/* KHEL style.css — version 6. If you can read this line in the browser,
   the NEW stylesheet is loaded. (Open /style.css on your site to check.) */
/* =========================================================
   KHEL — Responsive purple theme
   Palette:
     F3CCDE  light pink
     D6A8C4  soft purple
     BA88AE  medium purple
     9E6899  deep pink-purple  ← primary
     5B3765  deep purple
   ========================================================= */

:root {
  --khel-css: 6;   /* keep in sync with CSS_VERSION in slideshow.js */
  --brand:        #9E6899;
  --brand-dark:   #5B3765;
  --brand-mid:    #BA88AE;
  --brand-accent: #D6A8C4;
  --brand-soft:   #F3CCDE;
  --brand-light:  #FAF3F8;
  --text-dark:    #2A1B2F;
  --text-muted:   #6B5A72;

  --space-xs:  clamp(0.75rem, 1.5vw, 1rem);
  --space-sm:  clamp(1rem,    2vw,   1.5rem);
  --space-md:  clamp(1.25rem, 3vmin, 2.5rem);
  --space-lg:  clamp(2rem,    5vmin, 4rem);
  --space-xl:  clamp(4rem,    7vw,   6rem);

  /* Fluid spacing driven by the SMALLER side of the screen (vmin).
     A phone in landscape then gets the same comfortable padding as in
     portrait, instead of being treated like a wide tablet. */
  --section-pad-y: clamp(2rem, 1rem + 6vmin, 5rem);
  --container-pad: clamp(1rem, 0.5rem + 4vmin, 3rem);

  /* NEW: section heading rhythm */
  --heading-gap:     clamp(1.5rem, 4vmin, 2.75rem);
  --heading-max:     640px;
  --card-pad-x:      clamp(1rem, 0.6rem + 1.8vmin, 1.5rem);
  --card-pad-y:      clamp(1.1rem, 0.6rem + 2.4vmin, 2rem);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--brand-light);
  color: var(--text-dark);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(0.95rem, 0.9rem + 0.15vw, 1.05rem);
  line-height: 1.55;
  scroll-behavior: smooth;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  /* Prevent iOS text scale issues */
  -webkit-font-smoothing: antialiased;
}

/* Global text wrapping improvements */
p {
  orphans: 3;
  widows: 3;
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/* Image safety net */
img { max-width: 100%; }

/* Images added by JS fade in once loaded (no pop-in, no broken-image flash) */
.fade-img { opacity: 0; transition: opacity .45s ease; }
.fade-img.is-loaded { opacity: 1; }

/* KHEL watermark */
body::before {
  content: 'KHEL';
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Arial Black', 'Impact', sans-serif;
  font-weight: 900;
  font-size: clamp(28vw, 42vw, 55vw);
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(158, 104, 153, 0.075);
  pointer-events: none;
  z-index: 0;
  user-select: none;
  white-space: nowrap;
}

section, nav, footer, .whatsapp-float {
  position: relative;
  z-index: 1;
}

/* ---------- Container ---------- */
.container,
.container-fluid {
  padding-left:  max(var(--container-pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--container-pad), env(safe-area-inset-right, 0px));
  margin-left: auto;
  margin-right: auto;
  max-width: 1280px;
  width: 100%;
}

/* ---------- Sections ---------- */
section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}
/* Bootstrap's .py-5 is !important, so it was silently overriding
   --section-pad-y on every section. Win it back (higher specificity). */
section.py-5 {
  padding-top: var(--section-pad-y) !important;
  padding-bottom: var(--section-pad-y) !important;
}

/* Fluid gutters between columns (Bootstrap's g-4 / g-5 are fixed 1.5 / 3rem) */
.row.g-4 {
  --bs-gutter-x: clamp(1rem, 0.5rem + 2.5vmin, 1.5rem);
  --bs-gutter-y: clamp(1rem, 0.5rem + 2.5vmin, 1.5rem);
}
.row.g-5 {
  --bs-gutter-x: clamp(1.25rem, 0.5rem + 4vmin, 3rem);
  --bs-gutter-y: clamp(1.75rem, 1rem + 4vmin, 3rem);
}

/* ---------- Section Heading Rhythm (NEW) ---------- */
/* Every section starts with a centered heading block.
   We override Bootstrap's fixed mb-5 with a fluid version. */
section .text-center.mb-5,
section .text-center.mb-4 {
  margin-bottom: var(--heading-gap) !important;
}

