/* ============================================================
   Storefront stylesheet
   Palette is cool and screen-native — the world these products
   live in is glass, anodised metal and coloured silicone.
   ============================================================ */

:root {
  --ink:      #0F1115;
  --ink-2:    #59616E;
  --ink-3:    #8A929E;
  --surface:  #FFFFFF;
  --haze:     #F3F5F8;
  --haze-2:   #E9EDF2;
  --line:     #E3E7EC;
  --volt:     #E8552F;           /* accent — set from admin settings */
  --volt-ink: #C43D1B;
  --volt-haze:#FFF0EA;
  --pulse:    #E8123C;           /* reserved for markdowns and urgency */

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15,17,21,.06);
  --shadow:    0 4px 20px rgba(15,17,21,.08);
  --shadow-lg: 0 18px 50px rgba(15,17,21,.14);

  --pad: clamp(16px, 4vw, 40px);
  --maxw: 1320px;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', 'IBM Plex Sans Arabic', system-ui, sans-serif;

  --header-h: 68px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

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

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

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 { font-size: clamp(28px, 5vw, 46px); }
h2 { font-size: clamp(22px, 3.2vw, 32px); }
h3 { font-size: clamp(17px, 2vw, 20px); }

.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(40px, 6vw, 72px); }
.section--tight { padding-block: clamp(28px, 4vw, 44px); }
.section--haze { background: var(--haze); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-head p {
  color: var(--ink-2);
  font-size: 14px;
  margin-top: 4px;
}
.section-head .link-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--volt);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.section-head .link-more:hover { gap: 10px; transition: gap .2s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #22262F; }
.btn--volt { background: var(--volt); color: #fff; }
.btn--volt:hover { background: var(--volt-ink); }
.btn--ghost { border-color: var(--line); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 28px; font-size: 15px; }
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.badge--sale { background: var(--pulse); color: #fff; }
.badge--offer { background: var(--ink); color: #fff; }
.badge--new { background: var(--volt); color: #fff; }
.badge--out { background: var(--haze-2); color: var(--ink-2); }

/* ============================================================
   ANNOUNCEMENT + HEADER
   ============================================================ */

.announce {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  text-align: center;
  padding: 9px var(--pad);
  letter-spacing: .01em;
}

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header__bar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.logo img { height: 34px; width: auto; }
.logo__mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--volt);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}

/* search */
.search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--haze);
  transition: border-color .2s, background .2s;
}
.search input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--surface);
}
.search button {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: var(--ink-2);
}

.search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
  max-height: 60vh;
  overflow-y: auto;
}
.search__results.is-open { display: block; }
.search__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.search__row:last-child { border-bottom: 0; }
.search__row:hover { background: var(--haze); }
.search__row img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; background: var(--haze); }
.search__row strong { font-size: 14px; font-weight: 500; display: block; }
.search__row span { font-size: 13px; color: var(--volt); font-weight: 600; }
.search__empty { padding: 18px; text-align: center; color: var(--ink-2); font-size: 14px; }

.header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.icon-btn {
  width: 42px; height: 42px;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  position: relative;
  transition: background .2s;
}
.icon-btn:hover { background: var(--haze); }
.icon-btn__count {
  position: absolute;
  top: 4px; right: 3px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--volt);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
}

.burger { display: none; }

/* ---------- Nav + mega menu ---------- */
.nav { border-top: 1px solid var(--line); }
.nav__list {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav__list::-webkit-scrollbar { display: none; }

.nav__item { position: relative; flex-shrink: 0; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.nav__item:hover > .nav__link,
.nav__link.is-active { border-color: var(--ink); }
.nav__link svg { width: 14px; height: 14px; transition: transform .2s; }
.nav__item:hover .nav__link svg { transform: rotate(180deg); }

.mega {
  position: absolute;
  top: 100%; left: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 70;
}
.nav__item:hover .mega,
.nav__item:focus-within .mega {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mega a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.mega a:hover { background: var(--haze); color: var(--ink); }

/* ---------- Mobile drawer ---------- */
.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(340px, 86vw);
  background: var(--surface);
  z-index: 100;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer.is-open { transform: none; }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: var(--surface);
}
.drawer__body { padding: 10px 0 30px; }
.drawer__group > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 500;
}
.drawer__group > button svg { transition: transform .2s; }
.drawer__group.is-open > button svg { transform: rotate(180deg); }
.drawer__sub { display: none; padding: 0 0 8px; background: var(--haze); }
.drawer__group.is-open .drawer__sub { display: block; }
.drawer__sub a { display: block; padding: 10px 30px; font-size: 14px; color: var(--ink-2); }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15,17,21,.45);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.scrim.is-open { opacity: 1; visibility: visible; }

