/* =========================================================
   Suryah Medicals - black & white theme
   ========================================================= */
:root {
  --brand: #5a9a28;        /* light green (buttons, hero, headings on white) */
  --brand-dark: #4a8420;   /* hover / footer */
  --sky: #6aaa30;          /* logo light green, accents */
  --white: #ffffff;
  --ink: #1f3011;          /* body text */
  --g50: #f0f6eb;
  --g100: #e0ebd6;
  --g300: #bed4ac;
  --g500: #60764e;
  --g700: #394c29;
  --border: #000000;
  --radius: 20px;
  --radius-sm: 12px;
  --wrap: 1200px;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--border); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--white); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }

svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--border); border-radius: 999px;
  padding: 12px 22px; font-weight: 700; font-size: 15px; text-decoration: none;
  white-space: nowrap; transition: background .15s, color .15s;
}
.btn-dark { background: var(--brand); color: var(--white); }
.btn-dark:hover { background: var(--brand-dark); }
.btn-light { background: var(--white); color: var(--brand); border-color: var(--border); }
.btn-light:hover { background: var(--g100); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--border); }
.btn-ghost:hover { background: var(--white); color: var(--brand); }
.btn-outline { background: var(--white); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: var(--white); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }

.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--white);
  display: grid; place-items: center; flex: none;
}
.icon-btn:hover { border-color: var(--border); }
.icon-btn svg { width: 22px; height: 22px; }
.badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--brand); color: var(--white);
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding: 12px 16px 0; background: linear-gradient(var(--white) 60%, rgba(255,255,255,0)); }
.bar {
  width: 100%; margin: 0; display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1.5px solid var(--border); border-radius: 999px; padding: 4px 10px 4px 16px; box-shadow: 0 6px 20px rgba(83,140,34,.12);
}
.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 58px; width: auto; }
.bar-select { border: 0; background: transparent; font-weight: 500; font-size: 14px; max-width: 150px; padding: 8px 4px; border-left: 1.5px solid var(--border); padding-left: 14px; color: var(--ink); }
.search { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px; background: var(--g50); border-radius: 999px; padding: 0 16px; }
.search svg { width: 18px; height: 18px; flex: none; color: var(--g500); }
.search input { width: 100%; border: 0; background: transparent; padding: 12px 0; outline: none; font-size: 14px; }
.search:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.bar-loc { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1.2; flex: none; }
.bar-loc svg { width: 22px; height: 22px; }
.bar-loc small { display: block; font-weight: 400; color: var(--g500); font-size: 12px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: auto auto;
  align-items: center; column-gap: clamp(24px, 4vw, 48px);
  position: relative; width: calc(100% - 32px); max-width: var(--wrap); margin: 14px auto 0; overflow: hidden;
  padding: clamp(20px, 3vw, 36px); border-radius: 24px;
  color: var(--white); background: linear-gradient(135deg, #61ac22 0%, #538c22 100%);
}
.hero-banner { grid-column: 1; grid-row: 1 / span 2; }
.hero-banner {
  width: 100%; height: auto; object-fit: contain; border: 0; border-radius: 12px;
}
.hero-copy { display: block; grid-column: 2; grid-row: 1; align-self: end; }
.hero-copy h1 { font-size: clamp(28px, 3.6vw, 46px); font-weight: 800; max-width: 18ch; }
.hero-copy > p { margin-top: 14px; max-width: 54ch; color: #e9f3e1; font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.hero-card {
  display: flex; grid-column: 2; grid-row: 2; align-items: center; gap: 14px; justify-self: start;
  margin-top: 20px; background: var(--white); color: var(--ink);
  padding: 12px 24px 12px 12px; border-radius: 20px; text-decoration: none;
}
.hero-card-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: var(--white); display: grid; place-items: center; }
.hero-card-icon svg { width: 22px; height: 22px; }
.hero-card small { display: block; color: var(--g500); font-size: 13px; }
.hero-card strong { font-family: var(--display); font-size: 24px; letter-spacing: -0.01em; }
.hero-card:hover { background: var(--g100); }

