/* ==========================================================================
   TurbonX BD — Layout: announcement, header, hero, category rail, grids,
   trust, brand story, newsletter, social, footer, back-to-top
   ========================================================================== */

/* --- Announcement bar ------------------------------------------------- */
.announce {
  height: var(--announce-h);
  background: var(--text-primary);
  color: var(--bg-primary);
  overflow: hidden;
  display: flex;
  align-items: center;
  font-size: var(--step--2);
  letter-spacing: 0.03em;
  transition: height var(--dur-3) var(--ease-out), opacity var(--dur-2) var(--ease-out);
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  /* Fade to the bar's own colour at each edge instead of hard-cutting the
     text mid-character, and fade in exactly at var(--gutter) — the same
     inset the header/nav content below sits at (.container's padding-inline)
     — so the readable text lines up with that edge, not the raw viewport. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
.announce.is-hidden { height: 0; opacity: 0; }
.announce.is-dragging { cursor: grabbing; }
.announce__track {
  display: flex;
  flex-shrink: 0;
  gap: 0;
  white-space: nowrap;
  will-change: transform;
}
.announce__item { padding-inline: 2.2rem; position: relative; }
.announce__item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 3px;
  background: currentColor;
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}
/* Marks where one full pass through the messages ends and the next begins —
   distinct from the small dot between individual items above, so the loop
   reads as "round and round" rather than an unmarked, unbroken stream. */
.announce__lap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-inline: 2.6rem;
}
.announce__lap::before,
.announce__lap::after {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 1.5px;
  background: currentColor;
  opacity: 0.4;
}
@media (prefers-reduced-motion: reduce) {
  .announce { cursor: auto; }
  .announce__track { justify-content: center; }
  .announce__track > :nth-child(n + 5) { display: none; }
}

/* --- Header --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--bg-primary);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-3) var(--ease-out), border-color var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out);
}
/* Solid once the page has scrolled — NOT frosted glass. A see-through header
   blurred whatever slid under it (dark product photos, the category tiles)
   into grey / green smudges around the menu icon and the bottom edge of the
   bar, which came and went as the page scrolled. */
.site-header.is-scrolled {
  background: var(--bg-primary);
  border-bottom-color: var(--border-faint);
  box-shadow: var(--shadow-1);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--header-h);
  transition: height var(--dur-3) var(--ease-out);
}
.site-header.is-scrolled .site-header__inner { height: var(--header-h-scrolled); }

/* three-line button sits first, then the wordmark */
.header-menu-btn {
  display: inline-grid;
  place-items: center;
  margin-right: var(--sp-2);
  margin-left: calc(var(--sp-2) * -1);   /* optical: pull the icon to the gutter */
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  margin-right: auto;                     /* push actions right when nav is hidden */
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  flex-shrink: 0;
}
@media (min-width: 1000px) { .brand { margin-right: var(--sp-5); } }
.brand__tld {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--text-tertiary);
  transform: translateY(-0.15em);
}

/* The shop's own logo (Admin → Manage Shop → Shop management) in place of the wordmark — a long, transparent picture that
   keeps its proportions, sits on the header's centre line and gives way to the icons on a narrow phone (it shrinks, the
   buttons never do). Light / dark: a separate dark-theme picture when one was uploaded, else — with "auto" — the colours of a
   dark logo flip on the dark theme (and a white logo's on the light theme) so it never disappears into the background. */
