/* ==========================================================================
   MediNova — Design System
   --------------------------------------------------------------------------
   Single stylesheet, no framework. Organised as:
   1. Tokens        2. Reset/base      3. Layout
   4. Typography    5. Buttons/forms   6. Header/nav
   7. Components    8. Page blocks     9. Utilities   10. Motion/print
   ========================================================================== */

/* ============================ 1. TOKENS ================================== */
:root{
  /* Brand — apothecary green, the chemist-cross colour, not SaaS blue */
  --brand:        #0E6B54;
  --brand-600:    #0B5744;
  --brand-700:    #084334;
  --brand-300:    #4FA58C;
  --brand-50:     #E9F4F0;
  --brand-25:     #F3F9F7;

  /* Saffron — used only for money saved, offers and urgency */
  --accent:       #E08A1E;
  --accent-50:    #FDF3E3;

  /* Semantic */
  --rx:           #B23C36;      /* prescription / restricted */
  --rx-50:        #FBEDEC;
  --ok:           #1C8A5B;
  --ok-50:        #E7F5EE;
  --warn:         #9A6B08;
  --warn-50:      #FCF4E2;

  /* Neutrals — a green-leaning grey scale so nothing looks "off brand" */
  --ink:          #14241F;
  --ink-2:        #3E524C;
  --ink-3:        #6B807A;
  --line:         #DEE7E3;
  --line-2:       #EDF2F0;
  --surface:      #FFFFFF;
  --page:         #F5F8F7;

  /* Type */
  --font-display: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-text:    "Hind Siliguri", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-num:     "Archivo", system-ui, sans-serif;

  /* Space — 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 56px; --s-10: 72px;

  /* Radius — three tiers only, mapped to hierarchy */
  --r-sm: 8px;     /* chips, inputs, small controls */
  --r-md: 14px;    /* cards, panels */
  --r-lg: 22px;    /* hero surfaces, sheets */
  --r-pill: 999px;

  /* Elevation — restrained, green-tinted so shadows read as part of the palette */
  --sh-1: 0 1px 2px rgba(20,36,31,.06);
  --sh-2: 0 2px 10px rgba(20,36,31,.07);
  --sh-3: 0 12px 32px -8px rgba(20,36,31,.16);

  --container: 1220px;
  --header-h: 68px;
  --tabbar-h: 60px;
}

/* ============================ 2. RESET / BASE ============================= */
*,*::before,*::after{ box-sizing:border-box }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--page);
  color:var(--ink);
  font-family:var(--font-text);
  font-size:15.5px;
  line-height:1.62;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
img,svg,video{ max-width:100%; height:auto; display:block }
button,input,select,textarea{ font:inherit; color:inherit }
button{ cursor:pointer; background:none; border:0; padding:0 }
a{ color:inherit; text-decoration:none }
ul,ol{ margin:0; padding:0; list-style:none }
h1,h2,h3,h4,h5{ margin:0; font-family:var(--font-display); font-weight:700; line-height:1.18; letter-spacing:-.017em; color:var(--ink) }
p{ margin:0 }
table{ border-collapse:collapse; width:100% }
hr{ border:0; border-top:1px solid var(--line); margin:var(--s-6) 0 }

:focus-visible{ outline:3px solid var(--brand-300); outline-offset:2px; border-radius:4px }

::selection{ background:var(--brand-50); color:var(--brand-700) }

.skip-link{
  position:absolute; left:var(--s-4); top:-60px; z-index:200;
  background:var(--brand); color:#fff; padding:10px 18px; border-radius:var(--r-sm);
  transition:top .18s ease;
}
.skip-link:focus{ top:var(--s-4) }

/* ============================ 3. LAYOUT ================================== */
.container{ width:100%; max-width:var(--container); margin-inline:auto; padding-inline:var(--s-4) }
@media (min-width:768px){ .container{ padding-inline:var(--s-6) } }

.block{ padding-block:var(--s-8) }
.block-sm{ padding-block:var(--s-6) }
.block-lg{ padding-block:var(--s-9) }
@media (min-width:900px){
  .block{ padding-block:var(--s-9) }
  .block-sm{ padding-block:var(--s-7) }
  .block-lg{ padding-block:var(--s-10) }
}
.block-white{ background:var(--surface) }
.block-tint{ background:var(--brand-25) }
.edge-top{ border-top:1px solid var(--line) }
.edge-bottom{ border-bottom:1px solid var(--line) }

main{ min-height:50vh; padding-bottom:var(--s-8) }
@media (max-width:899px){ main{ padding-bottom:var(--s-6) } }

/* Below-the-fold sections skip layout work until they are near the viewport */
.defer-paint{ content-visibility:auto; contain-intrinsic-size:auto 480px }

.row{ display:flex; gap:var(--s-3); align-items:center }
.row-between{ display:flex; gap:var(--s-3); align-items:center; justify-content:space-between }
.row-wrap{ flex-wrap:wrap }
.stack{ display:flex; flex-direction:column; gap:var(--s-3) }
.stack-4{ display:flex; flex-direction:column; gap:var(--s-4) }
.stack-6{ display:flex; flex-direction:column; gap:var(--s-6) }

.split{ display:grid; gap:var(--s-6); align-items:start }
@media (min-width:960px){ .split{ grid-template-columns:minmax(0,1fr) 348px; gap:var(--s-7) } }

/* ============================ 4. TYPOGRAPHY ============================== */
.t-hero{ font-family:var(--font-display); font-size:clamp(30px,6.4vw,54px); line-height:1.08; letter-spacing:-.028em; font-weight:700 }
.t-1{ font-size:clamp(24px,4.2vw,36px); letter-spacing:-.022em }
.t-2{ font-size:clamp(20px,3vw,27px); letter-spacing:-.018em }
.t-3{ font-size:clamp(17px,2.2vw,20px) }
.t-4{ font-size:16px; letter-spacing:-.008em }

.lede{ font-size:clamp(15.5px,1.7vw,18px); color:var(--ink-2); max-width:60ch; line-height:1.65 }
.prose{ max-width:72ch; color:var(--ink-2) }
.prose h2{ font-size:22px; margin-top:var(--s-7); margin-bottom:var(--s-3); color:var(--ink) }
.prose h3{ font-size:17px; margin-top:var(--s-5); margin-bottom:var(--s-2); color:var(--ink) }
.prose p{ margin-bottom:var(--s-3) }
.prose ul{ list-style:none; margin-bottom:var(--s-4) }
.prose ul li{ position:relative; padding-left:22px; margin-bottom:var(--s-2) }
.prose ul li::before{
  content:""; position:absolute; left:2px; top:11px; width:7px; height:7px;
  border-radius:2px; background:var(--brand-300);
}
.prose a{ color:var(--brand); text-decoration:underline; text-underline-offset:3px }

