/* ============================================================================
   MI EMPRESA · DESIGN SYSTEM
   Aesthetic: premium retail · airy + bold · ember/gold accents
   Fonts: Bricolage Grotesque (display) · Plus Jakarta Sans (body)
   ========================================================================== */

/* ---------- TOKENS ---------- */
:root {
  /* color */
  --ink:        #14181F;
  --ink-soft:   #2E353F;
  --muted:      #5B6472;
  --muted-2:    #99A1AC;
  --line:       #E2E7F2;
  --line-2:     #EDF0F7;
  --bg:         #FFFFFF;
  --bg-2:       #EAF0FB;
  --bg-3:       #F2F6FE;
  --page-base:  #ECEBF3;   /* lienzo gris-lila (lo ajusta el panel) */

  --brand:      #635BFF;   /* índigo / violeta moderno */
  --brand-d:    #4F46E5;
  --brand-l:    #ECEAFE;
  --brand-glow: rgba(99,91,255,.26);

  --gold:       #C8961E;
  --gold-d:     #A87B17;
  --green:      #12A150;
  --green-l:    #E5F5EC;
  --blue:       #635BFF;

  /* radii */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* shadow */
  --sh-sm: 0 1px 2px rgba(16,21,28,.06), 0 1px 3px rgba(16,21,28,.05);
  --sh:    0 6px 20px rgba(16,21,28,.07), 0 2px 6px rgba(16,21,28,.04);
  --sh-lg: 0 20px 50px rgba(16,21,28,.12), 0 6px 16px rgba(16,21,28,.06);
  --sh-brand: 0 12px 28px var(--brand-glow);

  /* type */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  --container: 1240px;
  --ease: cubic-bezier(.22,1,.36,1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--page-base, #ECEBF3);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* fondo oficial: capa fija real (estable en móvil, sin el salto de background-attachment) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 48% at 50% -6%, var(--page-glow, rgba(99,91,255,.14)), transparent 60%),
    linear-gradient(180deg, var(--page-top, #F6F5FB), var(--page-base, #ECEBF3));
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }

/* ---------- UTIL ---------- */
.hide-sm { display: inline; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .76rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .55rem;
}
.eyebrow--gold { color: var(--gold-d); }
.eyebrow--light { color: rgba(255,255,255,.85); }

/* ============================================================================
   TOPBAR (marquee)
   ========================================================================== */
.topbar {
  background: linear-gradient(90deg, var(--topbar-2, var(--brand-d)), var(--topbar-1, var(--brand)));
  color: #fff;
  font-size: .82rem;
  overflow: hidden;
  position: relative;
}
.topbar__track {
  display: flex; gap: 3rem; white-space: nowrap; width: max-content;
  padding: .55rem 0;
  animation: marquee 32s linear infinite;
}
.topbar__track span { display: inline-flex; align-items: center; gap: .4rem; opacity: .96; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .topbar__track{ animation: none; } }

/* ============================================================================
   HEADER
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(43,91,255,.14);
  transition: box-shadow .3s var(--ease);
}
.header.is-scrolled { box-shadow: 0 6px 24px rgba(30,71,214,.10); }
.header__inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(1rem, 3vw, 2rem);
}
.header__menu { display: none; }

.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  box-shadow: var(--sh-brand);
  letter-spacing: -.04em;
}
.brand__text { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; letter-spacing: -.02em; }
.brand__text strong { font-weight: 800; }
.brand__text--light { color: #fff; }

/* branch selector */
.branch {
  display: flex; align-items: center; gap: .55rem;
  padding: .4rem .7rem; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--bg); transition: .2s var(--ease); flex-shrink: 0;
}
.branch:hover { border-color: var(--brand); box-shadow: var(--sh-sm); }
.branch__icon { font-size: 1.15rem; }
.branch__col { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.branch__col small { font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.branch__col strong { font-size: .82rem; font-weight: 700; }
.branch__chev { width: 16px; height: 16px; color: var(--muted); }

/* search */
.search {
  flex: 1; position: relative; display: flex; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 0 .9rem; max-width: 460px; transition: .2s var(--ease); box-shadow: var(--sh-sm);
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-l); }
.search__icon { width: 19px; height: 19px; color: var(--brand); flex-shrink: 0; }
.search input { flex: 1; border: none; background: none; padding: .65rem .6rem; font-size: .92rem; }
.search input::placeholder { color: var(--muted-2); }
.search kbd {
  font-family: var(--font-body); font-size: .72rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: .1rem .4rem; background: var(--bg);
}

/* nav */
.nav { display: flex; gap: .3rem; flex-shrink: 0; }
.nav a {
  padding: .5rem .8rem; border-radius: var(--r-sm); font-weight: 600; font-size: .9rem; color: var(--ink-soft);
  transition: .18s var(--ease);
}
.nav a:hover { background: var(--brand-l); color: var(--brand); }

.header__actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

/* cart button */
.cart-btn {
  position: relative; width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff;
  box-shadow: var(--sh-brand); transition: .2s var(--ease);
}
.cart-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px var(--brand-glow); }
.cart-btn svg { width: 21px; height: 21px; }
.cart-btn__count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--gold); color: #1a1205; border-radius: var(--r-pill);
  font-size: .7rem; font-weight: 800; display: grid; place-items: center;
  border: 2px solid #fff; transform: scale(0); transition: transform .25s var(--ease);
}
.cart-btn__count.show { transform: scale(1); }