.brand--logo { align-items: center; flex-shrink: 1; min-width: 0; max-width: min(240px, 44vw); line-height: 0; }
.brand__logo { display: block; height: 34px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; background: transparent; transition: height var(--dur-3) var(--ease-out); }
.foot-brand__logo { background: transparent; }
.brand--logo ~ .header-actions { margin-left: var(--sp-2); }   /* a long logo never touches the first icon */   /* a logo sits on the page itself — never on the grey photo backdrop every img gets (base.css) */
.site-header.is-scrolled .brand__logo { height: 30px; }
@media (max-width: 560px) { .brand__logo { height: 28px; } .site-header.is-scrolled .brand__logo { height: 26px; } }
@media (max-width: 380px) { .brand--logo { max-width: 40vw; } .brand__logo { height: 24px; } }
.tx-logo--dark { display: none; }
:root[data-theme="dark"] .tx-logo--light.tx-logo--paired { display: none; }
:root[data-theme="dark"] .tx-logo--dark { display: block; }
:root[data-theme="dark"] .tx-logo--flip-dark { filter: invert(1) hue-rotate(180deg); }
:root:not([data-theme="dark"]) .tx-logo--flip-light { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tx-logo--light.tx-logo--paired { display: none; }
  :root:not([data-theme="light"]) .tx-logo--dark { display: block; }
  :root:not([data-theme="light"]) .tx-logo--flip-dark { filter: invert(1) hue-rotate(180deg); }
  :root:not([data-theme]) .tx-logo--flip-light, :root[data-theme=""] .tx-logo--flip-light { filter: none; }
}

.primary-nav { display: none; }
@media (min-width: 1000px) {
  .primary-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: auto;
  }
}
.primary-nav__link {
  position: relative;
  padding: 0.5em 0.85em;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  transition: color var(--dur-2) var(--ease-out);
}
.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0.85em; right: 0.85em;
  bottom: 0.3em;
  height: 1px;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease-out);
}
.primary-nav__link.is-active::after { transform: scaleX(1); }
.primary-nav__link.is-active { color: var(--text-primary); }
@media (hover: hover) {
  .primary-nav__link:hover { color: var(--text-primary); }
  .primary-nav__link:hover::after { transform: scaleX(1); }
}

.header-actions { display: flex; align-items: center; gap: 2px; }

/* Language switcher — one icon button, same size at every breakpoint
   (it's a plain .icon-btn), opening a small dropdown below it with the
   two languages spelled out. Same visual language as .filter-pop. */
.lang-dd { position: relative; }
.lang-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--z-drawer);
  min-width: 150px;
  display: grid;
  padding: var(--sp-2);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  pointer-events: none;
}
.lang-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.lang-pop__opt {
  display: flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-3);
  font-size: var(--step--1);
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  text-align: left;
}
.lang-pop__opt.is-active { color: var(--text-primary); font-weight: 700; }
@media (hover: hover) {
  .lang-pop__opt:hover { background: var(--surface-sunken); color: var(--text-primary); }
}

/* Search — the one action with its own outline, plus a soft pulse every ~6s
   so it stays discoverable without shouting. Ring + glow only; hover, focus
   and reduced-motion all stop it. */
#open-search {
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
#open-search::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1.5px solid var(--text-primary);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  #open-search { animation: tx-search-beat 6s var(--ease-out) infinite; }
  #open-search::after { animation: tx-search-ring 6s var(--ease-out) infinite; }
  #open-search:hover,
  #open-search:focus-visible,
  #open-search:hover::after,
  #open-search:focus-visible::after { animation-play-state: paused; }
}
@keyframes tx-search-beat {
  0%, 82%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    border-color: var(--border);
    background: transparent;
  }
  87% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--text-primary) 14%, transparent);
    border-color: var(--border-strong);
    background: var(--surface-sunken);
  }
  94% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); border-color: var(--border); background: transparent; }
}
@keyframes tx-search-ring {
  0%, 82% { opacity: 0; transform: scale(1); }
  87% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* On small/narrow (portrait-phone-width) screens the header's icon buttons
   shrink a touch to fit, and the dark/light switcher folds away entirely —
   there's still a Light/Dark row in the slide-in menu (nav.js) for anyone
   on a narrow screen who wants it. A tablet, a square window or a tall-but-
   wide desktop window all have the room, so the switcher stays for any of
   those — this is a width check, not a portrait/landscape one. Placed
   after the base rules so it wins the cascade. */
@media (max-width: 639px) {
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 20px; height: 20px; }
  .icon-btn--theme { display: none; }
  .header-actions { gap: 0; }
  .brand { font-size: 1.14rem; }
}
@media (max-width: 380px) {
  .icon-btn { width: 34px; height: 34px; }
  .icon-btn svg { width: 19px; height: 19px; }
  .header-menu-btn { margin-right: 2px; }
  .brand { font-size: 1.02rem; }
}