section .text-center h2 {
  font-size: clamp(1.5rem, 3.5vw + 0.25rem, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5rem;
  text-wrap: balance;
}

section .text-center h2 + p,
section .text-center > p {
  font-size: clamp(0.9rem, 1vw + 0.3rem, 1.05rem);
  color: var(--text-muted);
  max-width: var(--heading-max);
  margin: 0 auto;
  text-wrap: pretty;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  font-size: clamp(0.85rem, 0.8rem + 0.1vw, 0.95rem);
  padding: clamp(0.5rem, 1vw, 0.65rem) clamp(1rem, 2vw, 1.4rem);
  border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease, background .2s, border-color .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  text-align: center;
}

.btn-brand {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-brand:hover, .btn-brand:focus {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn-outline-brand {
  color: var(--brand);
  border-color: var(--brand);
  background: transparent;
}
.btn-outline-brand:hover {
  background-color: var(--brand);
  color: #fff;
}
.btn-outline-light-brand {
  color: #fff;
  border-color: rgba(255,255,255,.65);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
}
.btn-outline-light-brand:hover {
  background: #fff;
  color: var(--brand-dark);
  border-color: #fff;
}

.badge-brand {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 500;
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.85rem);
  display: inline-block;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  background: #fff;
  box-shadow: 0 1px 20px rgba(91, 55, 101, .08);
  padding-top: .65rem;
  padding-bottom: .65rem;
}
.navbar > .container {
  align-items: center;
}
.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--brand-dark) !important;
  margin-right: 0;
}
.nav-logo {
  height: clamp(28px, 3vw, 40px);
  width: auto;
  display: block;
}
.brand-text {
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--brand-dark);
  font-size: clamp(1rem, 1.1vw, 1.2rem);
}

.navbar .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: .5rem .85rem !important;
  font-size: clamp(0.9rem, 0.85rem + 0.1vw, 1rem);
  text-align: center;
}
.navbar .nav-link:hover { color: var(--brand); }
.navbar .nav-link.active { color: var(--brand); font-weight: 600; }
@media (min-width: 992px) {
  .navbar .nav-link.active { box-shadow: inset 0 -2px 0 var(--brand); }
}
.navbar-toggler { min-width: 44px; min-height: 44px; }
.nav-logo, .footer-logo { object-fit: contain; object-position: center; }

/* Mobile menu: rows line up with the logo, easy to tap, WhatsApp button
   spans the width. Scrolls if the screen is too short to show it all. */
