/* Handy Café preorder v40, all selectors scoped to preorder. Normal / menu unchanged. */
.preorder-intro{margin:8px 0 20px}.preorder-intro h1{font-size:25px;color:#ef6758;letter-spacing:.03em;margin:0 0 7px}.preorder-intro p{font-size:13px;color:#c4b8b1;margin:0}
/* v43: a clear checkbox in every available product, with a whole-card tap target. */
.preorder-selectable{position:relative;cursor:pointer;touch-action:manipulation;border-radius:9px;isolation:isolate}
/* Ordinary goods keep the original typography but gain breathing room. */
.preorder-selectable:not(.item-combo-lunch-1):not(.item-combo-columns-2){padding:10px 13px 12px;margin-left:-13px;margin-right:-13px}
/* The checkbox is visible, but pointer input is handled by its entire card. */
.preorder-choice{display:flex;align-items:center;justify-content:flex-end;height:22px;margin:0 0 5px;pointer-events:none;position:relative;z-index:2}
.preorder-check{appearance:none;-webkit-appearance:none;display:block;flex:none;width:21px;height:21px;margin:0;border:2px solid #70b68d;border-radius:5px;background:#19211c;box-shadow:0 0 0 1px #0004;pointer-events:none;position:relative;opacity:1}
.preorder-check:checked{background:#35be6b;border-color:#35be6b}
.preorder-check:checked::after{content:'';position:absolute;width:5px;height:10px;top:1px;left:6px;border:solid #092215;border-width:0 3px 3px 0;transform:rotate(45deg)}
/* An understated green wash keeps existing combo colors and their layouts intact. */
.preorder-selectable.preorder-selected::before{content:'';position:absolute;inset:0;background:rgba(39,181,94,.16);border-radius:inherit;pointer-events:none;z-index:0}
.preorder-selectable.preorder-selected{outline:2px solid #49d87c;outline-offset:0;box-shadow:inset 0 0 0 1px #49d87c66}
.preorder-selectable > :not(.preorder-choice){position:relative;z-index:1}
.preorder-selectable:focus-visible{outline:3px solid #b0ffca;outline-offset:2px}
@media(max-width:520px){.preorder-selectable:not(.item-combo-lunch-1):not(.item-combo-columns-2){padding:9px 12px 11px;margin-left:-12px;margin-right:-12px}}

/* Floating bottom bar appears after first selection */
.preorder-bar{position:fixed;z-index:1000;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;gap:18px;padding:12px max(15px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom));background:#191410f5;border-top:1px solid #796151;box-shadow:0 -7px 28px #0009;box-sizing:border-box;color:#f7ecdf}
.preorder-bar[hidden],.preorder-overlay[hidden],.preorder-sent-top[hidden]{display:none!important}
.preorder-bar-info{display:flex;align-items:center;gap:20px;justify-content:space-between;max-width:540px;flex:1;min-width:0;font-size:13px;color:#d1c0b3}
.preorder-bar-amount{display:flex;flex-direction:column;gap:3px;align-items:flex-end;white-space:nowrap}.preorder-bar-amount small{font-size:11px;color:#bda89a}.preorder-bar-amount strong{font-size:23px;color:#f8c48c;font-variant-numeric:tabular-nums}
#preorder-bar-button{background:#e66d58;color:#18110c;border:0;border-radius:9px;padding:13px 22px;font-weight:900;font-size:16px;white-space:nowrap;cursor:pointer;min-height:47px}
body:has(.preorder-bar:not([hidden])) .page{padding-bottom:105px}
/* Modal overlay stays above all menu UI and can scroll on small phones */
body.preorder-modal-open{overflow:hidden}
.preorder-overlay{position:fixed;inset:0;z-index:3000;background:#080605e8;display:flex;justify-content:center;align-items:center;padding:16px;box-sizing:border-box;overflow:auto;overscroll-behavior:contain}
.preorder-panel{width:min(100%,640px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;border:1px solid #876555;border-radius:15px;background:#191410;box-shadow:0 18px 70px #000b;padding:20px;box-sizing:border-box;color:#f5e9db}
.preorder-modal-header{display:flex;justify-content:space-between;align-items:center;gap:16px;position:sticky;top:-20px;background:#191410;padding:5px 0 12px;z-index:1}
.preorder-panel h2{font-size:20px;color:#f5e2c9;margin:0}
#preorder-close{width:38px;height:38px;border:1px solid #765c4f;border-radius:9px;color:#f4ded0;background:#32261f;font-size:27px;line-height:1;cursor:pointer;flex-shrink:0}
.preorder-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;border-bottom:1px solid #3f3430;padding:11px 0}
.preorder-line-name{overflow-wrap:anywhere;font-weight:700;font-size:14px}.preorder-line-total{white-space:nowrap;color:#f6c291;font-variant-numeric:tabular-nums}
.preorder-qty{display:flex;align-items:center;gap:8px}.preorder-qty button{width:32px;height:34px;border-radius:7px;border:1px solid #716057;color:white;background:#302720;font-size:20px;cursor:pointer}
.preorder-qty .preorder-remove{border-color:#8c5757;color:#ffb4ae;margin-left:4px}.preorder-count{min-width:18px;text-align:center;font-weight:800}.preorder-empty{font-size:13px;color:#a89b91}
.preorder-total{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:15px 0;padding:12px 0;border-top:1px solid #675047;font-size:17px}.preorder-total strong{font-size:24px;color:#f8c48c}
#preorder-form{display:grid;gap:8px}#preorder-form label{font-size:13px;font-weight:800;color:#e3cec0;margin-top:8px}
#preorder-form input,#preorder-form textarea{width:100%;min-width:0;box-sizing:border-box;border-radius:8px;border:1px solid #615149;padding:12px;font:15px Arial,sans-serif;color:#f6f0eb;background:#29231f}
#preorder-form input:focus,#preorder-form textarea:focus{outline:2px solid #dc967b;outline-offset:1px}
#preorder-send,.preorder-new{background:#e66d58;color:#18110c;border:0;border-radius:8px;padding:15px 16px;font-weight:900;font-size:16px;cursor:pointer;margin-top:12px}
#preorder-send:disabled{opacity:.5;cursor:not-allowed}.preorder-cancel{display:block;margin:10px auto 0;color:#d4b9a7;background:transparent;border:0;padding:10px;font-size:14px;cursor:pointer}
#preorder-feedback{font-size:13px;color:#ffac96;margin-top:12px;min-height:0}#preorder-feedback:empty{display:none}
/* Compact confirmation at the top of the page */
.preorder-sent-top{background:#19291e;border:1px solid #5b9970;border-radius:11px;margin:12px 0 20px;padding:14px 16px;color:#dfefdf}
.preorder-sent-heading{font-size:18px;color:#a7e4b7;margin:0 0 5px}.preorder-sent-date,.preorder-sent-name,.preorder-sent-ref{font-size:13px;margin:5px 0;overflow-wrap:anywhere}
.preorder-sent-lines{border-top:1px solid #42634d;margin-top:10px;padding-top:6px}.preorder-sent-line{display:flex;gap:12px;justify-content:space-between;padding:5px 0;font-size:13px}.preorder-sent-line strong{white-space:nowrap}
.preorder-sent-total{display:flex;justify-content:space-between;border-top:1px solid #42634d;padding-top:9px;margin-top:6px;font-size:16px}.preorder-sent-comment{font-size:13px;overflow-wrap:anywhere;white-space:pre-wrap}.preorder-sent-info{font-size:12px;color:#a3c0a9}
.preorder-new{padding:11px 15px;margin-top:7px;font-size:13px}
@media(max-width:520px){.preorder-intro h1{font-size:21px}.preorder-bar{gap:9px;padding:10px 11px calc(10px + env(safe-area-inset-bottom))}.preorder-bar-info{gap:8px;font-size:11px}.preorder-bar-amount strong{font-size:20px}#preorder-bar-button{padding:12px 15px;font-size:14px}.preorder-overlay{padding:0;align-items:stretch}.preorder-panel{width:100%;max-height:100dvh;min-height:100dvh;border-radius:0;padding:16px 14px calc(24px + env(safe-area-inset-bottom))}.preorder-modal-header{top:-16px}.preorder-line{grid-template-columns:minmax(0,1fr) auto;gap:7px 8px}.preorder-line-name{grid-column:1/-1}.preorder-qty{grid-column:1}.preorder-line-total{grid-column:2}.preorder-sent-top{padding:12px}}

/* Prevent Safari from hiding the floating bar during browser toolbar changes. */
.preorder-bar{width:100%;transform:translateZ(0);-webkit-transform:translateZ(0);will-change:bottom}
.preorder-intro{margin-bottom:14px}

/* v46: keep the order action fixed to the top of the *visible* screen, including iOS Safari. */
.preorder-bar{top:0;bottom:auto!important;left:0;right:0;transform:none;-webkit-transform:none;will-change:auto;z-index:1000;box-shadow:0 7px 28px #0009;border-top:0;border-bottom:1px solid #796151;padding-top:calc(10px + env(safe-area-inset-top));padding-bottom:10px}
body:has(.preorder-bar:not([hidden])) .page{padding-bottom:0;padding-top:88px}
@media(max-width:520px){.preorder-bar{padding-top:calc(10px + env(safe-area-inset-top));padding-bottom:10px}body:has(.preorder-bar:not([hidden])) .page{padding-top:86px}}


/* v47: light-theme support for preorder mode */
body[data-theme="light"] .preorder-intro h1{color:#cf553e}
body[data-theme="light"] .preorder-intro p{color:#666}
body[data-theme="light"] .preorder-check{border-color:#5fa27b;background:#fff;box-shadow:none}
body[data-theme="light"] .preorder-check:checked{background:#2fb261;border-color:#2fb261}
body[data-theme="light"] .preorder-check:checked::after{border-color:#fff}
body[data-theme="light"] .preorder-selectable.preorder-selected::before{background:rgba(39,181,94,.09)}
body[data-theme="light"] .preorder-selectable.preorder-selected{outline-color:#38ad68;box-shadow:inset 0 0 0 1px #38ad6844}
body[data-theme="light"] .preorder-selectable:focus-visible{outline-color:#4d8df7}
body[data-theme="light"] .preorder-bar{background:#ffffffed;border-color:#dddddd;box-shadow:0 -7px 28px rgba(0,0,0,.12);color:#343434}
body[data-theme="light"] .preorder-bar-info{color:#555}
body[data-theme="light"] .preorder-bar-amount small{color:#757575}
body[data-theme="light"] .preorder-bar-amount strong{color:#c55336}
body[data-theme="light"] #preorder-bar-button,
body[data-theme="light"] #preorder-send,
body[data-theme="light"] .preorder-new{background:#e66d58;color:#fff}
body[data-theme="light"] .preorder-overlay{background:rgba(255,255,255,.9)}
body[data-theme="light"] .preorder-panel{border-color:#ddd;background:#fff;box-shadow:0 18px 70px rgba(0,0,0,.14);color:#1d1d1d}
body[data-theme="light"] .preorder-modal-header{background:#fff}
body[data-theme="light"] .preorder-panel h2{color:#1d1d1d}
body[data-theme="light"] #preorder-close{border-color:#ddd;color:#333;background:#f6f6f6}
body[data-theme="light"] .preorder-line{border-bottom-color:#e7e7e7}
body[data-theme="light"] .preorder-line-total{color:#c55336}
body[data-theme="light"] .preorder-qty button{border-color:#ddd;color:#222;background:#f7f7f7}
body[data-theme="light"] .preorder-qty .preorder-remove{border-color:#e3b0b0;color:#b54d4d}
body[data-theme="light"] .preorder-empty{color:#6d6d6d}
body[data-theme="light"] .preorder-total{border-top-color:#e7e7e7}
body[data-theme="light"] .preorder-total strong{color:#c55336}
body[data-theme="light"] #preorder-form label{color:#333}
body[data-theme="light"] #preorder-form input,
body[data-theme="light"] #preorder-form textarea{border-color:#ddd;color:#222;background:#fff}
body[data-theme="light"] #preorder-form input:focus,
body[data-theme="light"] #preorder-form textarea:focus{outline-color:#cf7f6f}
body[data-theme="light"] .preorder-cancel{color:#555}
body[data-theme="light"] #preorder-feedback{color:#c34f3f}
body[data-theme="light"] .preorder-sent-top{background:#f5fbf6;border-color:#b8d2bd;color:#23422c}
body[data-theme="light"] .preorder-sent-heading{color:#24663b}
body[data-theme="light"] .preorder-sent-lines,
body[data-theme="light"] .preorder-sent-total{border-color:#d6e6d9}
body[data-theme="light"] .preorder-sent-info{color:#4d7157}

/* PACK 7.05: optional unified online payment */
#preorder-pay,.preorder-confirm-pay{background:#23834b;color:#fff;border:1px solid #23834b;border-radius:8px;padding:14px 16px;font:inherit;font-weight:800;cursor:pointer;margin-top:8px;width:100%;box-sizing:border-box}
#preorder-pay:disabled,.preorder-confirm-pay:disabled{opacity:.5;cursor:not-allowed}.preorder-confirm-feedback{font-size:13px;margin:8px 0 0}

/* PACK 7.05.3: authoritative last-order payment status. */
.preorder-sent-status{font-size:14px;font-weight:750;letter-spacing:.02em;margin:12px 0 8px;padding:8px 12px;border-radius:6px;color:#fff;text-align:center}.preorder-sent-status.is-paid{background:#18743e}.preorder-sent-status.is-awaiting{background:#a95112}.preorder-sent-status.is-no_payment{background:#a92832}

#preorder-edit:not([hidden]){display:block;width:100%;margin:8px 0;padding:10px;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;font:inherit;cursor:pointer;}