/* --- Section shell ------------------------------------------------- */
.page-main { display: block; }

/* --- Hero -------------------------------------------------------- */
.hero { padding-top: clamp(1.5rem, 0.5rem + 3vw, 3.5rem); padding-bottom: clamp(2rem, 1rem + 3vw, 4rem); }
.hero__viewport {
  position: relative;
  border: 1px solid var(--border-faint);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.hero__slides { position: relative; }
.hero__slide {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  min-height: 400px;
}
@media (min-width: 860px) {
  .hero__slide { grid-template-columns: 1.05fr 0.95fr; min-height: 520px; }
}
.hero__slide[hidden] { display: none; }

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--sp-4);
  padding: clamp(1.75rem, 1rem + 5vw, 4rem);
  order: 2;
}
@media (min-width: 860px) { .hero__content { order: 1; } }

.hero__eyebrow {
  font-size: var(--step--1);
  color: var(--text-secondary);
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--border);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: var(--step-6);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.hero__body { color: var(--text-secondary); font-size: var(--step-1); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }

.hero__media {
  position: relative;
  background: var(--media-bg);
  min-height: 190px;
  order: 1;
  overflow: hidden;
}
@media (min-width: 560px) { .hero__media { min-height: 260px; } }
@media (min-width: 860px) { .hero__media { order: 2; min-height: auto; } }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.hero__controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4);
  pointer-events: none;
}
.hero__dots { display: flex; gap: 7px; pointer-events: auto; }
.hero__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  transition: background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
@media (hover: hover) { .hero__dot:hover { border-color: var(--text-primary); } }
.hero__dot.is-active { background: var(--text-primary); border-color: var(--text-primary); transform: scale(1.15); }
.hero__arrows { display: flex; gap: 6px; pointer-events: auto; }
.hero__arrow {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--bg-primary) 78%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: transform var(--dur-1) var(--ease-out), background var(--dur-2) var(--ease-out);
}
@media (hover: hover) { .hero__arrow:hover { background: var(--bg-primary); } }
.hero__arrow:active { transform: scale(0.9); }
.hero__arrow svg { width: 18px; height: 18px; }

/* --- Category rail (chips) ------------------------------------- */
.cat-section { padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.cat-rail {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.cat-rail::-webkit-scrollbar { display: none; }

/* --- Subcategory grid ---------------------------------------- */
.subcat-wrap {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.subcat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (min-width: 600px) { .subcat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .subcat-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 560px) {
  .subcat-grid {
    grid-auto-flow: column;
    grid-auto-columns: 44%;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--sp-2);
    scrollbar-width: none;
  }
  .subcat-grid::-webkit-scrollbar { display: none; }
  .subcat-card { scroll-snap-align: start; }
}

/* --- Shop by category grid ---------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
@media (min-width: 720px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
.category-grid > :first-child { grid-column: span 2; }
@media (min-width: 1040px) {
  .category-grid > :first-child { grid-column: span 2; grid-row: span 2; }
}

/* --- Catalog toolbar + product grid ------------------------ */
.catalog__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border-faint);
}
.catalog__count { font-size: var(--step--1); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.catalog__tools { display: flex; align-items: center; gap: var(--sp-2); }
.catalog__tools .select__native { min-height: 42px; padding-block: 0.4em; }
#catalog-inner { display: block; }

/* --- Filter dropdown (button + popover, no sidebar) --------------- */
.filter-dd { position: relative; }
.filter-dd__btn { display: inline-flex; align-items: center; gap: 7px; }
.filter-dd__btn.has-filters { border-color: var(--text-primary); color: var(--text-primary); }
.filter-dd__count {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  font-size: 11px; font-weight: 700; line-height: 1;
  color: var(--bg-primary); background: var(--text-primary);
  border-radius: var(--r-pill); font-variant-numeric: tabular-nums;
}

.filter-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--z-drawer);
  width: min(320px, 86vw);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  pointer-events: none;
}
.filter-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.filter-pop__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-faint);
  font-size: var(--step--1); font-weight: 700;
}
.filter-pop__close {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--r-sm); color: var(--text-secondary);
}
@media (hover: hover) {
  .filter-pop__close:hover { background: var(--surface-sunken); color: var(--text-primary); }
}
.filter-pop__body { display: grid; gap: var(--sp-5); padding: var(--sp-4); }