@media (max-width: 991px) {
  .navbar-collapse {
    padding-top: .5rem;
    padding-bottom: .5rem;
    max-height: calc(100vh - 4.5rem);
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .navbar-nav {
    align-items: stretch;
    text-align: left;
    gap: 0;
  }
  .navbar-nav .nav-link {
    padding: .85rem 0 !important;           /* 0 sideways = same left edge as the logo */
    min-height: 48px;
    border-bottom: 1px solid var(--brand-soft);
    text-align: left;
  }
  .navbar-nav .nav-item:nth-last-child(2) .nav-link { border-bottom: 0; }
  .navbar-nav .nav-item:last-child { margin-top: .5rem; }
  .navbar-nav .btn {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin: 0;
  }
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 .2rem var(--brand-soft);   /* soft brand ring instead of a heavy dark one */
}

/* =========================================================
   HERO BANNER — text-align fixed for all breakpoints
   ========================================================= */
.hero-banner {
  position: relative;
  min-height: clamp(340px, 60vh, 640px);
  min-height: clamp(340px, 60svh, 640px);
  background-color: var(--brand-dark);   /* shows until the hero photo loads */
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    rgba(42, 27, 47, .82) 0%,
    rgba(91, 55, 101, .58) 50%,
    rgba(158, 104, 153, .38) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  /* padding-block only: the old "padding: X 0" wiped the container's
     left/right padding, so hero text touched the screen edges on phones */
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  text-align: center; /* default — mobile & tablet */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Switch to left-aligned only on wide screens */
@media (min-width: 992px) {
  .hero-content {
    text-align: left;
    align-items: flex-start;
  }
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: clamp(0.7rem, 0.65rem + 0.15vw, 0.82rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  backdrop-filter: blur(6px);
  text-align: center;
}

.hero-title {
  font-size: clamp(1.75rem, 5.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 auto;
  text-shadow: 0 4px 20px rgba(0,0,0,.35);
  max-width: 640px;
  text-wrap: balance;
}

.hero-sub {
  margin-top: var(--space-sm);
  font-size: clamp(0.95rem, 1rem + 0.2vw, 1.15rem);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  opacity: .95;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
  text-wrap: pretty;
}

@media (min-width: 992px) {
  .hero-title,
  .hero-sub {
    margin-left: 0;
    margin-right: 0;
  }
}

.hero-content .btn-group-hero {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: var(--space-sm);
}
@media (min-width: 992px) {
  .hero-content .btn-group-hero { justify-content: flex-start; }
}

/* =========================================================
   STAT CARDS
   ========================================================= */
.stat-card {
  background: #fff;
  border: 1px solid var(--brand-accent);
  border-radius: 14px;
  padding: var(--card-pad-y) var(--card-pad-x);
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(91, 55, 101, .1);
}
.stat-card h3 {
  color: var(--brand);
  font-weight: 700;
  margin: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  line-height: 1.1;
}
.stat-card small {
  color: var(--text-muted);
  font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.85rem);
  margin-top: .25rem;
  display: block;
}

/* =========================================================
   ABOUT — slideshow + text
   ========================================================= */
.about-slideshow {
  position: relative;
  /* Never wider than the column / 720px, and never taller than 75% of the
     screen height (keeps the 4:3 shape on landscape phones). Centred. */
  width: min(100%, 720px, calc(75vh * 4 / 3));
  width: min(100%, 720px, calc(75svh * 4 / 3));
  margin-inline: auto;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(91, 55, 101, .22);
  background: var(--brand-soft);
}

.about-slide-track { position: absolute; inset: 0; }

.about-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  border: 0;
  padding: 0;
  cursor: default;
  background: transparent;
  display: block;
  text-align: left;
  font: inherit;
  color: inherit;
  pointer-events: none;
}
.about-slide.active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}
.about-slide.clickable { cursor: pointer; }
.about-slide.clickable:focus {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--brand);
}

/* Photo: anchored by --focus, filled (cover) or whole (contain) by --fit,
   both set per slide in data.js */
.about-slide-img {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: var(--fit, cover);
  object-position: var(--focus, center);
  transition: opacity .45s ease, transform 4s ease;
}
.about-slide.active .about-slide-img { transform: scale(1.04); }
.about-slide.fit-contain.active .about-slide-img { transform: none; }

/* Soft blurred copy behind a 'contain' photo so there are no bare bars */
.about-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.1);
  transform: scale(1.2);
}
.about-slide.no-photo {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}

.about-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(42, 27, 47, .82) 100%);
  pointer-events: none;
}

.about-slide-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--space-sm) var(--card-pad-x);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  pointer-events: none;
  text-align: left;
}

.about-slide-sub {
  font-size: clamp(0.68rem, 0.62rem + 0.15vw, 0.78rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .85;
  font-weight: 500;
}
.about-slide-label {
  font-size: clamp(1rem, 1.2vw + 0.3rem, 1.35rem);
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  line-height: 1.25;
}
.about-slide-cta {
  margin-top: .55rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: clamp(0.78rem, 0.75rem + 0.1vw, 0.88rem);
  font-weight: 600;
  color: #fff;
  background: rgba(158, 104, 153, .55);
  padding: .35rem .85rem;
  border-radius: 999px;
  width: fit-content;
  backdrop-filter: blur(6px);
  transition: background .25s, transform .25s;
}
.about-slide.clickable:hover .about-slide-cta {
  background: var(--brand);
  transform: translateX(4px);
}

.about-slide-dots {
  position: absolute;
  top: clamp(.6rem, 1.2vw, 1rem);
  right: clamp(.6rem, 1.2vw, 1rem);
  display: flex;
  gap: 0;
  z-index: 3;
}
.about-slide-dots button {
  position: relative;
  width: 24px; height: 24px;          /* finger-sized tap target */
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}
.about-slide-dots button::before {
  content: '';
  position: absolute;
  inset: 8px;                          /* the visible 8px dot */
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transition: background .2s, transform .2s;
}
.about-slide-dots button.active::before { background: #fff; transform: scale(1.35); }
.about-slide-dots button:hover::before { background: #fff; }

/* =========================================================
   CATEGORY CARDS
   ========================================================= */
.category-card {
  background: #fff;
  border: 1px solid var(--brand-accent);
  border-radius: 14px;
  padding: var(--card-pad-y) var(--card-pad-x);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  height: 100%;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(91, 55, 101, .14);
  border-color: var(--brand);
}
.category-card:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(158, 104, 153, .22);
}
.cat-icon {
  font-size: clamp(1.3rem, 1.7vw, 1.7rem);
  width: clamp(52px, 6vw, 64px);
  height: clamp(52px, 6vw, 64px);
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  border-radius: 50%;
  color: var(--brand);
  transition: background .25s, color .25s;
  flex-shrink: 0;
}
.cat-more-note {
  text-align: center;
  color: var(--brand-dark);
  font-style: italic;
  font-size: .95rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--brand-soft);
}
.cat-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--brand-soft);
  display: grid;
  place-items: center;
  margin-bottom: .15rem;
}
.cat-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: .4rem;
}
.category-card:hover .cat-icon {
  background: var(--brand);
  color: #fff;
}
.category-card h5 {
  color: var(--brand-dark);
  font-weight: 700;
  font-size: clamp(0.95rem, 1rem + 0.1vw, 1.1rem);
  margin: var(--space-sm) 0 .35rem;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}
