/* NexMart — storefront theme: brand, flyer carousel, categories, offers.
   Loaded after shop.css so it can refine the existing components. */

/* ---------- Brand lockup ---------- */
.topbar { background: var(--grad-brand); }
.brand { gap: 12px; }
.brand img, .brand svg { filter: drop-shadow(0 2px 6px rgb(3 32 79 / .5)); }
.brand-lockup { display: grid; line-height: 1; }
.brand-word { font-family: var(--f-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.03em; color: #fff; }
.brand-word i { font-style: normal; color: var(--sky); }
.brand-tag { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(255 255 255 / .62); margin-top: 3px; }
@media (max-width: 760px) {
  .brand-tag { display: none; }
  .brand-word { font-size: 1.2rem; }
  /* shop.css injects a hardcoded shop-name label here for the old markup */
  .brand::after { content: none !important; }
  .trust { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) { .trust { grid-template-columns: 1fr; } }

/* ---------- Announcement ticker ---------- */
.ticker {
  background: linear-gradient(90deg, #0F7A38 0%, #16A34A 45%, #0EA5A5 100%); color: #fff; overflow: hidden; position: relative;
  font-size: .85rem; font-weight: 600; --dur: 34s;
}
.ticker-track { display: flex; gap: 48px; width: max-content; padding: 9px 0; animation: ticker var(--dur) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: rgb(255 255 255 / .95); }
.ticker span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber-2); flex: none; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Flyer carousel (admin-managed advertisements) ---------- */
.flyers { max-width: 1320px; margin: 18px auto 0; padding: 0 clamp(12px, 3vw, 28px); }
.flyer-box {
  position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--leaf);
  box-shadow: var(--shadow-3); aspect-ratio: 1200 / 420;
}
@media (max-width: 760px) {
  .flyer-box { aspect-ratio: 3 / 2; }
  /* keep the artwork motif (badge, scooter) in frame when cover-cropping */
  .flyer-img { object-position: 72% center; }
}
.flyer-track {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; scroll-behavior: smooth;
}
.flyer-track::-webkit-scrollbar { display: none; }
.flyer {
  position: relative; flex: 0 0 100%; width: 100%; min-width: 100%; height: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: block; text-decoration: none; color: #fff; overflow: hidden;
}
.flyer-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Slow drift keeps the advert feeling alive without distracting from the copy */
.flyer.on .flyer-img { animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.03) translate3d(0, 0, 0); } to { transform: scale(1.11) translate3d(-1.5%, -1%, 0); } }
.flyer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgb(3 32 79 / .92) 0%, rgb(6 42 102 / .72) 42%, rgb(6 42 102 / .05) 72%);
}
@media (max-width: 760px) { .flyer::after { background: linear-gradient(0deg, rgb(3 32 79 / .95) 30%, rgb(6 42 102 / .25) 100%); } }
.flyer-copy {
  position: absolute; z-index: 2; inset: 0 auto 0 0; width: min(56%, 620px);
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: clamp(20px, 4vw, 54px);
}
@media (max-width: 760px) { .flyer-copy { width: 100%; justify-content: flex-end; gap: 8px; } }
.flyer-kind {
  align-self: flex-start; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; background: rgb(255 255 255 / .16); color: #fff;
  backdrop-filter: blur(4px); border: 1px solid rgb(255 255 255 / .22);
}
.flyer-kind.k-discount { background: var(--grad-sale); border-color: transparent; }
.flyer-kind.k-delivery { background: var(--grad-green); border-color: transparent; }
.flyer-kind.k-hours { background: var(--grad-amber); border-color: transparent; color: #26180A; }
.flyer-kind.k-promo { background: rgb(139 92 246 / .85); border-color: transparent; }
.flyer h2 { font-size: clamp(1.45rem, 3.6vw, 3rem); font-weight: 800; color: #fff; }
.flyer p { margin: 0; font-size: clamp(.9rem, 1.4vw, 1.1rem); color: rgb(255 255 255 / .84); max-width: 34em; }
.flyer .btn { align-self: flex-start; margin-top: 6px; }
/* Each slide's content animates in as it becomes the active one */
.flyer.on .flyer-kind, .flyer.on h2, .flyer.on p, .flyer.on .btn { animation: slide-up .6s var(--ease-out) backwards; }
.flyer.on h2 { animation-delay: .07s; } .flyer.on p { animation-delay: .14s; } .flyer.on .btn { animation-delay: .2s; }
@keyframes slide-up { from { opacity: 0; transform: translateY(18px); } }

.flyer-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgb(255 255 255 / .92); color: var(--leaf); box-shadow: var(--shadow-2);
  opacity: 0; transition: opacity .25s, transform .2s;
  &:hover { transform: translateY(-50%) scale(1.08); }
  svg { width: 20px; height: 20px; }
}
.flyer-box:hover .flyer-nav, .flyer-nav:focus-visible { opacity: 1; }
@media (hover: none) { .flyer-nav { opacity: .85; } }
.flyer-nav.prev { left: 14px; } .flyer-nav.next { right: 14px; }

.flyer-dots { position: absolute; z-index: 4; left: clamp(20px, 4vw, 54px); bottom: 18px; display: flex; gap: 8px; }
@media (max-width: 760px) { .flyer-dots { left: 50%; transform: translateX(-50%); } }
.flyer-dots button {
  width: 26px; height: 5px; border-radius: 3px; border: 0; padding: 0; background: rgb(255 255 255 / .38);
  transition: background .25s, width .25s;
  &[aria-current="true"] { background: var(--sky); width: 44px; }
}

/* ---------- Trust strip ---------- */
.trust {
  max-width: 1320px; margin: 16px auto 0; padding: 0 clamp(12px, 3vw, 28px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
}
.trust > div {
  display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 12px 16px; box-shadow: var(--shadow-1);
  transition: transform .25s var(--ease-out), box-shadow .25s;
  &:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
}
.trust > div > div { display: grid; gap: 2px; min-width: 0; }
.trust svg { width: 26px; height: 26px; flex: none; color: var(--blue); }
.trust b { display: block; font-size: .95rem; }
.trust span { font-size: .8rem; color: var(--muted); }

/* ---------- Section heading banner ---------- */
.band {
  max-width: 1320px; margin: 40px auto 18px; padding: 0 clamp(12px, 3vw, 28px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.band-title { display: flex; align-items: center; gap: 12px; }
.band-title h2 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 800; }
.band-title .dash { width: 6px; height: 30px; border-radius: 3px; background: var(--grad-sky); flex: none; }
.band p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }

/* ---------- Category circles ---------- */
.cats { position: relative; max-width: 1320px; margin: 0 auto; padding: 4px clamp(12px, 3vw, 28px) 8px; }
.cat-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: clamp(10px, 1.6vw, 20px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px 2px 16px;
}
.cat-scroll::-webkit-scrollbar { display: none; }
@media (max-width: 520px) { .cat-scroll { grid-auto-columns: 104px; } }
.cat {
  scroll-snap-align: start; display: grid; justify-items: center; gap: 10px; text-decoration: none;
  color: var(--ink); background: none; border: 0; padding: 0;
}
.cat-ring {
  width: 108px; height: 108px; border-radius: 50%; padding: 4px; background: var(--grad-ring);
  display: grid; place-items: center; transition: transform .3s var(--ease-spring), box-shadow .3s;
  box-shadow: 0 8px 20px -12px rgb(6 42 102 / .8);
}
@media (max-width: 520px) { .cat-ring { width: 88px; height: 88px; } }
.cat:hover .cat-ring, .cat:focus-visible .cat-ring { transform: translateY(-6px) scale(1.05); box-shadow: 0 16px 30px -14px rgb(6 42 102 / .9); }
.cat-face {
  width: 100%; height: 100%; border-radius: 50%; background: var(--paper); overflow: hidden;
  display: grid; place-items: center; position: relative;
}
.cat-face img { width: 100%; height: 100%; object-fit: contain; padding: 14%; transition: transform .35s var(--ease-out); }
.cat:hover .cat-face img { transform: scale(1.12); }
.cat-face .initial { font: 800 2rem var(--f-display); color: var(--leaf-2); }
.cat-face.tint { background: var(--c, var(--blue-soft)); }
.cat-name { font-size: .82rem; font-weight: 700; text-align: center; line-height: 1.2; }
.cat-count { font-size: .72rem; color: var(--muted); margin-top: -6px; }
.cat[aria-pressed="true"] .cat-ring { background: var(--grad-sale); }

/* ---------- Horizontal product rail (offers) ---------- */
.rail-wrap { position: relative; max-width: 1320px; margin: 0 auto; padding: 0 clamp(12px, 3vw, 28px); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(168px, 17vw, 214px);
  gap: clamp(10px, 1.5vw, 18px); overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: none; padding: 6px 2px 18px;
}
.rail::-webkit-scrollbar { display: none; }
@media (max-width: 520px) { .rail { grid-auto-columns: 58vw; } }
.rail > .card { scroll-snap-align: start; }
.rail-btn {
  position: absolute; top: calc(50% - 20px); transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
  color: var(--leaf); display: grid; place-items: center; box-shadow: var(--shadow-2);
  transition: transform .2s, opacity .2s;
  &:hover { transform: translateY(-50%) scale(1.1); }
  &[disabled] { opacity: 0; pointer-events: none; }
  svg { width: 18px; height: 18px; }
}
.rail-btn.prev { left: 2px; } .rail-btn.next { right: 2px; }

/* ---------- Offer badges & pricing ---------- */
.tag.sale {
  left: 8px; top: 8px; width: 44px; height: 44px; border-radius: 50%; padding: 0;
  background: var(--grad-sale); color: #fff; display: grid; place-content: center; line-height: 1;
  font: 800 .92rem/1 var(--f-display); box-shadow: 0 6px 14px -6px rgb(225 29 72 / .9);
  animation: badge-pop .45s var(--ease-spring) backwards;
}
.tag.sale small { display: block; font-size: .56rem; letter-spacing: .08em; font-weight: 800; margin-top: 2px; }
@keyframes badge-pop { from { transform: scale(.4); opacity: 0; } }
.card.on-offer { box-shadow: 0 0 0 1.5px rgb(225 29 72 / .28), var(--shadow-1); }

.price.is-sale { color: var(--sale); }
.price s { font: 600 .78rem/1.2 var(--f-body); color: var(--muted); text-decoration-thickness: 1.5px; }
.price-lg { font-size: 2rem; }

.saving-line { display: flex; justify-content: space-between; font-weight: 700; color: var(--ok); font-size: .9rem; }

/* ---------- Card polish ---------- */
.card { transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.card-media img { transition: transform .4s var(--ease-out); }
.card:hover .card-media img { transform: scale(1.07); }
.card-media { overflow: hidden; }

/* ---------- Compact hero (sits under the flyers) ---------- */
.hero-lite {
  max-width: 1320px; margin: 30px auto 0; padding: 0 clamp(12px, 3vw, 28px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(16px, 3vw, 40px); align-items: center;
}
@media (max-width: 860px) { .hero-lite { grid-template-columns: 1fr; } }
.hero-lite h1 { font-size: clamp(1.8rem, 4vw, 3.1rem); font-weight: 800; }
.hero-lite .hero-sub { color: var(--muted); margin: 14px 0 22px; font-size: clamp(1rem, 1.3vw, 1.1rem); max-width: 34em; }
.hero-lite .hero-sub strong { color: var(--leaf-2); }
.hero-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-weight: 650; color: var(--muted); font-size: .92rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgb(14 159 110 / .7); animation: pulse 2s infinite; flex: none; }
.live-dot.closed { background: var(--chili); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgb(14 159 110 / 0); } }
.hero-check { min-height: 1.5em; margin: 14px 0 0; font-weight: 650; color: var(--leaf-2); }
.hero-check.bad { color: var(--chili); }
.hero-card {
  background: var(--grad-brand); color: #fff; border-radius: var(--r-l); padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-3); display: grid; gap: 14px; position: relative; overflow: hidden;
}
.hero-card::before {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -90px; top: -110px;
  background: radial-gradient(circle, rgb(56 198 255 / .5), transparent 70%);
}
.hero-card h3 { font-size: 1.3rem; color: #fff; }
.hero-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .95rem; color: rgb(255 255 255 / .86); }
.hero-card li { display: flex; gap: 10px; align-items: flex-start; }
.hero-card li::before { content: "✓"; color: var(--sky); font-weight: 800; flex: none; }

/* Shop closed notice */
.closed-note {
  max-width: 1320px; margin: 16px auto 0; padding: 14px 18px; border-radius: var(--r-m);
  background: #FFF1F4; border: 1px solid #FFD3DC; color: #8C0F2E; font-weight: 650;
  margin-inline: clamp(12px, 3vw, 28px);
}

/* ---------- Footer / how-it-works on the blue theme ---------- */
.footer { background: var(--grad-brand); }
.how-steps li { background: var(--paper); border: 1px solid var(--line); }
.how-steps li::before { color: var(--blue); }

/* Empty rail placeholder */
.rail-empty { padding: 26px; border: 1.5px dashed var(--line); border-radius: var(--r-l); text-align: center; color: var(--muted); background: var(--paper); }

/* ---------- Fixes for components reused from shop.css ---------- */
.flyer.no-img { background: var(--grad-brand); }
.flyer.no-img::after { background: linear-gradient(100deg, rgb(3 32 79 / .55), transparent 70%); }

/* Offers chip in the aisle bar */
.chip.chip-sale {
  border-color: rgb(225 29 72 / .35); color: var(--sale); font-weight: 750;
  &[aria-pressed="true"] { background: var(--grad-sale); border-color: transparent; color: #fff; }
}
.group-scroll .chip[aria-pressed="true"] { background: var(--leaf-2); color: #fff; border-color: var(--leaf-2); }

/* The product dialog needs a positioning context for the discount badge */
.pd-media { position: relative; }
.pd-price .price { display: grid; }
.pd-price .price s { font-size: 1rem; }

/* Hero copy sits on white now, not on the old dark panel */
.hero-lite .hero-sub { color: var(--muted); }
.hero-lite .hero-sub strong { color: var(--leaf-2); }
.hero-lite .hero-title { color: var(--ink); }

/* Keep the sale price legible inside the basket lines */
.line .l-sub s { color: var(--muted); }

/* The generated label tile has no photo, so keep its text clear of the discount badge */
.card.on-offer .label-art .la-brand { padding-left: 42px; min-height: 40px; }
.rail .card.on-offer .label-art .la-brand { padding-left: 40px; }

/* Skeleton placeholders follow the blue theme */
.skeleton { background: linear-gradient(90deg, #E2EBF9 25%, #F1F6FE 50%, #E2EBF9 75%); background-size: 200% 100%; }


/* ---------- Photographic section banner ---------- */
.band-photo { max-width: 1320px; margin: 46px auto 0; padding: 0 clamp(12px, 3vw, 28px); }
.band-photo .strip {
  position: relative; border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-1);
  height: clamp(62px, 8.5vw, 104px); display: grid; place-items: center;
}
.band-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band-photo .strip::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(3 32 79 / .88) 0%, rgb(6 42 102 / .48) 50%, rgb(3 32 79 / .88) 100%);
}
.band-photo h2 {
  position: relative; z-index: 1; color: #fff; text-transform: uppercase; letter-spacing: .045em;
  font-size: clamp(1.05rem, 2.5vw, 1.95rem); font-weight: 800; text-align: center; padding: 0 16px;
  text-shadow: 0 2px 14px rgb(0 0 0 / .55);
}
/* A thin colour rule under the strip ties the section to the palette */
.band-photo .strip::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px; z-index: 2;
  background: linear-gradient(90deg, var(--amber), var(--green), var(--purple), var(--sale));
}
.band-sub {
  max-width: 1320px; margin: 12px auto 4px; padding: 0 clamp(12px, 3vw, 28px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.band-sub p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- Colour accents so the page is not monotone blue ---------- */
.trust > div:nth-child(1) svg { color: var(--green); }
.trust > div:nth-child(2) svg { color: var(--amber); }
.trust > div:nth-child(3) svg { color: var(--blue); }
.trust > div:nth-child(4) svg { color: var(--purple); }
.trust > div:nth-child(1) { border-top: 3px solid var(--green); }
.trust > div:nth-child(2) { border-top: 3px solid var(--amber); }
.trust > div:nth-child(3) { border-top: 3px solid var(--blue); }
.trust > div:nth-child(4) { border-top: 3px solid var(--purple); }

/* Category circles: white face + multicolour ring, as in a real grocery storefront */
.cat-face { background: #fff; }
.cat-face img { object-fit: cover; padding: 0; }
.cat-face.tint img { object-fit: contain; padding: 14%; }

.hero-card li::before { color: var(--green-2); }
.how-steps li::before { color: var(--green); }
.saving-line { color: var(--green); }
.bar.ok i { background: var(--grad-green); }

/* Banner theme chips used by the admin preview */
.flyer-kind.k-green { background: var(--grad-green); border-color: transparent; }
.flyer-kind.k-amber { background: var(--grad-amber); border-color: transparent; color: #26180A; }

/* Banner used as the product-grid heading: it already sits inside .shop's padding */
.band-photo.in-shop { max-width: none; margin: 0 0 14px; padding: 0; }
.shop-head { align-items: center; }

/* ================= Footer ================= */
.footer {
  background: var(--grad-brand); color: #fff; margin-top: 56px;
  padding: clamp(36px, 5vw, 64px) clamp(16px, 4vw, 48px) 0;
  display: block; position: relative; overflow: hidden;
}
/* Soft light bloom so the flat gradient does not look like a plain block */
.footer::before {
  content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
  right: -180px; top: -320px; pointer-events: none;
  background: radial-gradient(circle, rgb(56 198 255 / .32), transparent 70%);
}
.footer::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--amber), var(--green), var(--purple), var(--sale));
}
.foot-top {
  position: relative; max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: clamp(22px, 3vw, 48px);
}
@media (max-width: 1000px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .foot-top { grid-template-columns: 1fr; } }

.foot-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.foot-logo > span { display: grid; }
.foot-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: rgb(255 255 255 / .6); margin-top: 4px;
}
.foot-blurb { color: rgb(255 255 255 / .74); font-size: .93rem; max-width: 40ch; margin: 16px 0 18px; }

.socials { display: flex; gap: 10px; }
.soc {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgb(255 255 255 / .1); color: #fff; border: 1px solid rgb(255 255 255 / .18);
  transition: transform .2s var(--ease-spring), background-color .2s, border-color .2s;
  svg { width: 22px; height: 22px; }
  &:hover { transform: translateY(-3px); }
}
.soc.wa:hover { background: #25D366; border-color: #25D366; }
.soc.fb:hover { background: #1877F2; border-color: #1877F2; }
.soc.ig:hover { background: linear-gradient(45deg, #F9CE34, #EE2A7B, #6228D7); border-color: transparent; }
.soc.tt:hover { background: #000; border-color: #000; }

.foot-col { display: grid; align-content: start; gap: 10px; }
.foot-col h3 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800;
  color: var(--sky); margin-bottom: 4px;
}
.foot-col a {
  color: rgb(255 255 255 / .78); text-decoration: none; font-size: .93rem; width: fit-content;
  transition: color .18s, transform .18s;
  &:hover { color: #fff; transform: translateX(3px); }
}

.foot-contact { gap: 12px; }
.contact-row {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  color: rgb(255 255 255 / .8); transform: none !important;
  b { display: block; color: #fff; font-size: .92rem; font-weight: 700; }
  small { display: block; color: rgb(255 255 255 / .62); font-size: .82rem; }
}
.contact-row .ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .16);
  svg { width: 19px; height: 19px; }
}
.contact-row.wa .ico, .contact-row .ico.wa { background: rgb(37 211 102 / .22); border-color: rgb(37 211 102 / .4); color: #5BEF96; }
.contact-row .ico.call { background: rgb(56 198 255 / .2); border-color: rgb(56 198 255 / .4); color: var(--sky); }
.contact-row .ico.pin { background: rgb(139 92 246 / .24); border-color: rgb(139 92 246 / .42); color: #C4B1FF; }
.contact-row .ico.clock { background: rgb(245 165 36 / .22); border-color: rgb(245 165 36 / .4); color: var(--amber-2); }
a.contact-row:hover .ico { transform: scale(1.06); }

.foot-badges {
  position: relative; max-width: 1320px; margin: clamp(28px, 4vw, 44px) auto 0; padding: 20px 0;
  list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px;
  border-top: 1px solid rgb(255 255 255 / .14); border-bottom: 1px solid rgb(255 255 255 / .14);
}
.foot-badges li {
  display: flex; align-items: center; gap: 10px; color: rgb(255 255 255 / .82); font-size: .88rem; font-weight: 600;
  svg { width: 22px; height: 22px; color: var(--sky); flex: none; }
}

.foot-bottom {
  position: relative; max-width: 1320px; margin: 0 auto; padding: 20px 0 26px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  color: rgb(255 255 255 / .6); font-size: .85rem;
  p { margin: 0; }
  a { color: rgb(255 255 255 / .8); }
}

/* ---------- Floating call / WhatsApp buttons ---------- */
.quick-contact {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 80; display: grid; gap: 10px;
}
.qc {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; box-shadow: 0 10px 26px -8px rgb(3 32 79 / .7);
  transition: transform .2s var(--ease-spring), box-shadow .2s;
  svg { width: 26px; height: 26px; }
  &:hover { transform: scale(1.09); }
}
.qc-wa { background: #25D366; }
.qc-call { background: var(--grad-brand); }
/* The WhatsApp button gets one gentle pulse ring so it reads as "tap me" */
.qc-wa::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgb(37 211 102 / .6); animation: qc-pulse 2.6s infinite;
}
.qc { position: relative; }
@keyframes qc-pulse { 70% { box-shadow: 0 0 0 14px rgb(37 211 102 / 0); } 100% { box-shadow: 0 0 0 0 rgb(37 211 102 / 0); } }
@media (max-width: 560px) { .qc { width: 46px; height: 46px; svg { width: 23px; height: 23px; } } }
@media (prefers-reduced-motion: reduce) { .qc-wa::after { animation: none; } }
@media print { .quick-contact { display: none !important; } }

/* "Welcome back" notice when the checkout is filled from a previous order */
.saved-hint {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0;
  background: #EAF7EF; border: 1px solid #BFE6CE; color: #0B5A31;
  border-radius: var(--r-m); padding: 10px 14px; font-size: .88rem; font-weight: 600;
}
.saved-hint button {
  border: 0; background: none; padding: 0; font: inherit; color: var(--leaf-2);
  text-decoration: underline; cursor: pointer;
  &:hover { color: var(--sale); }
}

/* ================= NexMart top bar ================= */
/* Two-tone brand: "Nex" in white, "Mart" in the mint accent from the logo. */
.brand-word i { color: #5EEAD4; }

/* Shopping-themed header: a navy-to-teal wash with supermarket items drawn
   faintly behind it, rather than one flat block of blue. */
.topbar {
  position: sticky;
  background:
    url("/img/topbar-items.svg") repeat 0 center / 300px auto,
    linear-gradient(112deg, #071A44 0%, #0B3E8F 34%, #1D4ED8 64%, #0E7490 100%);
}
/* Keeps the search field and buttons readable over the pattern */
.topbar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgb(7 26 68 / .55) 0%, rgb(7 26 68 / .16) 42%, rgb(7 26 68 / .50) 100%);
}
/* Thin mint-to-sky rule tying the header into the green ticker below it */
.topbar::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, #34D399, #5EEAD4, #38BDF8, #34D399);
}
.topbar-inner { position: relative; z-index: 1; }

/* =====================================================================
   NexMart brand refresh: logo colours, shelf-talker product cards,
   phone-first layout. Everything below only restyles; no behaviour.
   ===================================================================== */
:root {
  --nx-green: #7AB800;      /* "Nex" in the logo */
  --nx-green-d: #1F7A35;    /* readable green for prices and buttons */
  --nx-yellow: #F7B500;     /* "Mart" in the logo */
  --nx-yellow-l: #FFD23F;
  --nx-rainbow: linear-gradient(90deg, #6CB33F 0%, #F7B500 22%, #F97316 42%, #E11D74 62%, #7C3AED 80%, #0EA5E9 100%);
}

/* ---------- Top bar: white, so the full-colour logo reads exactly as designed ---------- */
.topbar {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgb(122 184 0 / .07) 0%, rgb(247 181 0 / .07) 30%, rgb(225 29 116 / .04) 62%, rgb(14 165 233 / .07) 100%),
    rgb(255 255 255 / .97);
  backdrop-filter: saturate(1.4) blur(10px);
  animation-name: bar-shadow-soft;
}
@keyframes bar-shadow-soft { to { box-shadow: 0 10px 28px -16px rgb(12 27 51 / .35); } }
.topbar::before { content: none; }
.topbar::after { height: 3px; background: var(--nx-rainbow); }
.brand { gap: 0; color: var(--ink); }
.brand img, .brand svg { filter: none; }
.brand-lockup { display: grid; gap: 3px; justify-items: start; }
.brand-logo { height: 42px; width: auto; }
.brand-tag { color: #3E6E1F; letter-spacing: .07em; font-size: .58rem; margin: 0; }
.search input { background: #F3F5F8; box-shadow: inset 0 0 0 1.5px #E3E7EE; }
.search input:focus { outline: 3px solid rgb(247 181 0 / .55); background: #fff; }
.top-link { color: var(--ink); &:hover { background: rgb(12 27 51 / .06); } }
.top-link svg { width: 26px; height: 26px; color: var(--nx-green-d); }
.basket-btn {
  background: linear-gradient(135deg, #FFD23F 0%, var(--nx-yellow) 100%); color: var(--ink);
  box-shadow: 0 6px 16px -8px rgb(247 181 0 / .9);
  svg { width: 26px; height: 26px; }
}
.basket-count { border-color: #fff; }
@media (max-width: 760px) {
  .brand-logo { height: 32px; }
  .brand-tag { display: none; }
}
/* The track page puts its button right next to the logo */
.track-bar .brand-logo { height: 36px; }

/* ---------- Footer: shaded charcoal instead of blue ---------- */
.footer { background: linear-gradient(180deg, #2B2F36 0%, #1F2227 55%, #17191D 100%); }
.footer::before { background: radial-gradient(circle, rgb(255 255 255 / .06), transparent 70%); }
.footer::after { background: var(--nx-rainbow); }
.foot-col h3 { color: var(--nx-yellow-l); }
.foot-badges li svg { color: #9BD15A; }
.foot-mark {
  width: 54px; height: 54px; border-radius: 15px; background: #fff; padding: 6px; flex: none;
  display: grid; place-items: center; box-shadow: 0 8px 20px -10px rgb(0 0 0 / .6);
  img { width: 100%; height: 100%; object-fit: contain; }
}
.foot-logo .brand-word { color: #8DC63F; }
.foot-logo .brand-word i { color: var(--nx-yellow-l); }
.foot-bottom i { font-style: normal; }

/* ---------- Product cards, styled like a shelf talker ---------- */
.card, .card.on-offer {
  border-radius: 16px; border: 1px solid #ECEFF3;
  box-shadow: 0 1px 2px rgb(12 27 51 / .04), 0 6px 18px -12px rgb(12 27 51 / .25);
}

/* A soft tint per category behind each photo, so the grid is not a wall of white.
   shop.js sets --tint from the category colour (Admin → Categories); this is the fallback. */
.card { --tint: #EEF1F5; }
.cat-face .initial.emoji { font-size: 2.6rem; line-height: 1; }

.card-media {
  background: radial-gradient(90% 75% at 50% 40%, rgb(255 255 255 / .92) 0%, rgb(255 255 255 / .35) 55%, transparent 80%), var(--tint);
  isolation: isolate;
}
/* Multiply drops the white box around product photos into the tint */
.card-media img { position: relative; z-index: 1; padding: 9%; mix-blend-mode: multiply; }
/* A soft floor shadow gives each pack a little depth, as if it stands on a shelf */
.card-media::after {
  content: ""; position: absolute; z-index: 0; left: 24%; right: 24%; bottom: 7%; height: 7%;
  border-radius: 50%; background: radial-gradient(closest-side, rgb(12 27 51 / .28), transparent);
  transition: transform .45s var(--ease-out), opacity .45s;
}
.card[data-aisle] .label-art {
  background:
    radial-gradient(circle at 85% 12%, rgb(255 255 255 / .6) 0 18%, transparent 19%),
    repeating-linear-gradient(135deg, transparent 0 14px, rgb(255 255 255 / .22) 14px 15px),
    color-mix(in oklab, var(--tint), #7D8796 14%);
}
.card-media .label-art { position: relative; z-index: 1; }

/* 3D tilt on devices with a mouse */
@media (hover: hover) {
  .card-media { perspective: 700px; }
  .card:hover .card-media img { transform: rotateY(-12deg) rotateX(5deg) translateY(-6px) scale(1.07); }
  .card:hover .card-media::after { transform: scale(.82); opacity: .75; }
}
/* Offer items bob gently so the deals feel alive (off for reduced motion, via base.css) */
.rail .card-media img { animation: nx-bob 4.8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.55s); }
.rail .card-media::after { animation: nx-shadow 4.8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.55s); }
@keyframes nx-bob { 50% { translate: 0 -5px; } }
@keyframes nx-shadow { 50% { scale: .8; opacity: .7; } }

/* Discount badge: a big red pill on the photo corner */
.tag.sale {
  left: auto; top: auto; right: 8px; bottom: 8px; width: auto; height: auto; z-index: 2;
  padding: .26em .55em; border-radius: 10px; display: block;
  font: 800 clamp(.85rem, 8cqi, 1.3rem)/1.1 var(--f-display); letter-spacing: -.01em;
  background: linear-gradient(135deg, #E11D48 0%, #F43F5E 100%); color: #fff;
  box-shadow: 0 0 0 2px #fff, 0 8px 18px -8px rgb(225 29 72 / .95);
}
.pd-media .tag.sale { font-size: 1.5rem; right: 14px; bottom: 14px; }
/* The generated label tile keeps its pack pill clear of the badge */
.card.on-offer .label-art .la-brand, .rail .card.on-offer .label-art .la-brand { padding-left: 0; min-height: 0; }
.card.on-offer .label-art .la-pack { justify-self: start; }

.card-body { padding: 10px 12px 12px; gap: 2px; }
.card-name { font: 750 .98rem/1.25 var(--f-display); letter-spacing: -.01em; color: var(--ink); min-height: 0; }
.card-brand { font-size: .76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { align-items: flex-end; padding-top: 6px; }

.price, .price.is-sale { color: var(--ink); display: grid; justify-items: start; gap: 1px; font: inherit; }
.price .now { font: 800 1.35rem/1.05 var(--f-display); color: var(--nx-green-d); letter-spacing: -.02em; }
.price .save {
  background: var(--nx-yellow-l); color: #2B2100; font: 800 .66rem/1 var(--f-body); letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; margin-bottom: 3px;
}
.price s { font: 600 .78rem/1.2 var(--f-body); color: var(--muted); }
.price small { font: 600 .72rem/1.2 var(--f-body); color: var(--muted); }
.price-lg .now { font-size: 2.2rem; }
.price-lg .save { font-size: .8rem; }
.price-lg s { font-size: 1rem; }

.add { background: var(--nx-green-d); &:hover { background: #17662B; } }
.stepper { background: var(--nx-yellow-l); color: var(--ink); }

@container (max-width: 200px) { .price .now { font-size: 1.15rem; } .price s span { display: none; } }
/* Three-across cards on phones: the price sits over a full-width Add button */
@container (max-width: 150px) {
  .card-body { padding: 7px 7px 8px; }
  .card-name { font-size: .78rem; }
  .card-brand { font-size: .64rem; }
  .price .now { font-size: 1rem; }
  .price .save { font-size: .52rem; padding: 3px 6px; margin-bottom: 2px; }
  .price s { font-size: .64rem; }
  .price s span { display: none; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 4px; }
  .card-foot .ctl { display: block; }
  .add { width: 100%; height: 30px; padding: 0; font-size: .8rem; }
  .add .add-label { display: inline; }
  .add svg { width: 14px; height: 14px; }
  .stepper { display: flex; width: 100%; height: 30px; justify-content: space-between; }
  .card-foot .pill { font-size: .66rem; justify-content: center; }
}

/* ---------- Offers: a rail on desktop, a 3-across grid on phones ---------- */
.offers-foot { display: none; }
@media (max-width: 760px) {
  .rail {
    grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto;
    overflow: visible; scroll-snap-type: none; gap: 8px; padding: 6px 0 4px;
  }
  .rail-btn { display: none; }
  .offers-foot { display: flex; justify-content: center; padding: 10px clamp(12px, 3vw, 28px) 0; }
  .offers-foot .btn { width: 100%; }
}

/* ---------- Phones: shop details fit on one screen, products start sooner ---------- */
@media (max-width: 760px) {
  .flyers { margin-top: 12px; }
  .trust { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
  .trust > div { padding: 8px 10px; gap: 8px; border-radius: 12px; align-items: flex-start; }
  .trust svg { width: 20px; height: 20px; margin-top: 1px; }
  .trust b { font-size: .78rem; line-height: 1.2; }
  .trust span { font-size: .68rem; line-height: 1.25; }

  .hero-lite { margin-top: 16px; gap: 0; }
  .hero-card { display: none; }           /* the same steps are in "How delivery works" further down */
  .hero-kicker { font-size: .8rem; margin-bottom: 6px; }
  .hero-lite h1 { font-size: 1.45rem; }
  .hero-lite .hero-sub { font-size: .88rem; margin: 6px 0 12px; }
  .hero-cta { flex-wrap: nowrap; gap: 8px; }
  .hero-cta .btn { flex: 1; min-height: 40px; padding: .45em .8em; font-size: .88rem; }
  .hero-check { margin-top: 8px; font-size: .85rem; min-height: 0; }

  .band-photo { margin-top: 22px; }
  .band-photo .strip { height: 52px; }
  .band-sub { margin-top: 8px; }
}
@media (max-width: 420px) { .trust { grid-template-columns: 1fr 1fr; } }

/* ================= Town picker ================= */
.town-btn {
  height: 38px; padding: 0 12px 0 9px; border-radius: 999px; border: 1.5px solid #E3E7EE; background: #fff;
  display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font: 700 .85rem/1 var(--f-body);
  max-width: 160px; cursor: pointer;
  svg { width: 18px; height: 18px; flex: none; color: var(--nx-green-d); }
  span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  &:hover { border-color: var(--nx-green); }
}
@media (max-width: 760px) { .town-btn { height: 34px; padding: 0 9px 0 7px; font-size: .8rem; max-width: 104px; } }
@media (max-width: 420px) { .town-btn { max-width: 78px; padding: 0 7px 0 5px; gap: 3px; svg { width: 16px; height: 16px; } } }
.town-dialog {
  width: min(460px, calc(100vw - 32px)); border-radius: var(--r-l); padding: 0;
  &::backdrop { background: rgb(12 27 51 / .55); backdrop-filter: blur(3px); }
}
.town-in { padding: 28px 24px 22px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.town-in h2 { font-size: 1.5rem; }
.town-in > p { margin: 0 0 6px; font-size: .95rem; }
.town-pin {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #EAF7EF; color: var(--nx-green-d); svg { width: 30px; height: 30px; }
}
.town-list { width: 100%; display: grid; gap: 8px; max-height: min(52dvh, 420px); overflow-y: auto; padding: 2px; }
.town-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--r-m); background: #fff; cursor: pointer;
  font: 700 1.05rem/1.2 var(--f-body); color: var(--ink);
  svg { width: 22px; height: 22px; flex: none; color: var(--nx-green-d); }
  span { display: grid; gap: 2px; }
  small { font-weight: 550; font-size: .8rem; color: var(--muted); }
  &:hover, &:focus-visible { border-color: var(--nx-green); background: #F6FBEF; }
  &[aria-current="true"] { border-color: var(--nx-green-d); background: #EAF7EF; }
}

/* ================= "Go to checkout" bar ================= */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 85;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgb(255 255 255 / 0), rgb(255 255 255 / .9) 40%);
  pointer-events: none;
  &.pop .cartbar-in { animation: cartbar-in .45s var(--ease-spring); }
}
@keyframes cartbar-in { from { transform: translateY(120%); } }
.cartbar-in {
  pointer-events: auto; width: min(640px, 100%); margin: 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 14px; border: 0; border-radius: 18px; cursor: pointer; text-align: left;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #03204F 0%, #062A66 55%, #0B3E8F 100%); color: #fff;
  box-shadow: 0 14px 34px -12px rgb(3 32 79 / .7), inset 0 0 0 1px rgb(255 255 255 / .08);
  font-family: var(--f-body);
  /* the multicolour NexMart line along the top edge */
  &::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--nx-rainbow); }
  &:hover .cb-go { filter: brightness(1.05); }
}
.cb-ico {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgb(255 255 255 / .16); svg { width: 24px; height: 24px; }
  b {
    position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    background: var(--nx-yellow); color: var(--ink); font: 800 .72rem/20px var(--f-body); text-align: center;
  }
}
.cb-text { flex: 1; min-width: 0; display: grid; line-height: 1.2; b { font: 800 1.1rem/1.15 var(--f-display); } small { font-size: .78rem; opacity: .88; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.cb-go {
  flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 12px 14px 12px 18px; border-radius: 13px;
  background: linear-gradient(135deg, #FFD23F 0%, var(--nx-yellow) 100%); color: var(--ink); font: 800 .95rem/1 var(--f-body);
  svg { width: 18px; height: 18px; }
}
@media (max-width: 400px) { .cb-go { padding: 11px 10px 11px 13px; font-size: .86rem; } .cb-ico { width: 36px; height: 36px; } }
/* Keep the floating buttons, toasts and footer clear of the bar */
body.has-cartbar .quick-contact { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
body.has-cartbar .toasts { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
body.has-cartbar .footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
@media print { .cartbar { display: none !important; } }

/* Basket: carry on shopping */
.basket-more { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.basket-more #shopMore { flex: 1; svg { width: 18px; height: 18px; } }

/* ================= Promotion code at checkout ================= */
.promo { display: grid; gap: 8px; }
.promo-toggle {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 10px 14px;
  border: 1.5px dashed var(--nx-green); border-radius: var(--r-m); background: #F6FBEF; color: var(--nx-green-d);
  font: 700 .95rem/1 var(--f-body); cursor: pointer;
  svg { width: 20px; height: 20px; }
  &:hover { background: #EAF7EF; }
}
.promo-row { display: flex; gap: 8px; .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; } .btn { flex: none; } }
.promo-msg { margin: 0; font-size: .88rem; font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; &:empty { display: none; } }
.promo-msg.bad { color: var(--chili); }
.promo-msg.ok { background: #EAF7EF; border: 1px solid #BFE6CE; color: #0B5A31; border-radius: var(--r-m); padding: 10px 14px; }
.promo-msg .promo-next { flex-basis: 100%; font-weight: 550; color: var(--muted); }
.promo-msg .linkish, .co-more {
  border: 0; background: none; padding: 0; font: inherit; color: var(--leaf-2); text-decoration: underline; cursor: pointer;
}
.summary .promo-line { color: var(--nx-green-d); font-weight: 700; }
.co-more { display: block; margin-top: 10px; font-size: .9rem; font-weight: 650; }

/* ================= Shop chooser ================= */
.shop-dialog { width: min(560px, calc(100vw - 24px)); }
.shop-dialog .town-in { gap: 8px; padding: 24px 18px 16px; }
.shop-grid {
  width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 2px;
  max-height: min(62dvh, 560px); overflow-y: auto;
}
.shop-opt {
  display: grid; justify-items: center; align-content: start; gap: 8px; padding: 14px 10px 12px; text-align: center;
  border: 1.5px solid var(--line); border-radius: var(--r-l); background: #fff; cursor: pointer; color: var(--ink);
  font-family: var(--f-body); transition: transform .15s var(--ease-spring), border-color .15s, box-shadow .15s;
  &:hover, &:focus-visible { border-color: var(--nx-green); box-shadow: 0 10px 24px -14px rgb(12 27 51 / .45); transform: translateY(-2px); }
  &[aria-current="true"] { border-color: var(--nx-green-d); background: #F6FBEF; }
}
.so-img { width: 76px; height: 76px; border-radius: 20px; overflow: hidden; display: grid; place-items: center; background: #F3F6FA; img { width: 100%; height: 100%; object-fit: cover; } }
.so-text { display: grid; gap: 3px; b { font: 750 .98rem/1.2 var(--f-body); } small { font-size: .76rem; color: var(--muted); line-height: 1.25; } em { font-style: normal; font-size: .76rem; font-weight: 700; color: var(--nx-green-d); } }
/* The main shop: full width, bigger picture, side by side */
.shop-opt.big {
  grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left;
  gap: 16px; padding: 16px 18px; border-width: 2px; border-color: var(--nx-green);
  background: linear-gradient(135deg, #F6FBEF 0%, #FFFBEA 100%);
  .so-img { width: 104px; height: 104px; border-radius: 26px; background: #fff; box-shadow: 0 8px 20px -12px rgb(12 27 51 / .4); img { object-fit: contain; padding: 8px; } }
  .so-text b { font: 800 1.35rem/1.15 var(--f-display); }
  .so-text small { font-size: .86rem; }
  .so-text em { font-size: .82rem; }
}
@media (max-width: 380px) { .shop-opt.big { .so-img { width: 80px; height: 80px; } .so-text b { font-size: 1.15rem; } } }
.shop-foot { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ================= Shop banner (under the NexMart top bar) ================= */
.shop-hero {
  --a: #0B3E8F; --b: #38C6FF;
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px;
  width: min(1240px, calc(100% - 32px)); margin: 10px auto 0; padding: 9px 12px 11px 10px;
  border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, var(--a) 0%, var(--b) 100%);
  box-shadow: 0 12px 28px -20px rgb(3 32 79 / .7);
  isolation: isolate;
  &::before { content: ""; position: absolute; z-index: -1; width: 180px; height: 180px; right: -50px; top: -100px; border-radius: 50%; background: rgb(255 255 255 / .12); }
  &::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--nx-rainbow); }
}
.shop-hero[data-kind="main"], .shop-hero[data-kind="supermarket"] { --a: #03204F; --b: #1A6BFF; }
.shop-hero[data-kind="vegetables"] { --a: #14532D; --b: #65A30D; }
.shop-hero[data-kind="eggs"] { --a: #92400E; --b: #F59E0B; }
.shop-hero[data-kind="meat"] { --a: #0C4A6E; --b: #0EA5E9; }
.shop-hero[data-kind="bakery"] { --a: #78350F; --b: #D97706; }
.shop-hero[data-kind="pharmacy"] { --a: #134E4A; --b: #14B8A6; }
.shop-hero[data-kind="hardware"] { --a: #111827; --b: #4B5563; }
.shop-hero[data-kind="clothes"] { --a: #831843; --b: #EC4899; }
.shop-hero[data-kind="gas"] { --a: #7F1D1D; --b: #EA580C; }
.shop-hero[data-kind="electronics"] { --a: #1E3A8A; --b: #3B82F6; }
.shop-hero[data-kind="books"] { --a: #4C1D95; --b: #8B5CF6; }
.shop-hero .ss-img {
  flex: none; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 16px -10px rgb(0 0 0 / .55), 0 0 0 2px rgb(255 255 255 / .35);
  img { width: 100%; height: 100%; object-fit: cover; }
}
.shop-hero[data-kind="main"] .ss-img img { object-fit: contain; padding: 5px; }
.shop-hero .ss-text {
  flex: 0 1 auto; min-width: 0; display: grid; gap: 1px;
  small { font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
  h2 { margin: 0; font: 800 clamp(1.05rem, 2vw, 1.3rem)/1.15 var(--f-display); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  p { margin: 0; font-size: .8rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
}
.ss-town {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; justify-self: start; padding: 2px 9px 2px 6px; border: 0;
  border-radius: 999px; background: rgb(255 255 255 / .18); color: #fff; font: 700 .72rem/1.5 var(--f-body); cursor: pointer;
  svg { width: 13px; height: 13px; }
  &:hover:not(:disabled) { background: rgb(255 255 255 / .3); }
  &:disabled { cursor: default; }
}
/* The other shops: a sideways-scrolling row filling the right of the banner */
.ss-shops {
  flex: 1 1 0; min-width: 0; display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; padding: 4px 2px; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .45) transparent;
  & > :first-child { margin-left: auto; } /* sits on the right while there are few, scrolls when there are many */
  &::-webkit-scrollbar { height: 5px; }
  &::-webkit-scrollbar-thumb { background: rgb(255 255 255 / .45); border-radius: 9px; }
}
.ss-shop {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; max-width: 200px;
  padding: 5px 12px 5px 5px; border-radius: 999px; cursor: pointer; color: #fff;
  background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .3);
  font: 700 .84rem/1.15 var(--f-body); text-align: left;
  transition: background .15s, color .15s, transform .15s var(--ease-spring);
  img { width: 34px; height: 34px; flex: none; border-radius: 50%; object-fit: cover; background: #fff; }
  span { display: grid; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  small { font-size: .66rem; font-weight: 700; opacity: .85; }
  &:hover:not(:disabled), &:focus-visible { background: #fff; color: var(--ink); transform: translateY(-1px); }
  &.soon { cursor: default; opacity: .6; }
}
@media (max-width: 700px) {
  .shop-hero { flex-wrap: wrap; row-gap: 8px; padding: 9px 10px 11px; }
  .shop-hero .ss-text { flex: 1 1 0; p { display: none; } } /* phones: name and town only */
  .ss-shops { flex: 1 0 100%; & > :first-child { margin-left: 0; } }
  .ss-shop { max-width: 170px; }
}

/* ================= Right-side buttons: other shops, voice order, call / WhatsApp ================= */
.qc-shops {
  position: relative; background: conic-gradient(from 200deg, #F5A524, #16A34A, #1A6BFF, #8B5CF6, #E11D48, #F5A524);
  border: 3px solid #fff; cursor: pointer;
  .qc-label {
    position: absolute; right: calc(100% + 8px); top: 50%; translate: 0 -50%; padding: 5px 10px; border-radius: 999px;
    background: var(--ink); color: #fff; font: 700 .78rem/1 var(--f-body); white-space: nowrap; box-shadow: var(--shadow-2);
  }
}
.qc-contact { position: relative; display: grid; }
.qc-talk {
  border: 0; cursor: pointer; background: linear-gradient(135deg, #25D366 0%, #1A6BFF 100%);
  .qt-close { display: none; }
  &.open { background: var(--ink); .qt-open { display: none; } .qt-close { display: block; } }
}
.qc-talk::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgb(37 211 102 / .6); animation: qc-pulse 2.6s infinite;
}
.qc-talk.open::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .qc-talk::after { animation: none; } }
.qc-menu {
  position: absolute; right: 0; bottom: calc(100% + 10px); display: grid; gap: 8px; min-width: 200px;
  padding: 8px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-3);
  animation: qc-menu-in .22s var(--ease-spring);
  &[hidden] { display: none; }
}
@keyframes qc-menu-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.qc-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 12px;
  color: var(--ink); text-decoration: none; font: 750 .98rem/1.1 var(--f-body);
  .qo-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; svg { width: 20px; height: 20px; } }
  &.call .qo-ico { background: var(--grad-brand); }
  &.wa .qo-ico { background: #25D366; }
  &:hover, &:focus-visible { background: var(--wash); }
}
@media (max-width: 560px) { .qc-shops .qc-label { display: none; } }

/* A shop that is open but has nothing to sell yet */
.shop-opt.soon { cursor: default; opacity: .62; filter: grayscale(.5); &:hover { transform: none; box-shadow: none; border-color: var(--line); } }
.so-text .so-soon { color: #B45309; background: #FFF4DB; padding: 2px 8px; border-radius: 999px; justify-self: center; }
.shop-opt.big .so-text .so-soon { justify-self: start; }
.so-text .so-here { color: var(--leaf-2); }