/* ============================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: .92rem; border-radius: var(--r-pill);
  padding: .7rem 1.3rem; transition: .2s var(--ease); white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--lg { padding: .9rem 1.7rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--primary { background: linear-gradient(135deg, var(--btn-1, var(--brand)), var(--btn-2, var(--brand-d))); color: #fff; box-shadow: var(--sh-brand); }
.btn--primary:hover { filter: brightness(1.06); transform: translateY(-2px); background: var(--btn-hover, linear-gradient(135deg, var(--btn-1, var(--brand)), var(--btn-2, var(--brand-d)))); box-shadow: 0 16px 34px var(--btn-hover-glow, var(--brand-glow)); }
.btn--outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--ghost { background: var(--bg-2); color: var(--ink); }
.btn--ghost:hover { background: var(--line); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.btn--outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  color: var(--ink); transition: .18s var(--ease); font-size: 1rem;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 22px; height: 22px; }

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--brand-l); color: var(--brand-d);
  font-weight: 700; font-size: .82rem; padding: .4rem .9rem; border-radius: var(--r-pill);
}

/* ============================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%,
              rgba(255,255,255,.5) 0%, rgba(255,255,255,.2) 45%, transparent 75%);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem) clamp(3rem, 7vw, 6rem);
}
.hero__content, .hero__card { position: relative; z-index: 2; }
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center;
  max-width: var(--container); margin: 0 auto;
}
/* atmosphere */
.hero__bg { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.blob--1 { width: 460px; height: 460px; top: -120px; right: -80px;
  background: radial-gradient(circle, var(--hero-glow, var(--brand)) 0%, transparent 70%); }
.blob--2 { width: 380px; height: 380px; bottom: -120px; left: -60px;
  background: radial-gradient(circle, var(--grad-2, #9B8CFF) 0%, transparent 70%); opacity: .35; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px),
                    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: .6;
}

.hero__title { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 800; }
.hero__title .grad {
  background: linear-gradient(110deg, var(--brand), var(--grad-2, #9B8CFF));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--ink-soft); max-width: 38ch; margin: 1.2rem 0 1.9rem; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 2.2rem; margin-top: 2.6rem; flex-wrap: wrap; }
.hero__stats > div { display: flex; flex-direction: column; }
.hero__stats strong { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; }
.hero__stats small { color: var(--muted); font-size: .82rem; font-weight: 600; }

/* floating cards */
.hero__card { position: relative; height: 540px; }
.floatcard {
  position: absolute; display: flex; align-items: center; gap: .9rem;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.85); border-radius: var(--r-lg);
  padding: 1rem 1.25rem; box-shadow: var(--sh-lg);
  width: max-content; max-width: 248px;
}
.floatcard__emoji { font-size: 2.1rem; width: 60px; height: 60px; border-radius: 16px;
  display: grid; place-items: center; background: var(--brand-l); flex-shrink: 0; }
.floatcard small { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.floatcard strong { display: block; font-size: 1.05rem; font-family: var(--font-display); margin: .04rem 0; }
.floatcard .price { color: var(--brand); font-weight: 800; font-size: .98rem; }
/* 5 tarjetas, repartidas para que no se amontonen */
.floatcard--a { top: 6%;  left: -2%;  animation: float 6s   var(--ease) infinite; }
.floatcard--b { top: 1%;  right: -2%; animation: float 7s   var(--ease) infinite .5s; }
.floatcard--d { top: 44%; left: 3%;   animation: float 6.6s var(--ease) infinite .9s; }
.floatcard--f { top: 40%; right: -4%; animation: float 6.9s var(--ease) infinite .3s; }
.floatcard--c { bottom: 3%; left: 29%; animation: float 6.3s var(--ease) infinite 1.2s; }
.badge { position: absolute; top: -10px; left: -10px; font-size: .7rem; font-weight: 800;
  padding: .2rem .55rem; border-radius: var(--r-pill); }
.badge--gold { background: var(--gold); color: var(--ink); }
@keyframes float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce){ .floatcard{ animation: none; } }

/* ============================================================================
   BENEFITS
   ========================================================================== */
.benefits {
  max-width: var(--container); margin: 0 auto; padding: 0 clamp(1rem,3vw,2rem);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  transform: translateY(-30px);
}
.benefits article {
  display: flex; gap: .9rem; align-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.1rem 1.2rem; box-shadow: var(--sh-sm); transition: .25s var(--ease);
}
.benefits article:hover { box-shadow: var(--sh); transform: translateY(-3px); }
.benefits span { font-size: 1.4rem; width: 46px; height: 46px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--brand-l); border-radius: 12px; }
.benefits strong { font-family: var(--font-display); font-size: 1rem; display: block; }
.benefits p { font-size: .82rem; color: var(--muted); }

/* ============================================================================
   SECTIONS
   ========================================================================== */
.section { max-width: var(--container); margin: 0 auto; padding: clamp(2.5rem,5vw,4.5rem) clamp(1rem,3vw,2rem); }
.section--tight { padding-top: 1rem; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section__head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.section__desc { color: var(--muted); max-width: 36ch; }

/* ---------- categories ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 1rem;
}
.cat-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1/1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem; cursor: pointer; border: none; color: #fff; text-align: left;
  transition: .3s var(--ease); isolation: isolate;
}
.cat-card::before { content: ''; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(150deg, var(--c1), var(--c2)); }
.cat-card::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.35)); }
.cat-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: var(--sh-lg); }
.cat-card.is-active { box-shadow: 0 0 0 3px var(--ink), var(--sh-lg); }
.cat-card__emoji { font-size: 2.4rem; position: absolute; top: 1rem; right: 1rem; opacity: .92;
  transition: .3s var(--ease); }
.cat-card:hover .cat-card__emoji { transform: scale(1.15) rotate(-6deg); }
.cat-card__name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.1; }
.cat-card__count { font-size: .74rem; opacity: .85; font-weight: 600; }

/* ============================================================================
   TOOLBAR / FILTERS
   ========================================================================== */
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar__title { font-size: clamp(1.5rem,2.5vw,2rem); }
.toolbar__controls { display: flex; gap: .8rem; }
.select { display: flex; flex-direction: column; gap: .25rem; }
.select label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.select select {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .55rem 2rem .55rem .8rem;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23717A87' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .55rem center / 16px;
  font-weight: 600; font-size: .88rem; appearance: none; cursor: pointer; min-width: 150px;
  transition: .18s var(--ease);
}
.select select:hover { border-color: var(--brand); }
.price-range { display: flex; align-items: center; gap: .35rem; }
.price-range input {
  width: 78px; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .55rem .6rem; font-weight: 600; font-size: .88rem; background: var(--bg);
  color: var(--ink); transition: .18s var(--ease); appearance: textfield; -moz-appearance: textfield;
}
.price-range input::-webkit-outer-spin-button,
.price-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-range input:hover { border-color: var(--brand); }
.price-range input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l); }
.price-range span { color: var(--muted); }
.stock-toggle {
  display: flex; align-items: center; gap: .45rem; align-self: flex-end;
  font-size: .85rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; padding: .55rem 0;
}
.stock-toggle input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

.result-bar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; font-size: .88rem; color: var(--muted); }
.chip-clear { color: var(--brand); font-weight: 700; font-size: .85rem; }
.chip-clear:hover { text-decoration: underline; }

/* ============================================================================
   PRODUCT GRID + CARDS
   ========================================================================== */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(228px,1fr)); gap: 1.3rem;
}
.product-grid--offers { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); }