.muted{ color:var(--ink-3) }
.dim{ color:var(--ink-2) }
.num{ font-family:var(--font-num); font-variant-numeric:tabular-nums; font-weight:600 }
.strike{ text-decoration:line-through; color:var(--ink-3); font-weight:400 }

.section-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:var(--s-4); margin-bottom:var(--s-5);
}
.section-head p{ color:var(--ink-3); font-size:14.5px; margin-top:2px }
.section-head .link-more{ flex:none }

.link-more{
  color:var(--brand); font-weight:600; font-size:14.5px;
  display:inline-flex; align-items:center; gap:6px; padding:6px 2px;
}
.link-more:hover{ color:var(--brand-700) }
.link-more svg{ width:15px; height:15px }

/* Perforation rule — echoes the tear line on a blister strip. Used sparingly. */
.perf{
  height:1px; border:0; margin:0;
  background-image:radial-gradient(circle, var(--line) 1.4px, transparent 1.6px);
  background-size:10px 10px; background-repeat:repeat-x; background-position:center;
}

/* ============================ 5. BUTTONS / FORMS ========================= */
.btn{
  --btn-bg:var(--brand); --btn-fg:#fff; --btn-bd:var(--brand);
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--btn-bg); color:var(--btn-fg); border:1px solid var(--btn-bd);
  font-family:var(--font-display); font-weight:600; font-size:15px; letter-spacing:-.006em;
  padding:0 var(--s-5); height:46px; border-radius:var(--r-sm);
  transition:background .15s ease, border-color .15s ease, color .15s ease, transform .08s ease;
  white-space:nowrap; text-align:center;
}
.btn:hover{ --btn-bg:var(--brand-600); --btn-bd:var(--brand-600) }
.btn:active{ transform:translateY(1px) }
.btn[disabled],.btn[aria-disabled="true"]{
  --btn-bg:var(--line-2); --btn-fg:var(--ink-3); --btn-bd:var(--line);
  cursor:not-allowed; transform:none;
}
.btn svg{ width:18px; height:18px; flex:none }

.btn-outline{ --btn-bg:transparent; --btn-fg:var(--brand); --btn-bd:var(--brand) }
.btn-outline:hover{ --btn-bg:var(--brand-50); --btn-fg:var(--brand-700); --btn-bd:var(--brand) }

.btn-quiet{ --btn-bg:var(--surface); --btn-fg:var(--ink); --btn-bd:var(--line) }
.btn-quiet:hover{ --btn-bg:var(--brand-25); --btn-fg:var(--brand-700); --btn-bd:var(--brand-300) }

.btn-ghost{ --btn-bg:transparent; --btn-fg:var(--ink-2); --btn-bd:transparent }
.btn-ghost:hover{ --btn-bg:var(--line-2); --btn-fg:var(--ink); --btn-bd:transparent }

.btn-danger{ --btn-bg:transparent; --btn-fg:var(--rx); --btn-bd:#E8C7C4 }
.btn-danger:hover{ --btn-bg:var(--rx-50); --btn-bd:var(--rx) }

.btn-sm{ height:38px; font-size:14px; padding:0 var(--s-4); gap:6px }
.btn-sm svg{ width:16px; height:16px }
.btn-lg{ height:54px; font-size:16.5px; padding:0 var(--s-7) }
.btn-block{ width:100% }

.icon-btn{
  width:42px; height:42px; border-radius:var(--r-sm);
  display:inline-flex; align-items:center; justify-content:center;
  color:var(--ink); position:relative; transition:background .15s ease, color .15s ease;
}
.icon-btn:hover{ background:var(--brand-50); color:var(--brand-700) }
.icon-btn svg{ width:21px; height:21px }

.count-dot{
  position:absolute; top:3px; right:2px; min-width:18px; height:18px; padding:0 5px;
  background:var(--rx); color:#fff; border-radius:var(--r-pill);
  font-family:var(--font-num); font-size:11px; font-weight:700; line-height:18px;
  text-align:center; border:2px solid var(--surface); box-sizing:content-box;
}

.field{ display:block; margin-bottom:var(--s-4) }
.field > label,.label{
  display:block; font-size:13.5px; font-weight:600; color:var(--ink-2); margin-bottom:6px;
}
.input,.select,.textarea{
  width:100%; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-sm); padding:0 var(--s-4); height:48px; font-size:15px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.textarea{ height:auto; padding:var(--s-3) var(--s-4); min-height:118px; line-height:1.6; resize:vertical }
.select{
  appearance:none; padding-right:40px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B807A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center; background-size:18px;
}
.input:focus,.select:focus,.textarea:focus{
  outline:none; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-50);
}
.input::placeholder,.textarea::placeholder{ color:var(--ink-3) }
.input[aria-invalid="true"],.select[aria-invalid="true"]{ border-color:var(--rx); box-shadow:0 0 0 3px var(--rx-50) }

.field-error{ display:none; color:var(--rx); font-size:13px; margin-top:5px; font-weight:500 }
.field-error.show{ display:block }
.field-hint{ color:var(--ink-3); font-size:13px; margin-top:5px }

.field-grid{ display:grid; gap:0 var(--s-4) }
@media (min-width:600px){ .field-grid-2{ grid-template-columns:1fr 1fr } }

.check{
  display:flex; gap:10px; align-items:flex-start; cursor:pointer;
  font-size:14.5px; color:var(--ink-2); padding:5px 0; line-height:1.5;
}
.check input{ margin:3px 0 0; width:17px; height:17px; accent-color:var(--brand); flex:none; cursor:pointer }
.check:hover{ color:var(--ink) }

/* Selectable option row — delivery area, payment method, saved address */
.option{
  display:flex; gap:var(--s-3); align-items:flex-start; cursor:pointer;
  border:1px solid var(--line); border-radius:var(--r-sm); padding:var(--s-3) var(--s-4);
  background:var(--surface); transition:border-color .15s ease, background .15s ease;
}
.option:hover{ border-color:var(--brand-300) }
.option input{ margin:4px 0 0; accent-color:var(--brand); width:17px; height:17px; flex:none; cursor:pointer }
.option-body{ flex:1; min-width:0 }
.option-body strong{ display:block; font-size:14.5px; font-weight:600 }
.option-body span{ display:block; font-size:13.5px; color:var(--ink-3); line-height:1.5 }
.option:has(input:checked){ border-color:var(--brand); background:var(--brand-25) }

.pwd-field{ position:relative }
.pwd-field .input{ padding-right:46px }
.pwd-toggle{
  position:absolute; right:4px; top:50%; transform:translateY(-50%);
  width:40px; height:40px; display:grid; place-items:center; color:var(--ink-3); border-radius:var(--r-sm);
}
.pwd-toggle:hover{ color:var(--brand); background:var(--brand-50) }
.pwd-toggle svg{ width:19px; height:19px }