.category-card .text-secondary {
  text-align: center;
  line-height: 1.45;
  text-wrap: balance;
  margin-bottom: 0;
}

/* =========================================================
   CATEGORY DETAIL VIEW
   ========================================================= */
.cat-detail-icon {
  display: inline-grid;
  place-items: center;
  width: clamp(64px, 8vw, 84px);
  height: clamp(64px, 8vw, 84px);
  margin: 0 auto;
  background: var(--brand-soft);
  border-radius: 50%;
  color: var(--brand);
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
}

/* Detail heading — ensure everything is centered */
#categoryDetail .text-center h2 {
  text-wrap: balance;
}
#categoryDetail .text-center p {
  max-width: 620px;
  margin: 0 auto;
}

#catDetailTitle:focus { outline: none; }
#categoryDetail { animation: catDetailIn .35s ease both; }
@keyframes catDetailIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Back button — centered */
#backToCategories {
  margin-bottom: var(--space-md) !important;
}

/* =========================================================
   PRODUCT CARDS  (categories + partner products)
   ========================================================= */
.product-card {
  background: #fff;
  border: 1px solid var(--brand-accent);
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.product-card:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 28px rgba(91, 55, 101, .12);
}

/* Square frame; the product photo is centred and never cropped */
.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(100deg, var(--brand-light) 30%, #fff 50%, var(--brand-light) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;       /* skeleton while loading */
}
.product-media:has(img.is-loaded),
.product-media.is-empty {
  animation: none;
  background: #fff;
}
.product-media img {
  width: 100%;
  height: 100%;
  padding: clamp(.5rem, 2vmin, 1rem);
  object-fit: contain;
  object-position: center;
}
.product-media.is-empty { background: var(--brand-light); }
.product-media.is-empty i {
  font-size: clamp(1.8rem, 4vmin, 2.6rem);
  color: var(--brand-accent);
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.product-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  padding: clamp(.65rem, .4rem + 1.2vmin, 1.5rem);
  padding-top: clamp(.5rem, .3rem + 1vmin, 1.1rem);
}
.product-tag {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand);
}
.product-name {
  margin: 0;
  font-size: clamp(.9rem, .85rem + .2vw, 1.02rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand-dark);
  text-wrap: balance;
}
.product-note {
  margin: 0;
  font-size: .8rem;
  line-height: 1.4;
  color: var(--text-muted);
}
.size-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}
.size-pills li {
  font-size: .72rem;
  padding: .1rem .55rem;
  border-radius: 999px;
  background: var(--brand-light);
  border: 1px solid var(--brand-soft);
  color: var(--text-muted);
}
.product-ask {
  margin-top: auto;
  padding-top: .5rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: clamp(.74rem, .7rem + .2vw, .82rem);
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.product-ask:hover, .product-ask:focus-visible { color: var(--brand-dark); text-decoration: underline; }

/* ---------- Filter / switch chips ---------- */
.filter-chips {
  position: relative;
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* phones: one swipeable row that bleeds to the screen edges */
  margin-inline: calc(var(--container-pad) * -1);
  padding: .25rem var(--container-pad) .5rem;
}
.filter-chips::-webkit-scrollbar { display: none; }
@media (min-width: 768px) and (min-height: 501px) {
  .filter-chips {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}
.chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: .45rem 1rem;
  border: 1px solid var(--brand-accent);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: .88rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { background: var(--brand-soft); border-color: var(--brand); }
.chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.showcase-count {
  min-height: 1.4em;
  margin: 0 0 1rem;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
}

.empty-state {
  max-width: 520px;
  margin-inline: auto;
  padding: var(--card-pad-y) var(--card-pad-x);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--brand-accent);
  border-radius: 14px;
}
.empty-state i { font-size: 2rem; color: var(--brand); }
.empty-state h3 { margin: .5rem 0 .25rem; font-size: 1.1rem; font-weight: 700; color: var(--brand-dark); }
.empty-state p { margin-bottom: 1rem; color: var(--text-muted); }

/* Category card: product count pinned to the bottom so cards line up */
.cat-count {
  margin-top: auto;
  padding-top: .6rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--brand);
}