body.is-locked { overflow: hidden; }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
  padding-block: clamp(24px, 4vw, 44px);
  align-items: stretch;
}

.hero__promo {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.hero__promo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .55;
  z-index: -1;
}
.hero__promo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,17,21,.92) 8%, rgba(15,17,21,.15) 70%);
  z-index: -1;
}
.hero__promo-inner { padding: clamp(22px, 3vw, 36px); }
.hero__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--volt);
  background: rgba(255,255,255,.1);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
}
.hero__promo h1 { color: #fff; margin-bottom: 10px; }
.hero__promo p { color: rgba(255,255,255,.78); margin-bottom: 20px; max-width: 40ch; }

/* ---------- SIGNATURE: the device picker ----------
   Phone accessories are shopped model-first: nobody browses
   "cases", they browse "cases for MY phone". So the picker
   is a primary surface, not a filter buried in a sidebar.   */

.picker {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: clamp(18px, 2.4vw, 26px);
  display: flex;
  flex-direction: column;
}
.picker__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.picker__sub { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }

.picker__family {
  display: inline-flex;
  background: var(--haze);
  border-radius: var(--r-pill);
  padding: 3px;
  margin: 16px 0 14px;
  align-self: flex-start;
}
.picker__family button {
  padding: 7px 18px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background .2s, color .2s;
}
.picker__family button.is-on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.picker__groups {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.picker__groups::-webkit-scrollbar { display: none; }
.picker__groups button {
  padding: 7px 13px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.picker__groups button:hover { background: var(--haze); }
.picker__groups button.is-on { background: var(--ink); color: #fff; }

.picker__models {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
  gap: 8px;
  flex: 1;
  align-content: start;
}
.picker__chip {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  transition: border-color .18s, background .18s, transform .18s;
}
.picker__chip:hover {
  border-color: var(--volt);
  background: var(--volt-haze);
  color: var(--volt-ink);
  transform: translateY(-1px);
}

/* ============================================================
   CATEGORY GRID
   ============================================================ */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.cat-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 16px;
  background: var(--surface);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 128px;
}
.cat-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat-card__icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--volt-haze);
  color: var(--volt);
  display: grid; place-items: center;
}
.cat-card strong { font-size: 15px; font-weight: 600; display: block; }
.cat-card span { font-size: 12.5px; color: var(--ink-3); margin-top: auto; }

/* ============================================================
   PRODUCT CARD
   ============================================================ */

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

/* horizontal rail on small screens, grid on large */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
@media (min-width: 900px) {
  .rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-columns: auto;
    overflow: visible;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card__media {
  position: relative;
  aspect-ratio: 1;
  background: var(--haze);
  overflow: hidden;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 10%;
  transition: opacity .25s, transform .35s;
}
.card:hover .card__media img { transform: scale(1.05); }

.card__badges {
  position: absolute;
  top: 9px; left: 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  z-index: 2;
}

.card__quick {
  position: absolute;
  left: 9px; right: 9px; bottom: 9px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  z-index: 2;
}
.card:hover .card__quick,
.card:focus-within .card__quick { opacity: 1; transform: none; }
@media (hover: none) {
  .card__quick { opacity: 1; transform: none; }
}

.card__body {
  padding: 13px 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.card__brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.card__name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.card__price strong { font-size: 16px; font-weight: 700; }
.card__price del { font-size: 13px; color: var(--ink-3); }

/* colour swatches — the vernacular of this product world */
.swatches {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.swatch {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1px solid rgba(15,17,21,.16);
  box-shadow: inset 0 0 0 2px #fff;
  transition: transform .15s, box-shadow .15s;
}
.swatch:hover, .swatch.is-on {
  transform: scale(1.18);
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 1.5px var(--ink);
}
.swatch--more { font-size: 11px; color: var(--ink-3); font-weight: 600; }

/* ============================================================
   TRUST STRIP
   ============================================================ */

.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.trust__item {
  background: var(--surface);
  padding: 22px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.trust__item svg { color: var(--volt); flex-shrink: 0; margin-top: 2px; }
.trust__item strong { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.trust__item span { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* ---------- Brands ---------- */
.brands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.brand-tile {
  border: 1px solid var(--line);
  border-radius: var(--r);
  height: 76px;
  display: grid;
  place-items: center;
  padding: 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
  background: var(--surface);
  transition: border-color .2s, color .2s;
}
.brand-tile:hover { border-color: var(--ink); color: var(--ink); }
.brand-tile img { max-height: 100%; object-fit: contain; }

/* ============================================================
   COLLECTION PAGE
   ============================================================ */

.crumbs {
  font-size: 13px;
  color: var(--ink-3);
  padding-block: 16px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.crumbs a:hover { color: var(--ink); }

.collection {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: 60px;
}

.filters {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 4px 18px 18px;
}
.filters__group { padding-block: 16px; border-bottom: 1px solid var(--line); }
.filters__group:last-child { border-bottom: 0; }
.filters h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 11px;
  font-family: var(--font-body);
}
.filters label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  font-size: 14px;
  cursor: pointer;
}
.filters input[type=checkbox] { accent-color: var(--volt); width: 15px; height: 15px; }
.filters__price { display: flex; gap: 8px; align-items: center; }
.filters__price input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--haze);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar__count { font-size: 14px; color: var(--ink-2); }
.select {
  height: 40px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2359616E' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center;
  appearance: none;
  font-size: 14px;
  cursor: pointer;
}
.filters-toggle { display: none; }

.empty {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
}
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--ink-2); margin-bottom: 20px; }

.pager {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}
.pager a, .pager span {
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 14px;
  font-weight: 500;
}
.pager a:hover { border-color: var(--ink); }
.pager .is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============================================================
   PRODUCT PAGE
   ============================================================ */

.pdp {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: 60px;
  align-items: start;
}

.gallery { position: sticky; top: calc(var(--header-h) + 20px); }
.gallery__main {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--haze);
  overflow: hidden;
}
.gallery__main img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 7%;
}
.gallery__thumbs {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery__thumbs button {
  flex-shrink: 0;
  width: 68px; height: 68px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--haze);
  overflow: hidden;
  transition: border-color .2s;
}
.gallery__thumbs button.is-on { border-color: var(--ink); border-width: 2px; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }

.pdp__brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--volt);
  margin-bottom: 8px;
  display: inline-block;
}
.pdp h1 { font-size: clamp(23px, 3vw, 31px); margin-bottom: 12px; }
.pdp__short { color: var(--ink-2); margin-bottom: 20px; }