/* ============================ 6. HEADER / NAV ============================ */
.announce{
  background:var(--brand-700); color:#DCEDE7; font-size:13px;
  text-align:center; padding:7px var(--s-4); line-height:1.45;
}
.announce strong{ color:#fff; font-weight:600 }

.site-header{
  position:sticky; top:0; z-index:60; background:var(--surface);
  border-bottom:1px solid var(--line);
}
.header-bar{
  display:flex; align-items:center; gap:var(--s-3); height:var(--header-h);
}

.brand{ display:inline-flex; align-items:center; gap:10px; flex:none }
.brand-mark{
  width:36px; height:36px; border-radius:10px; flex:none;
  background:var(--brand); display:grid; place-items:center;
}
.brand-mark svg{ width:22px; height:22px; color:#fff }
.brand-word{
  font-family:var(--font-display); font-weight:700; font-size:20px;
  letter-spacing:-.03em; color:var(--brand-700); line-height:1;
}
.brand-word em{ font-style:normal; color:var(--accent) }
@media (max-width:400px){ .brand-word{ font-size:18px } }

.header-search{ flex:1; min-width:0; display:none }
@media (min-width:900px){ .header-search{ display:block } }
.search-host{ position:relative }
.search-form{ position:relative; display:flex; width:100% }
.search-form .input{ padding-left:44px; height:44px; background:var(--page); border-color:var(--line) }
.search-form .input:focus{ background:var(--surface) }
.search-icon{
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  color:var(--ink-3); pointer-events:none; width:19px; height:19px;
}
.search-clear{
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  width:30px; height:30px; display:none; place-items:center; color:var(--ink-3); border-radius:var(--r-pill);
}
.search-clear.show{ display:grid }
.search-clear:hover{ background:var(--line-2); color:var(--ink) }

/* Live suggestion panel */
.suggest{
  position:absolute; left:0; right:0; top:calc(100% + 8px); z-index:70;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
  box-shadow:var(--sh-3); overflow:hidden; display:none; max-height:min(72vh,470px); overflow-y:auto;
}
.suggest.open{ display:block }
.suggest-head{
  font-size:12px; font-weight:600; color:var(--ink-3); padding:10px var(--s-4) 4px;
}
.suggest-item{
  display:flex; gap:var(--s-3); align-items:center; padding:9px var(--s-4); width:100%; text-align:left;
  border-bottom:1px solid var(--line-2); transition:background .12s ease;
}
.suggest-item:last-child{ border-bottom:0 }
.suggest-item:hover,.suggest-item.active{ background:var(--brand-25) }
.suggest-item img{ width:42px; height:42px; border-radius:8px; background:var(--brand-25); object-fit:contain; flex:none }
.suggest-item .s-body{ flex:1; min-width:0 }
.suggest-item .s-name{ font-size:14.5px; font-weight:600; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.suggest-item .s-meta{ font-size:12.5px; color:var(--ink-3); display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.suggest-item .s-price{ font-family:var(--font-num); font-weight:700; font-size:14px; color:var(--brand-700); flex:none }
.suggest-item mark{ background:var(--accent-50); color:inherit; border-radius:3px; padding:0 1px }
.suggest-all{
  display:block; text-align:center; padding:12px; font-size:14px; font-weight:600;
  color:var(--brand); background:var(--brand-25); border-top:1px solid var(--line);
}
.suggest-empty{ padding:var(--s-6) var(--s-4); text-align:center; color:var(--ink-3); font-size:14px }

.header-actions{ display:flex; align-items:center; gap:2px; flex:none; margin-left:auto }
.header-link{
  display:none; align-items:center; gap:8px; padding:8px 12px; border-radius:var(--r-sm);
  font-size:14px; font-weight:600; color:var(--ink-2);
}
@media (min-width:1080px){ .header-link{ display:inline-flex } }
.header-link:hover{ background:var(--brand-50); color:var(--brand-700) }
.header-link svg{ width:19px; height:19px; color:var(--ink-3) }
.header-link:hover svg{ color:var(--brand) }

.nav-bar{ border-top:1px solid var(--line-2); display:none }
@media (min-width:900px){ .nav-bar{ display:block } }
.nav-list{ display:flex; align-items:center; gap:var(--s-1); height:46px; overflow-x:auto; scrollbar-width:none }
.nav-list::-webkit-scrollbar{ display:none }
.nav-list a{
  display:inline-flex; align-items:center; height:34px; padding:0 12px; border-radius:var(--r-sm);
  font-size:14.5px; font-weight:500; color:var(--ink-2); white-space:nowrap;
}
.nav-list a:hover{ background:var(--brand-50); color:var(--brand-700) }
.nav-list a[aria-current="page"]{ color:var(--brand-700); font-weight:600; background:var(--brand-50) }
.nav-list .nav-hot{ color:var(--accent); font-weight:600 }
.nav-list .nav-hot:hover{ background:var(--accent-50); color:#B96E10 }

/* Mobile search row, sits under the header bar */
.mobile-search{ padding-bottom:var(--s-3); position:relative }
@media (min-width:900px){ .mobile-search{ display:none } }

/* Slide-out menu */
.drawer{ position:fixed; inset:0; z-index:120; visibility:hidden }
.drawer.open{ visibility:visible }
.drawer-veil{
  position:absolute; inset:0; background:rgba(20,36,31,.5); opacity:0;
  transition:opacity .24s ease; backdrop-filter:blur(2px);
}
.drawer.open .drawer-veil{ opacity:1 }
.drawer-panel{
  position:absolute; inset-block:0; left:0; width:min(320px,86vw);
  background:var(--surface); box-shadow:var(--sh-3);
  transform:translateX(-100%); transition:transform .26s cubic-bezier(.32,.72,0,1);
  display:flex; flex-direction:column; overflow-y:auto;
}
.drawer.open .drawer-panel{ transform:none }
.drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:var(--s-4); border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--surface);
}
.drawer-section{ padding:var(--s-4) 0; border-bottom:1px solid var(--line-2) }
.drawer-section:last-child{ border-bottom:0 }
.drawer-title{ font-size:12px; font-weight:700; color:var(--ink-3); padding:0 var(--s-4) 8px }
.drawer-link{
  display:flex; align-items:center; gap:var(--s-3); padding:11px var(--s-4);
  font-size:15px; font-weight:500; color:var(--ink);
}
.drawer-link:hover{ background:var(--brand-25); color:var(--brand-700) }
.drawer-link svg{ width:19px; height:19px; color:var(--ink-3); flex:none }
.drawer-link:hover svg{ color:var(--brand) }
.drawer-link .tail{ margin-left:auto; font-size:12px; font-weight:700; color:var(--brand); background:var(--brand-50); padding:1px 8px; border-radius:var(--r-pill) }
.drawer-foot{ padding:var(--s-4); border-top:1px solid var(--line); margin-top:auto }

/* Bottom tab bar (mobile) */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:80; height:var(--tabbar-h);
  background:var(--surface); border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom);
  display:grid; grid-template-columns:repeat(5,1fr);
}
@media (min-width:900px){ .tabbar{ display:none } }
.tabbar a{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  font-size:10.5px; font-weight:600; color:var(--ink-3); position:relative; height:var(--tabbar-h);
}
.tabbar a svg{ width:22px; height:22px }
.tabbar a[aria-current="page"]{ color:var(--brand) }
.tabbar a[aria-current="page"]::before{
  content:""; position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:26px; height:3px; background:var(--brand); border-radius:0 0 3px 3px;
}
.tabbar .count-dot{ top:4px; right:calc(50% - 20px) }

/* Breadcrumb */
.crumbs{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; font-size:13.5px; color:var(--ink-3); padding:var(--s-4) 0 }
.crumbs a{ color:var(--ink-3) }
.crumbs a:hover{ color:var(--brand) }
.crumbs svg{ width:13px; height:13px; opacity:.6 }
.crumbs [aria-current]{ color:var(--ink-2); font-weight:500 }

/* ============================ 7. COMPONENTS ============================== */
.card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
}
.card-pad{ padding:var(--s-5) }
@media (min-width:768px){ .card-pad{ padding:var(--s-6) } }
.card-head{
  display:flex; align-items:center; justify-content:space-between; gap:var(--s-3);
  padding:var(--s-4) var(--s-5); border-bottom:1px solid var(--line-2);
}
.card-head h2,.card-head h3{ font-size:16.5px }
.card-body{ padding:var(--s-5) }