/* On small screens the popover becomes a bottom sheet */
@media (max-width: 560px) {
  .filter-dd { position: static; }
  .filter-pop {
    position: fixed;
    inset: auto 0 0 0;
    top: auto;
    width: 100%;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(100%);
    max-height: 80dvh;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .filter-pop.is-open { transform: none; }
}

.filter-block { display: grid; gap: var(--sp-3); }
.filter-block__title { font-size: var(--step--1); font-weight: 600; }
.filter-check { display: flex; align-items: center; gap: 10px; font-size: var(--step--1); color: var(--text-secondary); cursor: pointer; }
.filter-check input { width: 16px; height: 16px; accent-color: var(--text-primary); }
.price-inputs { display: flex; align-items: center; gap: var(--sp-2); }
.price-inputs .field__input { min-height: 40px; }
.filter-reset { justify-self: start; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
@media (min-width: 680px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1240px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 400px) { .product-grid { gap: var(--sp-3); } }

/* Homepage grid: 2 (mobile) / 4 (tablet) / 6 (desktop). Caps at 6. */
.product-grid--home { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (min-width: 600px)  { .product-grid--home { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); } }
@media (min-width: 1080px) { .product-grid--home { grid-template-columns: repeat(6, 1fr); } }

/* --- Trust row: the account -> order -> delivery -> exchange -> genuine ->
   support journey. Each card is a real button — click any one to open its
   full detail in .info-modal (see TX.trust in main.js). --------------- */
.trust__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-faint);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  overflow: hidden;
}
@media (min-width: 600px) { .trust__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .trust__grid { grid-template-columns: repeat(6, 1fr); } }
.trust__item {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--bg-primary);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out);
}
@media (hover: hover) { .trust__item:hover { background: var(--surface-sunken); } }
.trust__item:active { background: var(--surface-sunken); }
.trust__icon { color: var(--text-primary); }
.trust__icon svg { width: 22px; height: 22px; }
.trust__title { font-size: var(--step-0); font-weight: 600; }
.trust__body { font-size: var(--step--2); color: var(--text-secondary); }

/* --- Brand story ------------------------------------------ */
.about__grid { display: grid; gap: var(--sp-7); }
@media (min-width: 900px) { .about__grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.about__title { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.03em; max-width: 14ch; }
.about__copy { display: grid; gap: var(--sp-4); color: var(--text-secondary); font-size: var(--step-1); }
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}
.stat__num { font-family: var(--font-display); font-weight: 800; font-stretch: 125%; font-size: var(--step-3); letter-spacing: -0.02em; }
.stat__label { font-size: var(--step--2); color: var(--text-tertiary); margin-top: 4px; }

/* --- Newsletter / sign-up -------------------------------- */
.newsletter__inner {
  display: grid;
  gap: var(--sp-5);
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(2rem, 1rem + 5vw, 4rem);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}
.newsletter__title { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; }
.newsletter__body { color: var(--text-secondary); margin-top: var(--sp-2); }
.newsletter__form { display: flex; gap: var(--sp-2); flex-wrap: wrap; text-align: left; }
.newsletter__form .field { flex: 1 1 220px; }
.newsletter__consent { font-size: var(--step--2); color: var(--text-tertiary); margin-top: var(--sp-3); }