/* ---------- Sections ---------- */
.section, .promos { width: calc(100% - 32px); max-width: none; margin-left: auto; margin-right: auto; }
.section { padding: 72px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; }
.more { font-weight: 700; font-size: 15px; text-underline-offset: 4px; }
.count { color: var(--g500); font-size: 15px; }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cat {
  display: flex; flex-direction: column; gap: 14px; text-align: left;
  background: var(--g50); border: 2px solid var(--border); border-radius: var(--radius); padding: 20px;
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.cat-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--white); border: 1.5px solid var(--border); display: grid; place-items: center; }
.cat-icon svg { width: 28px; height: 28px; }
.cat-banner {
  position: relative; display: block; width: 100%; min-width: 0;
  padding: 0; overflow: hidden; box-sizing: border-box;
  border: 0; border-radius: 0; background: transparent;
}
.cat-banner::after {
  position: absolute; inset: 0; content: "";
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.34) 50%, transparent 65%);
  transform: translateX(-100%); pointer-events: none;
  animation: personal-care-shine 2.4s ease-in-out infinite;
}
.cat-feature-image { display: block; width: 100%; min-width: 0; height: auto; object-fit: contain; }
.cat h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.cat p { font-size: 14px; color: var(--g500); line-height: 1.4; margin-top: 4px; }
.cat:hover { background: var(--brand); color: var(--white); }
.cat:hover p { color: #e3efd9; }
#catGrid .cat-banner:hover, #catGrid .cat-banner:focus-visible {
  background: transparent; color: inherit; border: 0; outline: none; box-shadow: none;
}
#catGrid .cat-banner:hover .cat-feature-image,
#catGrid .cat-banner:focus-visible .cat-feature-image { filter: none; transform: none; }
@keyframes personal-care-shine {
  65% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Products */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { display: flex; flex-direction: column; }
.card-img { position: relative; background: var(--g50); border: 1px solid var(--border); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; padding: 18%; }
.card-img svg { width: 100%; height: 100%; stroke: none; }
.tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag-save { right: 12px; background: var(--brand); color: var(--white); }
.tag-rx { left: 12px; background: var(--white); border: 1.5px solid var(--border); color: var(--brand); }
.card h3 { font-family: var(--body); font-size: 15px; font-weight: 700; letter-spacing: 0; line-height: 1.35; margin-top: 12px; }
.card .pack { color: var(--g500); font-size: 13px; margin-top: 2px; }
.card .price { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; font-weight: 700; }
.card .price s { color: var(--g500); font-weight: 400; font-size: 14px; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.add { flex: 1; background: var(--brand); color: var(--white); border: 0; border-radius: 999px; padding: 10px; font-weight: 700; font-size: 14px; }
.add:hover { background: var(--brand-dark); }
.heart { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--white); display: grid; place-items: center; flex: none; }
.heart svg { width: 18px; height: 18px; }
.heart[aria-pressed="true"] { background: var(--brand); border-color: var(--border); color: var(--white); }
.heart[aria-pressed="true"] svg { fill: currentColor; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 20px; scrollbar-width: thin; }
.tab { flex: none; border: 1.5px solid var(--border); background: var(--white); border-radius: 999px; padding: 9px 18px; font-weight: 500; font-size: 14px; }
.tab:hover { border-color: var(--border); }
.tab[aria-selected="true"], .tab[aria-current="page"] { background: var(--brand); color: var(--white); border-color: var(--border); }
.empty { padding: 48px 0; text-align: center; color: var(--g500); }

/* Promos */
.promos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 72px; }
.promo { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: var(--radius); padding: 36px; text-decoration: none; min-height: 220px; }
.promo h3 { font-size: 28px; font-weight: 700; }
.promo p { margin: 8px 0 22px; max-width: 26ch; }
.promo svg { width: 120px; height: 120px; flex: none; }
.promo-light { background: #deebd2; color: var(--ink); position: relative; overflow: hidden; min-height: 260px; }
.promo-light > div { position: relative; z-index: 1; max-width: 52%; }
.promo-photo {
  position: absolute; right: 0; bottom: 0; height: 100%; width: auto; max-width: 62%; object-fit: cover; object-position: right bottom;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000000 22%); mask-image: linear-gradient(to right, transparent 0, #000000 22%);
}
.promo-dark { background: #559221; color: var(--white); position: relative; overflow: hidden; min-height: 260px; }
.promo-dark > div { position: relative; z-index: 1; max-width: 52%; }
/* photo background already matches the card colour, so no edge fade (it was blurring his elbow) */
.promo-dark .promo-photo { -webkit-mask-image: none; mask-image: none; }
.promo-dark p { color: #e9f3e1; }

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { counter-increment: step; border-top: 3px solid var(--border); padding-top: 18px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--white); font-weight: 700; margin-bottom: 14px; }
.steps h3 { font-size: 22px; font-weight: 700; }
.steps p { margin-top: 8px; color: var(--g700); max-width: 34ch; }

/* Visit */
.visit { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: stretch; }
.visit-info { background: var(--g50); border-radius: var(--radius); padding: 40px; }
.visit-info h2 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 700; }
address { font-style: normal; margin: 16px 0 24px; font-size: 18px; }
.contact { margin: 0 0 28px; display: grid; gap: 12px; }
.contact div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.contact dt { color: var(--g500); font-size: 14px; }
.contact dd { margin: 0; font-weight: 700; }
.contact a { text-underline-offset: 3px; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.map { border-radius: var(--radius); overflow: hidden; min-height: 380px; background: var(--g100); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

/* Footer */
.footer {
  width: calc(100% - 32px); margin: 88px auto 16px; padding: 28px 24px 20px;
  background: #f3fbf5; color: var(--ink); border: 1.5px solid var(--border); border-radius: var(--radius);
}
.footer-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.footer-brand { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--g300); }
.footer-photo { width: 80px; height: 80px; flex: none; object-fit: contain; padding: 6px; background: var(--white); border-radius: 16px; border: 1px solid var(--g300); }
.footer-brand h2 { font-size: 21px; font-weight: 700; color: #466e25; letter-spacing: -0.01em; }
.footer-brand p { margin-top: 4px; font-size: 15px; color: var(--g700); }
.footer-brand .trust { display: flex; align-items: center; gap: 8px; color: #0a7a4f; font-weight: 500; font-size: 14px; }
.trust svg { width: 16px; height: 16px; flex: none; }
.footer h3 { font-family: var(--body); font-size: 16px; font-weight: 700; letter-spacing: 0; color: #466e25; margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer li a, .linklike { color: var(--ink); text-decoration: none; font-size: 15px; }
.footer li a:hover, .linklike:hover { text-decoration: underline; text-underline-offset: 4px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.footer-visit { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 12px; padding-top: 24px; border-top: 1px solid var(--g300); }
.footer-visit > svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: #466e25; }
.footer-visit h3 { color: var(--ink); margin: 0 0 4px; }
.footer-visit p { font-size: 15px; color: var(--g700); }
.footer-notice { margin-top: 24px; background: var(--g100); border-radius: var(--radius-sm); padding: 16px; }
.footer-notice h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.footer-notice h3 svg { width: 18px; height: 18px; flex: none; }
.footer-notice p { font-size: 15px; color: var(--g700); }
.copyright { margin-top: 20px; text-align: center; font-size: 13px; color: var(--g500); }
@media (min-width: 960px) {
  .footer { padding: 36px 40px 24px; }
  .footer-main { grid-template-columns: 1.7fr 1fr 1fr 1.3fr; gap: 40px; }
  .footer-brand, .footer-visit { grid-column: auto; border: 0; padding: 0; }
  .footer-brand { align-items: flex-start; }
}

/* ---------- Sub pages ---------- */
a.tab { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; white-space: nowrap; }
.tab[aria-current="page"] { color: var(--white); }
.page-head {
  width: calc(100% - 32px); margin: 20px auto 0; padding: 28px 32px;
  background: var(--g50); border: 2px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; gap: 24px;
}
.page-head-icon { width: 84px; height: 84px; flex: none; border-radius: 24px; background: var(--brand); color: var(--white); display: grid; place-items: center; }
.page-head-icon svg { width: 42px; height: 42px; }
.crumbs { font-size: 13px; line-height: 1.3; color: var(--g500); margin-bottom: 8px; }
.crumbs a {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--white); color: var(--brand-dark);
  font-size: 12px; font-weight: 700; text-decoration: none; vertical-align: middle;
}
.crumbs a:hover { background: var(--g100); }
.page-head h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; }
.page-head p { margin-top: 8px; color: var(--g700); max-width: 62ch; }
.page-note { margin-top: 12px; padding: 12px 16px; background: var(--white); border: 1.5px solid var(--g300); border-radius: var(--radius-sm); font-size: 14px; }
.page-note button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.page-head + .section { padding-top: 36px; }
.category-head {
  position: relative; display: block; overflow: hidden; padding: 0;
  border: 0; background: transparent;
}
.category-page-banner { display: block; width: 100%; height: auto; }
.category-head .crumbs {
  position: absolute; z-index: 1; top: 5%; left: 5%; margin: 0;
  color: var(--ink);
}
.category-head .page-head-icon,
.category-head h1,
.category-head > div > p:not(.crumbs):not(.page-note) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.category-head > div { position: static; }
.all-products-head {
  position: relative; min-height: 250px; overflow: hidden;
  background: linear-gradient(110deg, var(--g50) 0%, #ddecd0 100%);
}
.all-products-page-banner {
  position: absolute; z-index: 0; inset: 0 2% 0 auto; width: 44%; height: 100%;
  object-fit: contain; object-position: center;
}
.all-products-head::after {
  position: absolute; z-index: 1; inset: 0; content: "";
  background: linear-gradient(90deg, var(--g50) 0 44%, rgba(240,246,235,.85) 56%, transparent 66%);
  pointer-events: none;
}
.all-products-head .page-head-icon,
.all-products-head > div { position: relative; z-index: 2; }
.all-products-head > div { max-width: 58%; }
@media (max-width: 720px) {
  .page-head { width: calc(100% - 24px); padding: 20px; gap: 16px; align-items: flex-start; }
  .page-head-icon { width: 56px; height: 56px; border-radius: 16px; }
  .page-head-icon svg { width: 28px; height: 28px; }
  .category-head { padding: 0; }
  .category-head .crumbs { top: 4%; left: 4%; font-size: 12px; }
  .category-head .crumbs a { padding: 2px 7px; }
  .all-products-head {
    min-height: 210px; padding: 20px;
    display: grid; grid-template-columns: minmax(0, 1fr) 36%;
    grid-template-rows: auto auto; gap: 12px;
  }
  .all-products-page-banner {
    position: static; z-index: auto; grid-column: 2; grid-row: 1 / span 2;
    width: 100%; height: 100%; min-height: 180px; object-fit: contain; object-position: center;
    opacity: 1; clip-path: none; border-radius: 12px;
  }
  .all-products-head::after {
    display: none;
  }
  .all-products-head .page-head-icon { grid-column: 1; grid-row: 1; }
  .all-products-head > div { grid-column: 1; grid-row: 2; max-width: none; }
}

/* ---------- Drawer & dialog ---------- */
.overlay { position: fixed; inset: 0; background: rgba(41,67,18,.55); z-index: 90; }
.overlay[hidden] { display: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 100;
  background: var(--white); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s ease; visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 24px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--border); display: grid; gap: 14px; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.total strong { font-family: var(--display); font-size: 26px; }
.note { font-size: 13px; color: var(--g500); }
.cart-empty { padding: 48px 0; text-align: center; color: var(--g500); }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.line-img { width: 56px; height: 56px; background: var(--g50); border-radius: 12px; padding: 8px; }
.line-img svg { width: 100%; height: 100%; stroke: none; }
.line h4 { margin: 0; font-size: 14px; line-height: 1.3; }
.line small { color: var(--g500); }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; border: 1.5px solid var(--border); border-radius: 999px; }
.qty button { width: 30px; height: 30px; border: 0; background: transparent; font-size: 18px; border-radius: 50%; }
.qty button:hover { background: var(--g100); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }
.line-price { font-weight: 700; }

.field { display: grid; gap: 6px; font-size: 14px; font-weight: 700; margin: 16px 0 0; }
.field input, .field textarea { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; font-weight: 400; background: var(--white); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--border); box-shadow: 0 0 0 1px var(--border); }
.drawer-foot .field { margin: 0; }

dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(460px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(41,67,18,.6); }
dialog form { padding: 0 24px 24px; }
dialog .drawer-head { margin: 0 -24px; }
dialog .note { margin: 16px 0; }
#rxPreview { margin-top: 14px; max-height: 180px; width: auto; border-radius: var(--radius-sm); border: 1.5px solid var(--border); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 24px); opacity: 0; pointer-events: none; z-index: 120;
  background: var(--brand); color: var(--white); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .bar-loc span small { display: none; }
  .bar-select { display: none; }
  .cat-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .visit, .promos { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .bar { flex-wrap: wrap; border-radius: 28px; padding: 10px 12px; gap: 10px; }
  .brand { order: 1; margin-right: auto; }
  .brand img { height: 46px; }
  .bar-loc { display: none; }
  .btn-dark[data-open-rx] { order: 2; padding: 10px 14px; font-size: 13px; }
  #cartBtn { order: 3; }
  .search { order: 4; flex-basis: 100%; }
  html { scroll-padding-top: 150px; }
  /* phone: signboard banner on top, short text + buttons underneath */
  .hero {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0; border-radius: 24px;
    background: linear-gradient(180deg, #61ac22 0%, #538c22 100%);
  }
  .hero-banner { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 0; }
  .hero-copy { padding: 4px 20px 0; }
  .hero-copy h1 { font-size: clamp(22px, 6.67vw, 26px); max-width: none; }
  .hero-copy > p { display: none; }
  .hero-actions { margin-top: 16px; }
  .hero-actions .btn { flex: 1 1 auto; padding: 11px 16px; font-size: 14px; }
  .hero-card { display: flex; margin: 16px 20px 20px; padding: 10px 16px 10px 10px; }
  .hero-card strong { font-size: 22px; }
  .section { padding-top: 56px; }
  .product-grid { gap: 14px; }
  .promo { padding: 24px; }
  .promo svg { display: none; }
  .promo-light, .promo-dark { min-height: 340px; }
  .promo-light > div, .promo-dark > div { max-width: 100%; }
  .promo-light, .promo-dark { align-items: flex-start; }
  .promo-photo { height: 54%; max-width: none; -webkit-mask-image: linear-gradient(to right, transparent 0, #000000 25%); mask-image: linear-gradient(to right, transparent 0, #000000 25%); }
  .visit-info { padding: 28px 22px; }
  .contact div { grid-template-columns: 1fr; gap: 2px; }
  .site-header { padding-right: 12px; padding-left: 12px; }
  .hero, .section, .promos { width: calc(100% - 24px); }
  .footer { width: calc(100% - 24px); padding: 22px 16px 16px; }
}
@media (max-width: 380px) {
  .cat-grid, .product-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drawer, .toast, .hero-banner { transition: none; }
  .cat-banner::after { animation: none !important; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* real product photos uploaded from the admin panel */
.card-img:has(.card-photo) { padding: 0; overflow: hidden; background: var(--white); }
.card-photo { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.line-img:has(.line-photo) { padding: 0; overflow: hidden; }
.line-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

/* description on product cards + details dialog */
.card-img[data-detail], .card-title[data-detail] { cursor: pointer; }
.card-desc { margin: 4px 0 0; font-size: 13px; color: var(--g700); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-more { background: none; border: 0; padding: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--brand); cursor: pointer; text-decoration: underline; }
#detailDialog { max-height: calc(100vh - 32px); overflow-y: auto; }
.detail-body { padding: 0 24px 24px; }
.detail-main { background: var(--g50); border: 1px solid var(--border); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; margin: 16px 0 10px; }
.detail-main img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.detail-main svg { width: 40%; height: 40%; stroke: none; }
.detail-thumbs { display: flex; gap: 8px; margin-bottom: 12px; }
.detail-thumb { width: 60px; height: 60px; padding: 0; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--white); cursor: pointer; }
.detail-thumb.on { border-color: var(--brand); }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-desc { margin: 12px 0 16px; line-height: 1.55; white-space: pre-line; }
#detailDialog .btn-block { margin-top: 8px; }

/* ---- Smaller product cards ---- */
.product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.card-img { padding: 14%; border-radius: 14px; }
.card h3 { font-size: 13px; margin-top: 8px; }
.card .pack, .card-desc, .card-more { font-size: 12px; }
.card .price { margin-top: 5px; font-size: 14px; }
.card .price s { font-size: 12px; }
.card-actions { margin-top: 8px; gap: 6px; }
.add { padding: 7px; font-size: 13px; }
.heart { width: 32px; height: 32px; }
.heart svg { width: 15px; height: 15px; }
.card-img .tag { font-size: 10px; padding: 2px 8px; top: 8px; }
.card-img .tag-save { right: 8px; }
.card-img .tag-rx { left: 8px; }
@media (max-width: 1200px) { .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1020px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* price on request */
.price-ask { font-weight: 700; color: var(--brand-dark); font-size: 13px; }
.add-ask { background: var(--white); color: var(--brand); border: 1.5px solid var(--brand); }
.add-ask:hover { background: var(--g100); }

/* search suggestions */
.search { position: relative; }
.search-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); min-width: 280px; background: var(--white); border: 1.5px solid var(--border); border-radius: 18px; box-shadow: 0 12px 32px rgba(0,0,0,.14); overflow: hidden; z-index: 80; max-height: 70vh; overflow-y: auto; }
.search-pop[hidden] { display: none; }
.sp-item { display: flex; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; }
.sp-item:hover, .sp-item.on { background: var(--g100); }
.sp-thumb { width: 42px; height: 42px; flex: none; border-radius: 10px; overflow: hidden; background: var(--g50); border: 1px solid var(--border); display: grid; place-items: center; padding: 0; }
.sp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-thumb svg { width: 70%; height: 70%; stroke: none; }
.sp-text { flex: 1; min-width: 0; display: grid; }
.sp-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-text small { font-size: 12px; color: var(--g500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-price { font-size: 13px; font-weight: 700; white-space: nowrap; }
.sp-all { display: block; padding: 11px 14px; text-align: center; font-size: 13px; font-weight: 700; color: var(--brand); border-top: 1px solid var(--g100); text-decoration: none; }
.sp-all:hover { background: var(--g100); }
.sp-empty { margin: 0; padding: 16px; font-size: 14px; color: var(--g700); }

/* =========================================================
   COMPACT LAYOUT - home, all products and category pages
   Everything is capped to one content width and the image
   areas are scaled down. Tune the sizes in the variables.
   ========================================================= */
:root {
  --wrap: 1440px;            /* one width for header, sections and footer (desktop) */
  --hero-img-max: 380px;     /* tallest the home hero signboard image can be */
  --cat-head-max: 1440px;    /* widest a category page banner can be */
  --cat-head-h: 200px;       /* tallest a category page banner can be on phones (150px) */
}

/* header lines up with the content below it */
.site-header { padding-top: 10px; }
.bar { max-width: var(--wrap); margin: 0 auto; gap: 12px; padding-top: 2px; padding-bottom: 2px; }
.brand img { height: 48px; }

/* everything below the header uses the same width */
.section, .promos, .page-head, .footer { max-width: var(--wrap); }
.section { padding-top: 36px; }
.section-head { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); }
.page-head + .section { padding-top: 20px; }

/* category tiles on the home page */
.cat-grid { gap: 12px; }

/* page headers (All products + category pages) */
.page-head { margin-top: 12px; padding: 16px 22px; gap: 16px; border-radius: 16px; }
.page-head-icon { width: 56px; height: 56px; border-radius: 16px; }
.page-head-icon svg { width: 28px; height: 28px; }
.page-head h1 { font-size: clamp(24px, 3vw, 34px); }
.page-head p { margin-top: 4px; font-size: 14px; }
.crumbs { margin-bottom: 4px; }

/* All products banner: short strip instead of a big block */
.all-products-head { min-height: 120px; }
.all-products-page-banner { width: 30%; inset: 0 2% 0 auto; }
.all-products-head::after { background: linear-gradient(90deg, var(--g50) 0 62%, rgba(240,246,235,.85) 70%, transparent 78%); }
.all-products-head > div { max-width: 66%; }

/* Category page banner: shrinks to a fixed height, never cropped, centred.
   The box wraps the image so the breadcrumb stays on top of it. */
.category-head { width: fit-content; max-width: calc(100% - 32px); border-radius: 16px; }
.category-page-banner { width: auto; max-width: min(100%, var(--cat-head-max)); max-height: var(--cat-head-h); border-radius: 16px; }

/* Desktop: banners stretch to the full content width, height follows the image */
@media (min-width: 721px) {
  .category-head { width: calc(100% - 32px); max-width: var(--wrap); }
  .category-page-banner { width: 100%; max-width: none; max-height: none; }
  .product-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (min-width: 721px) and (max-width: 1200px) { .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 721px) and (max-width: 1020px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* All products page: the banner image already has the title, so hide the text copy */
.all-products-head.category-head .crumbs { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
.all-products-head.category-head { min-height: 0; background: transparent; }
.all-products-head.category-head::after { display: none; }
.all-products-head.category-head { display: block; padding: 0; }

/* tabs are easier to tap, and the open category stays in view */
.tabs { margin-bottom: 14px; }
.tab { padding: 7px 14px; font-size: 13px; }

.footer { margin-top: 48px; }

@media (min-width: 721px) {
  /* hero: shorter, text and image side by side */
  .hero { padding: clamp(14px, 2vw, 22px); margin-top: 10px; border-radius: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(20px, 3vw, 36px); }
  .hero-banner { width: auto; max-width: 100%; max-height: var(--hero-img-max); justify-self: center; }
  .hero-copy h1 { font-size: clamp(24px, 2.8vw, 34px); }
  .hero-copy > p { margin-top: 10px; font-size: 15px; }
  .hero-actions { margin-top: 14px; gap: 10px; }
  .hero-actions .btn { padding: 10px 18px; font-size: 14px; }
  .hero-card { margin-top: 12px; padding: 8px 18px 8px 8px; gap: 12px; }
  .hero-card-icon { width: 40px; height: 40px; border-radius: 12px; }
  .hero-card strong { font-size: 20px; }

  /* promo banners */
  .promos { margin-top: 36px; gap: 14px; }
  .promo { padding: 22px 26px; }
  .promo-light, .promo-dark { min-height: 190px; }
  .promo h3 { font-size: 22px; }
  .promo p { margin: 6px 0 14px; font-size: 14px; }
}

@media (max-width: 1020px) {
  .all-products-head > div { max-width: 62%; }
}

@media (max-width: 720px) {
  .section { padding-top: 28px; }
  .page-head { padding: 14px 16px; gap: 12px; }
  .page-head-icon { width: 44px; height: 44px; border-radius: 12px; }
  .page-head-icon svg { width: 22px; height: 22px; }
  .hero-banner { max-height: 240px; }
  .category-head { max-width: calc(100% - 24px); }
  .category-page-banner { max-height: 150px; }
  .all-products-head { min-height: 100px; padding: 14px 16px; }
  .all-products-page-banner { min-height: 0; max-height: 120px; }
  .promo-light, .promo-dark { min-height: 300px; }
  .footer { margin-top: 36px; }
}

/* the category banner box wraps the image exactly (no padding) */
.category-head { padding: 0; gap: 0; }

/* prescription photo preview with remove button */
.rx-box { margin-top: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px; background: var(--g50); }
.rx-box[hidden] { display: none; }
.rx-thumb { display: grid; place-items: center; }
.rx-box #rxPreview { margin: 0; max-height: 160px; max-width: 100%; width: auto; border-radius: 10px; }
.rx-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.rx-name { flex: 1; min-width: 0; font-size: 13px; color: var(--g700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-remove { flex: none; border: 1.5px solid #b00020; color: #b00020; background: var(--white); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.rx-remove:hover { background: #fde8ea; }

/* even cards: same height per row, price and buttons line up at the bottom */
.card .price { margin-top: auto; padding-top: 6px; }
.card-desc { -webkit-line-clamp: 1; }
.card-more { align-self: flex-start; }

/* home deals: only show full rows (7 / 5 / 4 cards depending on the screen) */
#dealGrid .card:nth-child(n+8) { display: none; }
@media (min-width: 721px) and (max-width: 1200px) { #dealGrid .card:nth-child(n+6) { display: none; } }
@media (min-width: 721px) and (max-width: 1020px) { #dealGrid .card:nth-child(n+5) { display: none; } }
@media (max-width: 720px) { #dealGrid .card:nth-child(n+5) { display: none; } }

/* =========================================================
   HERO without the signboard photo: text on the left,
   call card on the right (desktop); stacked on phones
   ========================================================= */
.hero { isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); z-index: -1; pointer-events: none; }
.hero::before { width: 340px; height: 340px; right: -90px; top: -120px; }
.hero::after  { width: 220px; height: 220px; right: 22%; bottom: -110px; }

@media (min-width: 721px) {
  .hero { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: clamp(24px, 4vw, 56px); padding: clamp(26px, 3.6vw, 52px); margin-top: 10px; }
  .hero-copy { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .hero-copy h1 { font-size: clamp(28px, 3.4vw, 46px); max-width: 20ch; }
  .hero-copy > p { margin-top: 14px; font-size: 16px; max-width: 56ch; }
  .hero-actions { margin-top: 22px; gap: 12px; }
  .hero-actions .btn { padding: 12px 24px; font-size: 15px; }
  .hero-card { grid-column: 2; grid-row: 1 / span 2; justify-self: end; align-self: center; margin-top: 0; gap: 16px; padding: 18px 32px 18px 18px; border-radius: 22px; box-shadow: 0 14px 34px rgba(32,58,12,.22); }
  .hero-card-icon { width: 56px; height: 56px; border-radius: 16px; }
  .hero-card-icon svg { width: 26px; height: 26px; }
  .hero-card strong { font-size: clamp(22px, 2.4vw, 30px); }
}

@media (max-width: 720px) {
  .hero { padding: 24px 20px 20px; border-radius: 22px; }
  .hero-copy { padding: 0; }
  .hero-copy h1 { font-size: clamp(24px, 7.2vw, 30px); max-width: none; }
  .hero-copy > p { display: block; margin-top: 10px; font-size: 14px; line-height: 1.5; }
  .hero-actions { margin-top: 18px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 0; text-align: center; padding: 12px 10px; font-size: 14px; }
  .hero-card { margin: 18px 0 0; width: 100%; box-sizing: border-box; padding: 10px 16px 10px 10px; }
  .hero::before { width: 220px; height: 220px; right: -70px; top: -90px; }
  .hero::after { display: none; }
}

/* medicines sub-category chips */
.subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.subtab { border: 1.5px solid var(--brand); background: var(--white); color: var(--brand-dark); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; }
.subtab span { margin-left: 4px; font-weight: 500; color: var(--g500); }
.subtab:hover { background: var(--g100); }
.subtab[aria-pressed="true"] { background: var(--brand); color: var(--white); }
.subtab[aria-pressed="true"] span { color: #e3efd9; }
@media (max-width: 720px) { .subtabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; } .subtab { flex: none; } }

/* ---------- Breadcrumb buttons ---------- */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.crumbs a {
  gap: 6px; padding: 6px 13px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--brand-dark);
  font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 2px 8px rgba(41,67,18,.18);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.crumbs a:hover { background: #ffffff; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(41,67,18,.25); }
.crumbs a:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.crumbs a:first-child::before {
  content: ""; width: 13px; height: 13px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8M5 9.5V21h5v-6h4v6h5V9.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8M5 9.5V21h5v-6h4v6h5V9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.crumb-sep { width: 14px; height: 14px; flex: none; background: var(--ink); opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.crumb-current {
  padding: 6px 13px; border-radius: 999px; background: var(--brand-dark); color: #ffffff;
  font-size: 12.5px; font-weight: 700; box-shadow: 0 2px 8px rgba(41,67,18,.25);
}
@media (max-width: 720px) {
  .crumbs a, .crumb-current { padding: 5px 10px; font-size: 11.5px; }
  .crumb-sep { width: 12px; height: 12px; }
}

/* =========================================================
   HERO SLIDER (index.html)
   ========================================================= */
.hero-slider { position: relative; width: calc(100% - 32px); max-width: var(--wrap); margin: 14px auto 0; }
@media (min-width: 721px) { .hero-slider { margin-top: 10px; } }

.hero-track { position: relative; overflow: hidden; border-radius: 24px; transition: height .5s ease; }
.hero-slide { display: block; width: 100%; }
.hero-slider .hero { width: 100%; max-width: none; margin: 0; }

/* image slide: the whole picture is shown (never cropped) and is one big link */
.hero-slide-img { color: inherit; text-decoration: none; }
.hero-slide-img img { display: block; width: 100%; height: auto; }
.hero-slide-img:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }

/* with JavaScript: slides stack and cross-fade */
.js-slider .hero-slide { position: absolute; top: 0; left: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.js-slider .hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }

.hero-dots { display: none; justify-content: center; margin-top: 6px; }
.js-slider .hero-dots { display: flex; }
.hero-dot {
  width: 10px; height: 10px; padding: 8px 4px; box-sizing: content-box; background-clip: content-box;
  border: 0; border-radius: 999px; background-color: #c4d4b4; cursor: pointer; transition: width .25s, background-color .25s;
}
.hero-dot[aria-current="true"] { width: 28px; background-color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .hero-track, .js-slider .hero-slide { transition: none; }
}


/* Button on the Beast Gym banner slide (hero slider on index.html) */
.hero-slide-img { position: relative; }
.hero-slide-cta {
  position: absolute; left: clamp(12px, 3vw, 40px); bottom: clamp(12px, 3vw, 36px);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  background: #fc0f12; color: #fff; font-family: var(--display); font-weight: 700; font-size: 15px;
  letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(252, 15, 18, .45);
  transition: background .2s, transform .2s;
}
.hero-slide-cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-slide-img:hover .hero-slide-cta { background: #d4090c; transform: translateY(-2px); }
@media (max-width: 720px) { .hero-slide-cta { padding: 8px 14px; font-size: 12px; } .hero-slide-cta svg { width: 14px; height: 14px; } }