.pdp__price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.pdp__price strong { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.pdp__price del { color: var(--ink-3); font-size: 17px; }

.opt { margin-bottom: 22px; }
.opt__label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 10px;
}
.opt__label span:first-child { font-weight: 600; }
.opt__label span:last-child { color: var(--ink-2); }

.opt__colors { display: flex; gap: 9px; flex-wrap: wrap; }
.opt__color {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(15,17,21,.14);
  box-shadow: inset 0 0 0 3px #fff;
  transition: transform .15s, box-shadow .15s;
  position: relative;
}
.opt__color:hover { transform: scale(1.08); }
.opt__color.is-on { box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--ink); }
.opt__color[data-stock="0"] { opacity: .35; pointer-events: none; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.qty button {
  width: 42px; height: 46px;
  display: grid; place-items: center;
  font-size: 17px;
  transition: background .15s;
}
.qty button:hover { background: var(--haze); }
.qty input {
  width: 46px;
  height: 46px;
  text-align: center;
  border: 0;
  background: none;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pdp__buy { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.pdp__buy .btn { flex: 1; min-width: 160px; height: 48px; }

.stock-line { font-size: 13.5px; display: flex; align-items: center; gap: 7px; margin-bottom: 18px; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot--in { background: #14A44D; }
.dot--low { background: #E8A100; }
.dot--out { background: var(--pulse); }

.pdp__meta {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pdp__meta-row { display: flex; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.pdp__meta-row svg { color: var(--ink); flex-shrink: 0; }

.pdp__desc { margin-top: 26px; }
.pdp__desc h3 { margin-bottom: 10px; }
.pdp__desc p { color: var(--ink-2); line-height: 1.7; }

/* ============================================================
   CART
   ============================================================ */

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 92vw);
  background: var(--surface);
  z-index: 100;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.is-open { transform: none; }
.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.cart-drawer__head h3 { font-size: 17px; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 6px 20px; }
.cart-drawer__foot { border-top: 1px solid var(--line); padding: 18px 20px; }

.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.cart-line:last-child { border-bottom: 0; }
.cart-line__img {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  background: var(--haze);
  object-fit: contain;
  padding: 7px;
}
.cart-line__name { font-size: 14px; font-weight: 500; line-height: 1.35; }
.cart-line__variant { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.cart-line__price { font-weight: 600; font-size: 14px; margin-top: 5px; }
.cart-line__remove { font-size: 12.5px; color: var(--ink-3); text-decoration: underline; margin-top: 6px; }
.cart-line__remove:hover { color: var(--pulse); }

.qty--sm { border-radius: var(--r-sm); }
.qty--sm button { width: 30px; height: 32px; font-size: 15px; }
.qty--sm input { width: 32px; height: 32px; font-size: 13px; }

.totals { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.totals__row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); }
.totals__row--big {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ship-bar { margin-bottom: 16px; }
.ship-bar__text { font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; }
.ship-bar__track { height: 5px; border-radius: 3px; background: var(--haze-2); overflow: hidden; }
.ship-bar__fill { height: 100%; background: var(--volt); border-radius: 3px; transition: width .4s; }

.cart-page { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; padding-bottom: 60px; }
.cart-summary {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.cart-summary h3 { margin-bottom: 16px; font-size: 17px; }

/* ============================================================
   CHECKOUT
   ============================================================ */

.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; padding-bottom: 60px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--ink);
}
.field textarea { min-height: 88px; resize: vertical; }
.field__hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.field__error { font-size: 12.5px; color: var(--pulse); margin-top: 5px; }
.field.has-error input, .field.has-error select { border-color: var(--pulse); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.radio-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  margin-bottom: 10px;
  transition: border-color .2s, background .2s;
}
.radio-card:has(input:checked) { border-color: var(--ink); background: var(--haze); }
.radio-card input { accent-color: var(--volt); margin-top: 2px; }
.radio-card strong { display: block; font-size: 14.5px; }
.radio-card span { font-size: 13px; color: var(--ink-2); }

.alert {
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid;
}
.alert--err { background: #FFF3F2; border-color: #FFD5D2; color: #B3261E; }
.alert--ok  { background: #EFFAF3; border-color: #C7EDD5; color: #146C43; }

.step-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.success {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  padding-block: 60px 80px;
}
.success__mark {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: #EFFAF3;
  color: #146C43;
  display: grid; place-items: center;
  margin: 0 auto 22px;
}
.success h1 { margin-bottom: 10px; }
.success p { color: var(--ink-2); margin-bottom: 8px; }
.success__no {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  background: var(--haze);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  margin: 14px 0 26px;
  letter-spacing: .04em;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--ink);
  color: rgba(255,255,255,.72);
  padding-block: clamp(36px, 5vw, 60px) 28px;
  margin-top: 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer h4 {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-family: var(--font-body);
}
.footer a { color: rgba(255,255,255,.72); font-size: 14px; display: block; padding: 5px 0; }
.footer a:hover { color: #fff; }
.footer__about p { font-size: 14px; line-height: 1.7; margin-bottom: 14px; max-width: 34ch; }
.footer__logo { color: #fff; font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 12px; display: block; }
.footer__social { display: flex; gap: 8px; margin-top: 14px; }
.footer__social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  display: grid; place-items: center;
  padding: 0;
  transition: background .2s, border-color .2s;
}
.footer__social a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }
.footer__bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 18px; bottom: 18px;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
  z-index: 55;
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translate(-50%, 120%);
  background: var(--ink);
  color: #fff;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  gap: 9px;
}
.toast.is-open { transform: translate(-50%, 0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1080px) {
  .collection { grid-template-columns: 1fr; }
  .filters {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 88vw);
    z-index: 100;
    background: var(--surface);
    border-radius: 0;
    border: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .28s;
    padding: 18px;
  }
  .filters.is-open { transform: none; }
  .filters-toggle { display: inline-flex; }
  .checkout, .cart-page { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero__promo { min-height: 260px; }
  .pdp { grid-template-columns: 1fr; }
  .gallery { position: static; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .nav { display: none; }
  .burger { display: grid; }
  .search { display: none; }
  .search--mobile {
    display: block;
    max-width: none;
    padding: 0 var(--pad) 12px;
  }
  .header__bar { gap: 10px; }
  .logo { font-size: 17px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .field-row { grid-template-columns: 1fr; }
  .cart-page { gap: 22px; }
}

@media (min-width: 761px) {
  .search--mobile { display: none; }
}
