/* Tulshi e-Marketplace - mobile-first, quick-commerce style UI. Colours come from the Gram Panchayat logo. */
:root {
  /* 60% warm neutrals, 30% leaf green, 10% accents (turmeric = warmth, clay = urgency/offers) */
  --brand: #2F7A4D;          /* primary action colour */
  --brand-btn: #2B7249;
  --brand-dark: #1F5A38;
  --brand-soft: #E9F2EB;
  --deep: #1D3A2A;           /* header strip, footer, panel sidebar */
  --deep-2: #162D20;
  --accent: #C98B2E;         /* turmeric */
  --accent-soft: #FBF1DD;
  --clay: #B04A30;           /* discount / low stock */
  --clay-soft: #F8E8E2;
  --green: #2F7A4D; --green-soft: #E9F2EB;
  --brown: #22302A;          /* headings: deep green-ink */
  --ink: #26322B; --muted: #6C766D;
  --bg: #F6F3EA; --card: #fff; --line: #E7E2D5;
  --danger: #B3261E; --info: #2F6C93; --warn: #A66F12;
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(29, 58, 42, .05), 0 6px 18px rgba(29, 58, 42, .06);
  --shadow-lg: 0 12px 34px rgba(29, 58, 42, .16);
  --font: "Noto Sans Devanagari", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bn-h: 62px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 15px; -webkit-tap-highlight-color: transparent; }
