/*
FILE: public/css/shop.css
PURPOSE: Look of the customer shop only (public/index.html). The POS does not use this file.
*/
:root { color-scheme: light; --ink: #17201e; --green: #17645a; --line: #dde4e2; }
* { box-sizing: border-box; }
body { margin: 0; background: #f4f6f5; color: var(--ink); font: 15px/1.5 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif; overflow-wrap: anywhere; }
#shop { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green); }
h1, h2 { margin: 0 0 8px; line-height: 1.35; } h2 { font-size: 16px; margin-top: 16px; }
.s-wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.s-main { flex: 1 0 auto; padding-top: 16px; padding-bottom: 32px; }
.s-head { background: var(--green); padding: 12px 0; }
.s-head .s-wrap { display: flex; flex-direction: column; gap: 8px; }
.s-brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: #fff; text-decoration: none; font-size: 22px; font-weight: 700; }
.s-brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 8px; }
.s-search { width: 100%; min-height: 44px; border: 0; border-radius: 8px; padding: 0 14px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.s-banner { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
.s-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.s-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--green); background: #fff; color: var(--green); font: inherit; text-decoration: none; cursor: pointer; }
.s-chip[aria-current="true"], .s-chip[aria-pressed="true"] { background: var(--green); color: #fff; }
.s-title { font-size: 20px; }
.s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.s-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--ink); text-decoration: none; }
.s-card-pic { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #e6ecea; }
.s-card-text { display: flex; flex-direction: column; padding: 10px 12px; }
.s-name { font-weight: 600; }
.s-price { font-size: 17px; font-weight: 700; color: var(--green); }
.s-price-big { font-size: 24px; margin: 0; }
.s-in { font-size: 13px; color: #1c7a43; } .s-out { font-size: 13px; color: #a3271f; }
.s-more { display: flex; justify-content: center; margin-top: 16px; }
.s-btn { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--green); background: #fff; color: var(--green); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.s-primary { background: var(--green); color: #fff; }
.s-note { text-align: center; padding: 32px 16px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.s-back { display: inline-flex; align-items: center; min-height: 44px; }
.s-product { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.s-product > div { min-width: 0; }
.s-big-pic { display: block; width: 100%; max-height: 75vh; aspect-ratio: 4 / 5; object-fit: contain; background: #e6ecea; border-radius: 12px; }
.s-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.s-thumb { width: 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; }
.s-thumb[aria-pressed="true"] { border-color: var(--green); border-width: 3px; }
.s-thumb-pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.s-order { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.s-pre { white-space: pre-line; }
.s-foot { background: #0f2f2a; color: #e3f1ee; padding: 20px 0; }
.s-foot a { color: #b9e3da; }
.s-foot summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.s-links { display: flex; flex-wrap: wrap; gap: 16px; }
.s-admin { display: block; width: fit-content; margin: 16px auto 0; padding: 12px; font-size: 13px; opacity: .8; }
.s-preview { margin: 0; padding: 8px 16px; background: #fff3cd; color: #5c4300; text-align: center; font-size: 13px; }

.s-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.s-top .s-brand { min-width: 0; }
.s-head .s-cart { flex: 0 0 auto; display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; background: #fff; color: var(--green); font-weight: 700; text-decoration: none; }
.s-qty { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.s-qty button { min-width: 44px; min-height: 44px; border: 1px solid var(--green); border-radius: 8px; background: #fff; color: var(--green); font: inherit; font-size: 20px; cursor: pointer; }
.s-qty button:disabled { opacity: .4; cursor: default; }
.s-qty .s-remove { margin-left: auto; font-size: 14px; padding: 0 12px; border-color: #a3271f; color: #a3271f; }
.s-line { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.s-line img { width: 80px; height: 100px; flex: 0 0 80px; object-fit: cover; border-radius: 8px; }
.s-line-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.s-row { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0; }
.s-row strong { flex: 0 0 auto; }
.s-total { font-size: 18px; border-top: 1px solid var(--line); padding-top: 8px; }
.s-main > .s-btn { margin-top: 8px; }
.s-form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.s-field { display: flex; flex-direction: column; gap: 4px; }
.s-input { width: 100%; min-height: 48px; border: 1px solid #b7c4c1; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.s-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.s-alert { background: #fde8e6; border: 1px solid #a3271f; border-radius: 10px; padding: 4px 12px; margin-bottom: 10px; }
.s-alert p { margin: 6px 0; }
.s-orderno { font-size: 32px; font-weight: 700; color: var(--green); margin: 0; }

/* ---- Design update + order tracking ---- */
:root { --deep: #0f3f37; --tint: #e5f0ed; --marigold: #f2b134; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.s-head { position: sticky; top: 0; z-index: 5; background: var(--deep); padding: calc(10px + env(safe-area-inset-top, 0px)) 0 12px; border-bottom: 3px solid var(--marigold); }
.s-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.s-trackbtn { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 22px; background: var(--marigold); color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.s-head .s-cart { border-radius: 22px; gap: 6px; white-space: nowrap; }
.s-count { min-width: 22px; padding: 0 5px; border-radius: 11px; background: var(--green); color: #fff; text-align: center; font-size: 13px; }
.s-search { border-radius: 22px; padding: 0 18px; }
.s-main > .s-chips { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 6px; }
.s-main > .s-chips .s-chip { flex: 0 0 auto; border-color: var(--line); overflow-wrap: normal; }
.s-main > .s-chips .s-chip[aria-current="true"] { border-color: var(--green); }
.s-title { font-size: 22px; }
.s-card { border: 0; box-shadow: 0 0 0 1px var(--line); }
.s-card:hover { box-shadow: 0 0 0 2px var(--green); }
.s-card-text { gap: 2px; }
.s-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.s-btn { border-radius: 24px; }
.s-btn:disabled { opacity: .6; cursor: default; }
.s-foot { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 420px) { .s-brand { font-size: 18px; gap: 8px; } .s-brand img { width: 36px; height: 36px; } .s-trackbtn, .s-head .s-cart { padding: 0 10px; font-size: 14px; } }

.s-track { max-width: 560px; margin: 0 auto; }
.s-track .s-alert, .s-result { margin-top: 16px; }
.s-result { display: flex; flex-direction: column; gap: 12px; }
.s-status { background: var(--deep); color: #fff; border-radius: 16px; padding: 16px; }
.s-status p, .s-status h2 { margin: 0; } .s-status h2 { font-size: 24px; }
.s-status-stop { background: #8c2019; }
.s-steps { list-style: none; margin: 0; padding: 16px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.s-step { position: relative; display: flex; flex-direction: column; min-height: 56px; padding-left: 40px; }
.s-step:last-child { min-height: 0; }
.s-step::before { content: ""; box-sizing: border-box; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b7c4c1; background: #fff; }
.s-step:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.s-step.is-done::before { content: "✓"; display: grid; place-items: center; border-color: var(--green); background: var(--green); color: #fff; font-size: 14px; }
.s-step.is-done::after { background: var(--green) !important; }
.s-step.is-now::before { border: 7px solid var(--marigold); box-shadow: 0 0 0 4px #fcefd2; }
.s-step.is-now span { font-weight: 700; }
.s-step.is-todo { color: #66736f; }
.s-step.is-stop::before { content: "✕"; display: grid; place-items: center; border-color: #a3271f; background: #a3271f; color: #fff; font-size: 14px; }
.s-step small { color: #55635f; }
.s-courier p { margin: 0 0 8px; }
.s-item { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.s-item img { width: 48px; height: 60px; object-fit: cover; border-radius: 6px; background: var(--tint); }
.s-item span { flex: 1; min-width: 0; } .s-item strong { white-space: nowrap; }

/* ---- Design update 2 ---- */
html { scroll-padding-top: 140px; }
.s-banner { border-radius: 18px; aspect-ratio: 16 / 7; }
.s-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; margin: 0 0 20px; padding: 0; }
.s-perks li { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: var(--tint); font-size: 13px; overflow-wrap: normal; }
.s-perks strong { color: var(--deep); font-size: 14px; }
.s-card { position: relative; border-radius: 16px; transition: box-shadow .15s; }
.s-card-text { padding: 10px 12px 14px; }
.s-badge { position: absolute; top: 8px; left: 8px; padding: 2px 10px; border-radius: 12px; background: #8c2019; color: #fff; font-size: 12px; font-weight: 700; }
.s-card.is-out .s-card-pic { opacity: .55; }
.s-skeleton { aspect-ratio: 3 / 5; border-radius: 16px; background: #e6ecea; animation: s-pulse 1.2s ease-in-out infinite alternate; }
@keyframes s-pulse { to { opacity: .5; } }
.s-product .s-big-pic { border-radius: 18px; background: #fff; }
.s-product .s-title { font-size: 24px; }
.s-product .s-order { padding: 14px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.s-order p { margin: 0; }
.s-qty { justify-content: center; }
.s-line .s-qty { justify-content: flex-start; }
.s-qty button { border-radius: 50%; }
.s-qty .s-remove { border-radius: 22px; }
.s-line, .s-box { border-radius: 16px; }
.s-input { border-radius: 12px; }
.s-form .s-primary, .s-main > .s-primary { min-height: 52px; font-size: 17px; }
.s-done { max-width: 480px; margin: 0 auto; gap: 4px; background: #fff; border-radius: 20px; box-shadow: 0 0 0 1px var(--line); }
.s-done p { margin: 4px 0; }
.s-done .s-order { width: 100%; }
.s-tick { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 50%; background: var(--green); color: #fff; font-size: 32px; box-shadow: 0 0 0 8px var(--tint); }
.s-orderno { padding: 4px 20px; border: 2px dashed var(--marigold); border-radius: 12px; }
@media (max-width: 359px) { .s-top { flex-wrap: wrap; } .s-perks { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .s-skeleton { animation: none; } .s-card { transition: none; } }
@media (max-width: 359px) { .s-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---- Premium photo + contact rows ---- */
.s-big { position: relative; }
.s-product .s-big-pic { width: 100%; height: auto; max-height: none; aspect-ratio: auto 4 / 5; border-radius: 22px; box-shadow: 0 10px 28px rgba(15, 63, 55, .18); }
.s-counter { position: absolute; right: 12px; bottom: 12px; padding: 2px 12px; border-radius: 14px; background: rgba(15, 63, 55, .82); color: #fff; font-size: 13px; font-weight: 600; }
.s-thumbs { flex-wrap: nowrap; overflow-x: auto; gap: 10px; margin-top: 14px; padding: 3px; }
.s-thumb { flex: 0 0 68px; width: 68px; height: 85px; border: 0; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); opacity: .7; }
.s-thumb[aria-pressed="true"] { border: 0; box-shadow: 0 0 0 3px var(--marigold); opacity: 1; }
.s-back { gap: 4px; min-height: 40px; margin-bottom: 12px; padding: 0 16px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-weight: 600; text-decoration: none; }
.s-btn.s-wa { border-color: #12703a; background: #12703a; color: #fff; }
.s-contacts { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin: 14px 0; }
.s-foot .s-contact { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.s-contact > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.s-contact small { color: #b9d6cf; font-size: 13px; }
.s-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 50%; background: var(--marigold); color: var(--ink); }
.is-wa .s-icon { background: #25d366; } .is-fb .s-icon { background: #1877f2; color: #fff; }
.s-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.s-foot details { max-width: 480px; padding: 0 14px; border-radius: 16px; background: rgba(255, 255, 255, .08); }

/* ---- Home sections ---- */
.s-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 10px; margin-bottom: 14px; }
.s-rail .s-card { flex: 0 0 150px; scroll-snap-align: start; }

/* ---- Hero slider ---- */
.s-hero { margin-bottom: 14px; }
.s-hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px; }
.s-hero-track::-webkit-scrollbar { display: none; }
.s-slide { display: flex; flex: 0 0 100%; min-width: 0; height: clamp(220px, 58vw, 380px); scroll-snap-align: start; scroll-snap-stop: always; background: var(--deep); color: #fff; text-decoration: none; }
.s-slide:focus-visible { outline-offset: -4px; }
.s-slide-text { display: flex; flex: 1; min-width: 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; padding: 16px; }
.s-slide-text strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: clamp(18px, 5vw, 30px); line-height: 1.3; }
.s-slide-price { font-size: clamp(20px, 5.5vw, 28px); font-weight: 700; color: var(--marigold); }
.s-slide-btn { padding: 8px 16px; border-radius: 22px; background: var(--marigold); color: var(--ink); font-weight: 700; white-space: nowrap; }
.s-slide-pic { flex: 0 0 54%; width: 54%; height: 100%; object-fit: cover; object-position: top center; }
.s-dots { display: flex; justify-content: center; flex-wrap: wrap; }
.s-dots button { display: grid; place-items: center; width: 28px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.s-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: #b7c4c1; }
.s-dots button[aria-current="true"]::before { width: 22px; background: var(--green); }

/* ---- Offers ---- */
.s-offer { display: flex; overflow: hidden; margin-bottom: 16px; border-radius: 20px; background: var(--marigold); color: var(--ink); }
.s-offer > div { display: flex; flex: 1; min-width: 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: 16px; }
.s-offer h2 { margin: 0; font-size: 24px; } .s-offer p { margin: 0; }
.s-offer small { padding: 2px 10px; border-radius: 12px; background: #fff; font-weight: 600; }
.s-offer img { flex: 0 0 42%; width: 42%; min-height: 150px; max-height: 240px; align-self: stretch; object-fit: cover; }
.s-was { margin-left: 4px; color: #66736f; font-size: .8em; font-weight: 500; }
.s-badge-offer { background: var(--marigold); color: var(--ink); }