/* Sign up / Log in switcher */
.auth-tabs {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-pill);
  margin-inline: auto;
}
.auth-tabs__btn {
  padding: 0.5em 1.3em;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--r-pill);
  transition: color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}
.auth-tabs__btn.is-active { color: var(--bg-primary); background: var(--text-primary); }

.foot-contact a,
.foot-contact span { display: flex; align-items: center; gap: 8px; }
.foot-contact svg { color: var(--text-tertiary); }

/* --- Social -------------------------------------------- */
.social__row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.social__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.8em 1.2em;
  font-size: var(--step--1);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}
@media (hover: hover) {
  .social__link:hover { transform: translateY(-2px); border-color: var(--text-primary); background: var(--surface-sunken); }
}
.social__link svg { width: 18px; height: 18px; }

/* --- Footer ------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-faint);
  background: var(--bg-secondary);
  padding-block: clamp(3rem, 2rem + 5vw, 5rem) var(--sp-6);
}
.site-footer__grid {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .site-footer__grid { grid-template-columns: 1.6fr repeat(4, 1fr); } }
.foot-brand { display: grid; gap: var(--sp-3); align-content: start; }
.foot-brand__mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}
.foot-brand__text { color: var(--text-secondary); font-size: var(--step--1); max-width: 34ch; }
.foot-brand__mark--logo { display: inline-flex; line-height: 0; }
.foot-brand__logo { display: block; height: 44px; width: auto; max-width: min(240px, 70vw); object-fit: contain; object-position: left center; }
.foot-col { display: grid; gap: var(--sp-3); align-content: start; }
.foot-col__title { font-size: var(--step--1); font-weight: 600; }
.foot-links { display: grid; gap: var(--sp-2); }
.foot-links a { font-size: var(--step--1); color: var(--text-secondary); transition: color var(--dur-2) var(--ease-out); }
.foot-links a:hover { color: var(--text-primary); }
.foot-contact { display: grid; gap: var(--sp-2); font-size: var(--step--1); color: var(--text-secondary); }

.site-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border-faint);
  font-size: var(--step--2);
  color: var(--text-tertiary);
}
.payments { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
/* "We accept": the logos of the payment methods that are switched on (assets/css/paylogo.css draws each tile) */
#payment-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* --- Back to top ------------------------------------- */
.back-to-top {
  position: fixed;
  right: clamp(1rem, 0.5rem + 2vw, 2rem);
  bottom: calc(clamp(1rem, 0.5rem + 2vw, 2rem) + env(safe-area-inset-bottom));
  z-index: var(--z-backtop);
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  color: var(--button-text);
  background: var(--button-bg);
  border: 1px solid var(--button-bg);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: hover) { .back-to-top:hover { transform: translateY(-2px); } }
.back-to-top:active { transform: scale(0.9); }
.back-to-top svg { width: 18px; height: 18px; }

/* --- Network bar ------------------------------------ */
.netbar {
  position: fixed;
  left: 0; right: 0; top: 0;
  z-index: var(--z-toast);
  padding: 0.6em var(--sp-4);
  text-align: center;
  font-size: var(--step--2);
  font-weight: 600;
  color: #fff;
  background: var(--danger);
  transform: translateY(-100%);
  transition: transform var(--dur-3) var(--ease-out);
}
.netbar.is-visible { transform: none; }
.netbar--online { background: var(--text-primary); color: var(--bg-primary); }

/* ============================================================================
   Homepage — offer banner, section selector, category marquee, coming soon
   ============================================================================ */

