/* Shared structure for all Aventra variants.
   Variants set these tokens on :root and add their own section styles:
   --bg --surface --surface-2 --fg --muted --line --accent --accent-fg --tile --wa
   --font-display --font-body --font-ui --radius --radius-sm --shadow --ease */
:root {
  --wa: #1fae5b;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: max(18px, env(safe-area-inset-left, 0px));
  --gutter-r: max(18px, env(safe-area-inset-right, 0px));
  --maxw: 1240px;
}
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; overflow-x: clip }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
body.is-locked { overflow: hidden }
img { max-width: 100%; display: block }
a { color: inherit }
button, input, select { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px }
h1, h2, h3 { text-wrap: balance; margin: 0 }
p { margin: 0 }
[hidden] { display: none !important }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r) }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.ico { width: 1.15em; height: 1.15em; flex: none }

/* Lenis */
html.lenis, html.lenis body { height: auto }
.lenis.lenis-smooth { scroll-behavior: auto !important }
.lenis.lenis-stopped { overflow: hidden }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .95em 1.4em; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 600; text-decoration: none; line-height: 1;
  transition: transform .3s var(--ease), background-color .3s, box-shadow .3s, border-color .3s, color .3s;
}
.btn:active { transform: scale(.97) }
.btn--primary { background: var(--accent); color: var(--accent-fg) }
.btn--ghost { border-color: var(--line); background: transparent; color: var(--fg) }
.btn--ghost:hover { border-color: var(--fg) }
.btn--wa { background: var(--wa); color: #fff }
.btn--wa:hover { filter: brightness(1.06) }

/* Product cards (shared skeleton) */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: clamp(14px, 2vw, 22px) }
.pcard { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden }
.pcard__media {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; width: 100%; padding: 0; border: 0;
  background: var(--tile); overflow: hidden; color: var(--muted);
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease) }
.pcard:hover .pcard__media img { transform: scale(1.06) }
.ico-fallback { display: none; width: 34%; height: 34%; opacity: .45; stroke-width: 1.2 }
.is-missing > .ico-fallback { display: block }
.pcard__badge, .pcard__off {
  position: absolute; top: 12px; font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; line-height: 1;
}
.pcard__badge { left: 12px; background: var(--accent); color: var(--accent-fg) }
.pcard__off { right: 12px; background: var(--fg); color: var(--bg) }
.pcard__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1 }
.pcard__cat { font-family: var(--font-ui); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) }
.pcard__name { font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.3 }
.pcard__name button { all: unset; cursor: pointer }
.pcard__name button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.pcard__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-variant-numeric: tabular-nums; margin-top: auto; padding-top: 4px }
.pcard__price b { font-size: 18px }
.pcard__price s { color: var(--muted); font-size: 14px }
.pcard__price em { font-style: normal; color: var(--wa); font-size: 13px; font-weight: 600 }
.pcard__actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px }
.pcard__add, .pcard__wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 12px;
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; border-radius: var(--radius-sm); text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s, transform .2s;
}
.pcard__add { border: 1px solid var(--line); background: transparent }
.pcard__add:hover { border-color: var(--accent); color: var(--accent) }
.pcard__wa { background: var(--wa); color: #fff; border: 0 }
.pcard__wa:hover { filter: brightness(1.07) }
.pcard__add:active, .pcard__wa:active { transform: scale(.96) }
.l-short { display: none }
@media (max-width: 420px) { .pcard__wa span { display: none } .pcard__wa { padding: 0 13px } }
/* Phones: two-up catalogue with compact cards */
@media (max-width: 560px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
  .pgrid .pcard__body { padding: 10px 11px 12px; gap: 4px }
  .pgrid .pcard__name { font-size: 14px }
  .pgrid .pcard__cat { font-size: 10px; letter-spacing: .06em }
  .pgrid .pcard__price b { font-size: 17px }
  .pgrid .pcard__price s { font-size: 12px }
  .pgrid .pcard__actions { gap: 6px; margin-top: 6px }
  .pgrid .pcard__add, .pgrid .pcard__wa { min-height: 38px; padding: 0 8px; font-size: 12px }
  .pgrid .l-long { display: none }
  .pgrid .l-short { display: inline }
  .pgrid .pcard__badge, .pgrid .pcard__off { top: 8px; font-size: 9px; padding: 4px 7px }
  .pgrid .pcard__badge { left: 8px }
  .pgrid .pcard__off { right: 8px }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); flex-basis: 100% }
  .toolbar .chips::-webkit-scrollbar { display: none }
  .toolbar .chip { flex: none }
  .toolbar .tools { width: 100%; flex-wrap: nowrap }
  .toolbar .tools .field:first-child { flex: 1; min-width: 0 }
  .toolbar .field input { width: 100% }
}