body.has-bn { padding-bottom: calc(var(--bn-h) + env(safe-area-inset-bottom)); }
body.has-bn.has-cartbar { padding-bottom: calc(var(--bn-h) + 76px + env(safe-area-inset-bottom)); }
body.has-sticky { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 .7rem; }
h1, h2, h3, h4 { color: var(--brown); line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid #1E6FA8; outline-offset: 2px; }
.ic { flex: none; vertical-align: middle; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 14px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .bad { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section { padding-top: 1rem; padding-bottom: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 1rem; }
.empty-state { text-align: center; color: var(--muted); padding: 2.5rem 1rem; display: grid; gap: .8rem; justify-items: center; }
.empty-state .ic { color: var(--brand); opacity: .6; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.3rem; min-height: 46px; border-radius: 12px; border: 1.5px solid transparent;
  font: 700 .95rem var(--font); cursor: pointer; text-decoration: none !important; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand-btn); color: #fff; } .btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--brand-btn); border-color: var(--brand-btn); } .btn-outline:hover { background: var(--brand-soft); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-danger { background: #fff; color: var(--danger); border-color: #F1C4C4; } .btn-danger:hover { background: #FDECEC; }
.btn-sm { padding: .35rem .9rem; min-height: 36px; font-size: .85rem; border-radius: 10px; }
.btn-lg { min-height: 52px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--info); cursor: pointer; font: inherit; padding: .5rem 0; }
.btn-icon { background: none; border: 0; color: var(--muted); cursor: pointer; width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; }
.btn-icon:hover { background: var(--brand-soft); color: var(--danger); }

/* ---------- alerts / badges ---------- */
.alert { padding: .7rem 1rem; border-radius: var(--radius-sm); margin: .7rem 0; font-size: .92rem; border: 1px solid; display: flex; gap: .5rem; align-items: flex-start; }
.alert-ok { background: var(--green-soft); border-color: #B7DDB9; color: #1B5E20; }
.alert-bad { background: #FDECEC; border-color: #F1C4C4; color: #8E1B1B; }
.alert-warn { background: #FFF4DB; border-color: #F2D48B; color: #7A5200; }
.badge { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--green-soft); color: #1B5E20; } .badge-bad { background: #FDECEC; color: #8E1B1B; }
.badge-info { background: #E3F0FA; color: #14507C; } .badge-warn { background: #FFF4DB; color: #7A5200; }
.pill { display: inline-flex; align-items: center; gap: .3rem; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .78rem; padding: .25rem .75rem; border-radius: 999px; }
.pill-green { background: var(--green-soft); color: #1B5E20; }

/* ---------- header ---------- */
.deliver-bar { background: var(--deep); color: #D6E6DA; font-size: .78rem; text-align: center; padding: .35rem 14px; display: flex; justify-content: center; align-items: center; gap: .4rem; }
.app-header { background: #fff; position: sticky; top: -64px; z-index: 50; box-shadow: 0 1px 0 var(--line); }
.hdr-grid { display: grid; grid-template-columns: 1fr auto; grid-template-rows: 64px auto; grid-template-areas: "brand actions" "search search"; align-items: center; column-gap: .5rem; }
.hdr-grid .brand { grid-area: brand; } .hdr-grid .hdr-actions { grid-area: actions; } .hdr-grid .hdr-search { grid-area: search; }
.brand { display: flex; align-items: center; min-width: 0; }
.brand img { height: 50px; width: auto; max-width: 62vw; }
.hdr-actions { display: flex; align-items: center; gap: .15rem; }
.hdr-btn { position: relative; display: inline-flex; align-items: center; gap: .3rem; height: 42px; min-width: 42px; padding: 0 .55rem; justify-content: center; border: 0; background: none; border-radius: 12px; color: var(--brown); cursor: pointer; font: 600 .85rem var(--font); }
.hdr-btn:hover { background: var(--brand-soft); }
.hdr-btn img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-btn); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.hdr-search { padding-bottom: .6rem; }
.hdr-search form { display: flex; align-items: center; gap: .6rem; background: #F1EEE4; border: 1.5px solid transparent; border-radius: 14px; padding: 0 .9rem; height: 46px; transition: border-color .15s, background .15s; }
.hdr-search form:focus-within { background: #fff; border-color: var(--brand); }
.hdr-search .ic { color: var(--muted); }
.hdr-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: .95rem; outline: none; color: var(--ink); height: 100%; }
.hdr-nav, .hdr-cart { display: none; }
.hdr-btn .lbl { display: none; }
.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); min-width: 200px; padding: .35rem; z-index: 70; }
.menu-panel[hidden] { display: none; }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .6rem .8rem; color: var(--ink); border-radius: 10px; border: 0; background: none; font: 500 .92rem var(--font); cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--brand-soft); }
.menu-panel .on { color: var(--brand-btn); font-weight: 700; }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }

/* ---------- bottom nav, cart bar, sheet ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--bn-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); box-shadow: 0 -4px 16px rgba(74, 44, 18, .06); }
.bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--muted); }
.bottom-nav a.on { color: var(--brand-btn); }
.bottom-nav a.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand-btn); }
.bn-badge, .cart-badge { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--brand-btn); color: #fff; font-size: .65rem; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; display: grid; place-items: center; font-weight: 700; }
.bn-badge[hidden], .cart-badge[hidden] { display: none; }
.cartbar { position: fixed; z-index: 55; left: 12px; right: 12px; bottom: calc(var(--bn-h) + 10px + env(safe-area-inset-bottom)); background: var(--brand-btn); color: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 1rem; min-height: 56px; }
.cartbar[hidden] { display: none; }
.cartbar small { display: block; opacity: .9; font-size: .75rem; } .cartbar strong { font-size: 1rem; }
.cartbar .go { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(43, 33, 24, .5); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 1.4rem 1.2rem calc(1.4rem + env(safe-area-inset-bottom)); text-align: center; animation: up .22s ease-out; }
.sheet .sheet-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-btn); display: grid; place-items: center; margin: 0 auto .8rem; }
.sheet p { color: var(--muted); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- home ---------- */
.banners { display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .9rem 14px .3rem; scrollbar-width: none; margin: 0 auto; max-width: 1240px; }
.banners::-webkit-scrollbar, .hscroll::-webkit-scrollbar, .cat-scroll::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.banner { flex: 0 0 88%; scroll-snap-align: center; border-radius: 20px; padding: 1.3rem 1.2rem; color: #fff; position: relative; overflow: hidden; min-height: 168px; display: flex; flex-direction: column; justify-content: center; gap: .3rem; }
.banner::after { content: ""; position: absolute; right: -40px; bottom: -50px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.banner::before { content: ""; position: absolute; right: 60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.banner > * { position: relative; z-index: 1; }
.banner h2 { color: #fff; font-size: 1.35rem; margin: 0; max-width: 18ch; } .banner p { margin: 0; opacity: .95; font-size: .9rem; max-width: 34ch; }
.banner .btn { align-self: flex-start; margin-top: .5rem; }
.banner-1 { background: linear-gradient(135deg, #1D4A31, #3F8A5B); }
.banner-2 { background: linear-gradient(135deg, #8A5A28, #C99650); }
.banner-3 { background: linear-gradient(135deg, #2E3B6B, #5B69A3); }
.banner .dots, .story-band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .16) 1.3px, transparent 1.5px); background-size: 16px 16px; pointer-events: none; -webkit-mask-image: linear-gradient(120deg, transparent 35%, #000); mask-image: linear-gradient(120deg, transparent 35%, #000); }
.banner .pill { align-self: flex-start; background: rgba(255, 255, 255, .22); color: #fff; }
.cat-scroll { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 78px; gap: .7rem .4rem; overflow-x: auto; padding: .4rem 14px .5rem; scrollbar-width: none; max-width: 1240px; margin: 0 auto; }
.cat-item { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; font-size: .72rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.cat-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: var(--brand-btn); background: var(--brand-soft); transition: transform .15s; }
.cat-item:active .cat-ic, .cat-item:hover .cat-ic { transform: scale(1.06); }
.cat-item:nth-child(6n+2) .cat-ic { background: #F8EED8; color: #9A6A12; }
.cat-item:nth-child(6n+3) .cat-ic { background: var(--clay-soft); color: var(--clay); }
.cat-item:nth-child(6n+4) .cat-ic { background: #E4EEF5; color: #2F6C93; }
.cat-item:nth-child(6n+5) .cat-ic { background: #EEF0DA; color: #6B7A1F; }
.cat-item:nth-child(6n) .cat-ic { background: #EEE9F5; color: #6B4C93; }
.trust-row { display: flex; gap: .6rem; overflow-x: auto; padding: .4rem 14px; scrollbar-width: none; max-width: 1240px; margin: 0 auto; }
.trust-item { flex: 0 0 auto; display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .6rem .9rem; min-width: 215px; }
.trust-item .ic { color: var(--green); } .trust-item b { display: block; font-size: .85rem; color: var(--brown); } .trust-item small { color: var(--muted); font-size: .75rem; }
.block { padding-top: .9rem; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; gap: 1rem; }
.block-head h2 { margin: 0; font-size: 1.2rem; }
.see-all { display: inline-flex; align-items: center; gap: .15rem; color: var(--brand-btn); font-weight: 700; font-size: .85rem; }
.hscroll { display: flex; gap: .7rem; overflow-x: auto; padding: .2rem 14px .6rem; scroll-snap-type: x proximity; scrollbar-width: none; max-width: 1240px; margin: 0 auto; }
.hscroll > .pcard { flex: 0 0 152px; scroll-snap-align: start; }
.hscroll-wrap { max-width: 1240px; margin: 0 auto; }
.maker-card { flex: 0 0 230px; display: flex; gap: .7rem; align-items: center; padding: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; scroll-snap-align: start; }
.maker-card img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--brand-soft); }
.maker-card strong { display: block; font-size: .9rem; color: var(--brown); line-height: 1.25; } .maker-card small { color: var(--muted); }
.story-band { position: relative; overflow: hidden; margin-top: 1.5rem; background: linear-gradient(135deg, var(--deep-2), #2D5C41); color: #DCEADF; padding: 2.2rem 0; } .story-band > * { position: relative; }
.story-band h2 { color: #fff; font-size: 1.3rem; } .story-band p { max-width: 640px; opacity: .92; }

/* ---------- product card ---------- */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.pcard-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--brand-soft); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-badge { position: absolute; top: 0; left: 8px; background: var(--clay); color: #fff; font-size: .66rem; font-weight: 800; line-height: 1.1; padding: .3rem .4rem .45rem; border-radius: 0 0 8px 8px; text-align: center; letter-spacing: .02em; }
.pcard-out { position: absolute; inset: 0; background: rgba(255, 255, 255, .6); display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: .85rem; }
.pcard-body { padding: .6rem .65rem .7rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.pcard-maker { display: flex; align-items: center; gap: .25rem; font-size: .7rem; color: var(--muted); margin-top: .1rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .pcard-maker .ic { color: var(--accent); }
.pcard-low { align-self: flex-start; font-size: .68rem; font-weight: 800; color: var(--clay); background: var(--clay-soft); border-radius: 6px; padding: .1rem .45rem; }
.pcard-time-unused { display: inline-flex; align-items: center; gap: .25rem; font-size: .66rem; font-weight: 700; color: var(--muted); background: #F3EEE7; border-radius: 6px; padding: .1rem .4rem; align-self: flex-start; }
.pcard-title { font-weight: 600; font-size: .85rem; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.2em; margin-top: .15rem; }
.pcard-unit { color: var(--muted); font-size: .76rem; }
.pcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: .4rem; margin-top: auto; padding-top: .5rem; }
.price { display: flex; flex-direction: column; line-height: 1.15; }
.price strong { font-size: .95rem; color: var(--ink); } .price s { color: var(--muted); font-size: .74rem; }
.add-wrap { position: relative; flex: none; }
.add-btn { min-width: 68px; height: 34px; padding: 0 .8rem; background: #fff; color: var(--brand-btn); border: 1.5px solid var(--brand-btn); border-radius: 9px; font: 800 .8rem var(--font); letter-spacing: .03em; text-transform: uppercase; cursor: pointer; }
.add-btn:hover { background: var(--brand-soft); } .add-btn:disabled { opacity: .5; }
.stepper { display: inline-flex; align-items: center; height: 34px; background: var(--brand-btn); color: #fff; border-radius: 9px; overflow: hidden; }
.stepper button { width: 30px; height: 100%; border: 0; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.stepper button:active { background: rgba(0, 0, 0, .15); }
.stepper .st-q { min-width: 22px; text-align: center; font-weight: 800; font-size: .85rem; }
.add-wrap[data-qty="0"] .stepper, .add-wrap:not([data-qty="0"]) .add-btn { display: none; }
.add-wrap.lg .add-btn { height: 48px; min-width: 150px; font-size: .95rem; border-radius: 12px; }
.add-wrap.lg .stepper { height: 48px; border-radius: 12px; } .add-wrap.lg .stepper button { width: 44px; } .add-wrap.lg .st-q { min-width: 30px; font-size: 1rem; }

/* ---------- shop ---------- */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .7rem 14px; scrollbar-width: none; max-width: 1240px; margin: 0 auto; }
.chip { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink); }
.chip.on { background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; }
.shop-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.shop-head h1 { margin: 0; font-size: 1.25rem; } .shop-head small { color: var(--muted); font-weight: 500; }
.sort-form select, .form select, .filter-bar select { padding: .55rem .8rem; border-radius: 10px; border: 1.5px solid var(--line); font: inherit; background: #fff; color: var(--ink); }
.pager { display: flex; gap: .4rem; justify-content: center; margin: 1.5rem 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.pager .on { background: var(--brand-btn); color: #fff; border-color: var(--brand-btn); }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: .8rem; display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; } .crumbs a:hover { color: var(--brand-btn); }

/* ---------- product page ---------- */
.pdp { display: grid; gap: 1rem; }
.pdp-main-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 18px; background: var(--brand-soft); border: 1px solid var(--line); }
.pdp-thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; scrollbar-width: none; }
.pdp-thumbs button { padding: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: none; cursor: pointer; flex: none; }
.pdp-thumbs button.on { border-color: var(--brand-btn); } .pdp-thumbs img { width: 62px; height: 62px; object-fit: cover; }
.pdp h1 { font-size: 1.35rem; }
.pdp-price { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: .3rem 0; }
.pdp-price strong { font-size: 1.6rem; color: var(--ink); } .pdp-price s { color: var(--muted); }
.stock { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .85rem; }
.stock.in { color: var(--green); } .stock.out { color: var(--danger); } .stock.low { color: var(--clay); }
.info-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
.info-list li { display: flex; gap: .7rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; font-size: .88rem; }
.info-list .ic { color: var(--green); margin-top: 1px; }
.seller-card { display: flex; gap: .8rem; align-items: center; padding: .8rem; margin: 1rem 0; }
.seller-card img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; background: var(--brand-soft); }
.seller-card small { color: var(--muted); display: block; } .seller-card p { margin: .2rem 0 0; color: var(--muted); font-size: .82rem; }
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(74, 44, 18, .08);
  padding: .7rem 14px calc(.7rem + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.sticky-bar .sb-price strong { font-size: 1.25rem; display: block; line-height: 1.1; } .sticky-bar .sb-price small { color: var(--muted); }
.sticky-bar .btn { flex: 1; max-width: 340px; }
.sticky-bar .sb-actions { display: flex; gap: .6rem; align-items: center; }
.sb-actions .view-cart { display: none; }
.add-wrap:not([data-qty="0"]) ~ .view-cart { display: inline-flex; }

/* ---------- cart / checkout / order ---------- */
.steps-bar { display: flex; align-items: center; gap: .4rem; margin-bottom: 1rem; font-size: .78rem; font-weight: 700; color: var(--muted); }
.steps-bar .s { display: inline-flex; align-items: center; gap: .35rem; } .steps-bar .n { width: 22px; height: 22px; border-radius: 50%; background: #E7DFD3; display: grid; place-items: center; font-size: .72rem; }
.steps-bar .s.on { color: var(--brand-btn); } .steps-bar .s.on .n, .steps-bar .s.done .n { background: var(--brand-btn); color: #fff; } .steps-bar .s.done { color: var(--green); } .steps-bar .s.done .n { background: var(--green); }
.steps-bar .line { flex: 1; height: 2px; background: #E7DFD3; max-width: 40px; }
.cart-layout { display: grid; gap: 1rem; align-items: start; }
.cart-items { padding: .2rem .9rem; }
.cart-item { display: grid; grid-template-columns: 68px 1fr auto; gap: .2rem .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 68px; height: 68px; object-fit: cover; border-radius: 12px; background: var(--brand-soft); }
.ci-info { min-width: 0; } .ci-info strong { display: block; font-size: .9rem; line-height: 1.3; color: var(--ink); } .ci-info small { color: var(--muted); }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; font-weight: 800; }
.cart-item.unavailable { opacity: .55; }
.bill { padding: 1rem; }
.bill h3 { display: flex; gap: .4rem; align-items: center; }
.bill-row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: .9rem; } .bill-row .lbl { color: var(--muted); display: inline-flex; align-items: center; gap: .3rem; }
.bill-row s { color: var(--muted); margin-right: .3rem; } .bill-row .free { color: var(--green); font-weight: 700; }
.bill-total { border-top: 1.5px dashed var(--line); margin-top: .4rem; padding-top: .6rem; font-weight: 800; font-size: 1.05rem; }
.mo-hide { display: none; } @media (min-width: 900px) { .mo-hide { display: inline-flex; } }
.bill-note { background: var(--green-soft); color: #1B5E20; border-radius: 10px; padding: .55rem .7rem; font-size: .8rem; margin-top: .7rem; display: flex; gap: .45rem; }
.form { padding: 1rem; }
.field { margin-bottom: .85rem; display: flex; flex-direction: column; gap: .3rem; }
.field label, label { font-weight: 700; font-size: .85rem; color: var(--brown); }
.form input:not([type=checkbox]):not([type=file]), .form textarea, .auth-card input, .filter-bar input, .cat-row input:not([type=checkbox]) {
  width: 100%; padding: .75rem .85rem; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.form input:focus, .form textarea:focus, .form select:focus, .auth-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form select { min-height: 48px; font-size: 16px; width: 100%; }
.form input[disabled] { background: #F4EEE6; }
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.err { color: var(--danger); font-size: .78rem; }
.field.check, .check { flex-direction: row; align-items: center; } .check label, label.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.row2, .row3 { display: grid; gap: 0 .8rem; }
.thanks { text-align: center; padding: 1.5rem 1rem; margin-bottom: 1rem; background: var(--green-soft); border-color: #B7DDB9; display: grid; justify-items: center; gap: .3rem; }
.thanks .ok-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; animation: pop .4s ease-out; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.tracker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: .5rem 0 1rem; }
.tracker .t { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; color: var(--muted); position: relative; text-align: center; }
.tracker .t .dot { width: 36px; height: 36px; border-radius: 50%; background: #EFE8DD; display: grid; place-items: center; z-index: 1; }
.tracker .t::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: #EFE8DD; }
.tracker .t:first-child::before { display: none; }
.tracker .t.done { color: var(--green); } .tracker .t.done .dot, .tracker .t.done::before { background: var(--green); color: #fff; }
.tracker .t.now .dot { background: var(--accent); color: #fff; box-shadow: 0 0 0 5px var(--accent-soft); } .tracker .t.now { color: #8A5E12; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--brand-soft); }
.timeline li { padding: .2rem 0 .7rem 1rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: .55rem; width: 13px; height: 13px; border-radius: 50%; background: var(--brand); }
.mini-lines { list-style: none; padding: 0; margin: 0 0 .6rem; font-size: .88rem; } .mini-lines li { display: flex; justify-content: space-between; gap: .8rem; padding: .2rem 0; }
.order-card { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .9rem; }
.order-card .oc-no { font-weight: 800; color: var(--brown); } .order-card small { color: var(--muted); }

/* ---------- auth ---------- */
.auth-wrap { display: grid; place-items: center; padding: 1.2rem 14px 2rem; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 1.6rem 1.3rem; text-align: center; }
.auth-card .auth-logo { width: 150px; margin: 0 auto .8rem; }
.auth-card .g_id_signin { display: flex; justify-content: center; margin: 1.2rem 0; }
.auth-card .form, .auth-card form { text-align: left; }
.steps { text-align: left; color: var(--muted); font-size: .88rem; margin: 1rem 0 0; padding-left: 1.2rem; }
.dev-box { margin-top: 1.2rem; text-align: left; border: 1.5px dashed var(--brand); border-radius: 12px; padding: .6rem .8rem; background: #FFF9F0; font-size: .85rem; }
.dev-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.phone-row { display: flex; gap: .5rem; margin-bottom: .8rem; } .phone-prefix { display: grid; place-items: center; padding: 0 .9rem; background: var(--brand-soft); border-radius: 12px; font-weight: 800; }
.otp-input { text-align: center; letter-spacing: .5em; font-size: 1.4rem !important; margin-bottom: .8rem; }

/* ---------- tables (orders / panels) ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; background: var(--brand-soft); color: var(--brown); padding: .6rem .8rem; white-space: nowrap; font-size: .8rem; text-transform: none; }
.table td { padding: .6rem .8rem; border-top: 1px solid var(--line); vertical-align: middle; }
.thumb-sm { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; background: var(--brand-soft); }
.inline { display: inline-flex; gap: .3rem; flex-wrap: wrap; align-items: center; } .actions { white-space: nowrap; }
.prose p { font-size: 1rem; } .about-logo { margin: 0 auto 1rem; width: 170px; }

/* ---------- footer ---------- */
.footer { background: var(--deep-2); color: #CFDDD3; margin-top: 2rem; }
.footer a { color: #BFE0C7; } .footer h3 { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; padding-top: 1.8rem; padding-bottom: 1.2rem; }
.footer-logo { background: #fff; border-radius: 16px; padding: 10px; width: 150px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; } .footer-grid li { padding: .2rem 0; display: flex; gap: .5rem; align-items: center; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: .9rem 0; font-size: .8rem; color: #8FA899; }
.toast { position: fixed; left: 50%; bottom: calc(var(--bn-h) + 92px); transform: translateX(-50%); background: var(--deep); color: #fff; padding: .7rem 1.2rem; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 100; max-width: 90vw; font-size: .9rem; display: flex; gap: .5rem; align-items: center; }
.toast[hidden] { display: none; } .toast.bad { background: var(--danger); }
body.no-bn .toast { bottom: 100px; }

/* ---------- panels (admin / seller) ---------- */
.panel-body { background: #F1EFE6; padding-bottom: 0 !important; }
.panel { display: grid; min-height: 100vh; }
.panel-side { background: var(--deep); color: #DCEADF; padding: .7rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; } .brand-text strong { font-size: 1rem; } .brand-text small { font-size: .72rem; opacity: .8; }
.panel-side .brand { gap: .6rem; color: #fff; }
.panel-side .brand img { height: 46px; width: auto; border-radius: 10px; background: #fff; }
.panel-side nav { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
.panel-side nav a { display: inline-flex; align-items: center; gap: .5rem; flex: none; color: #DCEADF; padding: .5rem .85rem; border-radius: 10px; font-size: .9rem; font-weight: 600; }
.panel-side nav a.on, .panel-side nav a:hover { background: var(--brand-btn); color: #fff; }
.panel-foot { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; font-size: .8rem; } .panel-foot a { color: #BFE0C7; }
.panel-side .lang-switch { display: flex; border: 1.5px solid rgba(255, 255, 255, .25); border-radius: 999px; overflow: hidden; }
.panel-side .lang-switch a { padding: .2rem .6rem; font-size: .75rem; color: #DCEADF; } .panel-side .lang-switch a.on { background: #fff; color: var(--brown); }
.panel-main { padding: 1rem; min-width: 0; }
.panel-title { font-size: 1.35rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-bottom: 1.2rem; }
.stat { padding: .9rem; display: flex; flex-direction: column; gap: .2rem; color: var(--ink); } .stat small { color: var(--muted); } .stat strong { font-size: 1.45rem; color: var(--brown); }
a.stat:hover { border-color: var(--brand); }
.two-col { display: grid; gap: 1rem; }
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; } .filter-bar input { max-width: 260px; }
.img-grid { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.img-del { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; font-weight: 400; } .img-del img { object-fit: cover; border-radius: 10px; }
.cat-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; }
.cat-row input:not([type=checkbox]) { width: auto; flex: 1 1 140px; } .cat-row select { flex: 0 0 120px; } .cat-row .w-sort { flex: 0 0 80px; }
.pay-form input { width: auto !important; min-height: 38px !important; } .pay-form .w-amt { width: 100px !important; } .pay-form .w-ref { width: 120px !important; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; margin: .8rem 0; } .totals dd { margin: 0; text-align: right; }
.totals .grand { border-top: 1px solid var(--line); padding-top: .5rem; font-weight: 800; color: var(--brown); }

/* ---------- breakpoints ---------- */
@media (min-width: 640px) {
  .hdr-btn .lbl { display: inline; }
  .pgrid { grid-template-columns: repeat(3, 1fr); } .banner { flex-basis: 60%; }
  .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .hscroll > .pcard { flex-basis: 175px; }
  .footer-grid { grid-template-columns: 170px 1.5fr 1fr 1.2fr; }
}
@media (min-width: 900px) {
  body { font-size: 15.5px; } body.has-bn, body.has-bn.has-cartbar { padding-bottom: 0; } body.has-sticky { padding-bottom: 0; }
  .app-header { top: 0; } .hdr-grid { grid-template-columns: max-content minmax(180px, 520px) minmax(max-content, 1fr); grid-template-rows: 80px; grid-template-areas: "brand search actions"; column-gap: 1.6rem; } .brand img { height: 62px; max-width: none; }
  .hdr-search { padding: 0; } .hdr-actions { justify-self: end; gap: .4rem; }
  .hdr-nav { display: none; gap: .2rem; } .hdr-nav a { padding: .5rem .8rem; border-radius: 10px; font-weight: 700; font-size: .9rem; color: var(--brown); } .hdr-nav a:hover, .hdr-nav a.on { background: var(--brand-soft); color: var(--brand-btn); }
  .hdr-cart { display: inline-flex; align-items: center; gap: .5rem; background: var(--brand-btn); color: #fff; border-radius: 12px; padding: 0 1rem; height: 46px; font-weight: 800; }
  .hdr-cart:hover { background: var(--brand-dark); } .hdr-cart .cart-badge { position: static; background: #fff; color: var(--brand-btn); }
  .hdr-mobile-search { display: none; }
  .bottom-nav, .cartbar { display: none !important; }
  .banners { overflow: visible; padding-top: 1.2rem; } .banner { flex: 1 1 0; min-height: 210px; padding: 2rem; } .banner h2 { font-size: 1.7rem; }
  .cat-scroll { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(10, 1fr); overflow: visible; } .cat-ic { width: 72px; height: 72px; }
  .trust-row { overflow: visible; } .trust-item { flex: 1; min-width: 0; }
  .hscroll { overflow: visible; display: grid; grid-template-columns: repeat(6, 1fr); } .hscroll > .pcard { flex-basis: auto; }
  .hscroll.makers { display: flex; overflow-x: auto; }
  .pgrid { grid-template-columns: repeat(5, 1fr); gap: 1rem; }
  .pcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); transition: .15s; }
  .pdp { grid-template-columns: 1.05fr 1fr; gap: 2rem; } .pdp-info { position: sticky; top: 100px; align-self: start; }
  .sticky-bar { position: static; box-shadow: none; border: 0; padding: 0; background: transparent; margin: 1rem 0; justify-content: flex-start; }
  .cart-layout { grid-template-columns: 1fr 380px; }
  .sticky-bar.mo { display: none; }
  .hscroll > .pcard:nth-child(n+7) { display: none; }
  .toast { bottom: 40px; }
  .panel { grid-template-columns: 236px 1fr; }
  .panel-side { position: sticky; top: 0; height: 100vh; padding: 1.2rem 1rem; } .panel-side nav { flex-direction: column; overflow: visible; }
  .panel-main { padding: 1.5rem 2rem; } .two-col { grid-template-columns: 1.4fr 1fr; }
}
@media (min-width: 1100px) { .hdr-nav { display: flex; } }
@media (min-width: 900px) and (max-width: 1100px) { .pgrid { grid-template-columns: repeat(4, 1fr); } .hscroll { grid-template-columns: repeat(4, 1fr); } .hscroll > .pcard:nth-child(n+5) { display: none; } }
@media (max-width: 899px) { .hdr-search-desktop { display: none; } }
@media (max-width: 720px) {
  .table.stack thead, .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-top: 1px solid var(--line); padding: .5rem .2rem; }
  .table td { border: 0; padding: .2rem .8rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table td[data-l]::before { content: attr(data-l); color: var(--muted); font-weight: 700; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- WhatsApp OTP login ---------- */
.otp-box { text-align: left; margin-top: 1rem; }
.otp-box label { display: block; margin-bottom: .35rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.otp-hint { display: flex; gap: .4rem; align-items: flex-start; margin: .7rem 0 0; }
.otp-sent { display: flex; gap: .45rem; align-items: center; color: var(--green); font-weight: 700; font-size: .9rem; margin-bottom: .8rem; }
.otp-links { display: flex; justify-content: space-between; margin-top: .3rem; }
.otp-links .btn-link:disabled { color: var(--muted); cursor: default; }
.otp-box .btn span { display: inline; }
[hidden] { display: none !important; }