/* =========================================================
   DELIVERY
   ========================================================= */
.truck-image-wrap {
  width: min(100%, 720px, calc(75vh * 4 / 3));
  width: min(100%, 720px, calc(75svh * 4 / 3));
  margin-inline: auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(91, 55, 101, .22);
}
.truck-image {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.delivery-points {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 0;
}
.delivery-points li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-xs) 0;
  border-bottom: 1px dashed var(--brand-soft);
  text-align: left;
}
.delivery-points li:last-child { border-bottom: 0; }
.delivery-points i {
  color: var(--brand);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.delivery-points strong {
  display: block;
  color: var(--brand-dark);
  font-weight: 700;
  margin-bottom: .15rem;
  font-size: clamp(0.92rem, 0.9rem + 0.1vw, 1rem);
}
.delivery-points span {
  color: var(--text-muted);
  font-size: clamp(0.82rem, 0.8rem + 0.1vw, 0.92rem);
  line-height: 1.5;
}

/* Delivery promise */
.delivery-promise {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: #fff;
  border: 1px solid var(--brand-accent);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  text-align: left;
}
.delivery-promise i { font-size: 1.6rem; color: var(--brand); flex-shrink: 0; }
.delivery-promise p { margin: 0; color: var(--text-dark); line-height: 1.45; }
.delivery-promise strong { color: var(--brand-dark); }

/* =========================================================
   PARTNERS CAROUSEL
   ========================================================= */
#partners { overflow: hidden; }

.partners-strip {
  overflow: hidden;
  position: relative;
  padding: var(--space-sm) 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.partners-track {
  display: flex;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  width: max-content;
  animation: partnersScroll 40s linear infinite;
  align-items: stretch;
}
.partners-strip:hover .partners-track {
  animation-play-state: paused;
}

@keyframes partnersScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.partner-item {
  flex: 0 0 auto;
  display: flex;
}
.partner-item.is-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.partner-item.is-link:focus-visible .partner-logo {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(130px, 15vw, 180px);
  height: clamp(70px, 8vw, 90px);
  background: #fff;
  border: 2px solid;
  border-radius: 14px;
  font-weight: 800;
  font-size: clamp(0.85rem, 0.9vw + 0.35rem, 1.05rem);
  letter-spacing: .02em;
  text-align: center;
  padding: .75rem 1rem;
  line-height: 1.25;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 4px 14px rgba(91, 55, 101, .06);
  word-break: break-word;
}

.partner-logo-img {
  padding: .65rem;
  border-color: var(--brand-accent) !important;
}
.partner-logo-img.is-dark {
  background: #111;
  border-color: #111 !important;
}
/* Fill the fixed-size box from the start (not 0x0 while loading) */
.partner-logo-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(0);
  transition: transform .25s ease;
}
.partner-item:hover .partner-logo-img img {
  transform: scale(1.05);
}
.partner-item:hover .partner-logo {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(91, 55, 101, .16);
}

/* =========================================================
   BRANCH SELECTOR
   ========================================================= */
.branch-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: var(--space-md);
}
.branch-tab {
  border: 1px solid var(--brand-accent);
  background: #fff;
  color: var(--brand);
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-size: clamp(0.82rem, 0.8rem + 0.1vw, 0.92rem);
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  text-align: center;
}
.branch-tab:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
}
.branch-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(158, 104, 153, .35);
}

