:root{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:#1f2937;background:#f8fafc;--rose:#9f1239;--border:#e2e8f0;--muted:#64748b}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 8% 1%,#ffe9ee,transparent 340px),#f8fafc;line-height:1.55}.wrap{max-width:1120px;margin:0 auto;padding:30px 18px 95px}.customer{max-width:990px}.top{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.top h1{font-size:clamp(27px,4vw,39px);line-height:1.18;margin:8px 0;color:#4c0519;letter-spacing:-.035em}.top p,.muted{color:var(--muted)}.top p{margin:0}.back{color:var(--rose);text-decoration:none;font-size:14px;font-weight:700}.tag,.pill{background:#fff1f2;color:#9f1239;padding:7px 11px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}.panel{background:white;border:1px solid var(--border);border-radius:22px;padding:24px;margin-bottom:20px;box-shadow:0 10px 35px #1e293b0b}.panel h2{margin:0 0 9px;font-size:23px;letter-spacing:-.025em}.panel h3{margin:18px 0 10px}.section-head p{color:var(--muted);margin:0 0 18px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:12px 19px;min-height:47px;border-radius:12px;border:1px solid var(--rose);background:var(--rose);color:white;font:inherit;font-weight:800;text-decoration:none;cursor:pointer}.btn:hover{filter:brightness(1.08)}.btn.outline{background:white;color:var(--rose)}.btn.small{font-size:13px;padding:8px 12px;min-height:37px}.notice{background:#eff6ff;border:1px solid #bfdbfe;border-radius:13px;padding:14px 16px;margin:12px 0;font-size:14px}.notice.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}.notice.success{background:#f0fdf4;border-color:#bbf7d0;color:#166534}.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:18px}.steps span{font-size:12px;color:#64748b;padding:10px 6px;border-radius:10px;text-align:center;background:#e2e8f0;font-weight:800}.steps .active{background:#ffe4e6;color:#9f1239}.chips{display:flex;gap:7px;overflow-x:auto;margin:16px 0;padding-bottom:7px}.chip{border:1px solid #e2e8f0;background:white;border-radius:999px;padding:8px 13px;white-space:nowrap;color:#334155;font-weight:700;cursor:pointer}.chip.selected{background:#9f1239;border-color:#9f1239;color:#fff}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:13px}.store-product{border:1px solid #e2e8f0;border-radius:17px;overflow:hidden;display:flex;flex-direction:column}.store-photo{aspect-ratio:5/4;background:#fff1f2;display:grid;place-items:center;font-size:52px;overflow:hidden}.store-photo img{height:100%;width:100%;object-fit:cover}.store-body{padding:13px;display:flex;flex-direction:column;align-items:start;gap:5px;flex:1}.store-body strong{line-height:1.3}.store-body small{color:#64748b;font-size:11px}.store-body p{font-size:12px;color:#64748b;margin:3px 0;flex:1}.store-body .btn{width:100%;margin-top:7px}.product-price{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.product-price b{color:#15803d;font-size:19px}.product-price del,del{color:#94a3b8;font-size:12px}.cart-row{display:grid;grid-template-columns:minmax(0,1fr) 85px auto 30px;align-items:center;gap:10px;border-bottom:1px solid var(--border);padding:12px 0}.cart-row small{display:block;color:#64748b}.qty-label{font-size:11px}.qty-label input{width:100%;padding:7px}.remove{border:0;background:#fff1f2;color:#9f1239;border-radius:8px;font-size:23px;cursor:pointer}.field label{display:block;font-weight:700;font-size:13px;margin-bottom:6px}.field input,.field select,.field textarea,input[type=search],.qty-label input{border:1px solid #cbd5e1;border-radius:11px;background:#fff;min-height:46px;font:inherit;font-size:16px;padding:10px 12px;width:100%;outline:none}.field input:focus,.field textarea:focus,.field select:focus,input[type=search]:focus{border-color:#e11d48;box-shadow:0 0 0 3px #ffe4e6}.field small{display:block;color:#64748b}.form-grid,.product-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.wide{grid-column:1/-1}.actions,.form-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.form-actions{justify-content:space-between;margin:18px 0 76px}.form-actions .btn{min-width:140px}.upload-zone{display:flex;flex-direction:column;align-items:center;gap:6px;border:2px dashed #fda4af;border-radius:15px;background:#fff1f2;padding:28px;cursor:pointer;text-align:center;color:#9f1239}.upload-zone span{font-size:13px}#images{margin:12px 0;max-width:100%}.photo-previews{display:grid;grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:10px;margin-top:12px}.photo-previews img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px}.invoice{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:15px;padding:18px;margin:18px 0}.split{display:flex;justify-content:space-between;gap:12px;padding:7px 0}.green{color:#15803d}.check{display:flex;align-items:flex-start;gap:8px;font-weight:650}.check input{width:19px;height:19px;flex-shrink:0}.copy{border:0;background:#dbeafe;color:#1d4ed8;border-radius:8px;cursor:pointer;margin-left:6px;padding:5px 9px}.sticky-total{position:fixed;bottom:0;left:0;right:0;background:white;border-top:1px solid #e2e8f0;padding:10px max(16px,calc((100vw - 950px)/2));display:flex;justify-content:space-between;align-items:center;box-shadow:0 -5px 20px #00000008;z-index:20}.sticky-total strong{color:#9f1239}.center{text-align:center}.success-icon{display:inline-grid;place-items:center;width:55px;height:55px;border-radius:50%;background:#dcfce7;color:#15803d;font-size:32px}.admin-product{display:flex;align-items:center;gap:13px;padding:15px 0;border-bottom:1px solid #e2e8f0}.admin-product:last-child{border:0}.thumb{width:88px;height:88px;border-radius:12px;background:#fff1f2;display:grid;place-items:center;font-size:35px;overflow:hidden;flex-shrink:0}.thumb img{width:100%;height:100%;object-fit:cover}.grow{flex:1;min-width:0}.grow small{display:block;color:#64748b}.price{font-weight:900;color:#15803d}.admin-product .actions{justify-content:flex-end}@media(max-width:610px){.wrap{padding:14px 11px 95px}.panel{padding:16px;border-radius:17px}.top{align-items:start;flex-wrap:wrap}.form-grid,.product-form{grid-template-columns:1fr;gap:11px}.wide{grid-column:auto}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.store-body{padding:10px}.store-photo{aspect-ratio:1}.store-body strong{font-size:13px}.steps span{font-size:10px}.cart-row{grid-template-columns:minmax(0,1fr) 74px auto 25px;gap:5px;font-size:12px}.cart-row .qty-label input{padding:6px}.admin-product{flex-wrap:wrap}.admin-product .actions{width:100%}.form-actions .btn{flex:1}.sticky-total{font-size:13px}}@media(max-width:340px){.product-grid{grid-template-columns:1fr}}

/* KZ payment QR — restored from original order_request.php */
.payment-options{margin:22px auto;text-align:left;padding:18px;border:1px solid #fbcfe8;border-radius:20px;background:#fffafa;max-width:650px}.payment-options h3{font-size:18px;color:#881337;margin:0 0 5px}.payment-options .muted{font-size:13px;margin:0 0 15px}.payment-tabs{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:14px 0}.pay-tab{font:inherit;font-weight:800;padding:13px;border-radius:12px;background:#fff;color:#881337;border:1px solid #fecdd3;cursor:pointer;min-height:48px}.pay-tab.active{background:#9f1239;color:#fff;border-color:#9f1239}.pay-choice{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff;border:1px solid #f1f5f9;border-radius:16px;padding:15px}.pay-choice[hidden]{display:none!important}.pay-account{display:flex;flex-direction:column;align-items:start;gap:7px}.pay-account b{font-size:17px}.pay-account span{font-size:18px;letter-spacing:.03em;font-weight:750}.pay-qr{text-align:center;max-width:210px;width:45%}.pay-qr img{display:block;margin:auto;width:min(100%,190px);height:auto;aspect-ratio:1;object-fit:contain;border-radius:10px;border:1px solid #e5e7eb;background:white}.qr-open{display:block;font-size:12px;color:#1d4ed8;font-weight:750;padding-top:9px}.pay-help{font-size:13px;margin:13px 0 0;color:#475569;line-height:1.7}.payment-options button:focus-visible{outline:3px solid #fb7185;outline-offset:2px}@media(max-width:440px){.payment-options{padding:12px}.pay-choice{flex-direction:column;align-items:stretch}.pay-qr{max-width:none;width:100%}.pay-qr img{width:200px;max-width:85%}.pay-account{align-items:center}}

/* V3 FIX: native [hidden] must override .btn/.pay-tab display declarations */
[hidden]{display:none!important}
/* Compact, high-density product cards for small phones and slow connections */
.product-grid{grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:10px}
.store-product{border-radius:13px;box-shadow:0 2px 9px rgba(15,23,42,.035)}
.store-photo{aspect-ratio: 4/3;font-size:34px}
.store-body{padding:10px;gap:4px}
.store-body strong{font-size:13px;line-height:1.28}
.store-body p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;line-height:1.3;margin:0}
.store-body small{font-size:10px}
.store-body .product-price b{font-size:16px}
.store-body .btn{padding:7px 8px;font-size:12px;min-height:35px}
.store-photo button{border:0;background:transparent;padding:0;display:block;width:100%;height:100%;cursor:zoom-in;position:relative}
.store-photo button img{display:block;width:100%;height:100%;object-fit:cover}
.view-label{position:absolute;bottom:5px;right:5px;background:rgba(15,23,42,.82);color:#fff;font-size:10px;border-radius:6px;padding:3px 6px}
.product-hint{font-size:12px;margin:0 0 11px}
/* Accessible fullscreen product image preview with tap-to-close */
.product-lightbox:not([hidden]){display:grid;position:fixed;inset:0;z-index:2000;place-items:center;padding:12px}
.lightbox-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.84)}
.lightbox-inner{position:relative;background:white;border-radius:18px;padding:17px;width:min(100%,560px);max-height:93dvh;overflow:auto;text-align:center;box-shadow:0 20px 65px rgba(0,0,0,.27)}
.lightbox-inner img{max-width:100%;width:auto;max-height:65dvh;object-fit:contain;border-radius:10px}
.lightbox-inner h3{margin:10px 32px 4px;font-size:17px;color:#4c0519}
.lightbox-inner p{font-size:13px;color:#64748b;margin:0 0 13px}
.lightbox-close{position:absolute;top:9px;right:9px;border:0;background:#fff1f2;border-radius:50%;font-size:20px;width:36px;height:36px;cursor:pointer}
body.preview-open{overflow:hidden}
@media(max-width:610px){.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.store-photo{aspect-ratio: 5/4}.store-body{padding:8px}.store-body strong{font-size:12px}.store-body p{font-size:10px}.store-body small{font-size:10px}}
@media(max-width:310px){.product-grid{grid-template-columns:1fr}}

/* KZ V5: always-visible checkout actions above the amounts. */
body .wrap.customer {padding-bottom:calc(162px + env(safe-area-inset-bottom, 0px));}
#stickyTotal.sticky-total {
  display:flex;flex-direction:column;align-items:stretch;gap:9px;
  padding:10px max(14px,calc((100vw - 950px)/2)) calc(10px + env(safe-area-inset-bottom,0px));
  background:rgba(255,255,255,.98);box-shadow:0 -8px 28px rgba(15,23,42,.12);
  border-top:1px solid #e2e8f0;z-index:50;
}
#stickyTotal .sticky-checkout-actions {display:flex;gap:8px;justify-content:stretch;flex-wrap:nowrap;margin:0;min-width:0;}
#stickyTotal .sticky-checkout-actions .btn {flex:1;min-width:0;min-height:44px;margin:0;white-space:normal;}
#stickyTotal .sticky-checkout-actions .btn[hidden] {display:none!important;}
#stickyTotal .sticky-checkout-summary {display:grid;grid-template-columns:1fr 1fr;gap:10px;border-top:1px solid #f1f5f9;padding-top:8px;}
#stickyTotal .sticky-checkout-summary span {display:flex;flex-direction:column;gap:1px;font-size:12px;color:#64748b;line-height:1.3;}
#stickyTotal .sticky-checkout-summary span:last-child{text-align:right;}
#stickyTotal .sticky-checkout-summary strong {display:block;color:#881337;font-size:17px;line-height:1.35;}
@media(max-width:420px){#stickyTotal .sticky-checkout-actions .btn{font-size:13px;padding:10px 8px;}#stickyTotal .sticky-checkout-summary strong{font-size:16px;}}

/* View My Order V6: compact sticky summary with expanded editable order drawer. */
body .wrap.customer{padding-bottom:calc(208px + env(safe-area-inset-bottom,0px));}
#stickyTotal .view-order-toggle{width:100%;border:1px solid #fecdd3;border-radius:11px;background:#fff1f2;color:#881337;min-height:42px;padding:8px 12px;font:inherit;font-size:14px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}
#stickyTotal .view-order-toggle span:last-child{margin-left:auto}
#stickyTotal .view-order-toggle:focus-visible{outline:3px solid #fb7185;outline-offset:2px}
#stickyTotal .order-drawer{border:1px solid #e2e8f0;border-radius:15px;background:white;box-shadow:0 -12px 40px #0f172a1a;max-height:min(46dvh,390px);overflow:auto;overscroll-behavior:contain;padding:13px}
#stickyTotal .order-drawer[hidden]{display:none!important}
#stickyTotal .order-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
#stickyTotal .order-drawer-head strong{font-size:15px}
#stickyTotal .order-drawer-head button{border:0;background:#f1f5f9;border-radius:9px;min-width:36px;min-height:36px;cursor:pointer}
#stickyTotal .order-drawer-line{display:grid;grid-template-columns:minmax(0,1fr) 66px auto 28px;gap:7px;align-items:center;padding:9px 0;border-bottom:1px solid #f1f5f9}
#stickyTotal .order-drawer-line:last-child{border-bottom:0}
#stickyTotal .order-drawer-line strong{display:block;font-size:12px;color:#1f2937;line-height:1.35;overflow-wrap:anywhere}
#stickyTotal .order-drawer-line small{display:block;color:#64748b;font-size:11px}
#stickyTotal .order-drawer-line .drawer-qty{width:66px;min-height:39px;border:1px solid #cbd5e1;border-radius:8px;text-align:center;font-size:16px}
#stickyTotal .order-drawer-line .drawer-line-price{font-weight:800;font-size:12px;color:#881337;text-align:right;white-space:nowrap}
#stickyTotal .drawer-remove{border:0;background:#fff1f2;color:#9f1239;font-size:20px;border-radius:8px;width:28px;height:34px;cursor:pointer}
#stickyTotal .order-drawer-hint{font-size:11px;color:#64748b;margin:9px 0 0}
@media(max-width:400px){#stickyTotal .order-drawer-line{grid-template-columns:minmax(0,1fr) 55px auto 24px;gap:4px}#stickyTotal .order-drawer-line .drawer-qty{width:55px}#stickyTotal .order-drawer-line .drawer-line-price{font-size:11px}#stickyTotal .view-order-toggle{font-size:13px}}
/* V7: simple choices share the same product image */
.choice-label{display:block;margin:9px 0;color:#334155;font-size:12px;font-weight:750}
.choice-select{display:block;width:100%;min-height:44px;margin-top:6px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#182238;font:inherit;font-size:14px}
.choice-select:focus{outline:3px solid rgba(190,18,60,.18);border-color:#be123c}
@media(max-width:420px){.choice-select{font-size:16px}}


/* KZ Compact Choices V2 — directly inside main stylesheet */
#productGrid .store-product .store-body > p { flex: 0 0 auto !important; margin: 2px 0 4px !important; }
#productGrid .store-product .store-body { gap: 3px !important; }
#productGrid .store-product .choice-label { display: block !important; width: 100% !important; margin: 3px 0 0 !important; font-size: 11px !important; line-height: 1.15 !important; font-weight: 700 !important; color: #334155 !important; }
#productGrid .store-product .choice-select { display: block !important; box-sizing: border-box !important; width: 100% !important; height: 34px !important; min-height: 34px !important; margin: 3px 0 1px !important; padding: 4px 19px 4px 7px !important; font-size: 12px !important; line-height: normal !important; font-weight: 600 !important; border-radius: 8px !important; background-color: #fff !important; color: #182238 !important; }
@media(max-width:610px) { #productGrid .store-product .choice-label { font-size: 10px !important; } #productGrid .store-product .choice-select { font-size: 12px !important; } }

/* CART VIEW FIX — drawer visible above the sticky checkout controls */
#stickyTotal .order-drawer.is-open {display:block!important;position:relative;z-index:2;max-height:min(48dvh,380px);overflow-y:auto;overscroll-behavior:contain;}
#stickyTotal .order-drawer:not(.is-open),#stickyTotal .order-drawer[hidden] {display:none!important;}
#stickyTotal .view-order-toggle {touch-action:manipulation;flex-shrink:0;}
#stickyTotal .drawer-remove, .cart-row .remove {min-width:28px;touch-action:manipulation;}
/* Remove confirmation: one simple, readable dialog on every mobile width */
.kz-confirm-overlay[hidden] {display:none!important;}
.kz-confirm-overlay {position:fixed;inset:0;z-index:5000;display:grid;place-items:center;background:rgba(15,23,42,.62);padding:18px;}
.kz-confirm-box {background:white;width:min(100%,410px);border-radius:19px;padding:22px 18px;box-shadow:0 22px 65px rgba(0,0,0,.22);text-align:center;color:#1f2937;}
.kz-confirm-icon {width:40px;height:40px;border-radius:50%;display:grid;place-items:center;margin:0 auto 9px;background:#fff1f2;color:#9f1239;font-size:25px;font-weight:900;}
.kz-confirm-box h2 {font-size:20px;line-height:1.2;margin:0 0 8px;color:#881337;}
.kz-confirm-box p {font-size:14px;margin:0 0 12px;color:#475569;line-height:1.5;}
.kz-confirm-box strong {display:block;font-size:13px;overflow-wrap:anywhere;margin:0 0 18px;}
.kz-confirm-actions {display:grid;grid-template-columns:1fr 1fr;gap:9px;}
.kz-confirm-actions button {min-height:46px;border-radius:11px;padding:10px 6px;font:inherit;font-size:13px;font-weight:800;cursor:pointer;}
.kz-cancel-remove {background:#f1f5f9;color:#1e293b;border:1px solid #cbd5e1;}
.kz-yes-remove {background:#be123c;color:white;border:1px solid #be123c;}