.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 14px; padding: 60px 0; color: var(--muted) }

/* Chips + toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 26px }
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; min-width: 0 }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 99px;
  border: 1px solid var(--line); background: transparent; font-family: var(--font-ui); font-size: 14px; font-weight: 500;
  transition: background-color .25s, color .25s, border-color .25s;
}
.chip span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums }
.chip:hover { border-color: var(--fg) }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg) }
.chip[aria-pressed="true"] span { color: inherit; opacity: .7 }
.tools { display: flex; gap: 10px; flex-wrap: wrap }
.field {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface);
}
.field input, .field select { border: 0; background: transparent; outline: 0; min-width: 0; font-size: 14px; font-family: var(--font-ui) }
.field input { width: 180px }
.field select option { background: var(--surface); color: var(--fg) }
.field:focus-within { border-color: var(--accent) }
.count { font-family: var(--font-ui); font-size: 13px; color: var(--muted) }

/* Quantity stepper */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; height: 48px }
.qty button { width: 44px; height: 100%; display: grid; place-items: center; border: 0; background: transparent; border-radius: 99px }
.qty button:hover { color: var(--accent) }
.qty output { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600 }
.qty--sm { height: 36px }
.qty--sm button { width: 34px }

/* Quick view */
.qv { padding: 0; border: 0; background: transparent; color: var(--fg); max-width: min(980px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 24px) }
.qv::backdrop { background: rgba(5, 6, 8, .62); backdrop-filter: blur(6px) }
.qv[open] { animation: qv-in .45s var(--ease) }
@keyframes qv-in { from { opacity: 0; transform: translateY(24px) scale(.98) } }
.qv__inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); border-radius: var(--radius); overflow: hidden; max-height: calc(100dvh - 24px) }
.qv__media { position: relative; display: grid; place-items: center; background: var(--tile); color: var(--muted); min-height: 280px; overflow: hidden }
.qv__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.qv__media .pcard__badge { z-index: 1 }
.qv__body { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3.5vw, 40px); overflow-y: auto; min-width: 0 }
.qv__title { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); line-height: 1.05 }
.qv__price b { font-size: 24px }
.qv__desc { color: var(--muted) }
.qv__specs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 14px }
.qv__specs li { display: flex; gap: 8px; align-items: baseline }
.qv__specs li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-2px) }
.qv__opts { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px }
.qv__opts legend { font-family: var(--font-ui); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; padding: 0 }
.qv__opts label { position: relative }
.qv__opts input { position: absolute; opacity: 0; inset: 0; cursor: pointer }
.qv__opts span { display: grid; place-items: center; min-width: 46px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-ui); font-weight: 600; transition: all .2s }
.qv__opts input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg) }
.qv__opts input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px }
.qv__row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px }
.qv__add { flex: 1; min-width: 170px }
.qv__wa { width: 100% }
.qv__hint { color: var(--accent); font-size: 14px; font-weight: 600 }
.qv__close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); color: var(--fg); box-shadow: 0 2px 10px rgba(0,0,0,.18) }
@media (max-width: 760px) {
  .qv { max-width: 100vw; max-height: 100dvh; margin: auto 0 0; }
  .qv__inner { grid-template-columns: 1fr; border-radius: var(--radius) var(--radius) 0 0; max-height: 92dvh; overflow-y: auto }
  .qv__media { aspect-ratio: 4 / 3; min-height: 0 }
  .qv__body { overflow: visible; padding-bottom: max(22px, env(safe-area-inset-bottom, 0px)) }
  .qv[open] { animation-name: qv-up }
  @keyframes qv-up { from { transform: translateY(100%) } }
}