.pill{
  display:inline-flex; align-items:center; gap:5px; height:24px; padding:0 9px;
  border-radius:var(--r-sm); font-size:11.5px; font-weight:700; letter-spacing:.01em;
  font-family:var(--font-display);
}
.pill svg{ width:13px; height:13px }
.pill-save{ background:var(--accent); color:#fff }
.pill-new{ background:var(--brand-700); color:#fff }
.pill-rx{ background:var(--rx-50); color:var(--rx); border:1px solid #EBCBC8 }
.pill-out{ background:var(--ink-2); color:#fff }
.pill-soft{ background:var(--brand-50); color:var(--brand-700) }

/* Product card ------------------------------------------------------------ */
.grid-products{ display:grid; gap:var(--s-3); grid-template-columns:repeat(2,minmax(0,1fr)) }
@media (min-width:640px){ .grid-products{ gap:var(--s-4); grid-template-columns:repeat(3,minmax(0,1fr)) } }
@media (min-width:960px){ .grid-products{ grid-template-columns:repeat(4,minmax(0,1fr)) } }
@media (min-width:1180px){ .grid-products{ grid-template-columns:repeat(5,minmax(0,1fr)) } }
.grid-products.cols-4{ grid-template-columns:repeat(2,minmax(0,1fr)) }
@media (min-width:640px){ .grid-products.cols-4{ grid-template-columns:repeat(3,minmax(0,1fr)) } }
@media (min-width:1080px){ .grid-products.cols-4{ grid-template-columns:repeat(4,minmax(0,1fr)) } }

.p-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
  display:flex; flex-direction:column; overflow:hidden; position:relative;
  transition:border-color .16s ease, box-shadow .16s ease;
}
.p-card:hover{ border-color:var(--brand-300); box-shadow:var(--sh-2) }
.p-media{ position:relative; background:var(--brand-25); aspect-ratio:1/1 }
.p-media img{ width:100%; height:100%; object-fit:contain; padding:var(--s-4) }
.p-tags{ position:absolute; top:8px; left:8px; display:flex; flex-direction:column; gap:5px; align-items:flex-start }
.p-fav{
  position:absolute; top:6px; right:6px; width:34px; height:34px; border-radius:var(--r-pill);
  background:rgba(255,255,255,.94); display:grid; place-items:center; color:var(--ink-3);
  box-shadow:var(--sh-1); transition:color .15s ease, background .15s ease;
}
.p-fav:hover{ color:var(--rx); background:#fff }
.p-fav.on{ color:var(--rx) }
.p-fav svg{ width:17px; height:17px }
.p-body{ padding:var(--s-3) var(--s-3) var(--s-2); flex:1; display:flex; flex-direction:column; gap:3px }
@media (min-width:640px){ .p-body{ padding:var(--s-4) var(--s-4) var(--s-2) } }
.p-brand{ font-size:11.5px; font-weight:600; color:var(--brand); letter-spacing:.01em }
.p-name{
  font-family:var(--font-text); font-size:14.5px; font-weight:600; line-height:1.38; letter-spacing:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.p-card:hover .p-name{ color:var(--brand-700) }
/* Generic name printed like the imprint line on a blister strip */
.p-generic{
  font-size:11.5px; color:var(--ink-3); line-height:1.45; margin-top:2px;
  border-left:2px solid var(--line); padding-left:7px;
  display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden;
}
.p-price{ display:flex; align-items:baseline; gap:7px; margin-top:auto; padding-top:var(--s-2); flex-wrap:wrap }
.p-price .now{ font-family:var(--font-num); font-size:17px; font-weight:700; color:var(--ink) }
.p-price .was{ font-size:13px }
.p-stock{ font-size:11.5px; font-weight:600; display:flex; align-items:center; gap:5px }
.p-stock::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor }
.p-stock.in{ color:var(--ok) }
.p-stock.low{ color:var(--warn) }
.p-stock.out{ color:var(--ink-3) }
.p-foot{ padding:0 var(--s-3) var(--s-3) }
@media (min-width:640px){ .p-foot{ padding:0 var(--s-4) var(--s-4) } }

/* Horizontal scroller for category / offer rails */
.rail{
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(138px,1fr);
  gap:var(--s-3); overflow-x:auto; padding-bottom:var(--s-2);
  scroll-snap-type:x proximity; scrollbar-width:thin;
}
.rail > *{ scroll-snap-align:start }
.rail::-webkit-scrollbar{ height:6px }
.rail::-webkit-scrollbar-thumb{ background:var(--line); border-radius:var(--r-pill) }
@media (min-width:900px){
  .rail{ grid-auto-flow:row; grid-template-columns:repeat(8,minmax(0,1fr)); overflow:visible }
  .rail-3{ grid-template-columns:repeat(3,minmax(0,1fr)) }
}
@media (max-width:899px){ .rail-3{ grid-auto-columns:minmax(228px,1fr) } }

.cat-card{
  display:flex; flex-direction:column; align-items:center; gap:9px; text-align:center;
  padding:var(--s-4) var(--s-2); background:var(--surface);
  border:1px solid var(--line); border-radius:var(--r-md);
  transition:border-color .15s ease, background .15s ease;
}
.cat-card:hover{ border-color:var(--brand-300); background:var(--brand-25) }
.cat-icon{
  width:48px; height:48px; border-radius:var(--r-sm); background:var(--brand-50);
  display:grid; place-items:center; color:var(--brand);
}
.cat-icon svg{ width:25px; height:25px }
.cat-card strong{ font-size:13.5px; font-weight:600; line-height:1.35 }
.cat-card span{ font-size:11.5px; color:var(--ink-3) }

/* Trust strip — four facts, separated by rules not cards */
.trust{ display:grid; grid-template-columns:repeat(2,1fr); gap:0 }
@media (min-width:900px){ .trust{ grid-template-columns:repeat(4,1fr) } }
.trust > div{
  display:flex; gap:var(--s-3); align-items:flex-start; padding:var(--s-4);
  border-bottom:1px solid var(--line-2); border-right:1px solid var(--line-2);
}
.trust > div:nth-child(2n){ border-right:0 }
@media (max-width:899px){ .trust > div:nth-last-child(-n+2){ border-bottom:0 } }
@media (min-width:900px){
  .trust > div{ border-bottom:0 }
  .trust > div:nth-child(2n){ border-right:1px solid var(--line-2) }
  .trust > div:last-child{ border-right:0 }
}
.trust svg{ width:22px; height:22px; color:var(--brand); flex:none; margin-top:2px }
.trust strong{ display:block; font-size:14px; font-weight:600; font-family:var(--font-display) }
.trust span{ display:block; font-size:12.5px; color:var(--ink-3); line-height:1.5 }

/* Quantity stepper */
.qty{
  display:inline-flex; align-items:center; border:1px solid var(--line);
  border-radius:var(--r-sm); background:var(--surface); overflow:hidden; height:42px;
}
.qty button{
  width:38px; height:100%; display:grid; place-items:center; color:var(--ink-2);
  transition:background .12s ease, color .12s ease;
}
.qty button:hover:not(:disabled){ background:var(--brand-50); color:var(--brand-700) }
.qty button:disabled{ color:var(--line); cursor:not-allowed }
.qty button svg{ width:15px; height:15px }
.qty input{
  width:44px; height:100%; text-align:center; border:0; border-inline:1px solid var(--line);
  font-family:var(--font-num); font-weight:600; font-size:15px; background:transparent;
  -moz-appearance:textfield;
}
.qty input::-webkit-outer-spin-button,.qty input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0 }
.qty input:focus{ outline:none; background:var(--brand-25) }
.qty-sm{ height:36px }
.qty-sm button{ width:32px }
.qty-sm input{ width:38px; font-size:14px }

/* Toast */
.toast-host{
  position:fixed; left:50%; transform:translateX(-50%); z-index:200;
  bottom:calc(var(--tabbar-h) + 14px); display:flex; flex-direction:column; gap:8px;
  width:min(420px,calc(100vw - 32px)); pointer-events:none;
}
@media (min-width:900px){ .toast-host{ bottom:24px } }
.toast{
  display:flex; align-items:center; gap:10px; background:var(--ink); color:#fff;
  padding:12px var(--s-4); border-radius:var(--r-sm); box-shadow:var(--sh-3);
  font-size:14.5px; font-weight:500; pointer-events:auto;
  opacity:0; transform:translateY(10px); transition:opacity .2s ease, transform .2s ease;
}
.toast.in{ opacity:1; transform:none }
.toast svg{ width:18px; height:18px; flex:none; color:var(--brand-300) }
.toast.warn svg{ color:#FFC46B }
.toast a{ margin-left:auto; color:var(--brand-300); font-weight:600; text-decoration:underline; flex:none }

/* Empty / error states */
.empty{ text-align:center; padding:var(--s-9) var(--s-4); max-width:420px; margin-inline:auto }
.empty-icon{
  width:68px; height:68px; margin:0 auto var(--s-4); border-radius:var(--r-md);
  background:var(--brand-50); color:var(--brand); display:grid; place-items:center;
}
.empty-icon svg{ width:32px; height:32px }
.empty h2{ font-size:19px; margin-bottom:6px }
.empty p{ color:var(--ink-3); font-size:14.5px; margin-bottom:var(--s-5) }

/* Loading skeleton */
.skel{ background:var(--line-2); border-radius:var(--r-sm); position:relative; overflow:hidden }
.skel::after{
  content:""; position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.7),transparent);
  animation:shimmer 1.3s infinite;
}
@keyframes shimmer{ to{ transform:translateX(100%) } }

/* Status chip */
.status{
  display:inline-flex; align-items:center; gap:6px; height:26px; padding:0 10px;
  border-radius:var(--r-sm); font-size:12.5px; font-weight:600; font-family:var(--font-display);
}
.status::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor }
.status.pending{ background:var(--warn-50); color:var(--warn) }
.status.confirmed,.status.processing,.status.packed{ background:var(--brand-50); color:var(--brand-700) }
.status.out_for_delivery{ background:var(--accent-50); color:#9A5F0B }
.status.delivered{ background:var(--ok-50); color:var(--ok) }
.status.cancelled,.status.returned{ background:var(--rx-50); color:var(--rx) }

/* Order tracking timeline */
.track{ position:relative; padding-left:30px }
.track::before{
  content:""; position:absolute; left:9px; top:12px; bottom:12px; width:2px; background:var(--line);
}
.track-step{ position:relative; padding-bottom:var(--s-5) }
.track-step:last-child{ padding-bottom:0 }
.track-step::before{
  content:""; position:absolute; left:-30px; top:5px; width:20px; height:20px; border-radius:50%;
  background:var(--surface); border:2px solid var(--line); z-index:1;
}
.track-step.done::before{
  background:var(--brand); border-color:var(--brand);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-10'/%3E%3C/svg%3E");
  background-size:13px; background-position:center; background-repeat:no-repeat;
}
.track-step.now::before{ border-color:var(--brand); box-shadow:0 0 0 4px var(--brand-50) }
.track-step.now::after{
  content:""; position:absolute; left:-24px; top:11px; width:8px; height:8px;
  border-radius:50%; background:var(--brand); z-index:2;
}
.track-step strong{ display:block; font-size:14.5px; font-family:var(--font-display) }
.track-step span{ display:block; font-size:13px; color:var(--ink-3) }
.track-step.pendingstep strong{ color:var(--ink-3); font-weight:500 }

/* Accordion */
.acc{ border-bottom:1px solid var(--line) }
.acc:first-child{ border-top:1px solid var(--line) }
.acc-btn{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:var(--s-4);
  padding:var(--s-4) 0; text-align:left; font-size:15.5px; font-weight:600;
  font-family:var(--font-display); letter-spacing:-.008em;
}
.acc-btn:hover{ color:var(--brand-700) }
.acc-btn svg{ width:20px; height:20px; color:var(--ink-3); flex:none; transition:transform .22s ease }
.acc-btn[aria-expanded="true"] svg{ transform:rotate(180deg); color:var(--brand) }
.acc-panel{ display:grid; grid-template-rows:0fr; transition:grid-template-rows .24s ease }
.acc-panel > div{ overflow:hidden }
.acc-panel.open{ grid-template-rows:1fr }
.acc-panel p{ color:var(--ink-2); font-size:14.5px; padding-bottom:var(--s-4); max-width:70ch }

/* Tabs */
.tabs{ display:flex; gap:var(--s-1); border-bottom:1px solid var(--line); overflow-x:auto; scrollbar-width:none }
.tabs::-webkit-scrollbar{ display:none }
.tab{
  padding:11px var(--s-4); font-size:14.5px; font-weight:600; color:var(--ink-3);
  border-bottom:2px solid transparent; white-space:nowrap; font-family:var(--font-display);
}
.tab:hover{ color:var(--ink) }
.tab[aria-selected="true"]{ color:var(--brand-700); border-bottom-color:var(--brand) }

/* Chips */
.chips{ display:flex; gap:8px; flex-wrap:wrap }
.chip{
  display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 13px;
  border:1px solid var(--line); border-radius:var(--r-pill); background:var(--surface);
  font-size:13.5px; font-weight:500; color:var(--ink-2); transition:all .14s ease;
}
.chip:hover{ border-color:var(--brand-300); color:var(--brand-700) }
.chip[aria-pressed="true"],.chip.on{ background:var(--brand); border-color:var(--brand); color:#fff }
.chip svg{ width:14px; height:14px }
.chip-x{ display:inline-grid; place-items:center; width:17px; height:17px; border-radius:50%; background:rgba(255,255,255,.25) }

/* Summary rows (cart/checkout totals) */
.sum-row{ display:flex; justify-content:space-between; gap:var(--s-4); padding:7px 0; font-size:14.5px; color:var(--ink-2) }
.sum-row .v{ font-family:var(--font-num); font-weight:600; color:var(--ink) }
.sum-row.save .v{ color:var(--accent) }
.sum-total{
  display:flex; justify-content:space-between; align-items:baseline; gap:var(--s-4);
  padding-top:var(--s-3); margin-top:var(--s-3); border-top:1px solid var(--line);
}
.sum-total strong{ font-size:15.5px }
.sum-total .v{ font-family:var(--font-num); font-size:22px; font-weight:700; color:var(--brand-700) }

/* Sticky action bar (mobile product / checkout) */
.sticky-bar{
  position:fixed; left:0; right:0; bottom:var(--tabbar-h); z-index:70;
  background:var(--surface); border-top:1px solid var(--line);
  padding:10px var(--s-4) calc(10px + env(safe-area-inset-bottom));
  display:flex; gap:var(--s-3); align-items:center; box-shadow:0 -4px 16px rgba(20,36,31,.07);
}
@media (min-width:900px){ .sticky-bar{ display:none } }

/* Data table (orders, delivery areas) */
.table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch }
.table{ min-width:520px; font-size:14.5px }
.table th{
  text-align:left; font-family:var(--font-display); font-size:12.5px; font-weight:700;
  color:var(--ink-3); padding:10px var(--s-4); border-bottom:1px solid var(--line); white-space:nowrap;
}
.table td{ padding:13px var(--s-4); border-bottom:1px solid var(--line-2); vertical-align:middle }
.table tr:last-child td{ border-bottom:0 }
.table tbody tr:hover{ background:var(--brand-25) }

/* Notice bar */
.notice{
  display:flex; gap:11px; align-items:flex-start; padding:var(--s-3) var(--s-4);
  border-radius:var(--r-sm); font-size:14px; line-height:1.55;
  background:var(--brand-50); color:var(--brand-700); border:1px solid #CDE5DD;
}
.notice svg{ width:18px; height:18px; flex:none; margin-top:2px }
.notice strong{ font-weight:600 }
.notice-rx{ background:var(--rx-50); color:var(--rx); border-color:#EBCBC8 }
.notice-warn{ background:var(--warn-50); color:var(--warn); border-color:#EFDFBC }

/* ============================ 8. PAGE BLOCKS ============================= */
/* Hero — the search module is the centrepiece, because finding the right
   medicine fast is the job this site exists to do. */
.hero{ background:var(--brand-700); color:#fff; position:relative; overflow:hidden }
.hero::after{
  content:""; position:absolute; right:-120px; top:-140px; width:460px; height:460px;
  border-radius:50%; background:radial-gradient(circle at 30% 30%, rgba(79,165,140,.38), transparent 68%);
  pointer-events:none;
}
.hero-inner{ position:relative; z-index:1; padding-block:var(--s-8) var(--s-9) }
@media (min-width:900px){ .hero-inner{ padding-block:var(--s-9) var(--s-10) } }
.hero h1{ color:#fff; max-width:16ch }
.hero .lede{ color:#C8E0D8; margin-top:var(--s-3); max-width:52ch }

.hero-search{
  background:var(--surface); border-radius:var(--r-lg); padding:var(--s-4);
  box-shadow:var(--sh-3); margin-top:var(--s-6); max-width:720px; position:relative; z-index:2;
}
.hero-search .search-form .input{
  height:54px; font-size:16px; background:var(--page); border-color:var(--line); padding-left:48px;
}
.hero-search .search-icon{ left:16px; width:21px; height:21px }
.hero-search .btn{ height:54px }
.hero-search-row{ display:flex; gap:var(--s-3) }
.hero-search-row .search-form{ flex:1; min-width:0 }
.hero-search-row .btn-search-go{ display:none }
@media (min-width:640px){ .hero-search-row .btn-search-go{ display:inline-flex } }
.hero-quick{ display:flex; gap:7px; flex-wrap:wrap; margin-top:var(--s-3); padding:0 2px }
.hero-quick span{ font-size:12.5px; color:var(--ink-3); align-self:center; margin-right:2px }
.hero-quick a{
  font-size:13px; font-weight:500; color:var(--ink-2); background:var(--page);
  border:1px solid var(--line); border-radius:var(--r-pill); padding:4px 11px;
}
.hero-quick a:hover{ background:var(--brand-50); border-color:var(--brand-300); color:var(--brand-700) }

.hero-facts{ display:flex; gap:var(--s-6); flex-wrap:wrap; margin-top:var(--s-6) }
.hero-facts div{ display:flex; gap:9px; align-items:center; font-size:13.5px; color:#C8E0D8 }
.hero-facts svg{ width:18px; height:18px; color:var(--brand-300); flex:none }

/* Promo banner */
.promo{
  border-radius:var(--r-lg); padding:var(--s-6); background:var(--brand);
  color:#fff; display:grid; gap:var(--s-4); align-items:center; position:relative; overflow:hidden;
}
@media (min-width:768px){ .promo{ grid-template-columns:1fr auto; padding:var(--s-7) var(--s-8) } }
.promo::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(105deg, transparent 45%, rgba(255,255,255,.09) 100%);
}
.promo > *{ position:relative }
.promo h2{ color:#fff; font-size:clamp(21px,3vw,28px) }
.promo p{ color:#D3E9E2; margin-top:6px; max-width:48ch; font-size:15px }

/* Offer rail card */
.offer-card{
  display:flex; gap:var(--s-3); align-items:center; padding:var(--s-3);
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
  transition:border-color .15s ease;
}
.offer-card:hover{ border-color:var(--accent) }
.offer-card img{ width:56px; height:56px; object-fit:contain; background:var(--brand-25); border-radius:8px; flex:none }
.offer-card .o-body{ min-width:0; flex:1 }
.offer-card .o-name{ font-size:13.5px; font-weight:600; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.35 }
.offer-card .o-price{ font-family:var(--font-num); font-size:14px; font-weight:700; margin-top:3px }
.offer-card .o-off{
  flex:none; font-family:var(--font-num); font-size:13px; font-weight:700;
  background:var(--accent-50); color:#9A5F0B; padding:3px 8px; border-radius:var(--r-sm);
}

/* Product detail page */
.pdp{ display:grid; gap:var(--s-6) }
@media (min-width:900px){ .pdp{ grid-template-columns:minmax(0,440px) minmax(0,1fr); gap:var(--s-8) } }
.pdp-gallery{ position:sticky; top:calc(var(--header-h) + 16px) }
@media (max-width:899px){ .pdp-gallery{ position:static } }
.pdp-main{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
  aspect-ratio:1/1; display:grid; place-items:center; padding:var(--s-6); position:relative;
}
.pdp-main img{ max-height:100%; object-fit:contain }
.pdp-price{ display:flex; align-items:baseline; gap:var(--s-3); flex-wrap:wrap; margin:var(--s-3) 0 }
.pdp-price .now{ font-family:var(--font-num); font-size:32px; font-weight:700; letter-spacing:-.02em }
.pdp-price .was{ font-size:17px }
.pdp-price .off{ font-size:13px; font-weight:700; color:var(--accent); font-family:var(--font-num) }

/* Fact table — how medicine packaging presents information */
.facts{ border:1px solid var(--line); border-radius:var(--r-md); overflow:hidden; background:var(--surface) }
.facts div{ display:grid; grid-template-columns:132px 1fr; gap:var(--s-3); padding:11px var(--s-4); border-bottom:1px solid var(--line-2) }
.facts div:last-child{ border-bottom:0 }
.facts dt{ font-size:13px; color:var(--ink-3); font-weight:600 }
.facts dd{ margin:0; font-size:14.5px }
@media (max-width:480px){ .facts div{ grid-template-columns:106px 1fr } }

/* Shop layout */
.shop{ display:grid; gap:var(--s-5); align-items:start }
@media (min-width:960px){ .shop{ grid-template-columns:258px minmax(0,1fr); gap:var(--s-7) } }

.filters{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md) }
@media (min-width:960px){ .filters{ position:sticky; top:calc(var(--header-h) + 16px); max-height:calc(100vh - var(--header-h) - 40px); overflow-y:auto } }
.filter-group{ padding:var(--s-4); border-bottom:1px solid var(--line-2) }
.filter-group:last-child{ border-bottom:0 }
.filter-group h3{ font-size:13.5px; margin-bottom:var(--s-2) }
.filter-scroll{ max-height:196px; overflow-y:auto; padding-right:4px }

/* Filters become a bottom sheet on mobile */
@media (max-width:959px){
  .filters{
    position:fixed; inset:auto 0 0 0; z-index:130; border-radius:var(--r-lg) var(--r-lg) 0 0;
    max-height:82vh; overflow-y:auto; transform:translateY(101%);
    transition:transform .26s cubic-bezier(.32,.72,0,1); box-shadow:var(--sh-3); border-bottom:0;
  }
  .filters.open{ transform:none }
  .filters-head{
    position:sticky; top:0; background:var(--surface); z-index:2;
    display:flex; align-items:center; justify-content:space-between;
    padding:var(--s-4); border-bottom:1px solid var(--line);
  }
  .filters-foot{ position:sticky; bottom:0; background:var(--surface); padding:var(--s-3) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom)); border-top:1px solid var(--line); display:flex; gap:var(--s-3) }
}
@media (min-width:960px){ .filters-head,.filters-foot{ display:none } }
.sheet-veil{
  position:fixed; inset:0; background:rgba(20,36,31,.45); z-index:125;
  opacity:0; visibility:hidden; transition:opacity .22s ease, visibility .22s;
}
.sheet-veil.on{ opacity:1; visibility:visible }

.toolbar{
  display:flex; align-items:center; justify-content:space-between; gap:var(--s-3);
  flex-wrap:wrap; margin-bottom:var(--s-4);
}
.toolbar .select{ height:40px; width:auto; min-width:172px; font-size:14px }

/* Account layout */
.account{ display:grid; gap:var(--s-5); align-items:start }
@media (min-width:900px){ .account{ grid-template-columns:250px minmax(0,1fr); gap:var(--s-7) } }
.acct-nav{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md); overflow:hidden }
.acct-nav a{
  display:flex; align-items:center; gap:11px; padding:12px var(--s-4);
  font-size:14.5px; font-weight:500; color:var(--ink-2); border-bottom:1px solid var(--line-2);
}
.acct-nav a:last-child{ border-bottom:0 }
.acct-nav a:hover{ background:var(--brand-25); color:var(--brand-700) }
.acct-nav a[aria-current="page"]{ background:var(--brand-50); color:var(--brand-700); font-weight:600; box-shadow:inset 3px 0 0 var(--brand) }
.acct-nav svg{ width:19px; height:19px; color:var(--ink-3); flex:none }
.acct-nav a[aria-current="page"] svg,.acct-nav a:hover svg{ color:var(--brand) }
@media (max-width:899px){
  .acct-nav{ display:flex; overflow-x:auto; scrollbar-width:none }
  .acct-nav::-webkit-scrollbar{ display:none }
  .acct-nav a{ border-bottom:0; border-right:1px solid var(--line-2); white-space:nowrap; padding:11px var(--s-4) }
  .acct-nav a[aria-current="page"]{ box-shadow:inset 0 -3px 0 var(--brand) }
}

.acct-hero{
  background:var(--brand-700); color:#fff; border-radius:var(--r-md);
  padding:var(--s-5); display:flex; gap:var(--s-4); align-items:center; flex-wrap:wrap;
}
.avatar{
  width:54px; height:54px; border-radius:var(--r-pill); background:var(--brand-300); color:var(--brand-700);
  display:grid; place-items:center; font-family:var(--font-display); font-weight:700; font-size:21px; flex:none;
}
.acct-hero h1{ color:#fff; font-size:20px }
.acct-hero p{ color:#B9D8CE; font-size:13.5px }

.stat-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:var(--s-3) }
@media (min-width:640px){ .stat-grid{ grid-template-columns:repeat(4,1fr) } }
.stat{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md); padding:var(--s-4) }
.stat b{ display:block; font-family:var(--font-num); font-size:24px; font-weight:700; line-height:1.2 }
.stat span{ display:block; font-size:12.5px; color:var(--ink-3); margin-top:2px }

/* Cart line */
.cart-line{ display:grid; grid-template-columns:82px minmax(0,1fr); gap:var(--s-3); padding:var(--s-4); border-bottom:1px solid var(--line-2) }
.cart-line:last-child{ border-bottom:0 }
.cart-line img{ width:82px; height:82px; object-fit:contain; background:var(--brand-25); border-radius:var(--r-sm) }
.cart-line-top{ display:flex; justify-content:space-between; gap:var(--s-3) }
.cart-line-actions{ display:flex; align-items:center; justify-content:space-between; gap:var(--s-3); margin-top:var(--s-3); flex-wrap:wrap }
@media (min-width:640px){ .cart-line{ grid-template-columns:96px minmax(0,1fr) }  .cart-line img{ width:96px; height:96px } }

/* Auth pages */
.auth{ display:grid; place-items:center; padding-block:var(--s-8) }
.auth-card{ width:100%; max-width:428px }
.auth-card .card{ padding:var(--s-6) }
@media (min-width:480px){ .auth-card .card{ padding:var(--s-7) } }
.auth-head{ text-align:center; margin-bottom:var(--s-6) }
.auth-head h1{ font-size:24px; margin-bottom:6px }
.auth-head p{ color:var(--ink-3); font-size:14.5px }
.auth-alt{ text-align:center; margin-top:var(--s-5); font-size:14.5px; color:var(--ink-2) }
.auth-alt a{ color:var(--brand); font-weight:600 }
.divider{ display:flex; align-items:center; gap:var(--s-3); color:var(--ink-3); font-size:12.5px; margin:var(--s-5) 0 }
.divider::before,.divider::after{ content:""; height:1px; background:var(--line); flex:1 }

/* Checkout step marker — content really is a sequence here */
.steps{ display:flex; align-items:center; gap:var(--s-2); margin-bottom:var(--s-6); flex-wrap:wrap }
.step{ display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--ink-3); font-weight:500 }
.step b{
  width:24px; height:24px; border-radius:50%; background:var(--line-2); color:var(--ink-3);
  display:grid; place-items:center; font-family:var(--font-num); font-size:12.5px; font-weight:700;
}
.step.on{ color:var(--brand-700); font-weight:600 }
.step.on b{ background:var(--brand); color:#fff }
.step.done b{ background:var(--brand-50); color:var(--brand) }
.steps .sep{ width:18px; height:1px; background:var(--line) }

/* Footer */
.site-footer{ background:var(--ink); color:#B9C6C2; margin-top:var(--s-8) }
.footer-top{ display:grid; gap:var(--s-6); padding-block:var(--s-8) }
@media (min-width:768px){ .footer-top{ grid-template-columns:1.6fr 1fr 1fr 1.2fr; gap:var(--s-7) } }
.footer-top h4{ color:#fff; font-size:14px; margin-bottom:var(--s-3) }
.footer-top li{ margin-bottom:9px }
.footer-top a{ font-size:14px; color:#B9C6C2 }
.footer-top a:hover{ color:#fff }
.footer-about p{ font-size:14px; margin:var(--s-3) 0; max-width:40ch; line-height:1.65 }
.footer-top .brand-word{ color:#fff }
.footer-contact{ font-size:14px; display:flex; gap:9px; align-items:flex-start; margin-bottom:10px }
.footer-contact svg{ width:17px; height:17px; color:var(--brand-300); flex:none; margin-top:3px }
.social{ display:flex; gap:8px; margin-top:var(--s-4) }
.social a{
  width:36px; height:36px; border-radius:var(--r-sm); background:rgba(255,255,255,.08);
  display:grid; place-items:center; color:#fff; transition:background .15s ease;
}
.social a:hover{ background:var(--brand) }
.social svg{ width:18px; height:18px }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.09); padding-block:var(--s-4);
  display:flex; gap:var(--s-4); justify-content:space-between; align-items:center; flex-wrap:wrap;
  font-size:13px;
}
.pay-row{ display:flex; gap:7px; flex-wrap:wrap }
.pay-row span{
  background:rgba(255,255,255,.08); border-radius:6px; padding:4px 10px;
  font-size:12px; font-weight:600; color:#D7E2DF;
}
@media (max-width:899px){
  .site-footer{ padding-bottom:calc(var(--tabbar-h) + var(--s-4)) }
  .has-bar .site-footer{ padding-bottom:calc(var(--tabbar-h) + 78px) }
}

/* ============================ 9. UTILITIES =============================== */
.hidden,[hidden]{ display:none !important }
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.mt-2{ margin-top:var(--s-2) } .mt-3{ margin-top:var(--s-3) } .mt-4{ margin-top:var(--s-4) }
.mt-5{ margin-top:var(--s-5) } .mt-6{ margin-top:var(--s-6) } .mt-7{ margin-top:var(--s-7) }
.mb-2{ margin-bottom:var(--s-2) } .mb-3{ margin-bottom:var(--s-3) } .mb-4{ margin-bottom:var(--s-4) }
.mb-5{ margin-bottom:var(--s-5) } .mb-6{ margin-bottom:var(--s-6) }
.text-center{ text-align:center }
.w-full{ width:100% }
.flex-1{ flex:1; min-width:0 }
.no-wrap{ white-space:nowrap }
.only-mobile{ display:none }
@media (max-width:899px){ .only-mobile{ display:block } .only-desktop{ display:none } }

/* ============================ 10. MOTION / PRINT ========================= */
/* One orchestrated entrance on the home hero. Nothing else animates on load. */
@keyframes rise{ from{ opacity:0; transform:translateY(14px) } to{ opacity:1; transform:none } }
.hero-inner > *{ animation:rise .5s both }
.hero-inner > *:nth-child(2){ animation-delay:.06s }
.hero-inner > *:nth-child(3){ animation-delay:.12s }
.hero-inner > *:nth-child(4){ animation-delay:.18s }

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important; animation-iteration-count:1 !important;
    transition-duration:.001ms !important; scroll-behavior:auto !important;
  }
}

@media print{
  .site-header,.tabbar,.site-footer,.sticky-bar,.toast-host,.drawer,.announce{ display:none !important }
  body{ background:#fff }
  .card{ border-color:#ccc; break-inside:avoid }
}