.branch-panel { animation: branchFade .35s ease both; }
@keyframes branchFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.branch-info-card {
  background: #fff;
  border: 1px solid var(--brand-accent);
  border-radius: 14px;
  padding: var(--card-pad-y) var(--card-pad-x);
  height: 100%;
  box-shadow: 0 4px 20px rgba(91, 55, 101, .06);
}
.branch-info-card h4 {
  color: var(--brand-dark);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.4vw, 1.4rem);
  margin-bottom: var(--space-sm);
  text-align: left;
}

.branch-info-list { margin: 0; }
.branch-info-list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .55rem 0;
  color: var(--text-dark);
  font-size: clamp(0.88rem, 0.85rem + 0.1vw, 0.98rem);
  border-bottom: 1px dashed var(--brand-soft);
  text-align: left;
  line-height: 1.5;
}
.branch-info-list li:last-child { border-bottom: 0; }
.branch-info-list i {
  color: var(--brand);
  font-size: 1.05rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.branch-info-list a { color: var(--text-dark); text-decoration: none; }
.branch-info-list a:hover { color: var(--brand); }
.branch-email {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
}
.branch-email > span:first-child {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.branch-email-fallback {
  font-size: .78rem;
  color: var(--text-muted);
}
.branch-email-fallback a { color: var(--brand); }
.branch-email-fallback .link-btn {
  font-size: .78rem;
  text-decoration: underline;
}
.copy-email-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: .15rem;
  line-height: 1;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.copy-email-btn:hover { color: var(--brand); background: var(--brand-light); }
.copy-email-btn.copied { color: #2E7D32; }
/* Landmark lines, opening hours */
.info-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .1rem;
}
.hours-list { width: 100%; }
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  padding: .1rem 0;
}
.hours-row strong { font-weight: 600; color: var(--brand-dark); }
.hours-note {
  display: inline-block;
  margin-top: .3rem;
  padding: .1rem .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
}

/* "Find my nearest branch" */
.nearest-bar { margin-bottom: var(--space-sm); }
.nearest-status { min-height: 1.4em; margin: .5rem 0 0; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--brand-dark); }

/* Nearest-branch picker (pop-up) */
.branch-picker { border-radius: 16px; border: 1px solid var(--brand-accent); }
.branch-picker .modal-title { font-size: 1.1rem; font-weight: 700; color: var(--brand-dark); }
.picker-note { margin: .5rem 0 0; font-size: .8rem; color: var(--text-muted); }
.picker-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.1rem 0 .85rem;
  font-size: .8rem;
  color: var(--text-muted);
}
.picker-divider::before, .picker-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--brand-soft);
}
.picker-branches { display: flex; flex-wrap: wrap; gap: .5rem; }
.picker-result {
  margin-top: 1rem;
  padding: .85rem 1rem;
  background: var(--brand-light);
  border: 1px solid var(--brand-soft);
  border-radius: 12px;
}
.picker-skip { display: block; margin: 1.1rem auto 0; font-size: .85rem; }

/* Ratio wrapper — no extra margin */
.branch-panel .ratio {
  margin: 0;
  width: 100%;
}

/* Mobile: stack and center the buttons */
@media (max-width: 991px) {
  .branch-info-card { text-align: center; }
  .branch-info-card h4 { text-align: center; }
  .branch-info-list li { text-align: left; }
  .branch-info-card .btn { flex-grow: 1; }
}

/* =========================================================
   FOOTER — company on the left, Retail Pay pushed to the far right
   ========================================================= */
footer {
  background: #fff;
  border-top: 1px solid var(--brand-accent);
  padding: var(--space-md) 0 var(--space-sm);
}
footer.py-4 {
  padding-top: var(--space-md) !important;
  padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0px)) !important;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  padding-bottom: var(--space-sm);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.footer-col-left {
  align-items: flex-start;
  text-align: left;
}
.footer-company {
  font-weight: 700;
  color: var(--brand-dark);
  font-size: clamp(0.88rem, 0.85rem + 0.1vw, 0.98rem);
}
.footer-copy {
  font-size: clamp(0.72rem, 0.7rem + 0.05vw, 0.82rem);
  color: var(--text-muted);
}

.footer-col-right {
  margin-left: auto;          /* always hugs the right edge, even when it wraps below */
  align-items: flex-end;
  text-align: right;
}
.footer-built {
  font-size: clamp(0.72rem, 0.7rem + 0.05vw, 0.82rem);
  color: var(--text-muted);
}
.footer-credit-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
  transition: transform .2s ease;
}
.footer-credit-link:hover { transform: translateY(-1px); }
.footer-bizwiz-text {
  font-weight: 700;
  color: var(--brand);
  font-size: clamp(0.9rem, 1vw, 1.05rem);
}
.footer-credit-link:hover .footer-bizwiz-text { color: var(--brand-dark); }