.card {
  --pcolor: 130,150,180;
  --pimg: none;
  background: var(--bg); border: 1.5px solid rgba(var(--pcolor), .32); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: .28s var(--ease); position: relative;
  animation: cardIn .5s var(--ease) both;
}
.card:hover { transform: translateY(-6px); border-color: var(--card-hover, var(--brand)); box-shadow: 0 0 0 2px var(--card-hover, var(--brand)), 0 18px 38px rgba(var(--pcolor), .28); }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } }

.card__media {
  position: relative; aspect-ratio: var(--card-aspect, 0.775); overflow: hidden; cursor: pointer;
  background:
    radial-gradient(115% 85% at 28% 12%, rgba(255,255,255,.4), transparent 55%),
    linear-gradient(180deg, rgba(var(--pcolor), .16), rgba(var(--pcolor), .06));
}
/* fondo: la PROPIA foto difuminada llenando el recuadro (la nítida va encima) */
.card__media::before {
  content: ""; position: absolute; inset: -12%; z-index: 0;
  background-image: var(--pimg); background-size: cover; background-position: center;
  filter: blur(20px) saturate(1.3); transform: scale(1.12); opacity: .6; pointer-events: none;
}
.card__media .thumb { position: absolute; inset: 0; z-index: 1; }
.thumb-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none;
  z-index: 1; transition: transform .45s var(--ease);
}
.card:hover .thumb-img { transform: scale(1.06); }
.thumb-ph {
  position: absolute; inset: 0; display: grid; place-items: center; gap: .4rem;
  align-content: center; text-align: center;
  background:
    radial-gradient(120% 120% at 30% 18%, color-mix(in srgb, var(--c1) 22%, transparent), transparent 60%),
    linear-gradient(150deg, color-mix(in srgb, var(--c1) 16%, var(--bg-2)), color-mix(in srgb, var(--c2) 12%, var(--bg-3)));
}
.thumb-ph__icon { font-size: 3rem; filter: drop-shadow(0 6px 12px rgba(0,0,0,.12)); }
.thumb--big .thumb-ph__icon { font-size: 5rem; }
.thumb-ph__brand { font-size: .72rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft); opacity: .65; }
.card__tags { position: absolute; top: .7rem; left: .7rem; display: flex; flex-direction: column; gap: .35rem; z-index: 2; }
.tag { font-size: .68rem; font-weight: 800; padding: .22rem .55rem; border-radius: var(--r-pill); letter-spacing: .02em; }
.tag--new { background: var(--ink); color: #fff; }
.tag--off { background: var(--brand); color: #fff; }
.tag--low { background: var(--gold); color: #fff; }
.tag--promo { background: #fff; color: var(--brand); border: 1.5px solid var(--brand);
  box-shadow: 0 2px 6px rgba(var(--pcolor), .25); }

.card__fav {
  position: absolute; top: .6rem; right: .6rem; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.9); backdrop-filter: blur(4px); display: grid; place-items: center;
  color: var(--ink-soft); z-index: 2; opacity: 0; transform: translateY(-6px); transition: .22s var(--ease);
}
.card:hover .card__fav { opacity: 1; transform: translateY(0); }
.card__fav:hover { color: var(--brand); }
.card__fav.is-fav { color: var(--brand); opacity: 1; transform: translateY(0); }
.card__fav.is-fav svg { fill: var(--brand); }

.card__body { padding: .7rem .85rem .85rem; display: flex; flex-direction: column; flex: 1;
  position: relative; overflow: hidden; background: var(--bg); }
/* fondo: la propia foto difuminada detrás del texto (igual que el área de imagen) */
.card__body::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--pimg); background-size: cover; background-position: center;
  filter: blur(26px) saturate(1.3); transform: scale(1.2); opacity: .55; pointer-events: none;
}
.card__body::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.68));
}
.card__body > * { position: relative; z-index: 1; }
/* Interruptores del panel: apagar la foto como fondo */
body.pf-off .card__media::before,
body.pf-off .pview__media::before,
body.pf-off .gallery__main::before { display: none; }
body.pd-off .card__body::before,
body.pd-off .card__body::after,
body.pd-off .pview__info::before,
body.pd-off .pview__info::after { display: none; }
.card__brand { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.card__name { font-family: var(--font-display); font-weight: 600; font-size: .88rem; line-height: 1.22;
  margin: .2rem 0 .35rem; min-height: 2.2em; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__name:hover { color: var(--brand); }
.card__rate { display: flex; align-items: center; gap: .25rem; font-size: .76rem; color: var(--muted); margin-bottom: .4rem; }
.card__rate .stars { color: var(--gold); letter-spacing: -1px; }

.card__price { display: flex; align-items: baseline; gap: .5rem; margin-top: auto; }
.price-now { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.price-old { font-size: .85rem; color: var(--muted-2); text-decoration: line-through; }
.price-may {
  display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem;
  font-size: .76rem; font-weight: 700; color: var(--green);
  background: var(--green-l); padding: .15rem .5rem; border-radius: var(--r-pill); width: fit-content;
}
.price-locked {
  margin-top: .35rem; font-size: .74rem; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
}
.price-locked:hover { color: var(--brand); }

/* Botón Agregar: redondo, verde WhatsApp, en la unión foto/panel */
.card__add {
  position: absolute; top: -22px; right: .8rem; z-index: 4;
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--wa, #25D366); color: #fff; border: 2.5px solid var(--bg);
  box-shadow: 0 5px 14px rgba(0,0,0,.18); transition: .2s var(--ease);
}
.card__add:hover { filter: brightness(1.05); transform: translateY(-2px); }
.card__add svg { width: 21px; height: 21px; }
.card__add.added { background: var(--green); }

/* Panel blanco inferior con los datos (la tarjeta crece y se ve como una sola pieza) */
.card__panel { position: relative; background: var(--card-panel-bg, var(--bg)); padding: .7rem .9rem .7rem; }
.card__brandline { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-right: 2.6rem; }
.card__brand { font-size: .67rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.card__rate { display: inline-flex; align-items: center; gap: .2rem; font-size: .74rem; font-weight: 700; color: var(--ink-soft); }
.card__rate svg { width: 13px; height: 13px; fill: var(--gold); }
.card__name {
  font-family: var(--font-display); font-weight: 600; font-size: .92rem; line-height: 1.22;
  color: var(--ink); margin: .25rem 0 .4rem; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__name:hover { color: var(--brand); }
.card__price { display: flex; align-items: baseline; gap: .5rem; }
.card__panel .price-may { margin-top: .45rem; }

/* loader */
.sentinel { height: 1px; }
.loader { display: flex; justify-content: center; gap: .5rem; padding: 2rem; }
.loader span { width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
  animation: bounce .6s var(--ease) infinite alternate; }
.loader span:nth-child(2){ animation-delay: .15s; }
.loader span:nth-child(3){ animation-delay: .3s; }
@keyframes bounce { to { transform: translateY(-12px); opacity: .4; } }

.grid-empty { text-align: center; padding: 4rem 1rem; }
.grid-empty span { font-size: 3rem; display: block; margin-bottom: .5rem; }
.grid-empty h3 { font-size: 1.3rem; }
.grid-empty p { color: var(--muted); }

/* ============================================================================
   OFFERS section
   ========================================================================== */
.offers { background: var(--bg-3); border-radius: var(--r-xl); margin-top: 1rem; }

/* ============================================================================
   APP CTA
   ========================================================================== */
.appcta {
  background: var(--ink); color: #fff; position: relative; overflow: hidden;
  margin: 4rem clamp(1rem,3vw,2rem) 0; border-radius: var(--r-xl);
  max-width: calc(var(--container)); margin-left: auto; margin-right: auto;
}
.appcta::before { content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, var(--brand) 0%, transparent 70%); opacity: .4;
  top: -150px; right: -100px; }
.appcta::after { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%); opacity: .25;
  bottom: -150px; left: 10%; }
.appcta__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr;
  gap: 2rem; align-items: center; padding: clamp(2rem,4vw,3.5rem); }
.appcta__text h2 { font-size: clamp(1.8rem,3.5vw,2.8rem); }
.appcta__text > p { color: rgba(255,255,255,.7); margin: 1rem 0 1.5rem; max-width: 40ch; }
.checklist { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.8rem; }
.checklist li { display: flex; align-items: center; gap: .6rem; color: rgba(255,255,255,.9); font-size: .92rem; }
.checklist li::before { content: '✓'; width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.appcta__buttons { display: flex; gap: .8rem; flex-wrap: wrap; }
.appcta__meta { display: flex; gap: 2rem; margin-top: 2.2rem; flex-wrap: wrap; }
.appcta__meta strong { font-family: var(--font-display); font-size: 1.4rem; display: block; }
.appcta__meta small { color: rgba(255,255,255,.6); font-size: .78rem; }

/* phone mockup */
.appcta__phone { display: grid; place-items: center; }
.phone { width: 240px; height: 480px; background: #1A2129; border-radius: 38px; padding: 12px;
  box-shadow: 0 30px 70px rgba(0,0,0,.5), inset 0 0 0 2px rgba(255,255,255,.06);
  position: relative; animation: float 8s var(--ease) infinite; }
.phone__notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; background: #1A2129; border-radius: 0 0 14px 14px; z-index: 3; }
.phone__screen { width: 100%; height: 100%; background: linear-gradient(180deg,#FFF7F3,#fff);
  border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; }
.phone__head { display: flex; justify-content: space-between; align-items: center; padding: 1.6rem 1rem .7rem;
  font-family: var(--font-display); font-weight: 800; font-size: .8rem; color: var(--ink); }
.phone__hero { margin: 0 .8rem; padding: 1rem; border-radius: 14px; color: #fff; font-weight: 700; font-size: .8rem;
  background: linear-gradient(120deg, var(--brand), var(--gold-d)); box-shadow: var(--sh); }
.phone__cards { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .8rem; flex: 1; }
.phone__cards div { background: #fff; border-radius: 10px; box-shadow: var(--sh-sm); }
.phone__bar { display: flex; justify-content: space-around; padding: .7rem; background: #fff;
  border-top: 1px solid var(--line); font-size: 1rem; }

/* ============================================================================
   REVIEWS
   ========================================================================== */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.2rem; }
.review {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.5rem; box-shadow: var(--sh-sm); transition: .25s var(--ease);
}
.review:hover { box-shadow: var(--sh); transform: translateY(-3px); }
.review__stars { color: var(--gold); margin-bottom: .7rem; letter-spacing: 1px; }
.review__text { font-size: .96rem; color: var(--ink-soft); margin-bottom: 1.1rem; }
.review__author { display: flex; align-items: center; gap: .7rem; }
.review__avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #fff; font-family: var(--font-display);
  background: linear-gradient(135deg, var(--brand), var(--gold-d)); }
.review__author strong { display: block; font-size: .9rem; font-family: var(--font-display); }
.review__author small { color: var(--muted); font-size: .78rem; }

/* ============================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--footer-bg, var(--ink)); color: var(--footer-text, #C8CDD4); margin-top: 4rem; }
.footer__inner {
  max-width: var(--container); margin: 0 auto; padding: clamp(2.5rem,4vw,3.5rem) clamp(1rem,3vw,2rem) 2rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1.3fr; gap: 2rem;
}
.footer__brand p { font-size: .9rem; color: rgba(255,255,255,.6); margin: 1rem 0 1.2rem; max-width: 28ch; }
.social { display: flex; gap: .6rem; }
.social a { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; font-weight: 700; transition: .2s var(--ease); }
.social a:hover { background: var(--brand); transform: translateY(-2px); }
.social a svg { width: 19px; height: 19px; }
.footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer__col a, .footer__col p { display: block; font-size: .88rem; color: rgba(255,255,255,.65);
  margin-bottom: .55rem; transition: .18s var(--ease); }
.footer__col a:hover { color: var(--brand); }
.newsletter { display: flex; gap: .5rem; margin-top: .3rem; }
.newsletter input { flex: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-pill); padding: .65rem 1rem; color: #fff; font-size: .85rem; }
.newsletter input::placeholder { color: rgba(255,255,255,.45); }
.newsletter .btn { padding: .65rem 1.1rem; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 1.3rem clamp(1rem,3vw,2rem);
  max-width: var(--container); margin: 0 auto; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem; font-size: .8rem; color: rgba(255,255,255,.45);
}

/* ============================================================================
   WHATSAPP FLOAT
   ========================================================================== */
.wa-float {
  position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37,211,102,.45);
  transition: .25s var(--ease); animation: waPulse 2.5s infinite;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; stroke: none; }
@keyframes waPulse { 0%{ box-shadow: 0 10px 30px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5);} 70%{ box-shadow: 0 10px 30px rgba(37,211,102,.45), 0 0 0 16px rgba(37,211,102,0);} 100%{ box-shadow: 0 10px 30px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0);} }