/* --- Offer banner (image only, whole banner links to a product) --------- */
.offer-banner {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin: var(--sp-4) auto 0;
  padding-inline: var(--gutter);
}
/* One fixed ratio at every width (mobile, tablet, desktop) — not a different
   ratio below 640px. object-fit:cover crops to whatever box it's given, so a
   breakpoint-specific ratio would show a different slice of the same banner
   art depending on screen size, cutting off parts of it inconsistently. A
   single ratio means the exact same crop everywhere; only the physical size
   scales down. Design/export banner art at this ratio — 1680×720px (or any
   multiple of it, e.g. 2100×900 for a sharper retina source) — so nothing
   gets cropped that you didn't intend. */
.offer-banner__slides {
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--media-bg);
  touch-action: pan-y;            /* let vertical page scroll through, we own the x */
}

.offer-banner__track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform var(--dur-3) var(--ease-out);
}
.offer-banner__track.is-dragging { transition: none; }
.offer-banner__slide {
  position: relative;
  flex: 0 0 100%;
  display: block;
}
.offer-banner__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;          /* drags land on the track, taps on the <a> */
}

/* prev / next — theme colour, always reachable (touch has no hover) */
.offer-banner__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  opacity: 0.55;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out), background var(--dur-2) var(--ease-out);
}
.offer-banner:focus-within .offer-banner__nav { opacity: 1; }
@media (hover: hover) {
  .offer-banner:hover .offer-banner__nav { opacity: 1; }
  .offer-banner__nav:hover { background: var(--bg-primary); opacity: 1; }
}
.offer-banner__nav:active { transform: translateY(-50%) scale(0.9); }
.offer-banner__nav svg { width: 18px; height: 18px; }
.offer-banner__nav--prev { left: calc(var(--gutter) + var(--sp-3)); }
.offer-banner__nav--next { right: calc(var(--gutter) + var(--sp-3)); }
@media (hover: none) {
  .offer-banner__nav { opacity: 0.92; width: 36px; height: 36px; }
  .offer-banner__nav svg { width: 16px; height: 16px; }
}

/* count marker — round dots in a glass pill so they read on any artwork;
   the active one stretches into a bar and goes solid */
.offer-banner__dots {
  position: absolute;
  left: 50%; bottom: var(--sp-4);
  transform: translateX(-50%);
  z-index: 2;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px;
  border-radius: var(--r-pill);
  background: rgba(10, 10, 10, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.offer-banner__dot {
  width: 7px; height: 7px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.45);
  transition: width var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}
.offer-banner__dot.is-active {
  width: 22px;
  background: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .offer-banner__track { transition: none; }
}

/* --- Small "Section" / "Categories" rail labels ------------------------ */
.rail-label {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-2);
}

/* The catalogue's own head ("For you" / "A mix from across the store.")
   reads lighter/smaller here than a plain .section-head elsewhere on the
   site (e.g. product.html's "You might also like") — it's a small
   transition line above the grid, not a headline, so it shouldn't take
   much vertical room. Scoped to .catalog-home so other pages are untouched. */
.catalog-home .section-head { margin-bottom: var(--sp-3); }
.catalog-home .section-head__title { font-size: var(--step-1); }
.catalog-home .section-head__lead { font-size: var(--step--2); margin-top: 2px; }

/* --- Section selector (compact icon + label chips) --------------------- */
.catalog-home { padding-top: clamp(1.75rem, 1rem + 3vw, 3rem); }
.section-selector {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  scrollbar-width: none;
  margin-bottom: var(--sp-4);
}
.section-selector::-webkit-scrollbar { display: none; }
.section-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 0.5em 0.9em;
  font-size: var(--step--1);
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}
.section-chip__icon { display: inline-flex; }
.section-chip__icon svg { width: 16px; height: 16px; }
@media (hover: hover) {
  .section-chip:hover { color: var(--text-primary); border-color: var(--border-strong); }
}
.section-chip.is-active {
  color: var(--bg-primary);
  background: var(--text-primary);
  border-color: var(--text-primary);
}
.section-chip__soon {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: var(--r-xs);
  border: 1px solid currentColor;
  opacity: 0.7;
}
.section-chip.is-soon { opacity: 0.85; }