/* Bag drawer */
.bag { position: fixed; inset: 0; z-index: 90; pointer-events: none }
.bag__scrim { position: absolute; inset: 0; background: rgba(5, 6, 8, .55); opacity: 0; transition: opacity .4s; backdrop-filter: blur(3px) }
.bag__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); color: var(--fg); transform: translateX(102%); transition: transform .55s var(--ease); outline: 0;
  padding-top: env(safe-area-inset-top, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.bag.is-open { pointer-events: auto }
.bag.is-open .bag__scrim { opacity: 1 }
.bag.is-open .bag__panel { transform: none }
.bag__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line) }
.bag__head h2 { font-family: var(--font-display); font-size: 24px }
.bag__head h2 span { font-family: var(--font-ui); font-size: 15px; color: var(--muted) }
.bag__x { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50% }
.bag__x:hover { background: var(--surface-2) }
.bag__items { flex: 1; overflow-y: auto; padding: 8px 22px; overscroll-behavior: contain }
.bag__item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line) }
.bag__thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--tile); display: grid; place-items: center; color: var(--muted) }
.bag__thumb img { width: 100%; height: 100%; object-fit: cover }
.bag__info { display: grid; gap: 2px; min-width: 0; font-size: 14px }
.bag__info b { font-weight: 600; line-height: 1.3 }
.bag__info small { color: var(--muted) }
.bag__info span { font-variant-numeric: tabular-nums; font-weight: 600 }
.bag__empty { display: grid; justify-items: center; gap: 14px; padding: 70px 0; color: var(--muted); text-align: center }
.bag__empty .ico { width: 44px; height: 44px; stroke-width: 1.2 }
.bag__foot { display: grid; gap: 14px; padding: 18px 22px max(18px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface-2) }
.bag__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.bag__fields label { display: grid; gap: 4px; font-family: var(--font-ui); font-size: 12px; color: var(--muted) }
.bag__fields input { min-width: 0; height: 42px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 15px }
.bag__fields input:focus { outline: 0; border-color: var(--accent) }
.bag__total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-ui) }
.bag__total b { font-size: 24px; font-variant-numeric: tabular-nums }
.bag__send { width: 100%; padding-block: 1.1em }
.bag__note { font-size: 12px; color: var(--muted); text-align: center }

/* Toast */
.toast {
  position: fixed; z-index: 95; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translate(-50%, calc(100% + 60px));
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px;
  border-radius: 99px; background: var(--fg); color: var(--bg); font-family: var(--font-ui); font-size: 14px;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.45); transition: transform .5s var(--ease), visibility 0s .5s; visibility: hidden;
}
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0 }
.toast button { border: 0; border-radius: 99px; padding: 8px 14px; background: var(--accent); color: var(--accent-fg); font-weight: 600; flex: none }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .5s var(--ease), visibility 0s }

/* Floating WhatsApp */
.fab {
  position: fixed; z-index: 80; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff;
  box-shadow: 0 12px 30px -8px rgba(31, 174, 91, .6); transition: transform .3s var(--ease);
}
.fab .ico { width: 28px; height: 28px }
.fab:hover { transform: scale(1.07) }

/* Bag button counter */
.bagbtn { position: relative; display: inline-flex; align-items: center; gap: 8px }
.bagbtn [data-bag-count] {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-fg); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.bagbtn.is-bump { animation: bump .5s var(--ease) }
@keyframes bump { 40% { transform: scale(1.18) } }

/* Fly-to-bag ghost */
.fly { position: fixed; z-index: 100; pointer-events: none; border-radius: 12px; overflow: hidden; background: var(--tile); box-shadow: 0 10px 30px rgba(0,0,0,.3) }
.fly img { width: 100%; height: 100%; object-fit: cover }

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

/* Aventra logo: redrawn chevron mark + wide geometric wordmark (matches the poster lockup) */
.logo { display: inline-flex; align-items: center; gap: .5em; text-decoration: none; line-height: 1 }
.logo__mark { width: 1.55em; height: 1.55em; flex: none; color: var(--logo-mark, currentColor) }
.logo__word { font-family: "Montserrat", "Avenir Next", system-ui, sans-serif; font-weight: 600; letter-spacing: .06em; font-size: 1em; text-transform: uppercase }
.logo__word sup { font-size: .38em; font-weight: 600; margin-left: .15em; vertical-align: 1.3em; letter-spacing: 0 }