/* ============================================================================
   DRAWER (cart)
   ========================================================================== */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; overflow: hidden; }
.drawer.open { visibility: visible; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(16,21,28,.5); opacity: 0; transition: .3s var(--ease); }
.drawer.open .drawer__overlay { opacity: 1; }
.drawer__panel {
  position: absolute; top: 1.5rem; right: 1.25rem; bottom: auto;
  height: auto; max-height: min(640px, calc(100% - 3rem));
  width: min(350px, 92vw);
  background: var(--bg); display: flex; flex-direction: column;
  border-radius: var(--r-xl); overflow: hidden;
  transform: translateX(calc(100% + 1.5rem)); transition: transform .35s var(--ease); box-shadow: var(--sh-lg);
}
.drawer.open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.4rem;
  border-bottom: 1px solid var(--line); }
.drawer__head h3 { font-size: 1.25rem; }
.drawer__body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.4rem; }
.cart-empty { text-align: center; padding: 4rem 1rem; }
.cart-empty span { font-size: 3.4rem; display: block; margin-bottom: 1rem; }
.cart-empty p { color: var(--muted); margin-bottom: 1.5rem; }
.cart-list { display: flex; flex-direction: column; gap: .9rem; }
.cart-item { display: flex; gap: .9rem; align-items: center; padding-bottom: .9rem; border-bottom: 1px solid var(--line-2); }
.cart-item__thumb { width: 60px; height: 60px; border-radius: var(--r-sm); display: grid; place-items: center;
  font-size: 1.8rem; background: var(--bg-2); flex-shrink: 0; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name { font-family: var(--font-display); font-weight: 600; font-size: .88rem; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item__price { color: var(--brand); font-weight: 800; font-size: .92rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); margin-top: .3rem; }
.qty button { width: 26px; height: 26px; display: grid; place-items: center; font-weight: 800; color: var(--ink-soft); }
.qty button:hover { color: var(--brand); }
.qty span { min-width: 24px; text-align: center; font-weight: 700; font-size: .85rem; }
.cart-item__remove { color: var(--muted-2); font-size: .9rem; align-self: flex-start; }
.cart-item__remove:hover { color: var(--brand); }
.drawer__foot { border-top: 1px solid var(--line); padding: 1.3rem 1.4rem; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; }
.cart-total strong { font-family: var(--font-display); font-size: 1.6rem; }
.ck-igv { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.ck-igv__lbl { font-size: .8rem; font-weight: 700; color: var(--muted); }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.seg__btn { font-size: .8rem; font-weight: 700; color: var(--muted); padding: .35rem .8rem; border-radius: var(--r-pill); transition: .15s var(--ease); }
.seg__btn.is-on { background: var(--brand); color: #fff; box-shadow: var(--sh-sm); }
.cart-sum { margin-bottom: 1rem; }
.cart-sum__row { display: flex; justify-content: space-between; align-items: baseline; font-size: .9rem; color: var(--ink-soft); padding: .15rem 0; }
.cart-sum__total { margin-top: .35rem; padding-top: .5rem; border-top: 1px dashed var(--line); }
.cart-sum__total span { font-weight: 700; color: var(--ink); }
.cart-sum__total strong { font-family: var(--font-display); font-size: 1.55rem; color: var(--ink); }
.cart-note { font-size: .78rem; color: var(--muted); margin-bottom: 1rem; }
.cart-who { font-size: .82rem; color: var(--ink-soft); margin: -.4rem 0 .9rem; display: flex; align-items: center; gap: .4rem; }
.cart-who b { color: var(--ink); }
.cart-coupon { display: flex; gap: .5rem; margin-bottom: .8rem; }
.cart-coupon input { flex: 1; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; font: inherit; color: var(--ink); min-width: 0; }
.cart-coupon input:focus { outline: none; border-color: #25D366; }
.cart-coupon .btn { white-space: nowrap; }
.cart-sum__desc { color: #12A150; font-weight: 600; }
.cart-sum__desc button { background: none; border: none; color: var(--muted-2); font-size: .82rem; margin-left: .35rem; cursor: pointer; padding: 0; }
.cart-sum__desc button:hover { color: #D92D20; }

/* ===== Carrito: identidad WhatsApp + compacto ===== */
#cartDrawer .drawer__head { background: #075E54; padding: .8rem 1.1rem; border-bottom: none; }
#cartDrawer .drawer__head h3 { color: #fff; font-size: 1.05rem; }
#cartDrawer .drawer__head .icon-btn { color: #fff; }
#cartDrawer .drawer__body { padding: .7rem 1.1rem; }
#cartDrawer .drawer__foot { padding: .8rem 1.1rem .9rem; background: #F5FBF4; }
#cartDrawer .cart-item { gap: .7rem; padding-bottom: .55rem; margin-bottom: .55rem; }
#cartDrawer .cart-item__thumb { width: 46px; height: 46px; }
#cartDrawer .cart-item__name { font-size: .83rem; }
#cartDrawer .cart-item__price { color: #075E54; font-size: .88rem; }
#cartDrawer .cart-sum { margin-bottom: .55rem; }
#cartDrawer .cart-sum__row { font-size: .85rem; padding: .08rem 0; }
#cartDrawer .cart-sum__total { margin-top: .25rem; padding-top: .4rem; }
#cartDrawer .cart-sum__total strong { font-size: 1.25rem; }
#cartDrawer .cart-who { font-size: .8rem; margin: 0 0 .6rem; }
#cartDrawer #btnCheckout { background: #25D366; border-color: #25D366; color: #fff; box-shadow: 0 6px 18px rgba(37,211,102,.32); }
#cartDrawer #btnCheckout:hover { background: #1da851; border-color: #1da851; }
.ck-fields { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .9rem; }
.ck-fields input { width: 100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 11px;
  background: var(--bg-2); font-size: .9rem; }
.ck-fields input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l); background: var(--bg); }

/* ============================================================================
   MODALS
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 110; visibility: hidden; overflow: hidden; }
.modal.open { visibility: visible; }
.modal__overlay { position: absolute; inset: 0; background: rgba(16,21,28,.55); backdrop-filter: blur(4px);
  opacity: 0; transition: .3s var(--ease); }
.modal.open .modal__overlay { opacity: 1; }
.modal__box {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -46%) scale(.96);
  width: min(440px, 92vw); max-height: 90vh; overflow-y: auto;
  background: var(--bg); border-radius: var(--r-xl); padding: 2rem; box-shadow: var(--sh-lg);
  opacity: 0; transition: .32s var(--ease);
}
.modal.open .modal__box { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal__box--wide { width: min(560px, 92vw); }
.modal__box--product { width: min(980px, 96vw); padding: 0; max-height: 94vh; overflow-y: auto; }
#productModal .modal__x { background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.14); z-index: 6; }
.modal__box--branch { width: min(500px, 92vw); }
.modal__box--orders { width: min(560px, 94vw); }
.orders-head { margin-bottom: 1.1rem; }
.orders-head h3 { font-family: var(--font-display); font-size: 1.4rem; }
.orders-head p { color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.orders-body { display: flex; flex-direction: column; gap: .9rem; }
.orders-loading, .orders-empty { text-align: center; color: var(--muted); padding: 2rem 1rem; line-height: 1.55; }
.orders-empty span { font-size: .85rem; color: var(--muted-2); }
.order-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.1rem; background: #fff; }
.order-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .2rem; }
.order-card__id { display: flex; flex-direction: column; line-height: 1.25; }
.order-card__id strong { font-family: var(--font-display); font-size: 1rem; }
.order-card__id small { color: var(--muted); font-size: .78rem; }
.order-card__items { list-style: none; display: flex; flex-direction: column; gap: .35rem; margin: .6rem 0; padding: .7rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.order-card__items li { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; }
.order-card__items li span:first-child { color: var(--ink-soft); }
.order-card__items li span:last-child { color: var(--muted); white-space: nowrap; }
.order-card__row { display: flex; justify-content: space-between; font-size: .85rem; color: #12A150; font-weight: 600; margin-bottom: .4rem; }
.order-card__total { display: flex; justify-content: space-between; align-items: center; font-size: .95rem; }
.order-card__total strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--brand); }
.order-badge { font-size: .72rem; font-weight: 800; padding: .28rem .6rem; border-radius: var(--r-pill); white-space: nowrap; }
.st-nuevo { background: var(--brand-l); color: var(--brand-d); }
.st-proceso { background: #FEF3C7; color: #92400E; }
.st-entregado { background: #DCFCE7; color: #166534; }
.st-cancelado { background: #FEE2E2; color: #991B1B; }
.modal__box--flyer { width: min(760px, 94vw); padding: 0; overflow: hidden; }
.flyer { display: grid; grid-template-columns: .85fr 1.15fr; }
.flyer__side { background: linear-gradient(160deg, var(--brand), var(--brand-d)); color: #fff; padding: 2rem 1.6rem; }
.flyer__brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.6rem; }
.flyer__brand .brand__mark { background: rgba(255,255,255,.18); box-shadow: none; }
.flyer__brand strong { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.flyer__side h4 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; }
.flyer__benes { display: flex; flex-direction: column; gap: 1rem; }
.flyer__benes li { display: flex; gap: .7rem; align-items: flex-start; }
.flyer__benes span { font-size: 1.25rem; line-height: 1; }
.flyer__benes strong { display: block; font-size: .9rem; font-weight: 700; }
.flyer__benes p { font-size: .78rem; color: rgba(255,255,255,.82); }
.flyer__main { padding: 2.2rem 2rem; }
.tabs { display: flex; gap: .3rem; background: var(--bg-2); border-radius: var(--r-pill); padding: 4px; margin-bottom: 1.5rem; }
.tab { flex: 1; padding: .55rem; border-radius: var(--r-pill); font-weight: 700; font-size: .9rem; color: var(--muted); transition: .15s var(--ease); }
.tab.is-on { background: var(--bg); color: var(--ink); box-shadow: var(--sh-sm); }
.flyer__form h3 { font-size: 1.35rem; margin-bottom: 1.1rem; }
.flyer__note { font-size: .78rem; color: var(--muted); text-align: center; margin-top: .2rem; }

/* Flyer login/registro — íconos, scroll y detalles (referencia) */
[hidden] { display: none !important; }
.modal__box--flyer, .flyer, .flyer__side, .flyer__main { max-height: 94vh; }
.flyer__side, .flyer__main { overflow-y: auto; }
.flyer__form { gap: .7rem; }
.flyer__title { font-size: 1.3rem; display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .35rem; }
.flyer__badge { background: var(--brand); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .03em; padding: .25rem .55rem; border-radius: var(--r-pill); }
.flyer__lead { font-size: .84rem; color: var(--muted); line-height: 1.5; margin-bottom: .9rem; }
.ifield { position: relative; display: flex; align-items: center; }
.ifield__ico { position: absolute; left: .85rem; width: 18px; height: 18px; color: var(--muted-2); pointer-events: none; }
.ifield input, .ifield select { width: 100%; padding-left: 2.5rem !important; }
.ifield:has(.ifield__eye) input { padding-right: 2.6rem !important; }
.ifield__eye { position: absolute; right: .55rem; color: var(--muted-2); padding: .25rem; display: grid; place-items: center; }
.ifield__eye svg { width: 18px; height: 18px; }
.ifield__eye:hover { color: var(--brand); }
.flyer__or { display: flex; align-items: center; gap: .7rem; color: var(--muted-2); font-size: .76rem; margin: .5rem 0; }
.flyer__or::before, .flyer__or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.flyer__form .btn--outline { border-color: var(--brand); color: var(--brand); }
.flyer__form .btn--outline:hover { background: var(--brand); color: #fff; }
.flyer__close { background: #8A93A2; color: #fff; }
.flyer__close:hover { background: #717A8A; }
.flyer__card { margin-top: 1.4rem; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: .9rem 1rem; }
.flyer__card strong { display: block; font-size: .85rem; color: #fff; margin-bottom: .35rem; }
.flyer__card p { font-size: .76rem; color: rgba(255,255,255,.9); line-height: 1.45; }
.flyer__card b { color: #FFD774; }
@media (max-width: 620px) {
  .flyer { grid-template-columns: 1fr; }
  .flyer__side { display: none; }
  .flyer__main { padding: 1.6rem 1.3rem; }
}
.modal__x { position: absolute; top: 1rem; right: 1rem; z-index: 3; }
.modal__head { text-align: center; margin-bottom: 1.5rem; }
.modal__icon { font-size: 2.4rem; display: block; margin-bottom: .5rem; }
.modal__head h3 { font-size: 1.5rem; }
.modal__head p { color: var(--muted); font-size: .92rem; margin-top: .4rem; }
.modal__divider { text-align: center; position: relative; margin: 1.3rem 0; }
.modal__divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.modal__divider span { position: relative; background: var(--bg); padding: 0 .8rem; color: var(--muted); font-size: .85rem; }

/* forms */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field > span { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem .9rem;
  background: var(--bg-2); font-size: .92rem; transition: .18s var(--ease); resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  background: var(--bg); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-l); outline: none;
}
.field small { font-size: .74rem; color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: .55rem; font-size: .82rem; color: var(--ink-soft); }
.check input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--brand); margin-top: .1rem; }

/* branch list */
.branch-list { display: flex; flex-direction: column; gap: .7rem; }
.branch-list li {
  display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line);
  border-radius: var(--r-lg); cursor: pointer; transition: .2s var(--ease);
}
.branch-list li:hover { border-color: var(--brand); background: var(--brand-l); }
.branch-list li.is-active { border-color: var(--brand); background: var(--brand-l); box-shadow: var(--sh-sm); }
.branch-list .b-icon { font-size: 1.8rem; }
.branch-list strong { display: block; font-family: var(--font-display); font-size: 1rem; }
.branch-list small { color: var(--muted); font-size: .82rem; }
.branch-list .b-check { margin-left: auto; color: var(--brand); font-weight: 800; opacity: 0; }
.branch-list li.is-active .b-check { opacity: 1; }

/* product view */
.pview { --pcolor: 130,150,180; --pimg: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.pview__media { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  border-radius: var(--r-xl) 0 0 var(--r-xl); padding: .6rem;
  background: var(--img-open-bg, var(--bg-2)); }
.pview__media::before { display: none; }
.pview__media > * { position: relative; z-index: 1; }
.gallery__main { position: relative; width: 100%; aspect-ratio: 1/1; overflow: hidden; border-radius: var(--r-lg);
  background: var(--img-open-bg, var(--bg-2)); }
.gallery__main::before { display: none; }
.gallery__main .thumb-img { position: relative; z-index: 1; inset: auto; height: 100%; width: 100%; object-fit: contain; transform: none; }
.gallery__thumbs { display: flex; gap: .5rem; overflow-x: auto; padding-top: .6rem; flex-shrink: 0; }
.gallery__thumb { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); flex-shrink: 0; background: var(--bg-2); cursor: pointer; padding: 0; }
.gallery__thumb.is-on { border-color: var(--brand); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__zoom { position: absolute; z-index: 2; bottom: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(8,12,20,.55); color: #fff; display: grid; place-items: center; font-size: .95rem; pointer-events: none; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: var(--lightbox-bg, rgba(8,12,20,.93)); display: flex; align-items: center; justify-content: center; padding: 1rem; cursor: zoom-out; animation: lbfade .18s ease; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; margin: auto; object-fit: contain; border-radius: 10px; }
.lightbox__x { position: fixed; top: 1rem; right: 1rem; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 1.1rem; display: grid; place-items: center; cursor: pointer; }
@keyframes lbfade { from { opacity: 0; } to { opacity: 1; } }
.pview__info { padding: 2.2rem; position: relative; overflow: hidden; }
.pview__info::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: var(--pimg); background-size: cover; background-position: center;
  filter: blur(30px) saturate(1.3); transform: scale(1.2); opacity: .5; pointer-events: none; }
.pview__info::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.72)); }
.pview__info > * { position: relative; z-index: 1; }
.pview__promo { display: inline-flex; align-items: center; gap: .4rem; margin: .2rem 0 .4rem;
  font-size: .8rem; font-weight: 700; color: var(--brand);
  background: var(--brand-l); border: 1px solid var(--brand); border-radius: var(--r-pill);
  padding: .25rem .7rem; width: fit-content; }
.pview__brand { font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pview__name { font-size: 1.7rem; margin: .4rem 0; }
.pview__rate { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.pview__rate .stars { color: var(--gold); }
.pview__price { display: flex; align-items: baseline; gap: .7rem; margin: 1rem 0 .3rem; }
.pview__price .price-now { font-size: 2rem; }
.pview__desc { color: var(--ink-soft); font-size: .92rem; margin: 1.2rem 0; }
.pview__meta { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; font-size: .85rem; }
.pview__meta div strong { display: block; font-family: var(--font-display); }
.pview__meta div small { color: var(--muted); }
.pview__actions { display: flex; gap: .7rem; }

/* ============================================================================
   TOASTS
   ========================================================================== */
.toasts { position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: .6rem; align-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; padding: .8rem 1.3rem; border-radius: var(--r-pill);
  font-size: .9rem; font-weight: 600; box-shadow: var(--sh-lg); display: flex; align-items: center; gap: .5rem;
  animation: toastIn .35s var(--ease), toastOut .35s var(--ease) 2.6s forwards;
}
.toast--success { background: var(--green); }
.toast--error { background: #D92D20; }
.toast--brand { background: var(--brand); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(20px); } }

/* ============================================================================
   REVEAL on scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .nav { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .header .branch, .header .search { display: none; }
  .header .header__actions { margin-left: auto; }                       /* empuja el carrito a la derecha */
  .header .header__actions > .btn { display: none; }                    /* oculta Mis pedidos / Cliente; el carrito (.cart-btn) queda visible */
  .header--show .branch, .header--show .search { display: flex; }
  .header--show .header__actions > .btn:not([hidden]) { display: inline-flex; }
}
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero__card { display: none; }
  .appcta__inner { grid-template-columns: 1fr; }
  .appcta__phone { display: none; }
  .benefits { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .header__inner { flex-wrap: wrap; }
  .branch__col small { display: none; }
  /* Móvil: cabecera minimal (solo menú + marca); lo demás aparece al desplazar */
  .header .branch, .header .search { display: none; }
  .header--show .search { order: 5; flex-basis: 100%; max-width: none; }
  .toolbar__controls { width: 100%; }
  .toolbar__controls .select { flex: 1; }
  .select select { min-width: 0; width: 100%; }
  .pview { grid-template-columns: 1fr; }
  .modal__box--product { width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  #productModal .modal__x { position: fixed; top: .7rem; right: .7rem; z-index: 10; }
  .pview__media { border-radius: 0; padding: 0; background: var(--img-open-bg, transparent); }
  .pview__media .gallery__main { aspect-ratio: auto; width: 100%; height: calc(100dvh - 3.2rem); margin: 0; border-radius: 0; box-shadow: none; background: var(--img-open-bg, transparent); }
  .pview__media .gallery__thumbs { position: absolute; left: 0; right: 0; bottom: 1rem; z-index: 4; justify-content: center; padding: 0; }
  .pview__media .gallery__thumb { background: rgba(255,255,255,.92); }
  .form--grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .toolbar { flex-wrap: wrap; }
  .toolbar__controls { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .benefits { grid-template-columns: 1fr; transform: translateY(-15px); }
  .hero__stats { gap: 1.4rem; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .card__name { font-size: .85rem; }
  .price-now { font-size: 1.1rem; }
  .modal__box { padding: 1.5rem; }
  .select { min-width: 0; }
  .toolbar__controls > * { min-width: 0; }
  .price-range input { width: 100%; }
}

/* ============================================================================
   MODO OSCURO  (lo activa el panel · ajustes.modo = 'oscuro')
   ========================================================================== */
body.theme-dark {
  --ink: #ECEEF5; --ink-soft: #C7CCD8; --muted: #9AA1B2; --muted-2: #6E7689;
  --line: #2B2F3B; --line-2: #242834;
  --bg: #1B1E27; --bg-2: #232734; --bg-3: #1F2330;
  --sh-sm: 0 1px 2px rgba(0,0,0,.45); --sh: 0 6px 20px rgba(0,0,0,.5); --sh-lg: 0 22px 55px rgba(0,0,0,.6);
}
body.theme-dark .header { background: rgba(20,22,30,.82); border-bottom-color: rgba(255,255,255,.08); }
body.theme-dark .search { background: var(--bg-2); }
body.theme-dark .floatcard { background: rgba(30,33,45,.92); border-color: rgba(255,255,255,.08); }
body.theme-dark .card__fav { background: rgba(28,31,42,.85); }
body.theme-dark .card__body::after { background: linear-gradient(180deg, rgba(18,20,28,.5), rgba(18,20,28,.72)); }
body.theme-dark .pview__info::after { background: linear-gradient(180deg, rgba(18,20,28,.5), rgba(18,20,28,.72)); }
body.theme-dark .gallery__thumb { background: var(--bg-2); border-color: var(--line); }
body.theme-dark .tag--promo { background: var(--bg-2); color: #fff; border-color: var(--brand); }
body.theme-dark .appcta { background: #0E1016; }
body.theme-dark .review-card, body.theme-dark .rev-card { background: var(--bg-2); }

/* ---- Tarjetas flotantes: tamaños (panel) y posiciones extra ---- */
#heroCard.fc-sm .floatcard { padding:.65rem .8rem; gap:.6rem; max-width:208px; }
#heroCard.fc-sm .floatcard__emoji { width:44px; height:44px; font-size:1.45rem; border-radius:13px; }
#heroCard.fc-sm .floatcard strong { font-size:.92rem; }
#heroCard.fc-sm .floatcard small { font-size:.68rem; }
#heroCard.fc-sm .floatcard .price { font-size:.85rem; }
#heroCard.fc-lg .floatcard { padding:1.2rem 1.5rem; gap:1.1rem; max-width:292px; }
#heroCard.fc-lg .floatcard__emoji { width:72px; height:72px; font-size:2.5rem; border-radius:18px; }
#heroCard.fc-lg .floatcard strong { font-size:1.2rem; }
#heroCard.fc-lg .floatcard .price { font-size:1.1rem; }
.floatcard--e { top: 20%; left: 31%; animation: float 5.8s var(--ease) infinite .8s; }
.floatcard--g { bottom: 24%; left: 1%;  animation: float 6.4s var(--ease) infinite 1.1s; }
.floatcard--h { top: 70%; right: 2%;    animation: float 6.1s var(--ease) infinite .4s; }