/* --- Category browser — image cards that drift right to left ----------
   The one showpiece: a sharp product shot up top dissolving into a soft
   blur where the label sits. Real horizontal scroll so it drags on any
   input; JS drives the drift and the seamless loop. */
.category-marquee {
  margin-bottom: var(--sp-5);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.category-marquee::-webkit-scrollbar { display: none; }
.category-marquee.is-grabbing { cursor: grabbing; }
.category-marquee.has-selection { -webkit-mask-image: none; mask-image: none; }

.category-marquee__track {
  display: flex;
  gap: var(--sp-3);
  width: max-content;
  /* Room for the selected card's halo ring (extends 4px past the card) —
     .category-marquee clips vertically (overflow-y: hidden, so the
     horizontal scroller doesn't grow tall), so without this the ring's
     top/bottom would be cut off. */
  padding-block: 6px;
}

.cat-card {
  position: relative;
  flex: 0 0 auto;
  width: 168px;
  aspect-ratio: 16 / 11;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--media-bg);
  border: 1px solid var(--border-faint);
  text-align: left;
  color: #fff;
  transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out),
    transform var(--dur-2) var(--ease-out);
}
/* Exactly 3 cards fill the viewport width on phones (was a fixed 140px,
   which only fit ~2.5 — a partial third card). Sized off 100vw rather than a
   percentage because .category-marquee__track is width:max-content (it has
   to be wider than the viewport to hold every card for the drift/loop), so a
   percentage here would resolve against that oversized track, not the
   viewport. The scroll/drift motion itself is unchanged — only the card
   width changes, so three now land edge-to-edge instead of two-and-a-half. */
@media (max-width: 560px) {
  .cat-card { width: calc((100vw - 2 * var(--gutter) - 2 * var(--sp-3)) / 3); }
}
@media (hover: hover) { .cat-card:hover { transform: translateY(-2px); } }
.cat-card:active { transform: translateY(0); }

.cat-card__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  pointer-events: none;
}
/* clear at the top, blurred + darkened toward the label */
.cat-card__veil {
  position: absolute; inset: 0;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  -webkit-mask-image: linear-gradient(to top, #000 0, #000 30%, transparent 70%);
  mask-image: linear-gradient(to top, #000 0, #000 30%, transparent 70%);
}
.cat-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 8, 0.88) 4%, rgba(8, 8, 8, 0.2) 44%, transparent 68%);
}
.cat-card__label {
  position: absolute;
  left: 11px; right: 11px; bottom: 10px;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.cat-card__name {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: 1.15;
}
.cat-card__count {
  font-size: var(--step--2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}
/* Selected state: a halo ring, not just a border sitting on the photo.
   A plain border can vanish against a busy/light image in either theme, so
   this pairs a small gap of the page's own background with an outer ring in
   the page's own ink — --bg-primary/--text-primary already flip together
   for light vs dark, so the ring reads clearly against the card either way,
   independent of whatever the card's own image looks like. */
.cat-card.is-active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .category-marquee { scroll-behavior: auto; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cat-card__veil { background: rgba(10, 10, 10, 0.35); }
}

/* --- Coming soon panel ---------------------------------------------- */
.coming-soon {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 46vh;
  padding: var(--sp-8) var(--sp-4);
}
.coming-soon__inner { display: grid; gap: var(--sp-3); justify-items: center; max-width: 40ch; }
.coming-soon__icon {
  display: grid; place-items: center;
  width: 60px; height: 60px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  color: var(--text-secondary);
}
.coming-soon__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 118%;
  font-size: var(--step-3);
  letter-spacing: -0.02em;
}
.coming-soon__body { color: var(--text-secondary); font-size: var(--step-0); }