.footer-social-row {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding-top: var(--space-sm);
  border-top: 1px dashed var(--brand-soft);
}
.footer-icon {
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: color .2s, transform .2s;
}
.footer-icon:hover { color: var(--brand); transform: translateY(-2px); }

/* =========================================================
   OFFLINE BANNER
   ========================================================= */
.offline-banner {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--brand-dark);
  color: #fff;
  text-align: center;
  font-size: .85rem;
  padding: .45rem 1rem;
}
.offline-banner[hidden] { display: none; }

/* Online-only links look unavailable while offline (tap shows a message). */
body.is-offline a[data-wa],
body.is-offline a[href^="https://"],
body.is-offline a[href^="http://"],
body.is-offline #pickerSkip {
  opacity: .5;
  cursor: not-allowed;
}

/* The embedded Google Map can't load offline. */
body.is-offline .branch-map::after {
  content: "Map needs an internet connection";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 600;
  z-index: 2;
}

.offline-toast {
  position: fixed;
  left: 50%;
  bottom: clamp(20px, 6vmin, 40px);
  transform: translate(-50%, 10px);
  max-width: calc(100vw - 2rem);
  background: var(--brand-dark);
  color: #fff;
  padding: .65rem 1.2rem;
  border-radius: 999px;
  font-size: .9rem;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 2000;
}
.offline-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================================
   FLOATING WHATSAPP
   ========================================================= */
.whatsapp-float {
  position: fixed;
  bottom: max(clamp(14px, 3vmin, 28px), env(safe-area-inset-bottom, 0px));
  right:  max(clamp(14px, 3vmin, 28px), env(safe-area-inset-right, 0px));
  width: clamp(48px, 5vw, 58px);
  height: clamp(48px, 5vw, 58px);
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  box-shadow: 0 6px 20px rgba(37,211,102,.4);
  z-index: 1000;
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* =========================================================
   ANCHOR OFFSET
   ========================================================= */
section[id] { scroll-margin-top: 84px; }

/* =========================================================
   BREAKPOINT TWEAKS — component-level only
   Padding (--section-pad-y, --container-pad, card padding) is now
   fluid in :root, so there are NO per-device padding overrides here.
   ========================================================= */

/* Very small phones (≤375px) */
@media (max-width: 375px) {
  .partner-logo {
    width: 110px;
    height: 64px;
    font-size: 0.78rem;
    padding: .5rem .75rem;
  }
  .btn { font-size: 0.82rem; padding: .45rem .9rem; }
  .stat-card h3 { font-size: 1.2rem; }
}

/* Large screens (1441–1920px) */
@media (min-width: 1441px) and (max-width: 1920px) {
  .container { max-width: 1360px; }
}

/* Ultra-wide (1921px+) — 2K, 4K */
@media (min-width: 1921px) {
  :root {
    --section-pad-y: 6rem;
    --container-pad: 3.5rem;
  }
  .container { max-width: 1480px; }
  body::before { font-size: 38vw; }
}

/* Landscape phones (short viewport) — tighten vertical space only */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --heading-gap: 1.25rem; }
  .navbar { padding-top: .35rem; padding-bottom: .35rem; }
  .navbar-nav .nav-link { padding: .5rem 0 !important; min-height: 44px; }
  .navbar { transition: transform .25s ease; }
  .navbar.nav-hidden { transform: translateY(-100%); }   /* hides while scrolling down, returns on scroll up */
  section[id] { scroll-margin-top: .75rem; }
  .hero-content .mt-4 { margin-top: .75rem !important; }
  .hero-banner { min-height: 300px; }
  .hero-content { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .hero-title { font-size: clamp(1.5rem, 4vw, 2.2rem); }
}

/* =========================================================
   FIRST-LOAD POLISH
   ========================================================= */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero-content > * { animation: heroIn .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-content > :nth-child(2) { animation-delay: .08s; }
.hero-content > :nth-child(3) { animation-delay: .16s; }
.hero-content > :nth-child(4) { animation-delay: .24s; }

/* Prevent hover transforms on touch devices */
@media (hover: none) {
  .category-card:hover,
  .stat-card:hover,
  .partner-item:hover .partner-logo,
  .whatsapp-float:hover {
    transform: none;
  }
}

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