/* ============================================================
   TERRA VISIONE — Tienda online multinacional 2026
   Estética: blanco puro · gris #f8fafc · azul #0d3b7a · celeste #38bdf8
   Tipografías: Inter + Fraunces
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-lum: #f0f9ff;
  --ink: #0b1220;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e8eef4;
  --line-2: #d1dce8;
  --blue: #0d3b7a;
  --blue-dark: #092850;
  --sky: #38bdf8;
  --sky-soft: #e6f5fe;
  --wa: #25d366;
  --red: #e11d48;
  --amber: #f59e0b;
  --green: #10b981;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 4px 14px rgba(13, 59, 122, .04);
  --shadow-md: 0 18px 45px rgba(13, 59, 122, .08);
  --shadow-lg: 0 30px 90px rgba(13, 59, 122, .13);
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-script: "Great Vibes", "Brush Script MT", cursive;
}

/* Modo cuadrado: alternar desde el panel admin */
body.square-cards {
  --radius: 6px;
  --radius-sm: 2px;
}

/* Paletas de color alternativas (panel admin → Estructura y paleta) */
body.theme-morado {
  --blue: #6d28d9; --blue-dark: #4c1d95;
  --sky: #c084fc; --sky-soft: #f3e8ff; --bg-lum: #f7f2ff;
}
body.theme-verde {
  --blue: #047857; --blue-dark: #064e3b;
  --sky: #34d399; --sky-soft: #d1fae5; --bg-lum: #f0fdf6;
}
body.theme-terracota {
  --blue: #b45309; --blue-dark: #78350f;
  --sky: #fb923c; --sky-soft: #ffedd5; --bg-lum: #fff7ed;
}
body.theme-grafito {
  --blue: #1f2937; --blue-dark: #111827;
  --sky: #9ca3af; --sky-soft: #f3f4f6; --bg-lum: #f9fafb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 86px; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--ink); }

.container { width: min(1220px, 92%); margin-inline: auto; }

h1, h2, h3 { letter-spacing: -0.035em; line-height: 1.05; font-weight: 600; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.65rem); }

.eyebrow {
  display: inline-block;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--blue);
  background: linear-gradient(135deg, var(--sky-soft), #f0f9ff);
  padding: .4rem .95rem; border-radius: 999px;
  margin-bottom: 1rem; border: 1px solid var(--line);
}

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 3rem; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-sub { color: var(--muted); max-width: 560px; margin-top: .7rem; font-size: 1.02rem; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .95rem;
  padding: .75rem 1.5rem; border-radius: 999px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-lg { padding: 1rem 2.1rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem 1.1rem; font-size: .85rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #1354a6 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(13, 59, 122, .28);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(13, 59, 122, .38); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: var(--bg); color: var(--blue);
  border: 1.5px solid var(--line-2);
}
.btn-ghost:hover { border-color: var(--sky); background: var(--sky-soft); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1rem; color: var(--muted);
  background: var(--bg-soft);
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--line); color: var(--ink); }

.link-btn {
  color: var(--blue); font-weight: 600; font-size: .9rem;
  text-decoration: underline; text-underline-offset: 3px;
  background: transparent; border: none;
  display: inline-block;
}
.link-btn:hover { color: var(--sky); }

/* ============ TOP BAR ============ */
.top-bar {
  background: linear-gradient(90deg, var(--blue-dark) 0%, var(--blue) 50%, #1354a6 100%);
  color: #fff;
  font-size: .84rem;
  padding: .55rem 0;
  position: relative; z-index: 70;
  overflow: hidden;
}
.marquee { width: 100%; overflow: hidden; mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%); }
.marquee-track {
  display: flex; gap: 3rem; width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: center; gap: .55rem;
  white-space: nowrap;
}
.marquee-item svg { width: 18px; height: 18px; }
.marquee-item strong { font-weight: 700; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.top-bar-close {
  position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  color: rgba(255,255,255,.8); font-size: .9rem;
  background: rgba(255,255,255,.1);
  transition: background .2s, color .2s;
}
.top-bar-close:hover { background: rgba(255,255,255,.2); color: #fff; }
.top-bar.hidden { display: none; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(13, 59, 122, .03);
}
.header-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: .2rem;
  padding: .5rem 0 .35rem;
}
.header-top {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  width: 100%;
  gap: 1rem;
}
.header-top > * { min-width: 0; }

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  color: var(--blue);
}
.brand-logo {
  width: 170px;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center 50%;
  image-rendering: -webkit-optimize-contrast;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.brand-fallback {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .04em;
  color: var(--blue);
  white-space: nowrap;
}
.brand-light .brand-fallback { color: #fff; }

.header-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-2);
  background: transparent;
  transition: background .2s, color .2s, transform .15s;
  position: relative;
}
.header-icon:hover { background: var(--bg-soft); color: var(--blue); transform: translateY(-1px); }
.header-icon svg { width: 24px; height: 24px; }

.main-nav { display: flex; gap: 2.2rem; justify-content: center; padding-top: .25rem; }
.main-nav a { font-size: .94rem; font-weight: 500; color: var(--ink-2); position: relative; padding: .4rem 0; }

.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--sky); border-radius: 2px;
  transition: width .28s ease;
}
.main-nav a:hover { color: var(--blue); }
.main-nav a:hover::after { width: 100%; }

.cart-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--blue); color: #fff;
  font-size: .73rem; font-weight: 800;
  border-radius: 999px; display: grid; place-items: center;
  border: 2px solid #fff;
}
.cart-badge[hidden] { display: none; }

/* ============ HERO BANNER ============ */
.hero-banner {
  position: relative;
  width: 100%;
  height: clamp(420px, 70vh, 720px);
  min-height: 420px;
  overflow: hidden;
  background: var(--bg-soft);
}
.banner-slides { position: absolute; inset: 0; }
.banner-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  z-index: 1;
  overflow: hidden;
}
.banner-slide.active { opacity: 1; z-index: 2; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }

.banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,26,44,.78) 0%, rgba(7,26,44,.45) 55%, rgba(7,26,44,.2) 100%);
  z-index: 3;
  display: flex; align-items: center;
}
.banner-content {
  width: min(1220px, 92%);
  margin-inline: auto;
  padding: 0 1rem;
  color: #fff;
}
.banner-eyebrow {
  display: inline-block;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--sky);
  background: rgba(255,255,255,.12);
  padding: .4rem .95rem; border-radius: 999px;
  margin-bottom: 1rem; border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
}
.banner-content h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: .4rem 0 1.1rem;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,.25);
}
.banner-slogan {
  display: inline-block;
  font-family: var(--font-script);
  font-size: 1.15em;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--sky);
  background: linear-gradient(135deg, #fff 0%, var(--sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.banner-tagline {
  color: rgba(255,255,255,.88);
  font-size: 1.15rem;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 1.8rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.banner-content .btn-primary { box-shadow: 0 10px 28px rgba(0,0,0,.25); }

.banner-dots {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; gap: .6rem; z-index: 4;
}
.banner-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: none; padding: 0; cursor: pointer;
  transition: background .2s, transform .2s;
}
.banner-dot.active { background: #fff; transform: scale(1.25); }

/* ============ TRUST STRIP ============ */
.trust-strip { border-block: 1px solid var(--line); background: var(--bg-soft); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding: 2rem 0; }
.trust-item { display: flex; align-items: center; gap: 1rem; }
.trust-item svg { width: 38px; height: 38px; color: var(--blue); flex-shrink: 0; }
.trust-item strong { display: block; font-size: .92rem; }
.trust-item span { font-size: .8rem; color: var(--muted); }

/* ============ CATALOG ============ */
.catalog { padding: 6rem 0; }

.catalog-tools { display: flex; flex-direction: column; gap: 1.2rem; align-items: center; }

.search-box {
  display: flex; align-items: center; gap: .8rem;
  width: 100%; max-width: 680px;
  background: #fff; border: 2px solid var(--line);
  border-radius: 999px; padding: .85rem 1.4rem;
  box-shadow: 0 6px 20px rgba(14,58,124,.08);
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(56,189,248,.14), 0 8px 24px rgba(14,58,124,.1); }
.search-box svg { width: 22px; height: 22px; color: var(--blue); flex-shrink: 0; }
.search-box input { border: none; outline: none; width: 100%; background: transparent; font-size: 1.08rem; color: var(--ink); }
.search-box input::placeholder { color: var(--muted); }

.filter-chips { display: flex; gap: .55rem; flex-wrap: wrap; }
.chip {
  padding: .55rem 1.2rem; border-radius: 999px;
  font-size: .86rem; font-weight: 600;
  border: 1.5px solid var(--line); color: var(--ink-2);
  background: var(--bg);
  transition: all .2s;
}
.chip:hover { border-color: var(--sky); color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.face-chips { align-items: center; }
.face-chips-label { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.face-chips .chip { font-size: .78rem; padding: .38rem .9rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.2rem;
  grid-template-rows: repeat(2, auto);
  overflow: hidden;
}
.catalog.is-expanded .product-grid { grid-template-rows: none; overflow: visible; }

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .35s ease, box-shadow .35s ease, border-color .25s;
}
.product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); border-color: #d0e2f1; }

.product-media { position: relative; aspect-ratio: 1 / 1.12; background: var(--bg-soft); overflow: hidden; }

/* Imágenes: render directo, sin estados de carga — como funcionaba
   originalmente. La foto se ve en cuanto el navegador la tiene. */
.product-media .product-img,
.product-media .product-worn { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .55s ease, transform .8s ease; }
.product-media .product-worn { opacity: 0; transform: scale(1.08); z-index: 2; }
.product-card:hover .product-worn { opacity: 1; transform: scale(1); }
/* La foto principal solo se desvanece si el producto tiene foto de modelo
   (has-worn): los accesorios quedan fijos y estáticos, sin cuadro vacío */
.product-card.has-worn:hover .product-img { opacity: 0; transform: scale(1.03); }
.product-media .view-overlay {
  position: absolute; inset: 0; background: rgba(14, 58, 124, .25);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s;
  z-index: 3;
}
.product-card:hover .view-overlay { opacity: 1; }
.view-overlay span { color: #fff; font-weight: 500; font-size: .86rem; padding: .5rem 1.1rem; border: 1.5px solid rgba(255,255,255,.85); border-radius: 999px; backdrop-filter: blur(6px); }

.worn-toggle {
  position: absolute; bottom: 12px; right: 12px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--blue);
  display: grid; place-items: center;
  font-size: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transition: transform .2s, background .2s, color .2s;
}
.worn-toggle:hover { transform: scale(1.1); background: #fff; }
.product-card.is-worn .product-worn { opacity: 1; transform: scale(1); }
.product-card.is-worn .product-img { opacity: 0; transform: scale(1.03); }
.product-card.is-worn .worn-toggle { background: var(--blue); color: #fff; }

.product-tag {
  position: absolute; top: 16px; left: 16px; z-index: 4;
  font-size: .65rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em;
  padding: .3rem .65rem; border-radius: 999px;
  background: rgba(14, 58, 124, .88); color: #fff;
  backdrop-filter: blur(4px);
}
.product-tag.oferta { background: var(--red); }

.stock-flag {
  position: absolute; top: 16px; right: 16px;
  font-size: .65rem; font-weight: 500;
  padding: .3rem .6rem; border-radius: 999px;
  background: rgba(255,255,255,.95); color: var(--amber);
  backdrop-filter: blur(4px);
}
.stock-flag.out { color: var(--red); }

.product-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-cat { font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--sky); }
.product-name { font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.product-desc { font-size: .83rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.product-foot { margin-top: auto; padding-top: 1.1rem; }
.product-price { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.product-price small { font-size: .78rem; color: var(--muted); font-weight: 500; }
.product-actions { display: flex; gap: .55rem; margin-top: .85rem; }

.add-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: var(--blue); color: #fff;
  font-weight: 600; font-size: .9rem;
  padding: .7rem 1rem; border-radius: var(--radius-sm);
  transition: background .2s, transform .15s;
}
.add-btn:hover { background: var(--blue-dark); }
.add-btn:active { transform: scale(.97); }
.add-btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.add-btn svg { width: 17px; height: 17px; }

.wa-btn {
  width: 46px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  border: 1.5px solid #bbf7d0; color: var(--wa);
  background: #f0fdf4;
  transition: all .2s;
}
.wa-btn:hover { background: var(--wa); color: #fff; border-color: var(--wa); }
.wa-btn svg { width: 21px; height: 21px; }

.catalog-more {
  display: block; margin: 2.5rem auto 0;
  padding: .9rem 2rem; border-radius: 999px;
  border: 2px solid var(--blue); color: var(--blue);
  background: transparent; font-weight: 700; font-size: .95rem;
  transition: background .2s, color .2s, transform .2s;
  cursor: pointer;
}
.catalog-more:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.catalog.is-expanded .catalog-more { display: none; }
.empty-state { text-align: center; color: var(--muted); padding: 4rem 0; font-size: 1rem; }

/* ============ MINI CATÁLOGO REEL ============ */
.mini-catalog { padding: 5rem 0 4rem; background: var(--bg-soft); border-block: 1px solid var(--line); overflow: hidden; }
.mini-catalog .section-head { margin-bottom: 2.2rem; }
.reel {
  display: flex;
  width: max-content;
  animation: reelScroll 28s linear infinite;
}
.reel:hover { animation-play-state: paused; }
.reel-track { display: flex; gap: 1rem; }
.reel-track img {
  width: 280px; height: 190px; flex-shrink: 0;
  object-fit: contain; background: #fff; padding: .4rem;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: transform .3s, box-shadow .3s;
}
.reel-track img:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }
@keyframes reelScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (max-width: 960px) {
  .reel-track img { width: 220px; height: 150px; }
}

/* ============ REELS ============ */
.reels {
  position: relative;
  padding: 5.5rem 0;
  background: linear-gradient(180deg, #071530 0%, #0a2144 40%, #061224 100%);
  color: #fff;
  overflow: hidden;
  border-block: none;
}
.reels-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, .18) 0%, transparent 45%),
              radial-gradient(circle at 80% 70%, rgba(14, 58, 124, .45) 0%, transparent 50%);
  pointer-events: none;
}
.reels-head .eyebrow { color: var(--sky); }
.reels-head h2 { color: #fff; }
/* Texto secundario en azul cielo de la paleta: legible sobre el fondo oscuro */
.reels-head .section-sub { color: var(--sky); font-weight: 500; }
.reels-track {
  display: flex; gap: 1.8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2rem 4vw 3rem;
  scroll-padding: 4vw;
  scrollbar-width: none;
  align-items: center;
}
.reels-track::-webkit-scrollbar { display: none; }
.reels-carousel { position: relative; }
.reels-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 6;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.14); color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background .25s, transform .25s, opacity .25s;
}
.reels-arrow svg { width: 22px; height: 22px; }
.reels-arrow:hover { background: rgba(255,255,255,.28); transform: translateY(-50%) scale(1.08); }
.reels-arrow:disabled { opacity: .25; pointer-events: none; }
.reels-arrow.prev { left: 1rem; }
.reels-arrow.next { right: 1rem; }
@media (max-width: 720px) {
  .reels-arrow { width: 40px; height: 40px; }
  .reels-arrow.prev { left: .5rem; }
  .reels-arrow.next { right: .5rem; }
}
.reel-card {
  flex: 0 0 auto;
  scroll-snap-align: center;
  position: relative;
  width: clamp(260px, 26vw, 320px);
  border-radius: 32px;
  overflow: visible;
  background: transparent;
  perspective: 1200px;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .4s;
}
.reel-card:hover { transform: translateY(-10px) scale(1.02); }
.reel-card:not(:hover) { filter: brightness(.92); }
.reels-track:hover .reel-card:not(:hover) { transform: scale(.96); filter: brightness(.78); }
.reel-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
}
.reel-frame video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.reel-shine {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 40%, transparent 60%, rgba(255,255,255,.06) 100%);
  pointer-events: none;
  z-index: 2;
}
.reel-overlay {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(transparent 55%, rgba(0,0,0,.8) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.4rem;
  pointer-events: none;
}
.reel-line { display: flex; align-items: center; gap: .75rem; }
.reel-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  border: 2px solid rgba(255,255,255,.35);
}
.reel-title { color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.reel-meta { color: rgba(255,255,255,.75); font-size: .82rem; margin-top: .15rem; }
.reel-controls {
  position: absolute; right: 1rem; top: 1rem; z-index: 4;
  display: flex; flex-direction: column; gap: .6rem;
  pointer-events: auto;
}
.reel-controls button {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; backdrop-filter: blur(8px);
  display: grid; place-items: center;
  font-size: 1rem;
  transition: background .25s, transform .25s;
  border: 1px solid rgba(255,255,255,.12);
}
.reel-controls button:hover { background: rgba(0,0,0,.75); transform: scale(1.1); }
@media (max-width: 960px) {
  .reels-track { gap: 1.2rem; padding: 1.5rem 4vw 2.5rem; }
  .reel-card { width: 220px; }
  .reel-frame { border-radius: 24px; }
}

/* ============ DEMO 3D ============ */
.demo-3d { padding: 6rem 0; background: var(--bg); border-block: 1px solid var(--line); }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.demo-copy { display: flex; flex-direction: column; gap: 1rem; }
.demo-copy h2 { font-size: clamp(2rem, 4vw, 3rem); color: var(--ink); }
.demo-copy p { color: var(--muted); font-size: 1.05rem; max-width: 460px; line-height: 1.65; }
.demo-stage {
  position: relative; border-radius: 28px;
  aspect-ratio: 1 / 1.05;
  cursor: pointer;
}
.demo-card {
  position: relative; width: 100%; height: 100%; border-radius: 28px; overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .15s ease-out;
  box-shadow: var(--shadow-lg);
  background: var(--bg-soft);
}
.demo-card.is-idle { animation: demoFloat 5.5s ease-in-out infinite; }
@keyframes demoFloat {
  0%, 100% { transform: rotateX(4deg) rotateY(-6deg) translateZ(0); }
  50% { transform: rotateX(-2deg) rotateY(6deg) translateZ(16px); }
}
.demo-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; }
.demo-shine {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.32) 50%, transparent 70%);
  background-size: 200% 200%;
  opacity: 0; transition: opacity .2s, background-position .15s ease-out;
  border-radius: 28px;
}
.demo-stage:hover .demo-shine { opacity: .55; }

@media (max-width: 960px) {
  .demo-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .demo-copy { text-align: center; align-items: center; }
  .demo-copy p { max-width: 520px; }
}

/* ============ TESTIMONIOS ============ */
.testimonials { padding: 5.5rem 0; background: var(--bg); }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.testimonial-card {
  margin: 0; padding: 1.6rem 1.5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm, 0 4px 14px rgba(13,59,122,.06));
  display: flex; flex-direction: column; gap: .9rem;
  transition: transform .3s, box-shadow .3s;
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(13,59,122,.12); }
.testimonial-stars { color: #f5a623; font-size: 1rem; letter-spacing: .12em; }
.testimonial-card blockquote { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--text); }
.testimonial-card figcaption { font-weight: 700; font-size: .85rem; }
.testimonial-card figcaption span { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; margin-top: .15rem; }

/* ============ ADVISOR ============ */
.advisor {
  padding: 6rem 0;
  background:
    radial-gradient(900px 420px at 10% 20%, rgba(56, 189, 248, .10), transparent 60%),
    radial-gradient(800px 360px at 90% 80%, rgba(13, 59, 122, .06), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-block: 1px solid var(--line);
}

.face-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.2rem; max-width: 980px; margin-inline: auto; }
.face-card {
  background: rgba(255,255,255,.85);
  border: 1.5px solid rgba(255,255,255,.9);
  border-radius: var(--radius);
  padding: 1.8rem 1rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: .9rem;
  transition: all .3s cubic-bezier(.32,.72,.28,1);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.face-card:hover {
  border-color: var(--sky);
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-md);
}
.face-card.active {
  background: linear-gradient(135deg, var(--sky-soft), #fff);
  border-color: var(--blue);
  box-shadow: 0 18px 45px rgba(13,59,122,.12);
  transform: translateY(-6px) scale(1.03);
}
.face-card svg { width: 66px; height: 66px; color: var(--blue); transition: transform .3s; }
.face-card:hover svg { transform: scale(1.08); }
.face-card span { font-weight: 700; font-size: .98rem; color: var(--ink-2); }

.face-result {
  max-width: 760px; margin: 2.4rem auto 0;
  background: rgba(255,255,255,.92);
  border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 2.2rem 2.4rem;
  box-shadow: var(--shadow-lg);
  animation: rise .5s ease;
  backdrop-filter: blur(12px);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.face-result h3 { font-size: 1.4rem; margin-bottom: .6rem; color: var(--blue); }
.face-result p { color: var(--muted); font-size: 1rem; line-height: 1.65; }
.face-styles { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0 1.6rem; }
.face-styles span {
  font-size: .85rem; font-weight: 600;
  background: var(--sky-soft); color: var(--blue-dark);
  padding: .5rem 1.1rem; border-radius: 999px;
}

/* ============ FAQ COMPACTO ============ */
.faq-section { padding: 2.5rem 0; background: var(--bg-soft); border-top: 1px solid var(--line); }
.faq-toggle {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.4rem;
  background: #fff; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 16px;
  font-weight: 600; font-size: .98rem;
  box-shadow: var(--shadow-sm);
  transition: all .2s;
}
.faq-toggle:hover { border-color: var(--sky); color: var(--blue); }
.faq-toggle[aria-expanded="true"] { border-color: var(--blue); color: var(--blue); background: var(--sky-soft); }
.faq-toggle span { pointer-events: none; }
.faq-chev { width: 18px; height: 18px; transition: transform .3s; }
.faq-toggle[aria-expanded="true"] .faq-chev { transform: rotate(180deg); }
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease, padding .3s ease;
  overflow: hidden;
}
.faq-panel.open { grid-template-rows: 1fr; padding-top: 1rem; }
.faq-panel > div { min-height: 0; }

.accordion { max-width: 760px; margin-inline: auto; }
.accordion-item {
  border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: .5rem; background: #fff; overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.accordion-item.open { border-color: #bfdbfe; box-shadow: var(--shadow-sm); }
.accordion-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .85rem 1.1rem;
  font-weight: 600; font-size: .92rem; text-align: left;
  color: var(--ink-2);
}
.accordion-q .chev {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%; background: var(--bg-soft);
  display: grid; place-items: center;
  transition: transform .25s, background .2s;
}
.accordion-q .chev svg { width: 12px; height: 12px; color: var(--blue); }
.accordion-item.open .chev { transform: rotate(180deg); background: var(--sky-soft); }
.accordion-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.accordion-a > div { padding: 0 1.1rem 1rem; color: var(--muted); font-size: .86rem; line-height: 1.55; }

/* ============ FOOTER ============ */
.site-footer { background: #071a2c; color: #c8d4e0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; gap: 2.2rem; padding: 4.5rem 0 3.5rem; }
.footer-col h4 { color: #fff; font-size: .98rem; margin-bottom: 1.2rem; letter-spacing: .03em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .7rem; font-size: .9rem; }
.footer-col a:hover { color: var(--sky); }
.footer-brand .brand-logo {
  width: 140px;
  height: 40px;
  display: block;
  object-fit: contain;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  filter: brightness(0) invert(1);
}
.footer-brand .brand { color: #fff; }
.footer-brand .brand:hover { opacity: .85; }
.footer-brand p { font-size: .9rem; margin: .8rem 0 1.4rem; max-width: 300px; }
.footer-tagline { font-family: var(--font-serif); font-style: italic; color: var(--sky); font-size: 1.15rem; margin-bottom: .6rem; }
.footer-qr { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.footer-qr img { width: 120px; height: 120px; background: #fff; padding: 8px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.footer-qr .muted { font-size: .78rem; color: #94a3b8; line-height: 1.4; }

.social-row { display: flex; gap: .8rem; }
.social-row a {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  display: grid; place-items: center; color: #e2e8f0;
  transition: all .2s;
}
.social-row a:hover { background: var(--sky); border-color: var(--sky); color: var(--blue-dark); transform: translateY(-2px); }
.social-row svg { width: 20px; height: 20px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.4rem 0; font-size: .82rem; flex-wrap: wrap;
}
.admin-link {
  display: inline-flex; align-items: center; gap: .5rem;
  color: #94a3b8; font-size: .82rem; font-weight: 500;
  padding: .5rem 1rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  transition: all .2s;
}
.admin-link:hover { color: #fff; border-color: var(--sky); }
.admin-link svg { width: 15px; height: 15px; }

/* ============ WA FLOAT ============ */
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 70;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(37, 211, 102, .45);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; }

/* ============ CART DRAWER ============ */
.overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(7, 26, 44, .45);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: min(440px, 100vw);
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform .35s cubic-bezier(.32,.72,.28,1);
  box-shadow: var(--shadow-lg);
}
.cart-drawer.open { transform: none; }

.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem 1.6rem; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 1.2rem; }
.drawer-head span { color: var(--muted); font-weight: 500; font-size: .9rem; }

.drawer-body { flex: 1; overflow-y: auto; padding: 1.2rem 1.6rem; }

.cart-empty { text-align: center; color: var(--muted); padding: 4rem 1rem; }
.cart-empty svg { width: 56px; height: 56px; color: var(--line); margin: 0 auto 1.2rem; }

.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 1rem; align-items: center;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-soft); }
.ci-name { font-weight: 600; font-size: .92rem; line-height: 1.3; }
.ci-price { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.qty-ctrl { display: inline-flex; align-items: center; gap: .55rem; margin-top: .5rem; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .45rem; }
.qty-ctrl button { width: 26px; height: 26px; border-radius: 50%; font-weight: 700; color: var(--blue); font-size: .95rem; }
.qty-ctrl button:hover { background: var(--sky-soft); }
.qty-ctrl span { font-size: .86rem; font-weight: 600; min-width: 16px; text-align: center; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
.ci-total { font-weight: 700; font-size: .95rem; }
.ci-remove { font-size: .76rem; color: var(--red); opacity: .85; }
.ci-remove:hover { opacity: 1; text-decoration: underline; }

.drawer-foot { padding: 1.3rem 1.6rem 1.7rem; border-top: 1px solid var(--line); background: var(--bg-soft); }
.drawer-foot.hidden { display: none; }
.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; margin-bottom: .4rem; }
.cart-total-row strong { font-size: 1.45rem; letter-spacing: -.02em; }
.cart-note { font-size: .8rem; color: var(--muted); margin-bottom: 1.1rem; }
.drawer-foot .link-btn { display: block; margin: .9rem auto 0; }

/* ============ MODALS ============ */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(7, 26, 44, .48);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 1.4rem;
}
.modal.open { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } }

.modal-card {
  background: var(--bg); border-radius: 24px;
  width: 100%; box-shadow: var(--shadow-lg);
  max-height: 94vh; overflow-y: auto;
  animation: rise .35s ease;
}
.checkout-card { max-width: 640px; }
.login-card { max-width: 420px; padding-bottom: 1.8rem; }
.detail-card { max-width: 900px; }

.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 1.8rem 0;
}
.modal-head h3 { font-size: 1.35rem; }

/* Checkout steps */
.steps { display: flex; gap: .5rem; padding: 1.2rem 1.8rem 0; flex-wrap: wrap; }
.step-dot {
  font-size: .76rem; font-weight: 700;
  color: var(--muted);
  padding: .4rem .85rem; border-radius: 999px;
  background: var(--bg-soft);
}
.step-dot.active { background: var(--blue); color: #fff; }
.step-dot.done { background: var(--sky-soft); color: var(--blue-dark); }

.step-pane { display: none; padding: 1.5rem 1.8rem 1.9rem; }
.step-pane.active { display: block; animation: rise .25s ease; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .span2 { grid-column: span 2; }

label { display: flex; flex-direction: column; gap: .4rem; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .7rem .95rem; outline: none; font-size: .95rem; font-weight: 400;
  background: var(--bg); width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(56,189,248,.16); }
input::placeholder, textarea::placeholder { color: #94a3b8; }
input.invalid { border-color: var(--red); }

.step-actions { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: 1.6rem; }
.step-actions .btn:last-child { margin-left: auto; }
.step-actions .btn:only-child { margin-left: auto; }

.cp-row { display: flex; gap: .9rem; align-items: flex-end; }
.cp-row label { flex: 1; }
.hint { font-size: .82rem; color: var(--muted); margin: .9rem 0 1.2rem; }

.ship-options { display: flex; flex-direction: column; gap: .65rem; }
.ship-option {
  display: flex; align-items: center; gap: .85rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .9rem 1.1rem; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.ship-option:hover { border-color: var(--sky); }
.ship-option.selected { border-color: var(--blue); background: var(--sky-soft); }
.ship-option input { width: auto; accent-color: var(--blue); }
.ship-info { flex: 1; }
.ship-info strong { display: block; font-size: .92rem; }
.ship-info small { color: var(--muted); font-size: .78rem; }
.ship-price { font-weight: 800; font-size: .98rem; }
.ship-price.free { color: var(--green); }

/* Prescription */
.prescription-box {
  margin-top: 1.6rem;
  border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem; background: var(--bg-soft);
}
.prescription-toggle { display: flex; flex-direction: row; align-items: center; gap: .7rem; cursor: pointer; font-weight: 600; font-size: .95rem; }
.prescription-toggle input { width: auto; height: 20px; width: 20px; accent-color: var(--blue); }
.prescription-fields { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; animation: rise .3s ease; }
#coRxPreview { max-height: 160px; width: auto; max-width: 100%; border-radius: var(--radius-sm); margin-top: .6rem; border: 1px solid var(--line); }

.order-resume {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 1.1rem 1.2rem;
  font-size: .88rem; margin-bottom: 1.4rem;
}
.order-resume .or-row { display: flex; justify-content: space-between; padding: .25rem 0; color: var(--ink-2); }
.order-resume .or-row.total { border-top: 1px dashed var(--line); margin-top: .55rem; padding-top: .7rem; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.order-resume .or-row .disc { color: var(--green); font-weight: 600; }
.order-resume .or-row .rx { color: var(--blue); font-weight: 600; }

.pay-methods { display: flex; flex-direction: column; gap: .75rem; }
.pay-option { cursor: pointer; flex-direction: row; }
.pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-card {
  flex: 1; display: block;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem; transition: all .2s;
}
.pay-card strong { display: block; font-size: .98rem; margin-bottom: .2rem; }
.pay-card small { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.pay-option input:checked + .pay-card { border-color: var(--blue); background: var(--sky-soft); box-shadow: 0 0 0 1px var(--blue); }

#paymentDetail { margin-top: 1.3rem; }
.mp-box {
  display: flex; align-items: center; gap: 1rem;
  background: linear-gradient(135deg, #009ee3, #00b1ea);
  color: #fff; border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem; font-size: .9rem;
}
.mp-box svg { width: 36px; height: 36px; flex-shrink: 0; }
.transfer-box {
  background: var(--bg-soft); border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; font-size: .88rem;
}
.transfer-box code {
  display: inline-block; background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: .2rem .55rem; margin-top: .35rem;
  font-size: .86rem; font-weight: 600; color: var(--blue);
}

.order-done { text-align: center; padding: 1.2rem 0 .5rem; }
.order-done .check {
  width: 76px; height: 76px; margin: 0 auto 1.3rem;
  border-radius: 50%; background: #dcfce7;
  display: grid; place-items: center;
}
.order-done .check svg { width: 38px; height: 38px; color: var(--green); }
.order-done h3 { font-size: 1.6rem; margin-bottom: .5rem; }
.order-done .order-id { color: var(--muted); font-size: .92rem; margin-bottom: 1.1rem; }
.order-done .order-id strong { color: var(--blue); font-family: monospace; font-size: 1.05rem; }
.order-done p { color: var(--muted); font-size: .92rem; max-width: 430px; margin: 0 auto 1.5rem; }
.order-done .done-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* Login */
.login-form { padding: 1.4rem 1.8rem 0; display: flex; flex-direction: column; gap: 1.1rem; }
.login-error { color: var(--red); font-size: .85rem; font-weight: 500; }

/* Product detail modal */
.detail-body { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.2rem; padding: 1.4rem 1.8rem 1.8rem; }
.detail-media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); aspect-ratio: 4 / 3; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }


.detail-info { display: flex; flex-direction: column; gap: .9rem; }
.detail-cat { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--sky); }
.detail-price { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.detail-price small { font-size: .85rem; color: var(--muted); font-weight: 500; display: block; margin-top: .2rem; }
.detail-desc { color: var(--muted); font-size: .95rem; line-height: 1.6; }

.detail-desc[hidden] { display: none; }

.detail-actions { display: flex; gap: .7rem; margin-top: auto; padding-top: 1rem; }
.detail-actions .btn { flex: 1; }

/* ============ ADMIN PANEL ============ */
.admin-panel {
  position: fixed; inset: 0; z-index: 110;
  background: var(--bg-soft);
  overflow-y: auto;
}
.admin-topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--blue-dark); color: #fff;
}
.admin-topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.admin-title { font-weight: 800; letter-spacing: .04em; font-size: .98rem; }
.save-status { font-size: .8rem; font-weight: 600; margin-left: .9rem; }
.save-status.ok { color: var(--green); }
.save-status.err { color: var(--red); }
.admin-topbar .btn-ghost { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.admin-topbar .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); }
.admin-topbar-inner > div { display: flex; gap: .6rem; }

.admin-body { padding: 2rem 0 4.5rem; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.1rem; margin-bottom: 1.8rem; }
.stat-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
}
.stat-card small { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat-card strong { display: block; font-size: 1.7rem; letter-spacing: -.02em; margin-top: .35rem; }
.stat-card .sub { font-size: .78rem; color: var(--muted); }

.admin-cols { display: grid; grid-template-columns: 380px 1fr; gap: 1.6rem; align-items: start; margin-bottom: 1.6rem; }

.admin-box {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem;
}
.admin-box-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.3rem; }
.admin-box-head h4 { font-size: 1.08rem; letter-spacing: -.01em; }
.muted { color: var(--muted); font-weight: 500; font-size: .85rem; }

.banner-editor { display: flex; flex-direction: column; gap: .9rem; }
.banner-row {
  display: grid; grid-template-columns: 70px 1fr auto;
  align-items: start; gap: .8rem;
  padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.banner-thumb { width: 60px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.banner-fields { display: flex; flex-direction: column; gap: .5rem; }
.banner-row input[type="url"] { width: 100%; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; }
.banner-row input[type="file"] { font-size: .78rem; max-width: 220px; }
.banner-params { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; }
.banner-params label { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); }
.banner-params input[type="range"] { width: 90px; }
.banner-params select { padding: .35rem .5rem; border-radius: 6px; border: 1px solid var(--line); font-size: .8rem; }
.banner-add, .banner-remove { padding: .5rem .9rem; border-radius: 8px; font-weight: 600; font-size: .82rem; }
.banner-add { background: var(--blue); color: #fff; }
.banner-remove { background: #fee2e2; color: #b91c1c; }
.banner-actions { display: flex; gap: .6rem; }

.reels-editor { display: flex; flex-direction: column; gap: .9rem; }
.reel-row {
  display: grid; grid-template-columns: 70px 1fr auto;
  align-items: start; gap: .8rem;
  padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.reel-thumb { width: 70px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #000; }
.reel-fields { display: flex; flex-direction: column; gap: .5rem; }
.reel-row input[type="text"] { width: 100%; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; }
.file-label { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.file-label input[type="file"] { display: none; }
.file-label span { padding: .55rem .9rem; background: var(--blue); color: #fff; border-radius: 8px; font-weight: 600; font-size: .82rem; }
.file-label:hover span { background: #0e3a7c; }
.reel-remove { padding: .5rem .9rem; border-radius: 8px; font-weight: 600; font-size: .82rem; background: #fee2e2; color: #b91c1c; }
.reel-upload-row { display: flex; gap: .6rem; }
.reel-upload-row input[type="text"], .reel-upload-row input[type="url"] { flex: 1; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; font-size: .88rem; }
.reel-upload span { white-space: nowrap; }
.reel-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.reel-fallback {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
}
.reel-fallback img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.45); }
.reel-fallback-msg {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem;
  padding: 1.2rem; text-align: center;
  color: #fff; font-size: .85rem; font-weight: 600;
}
.reel-open-btn {
  padding: .6rem 1.2rem; border-radius: 999px;
  background: #fff; color: var(--blue);
  font-weight: 700; font-size: .82rem;
  transition: transform .25s, box-shadow .25s;
}
.reel-open-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.3); }

.offers-list { display: flex; flex-direction: column; gap: .6rem; }
.offer-row {
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.offer-row img { width: 52px; height: 38px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.offer-name { flex: 1; font-weight: 600; font-size: .88rem; }
.offer-price { color: var(--muted); font-size: .82rem; }
.offer-remove { padding: .4rem .85rem; border-radius: 8px; font-weight: 600; font-size: .78rem; background: #fee2e2; color: #b91c1c; }
.offers-add { display: flex; gap: .6rem; margin-top: .9rem; }
.offers-add select { flex: 1; }
.reel-track a { display: inline-block; cursor: pointer; }

.admin-editor .content-form {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem;
}
.content-field { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; color: var(--ink-2); }
.content-field input,
.content-field textarea {
  width: 100%; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); font-size: .9rem; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.content-field textarea { resize: vertical; min-height: 60px; }
.content-field input:focus,
.content-field textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-soft); }

#productForm { display: flex; flex-direction: column; gap: 1rem; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }

.img-preview-row { display: flex; gap: 1rem; align-items: center; }
.img-preview-row img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.img-url-wrap { flex: 1; }
.img-url-wrap small { display: block; color: var(--muted); font-size: .73rem; margin-top: .3rem; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-table th {
  text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); padding: .65rem .75rem; border-bottom: 1px solid var(--line);
}
.admin-table td { padding: .75rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .t-prod { display: flex; align-items: center; gap: .75rem; font-weight: 600; }
.admin-table .t-prod img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; background: var(--bg-soft); }
.t-cat { text-transform: capitalize; color: var(--muted); }
.t-stock.low { color: var(--amber); font-weight: 700; }
.t-stock.out { color: var(--red); font-weight: 700; }
.t-state { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.t-state button { font-size: .7rem; padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--line); }
.t-state.available span { color: var(--green); }
.t-state.out span { color: var(--red); }
.t-actions { display: flex; gap: .45rem; justify-content: flex-end; }
.t-order { display: flex; gap: .3rem; justify-content: center; }
.t-order .t-btn { padding: .25rem .55rem; font-size: .95rem; line-height: 1; }
.t-order .t-btn:disabled { opacity: .3; pointer-events: none; }
.t-btn {
  font-size: .74rem; font-weight: 600; padding: .4rem .75rem;
  border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2);
  transition: all .15s;
}
.t-btn:hover { border-color: var(--sky); color: var(--blue); background: var(--sky-soft); }
.t-btn.danger:hover { border-color: var(--red); color: var(--red); background: #fff1f2; }
a.t-btn { display: inline-block; text-decoration: none; }

.status-select { padding: .4rem .55rem; font-size: .8rem; border-radius: 8px; width: auto; }

/* ============ TOAST ============ */
.toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 130;
  transform: translate(-50%, 90px);
  background: var(--ink); color: #fff;
  font-size: .9rem; font-weight: 500;
  padding: .85rem 1.5rem; border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0; transition: transform .35s cubic-bezier(.32,.72,.28,1), opacity .3s;
  pointer-events: none;
  max-width: 92vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

/* ============ PROMO SECTIONS ============ */
.promo-section { padding: 5rem 0; background: var(--bg); }
.promo-section.promo-muted { background: var(--bg-soft); }
.promo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.promo-inverted .promo-row { direction: rtl; }
.promo-inverted .promo-copy { direction: ltr; }
.promo-media {
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--bg-soft);
}
.promo-media img { width: 100%; height: 100%; object-fit: cover; }
.promo-copy { display: flex; flex-direction: column; gap: 1rem; }
.promo-copy h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.promo-copy p { font-size: 1.05rem; color: var(--muted); line-height: 1.65; max-width: 480px; }
.promo-copy .btn { align-self: flex-start; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .main-nav { gap: 1.4rem; }
  .hero-banner { height: clamp(360px, 60vh, 520px); }
  .banner-content h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
  .banner-tagline { font-size: 1rem; }
  .promo-row { grid-template-columns: 1fr; gap: 2rem; }
  .promo-inverted .promo-row { direction: ltr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .admin-cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 2.2rem; }
  .catalog-tools { align-items: flex-start; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-media { max-height: 340px; }
}

@media (max-width: 560px) {
  .header-top { grid-template-columns: 44px 1fr 44px; gap: .6rem; }
  .header-icon { width: 40px; height: 40px; }
  .main-nav { gap: .8rem; }
  .main-nav a { font-size: .82rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .product-actions { flex-direction: column; }
  .wa-btn { width: 100%; height: 42px; }
  .hero-banner { height: clamp(320px, 55vh, 420px); }
  .banner-content { padding: 0 1.2rem; }
  .banner-content h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); }
  .banner-content .btn-primary { align-self: flex-start; }
  .steps { gap: .3rem; }
  .step-dot { font-size: .68rem; padding: .3rem .55rem; }
  .footer-bottom-inner { justify-content: center; text-align: center; }
  .brand-logo { width: 130px; height: auto; }
  .brand-name { font-size: .92rem; }
  .header-utils { gap: .5rem; }
  .top-bar-close { right: .5rem; }
}

/* ---------- Paletas / estructura dinamica ---------- */
.section-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.section-toggle { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 600; color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; cursor: pointer; }
.section-toggle input { width: 16px; height: 16px; accent-color: var(--blue); }

.custom-block { padding: 2.2rem 0; }
.custom-block:nth-child(odd) { background: var(--bg-soft); }
.custom-block h3 { font-size: 1.35rem; color: var(--blue-dark); margin-bottom: .55rem; }
.custom-block p { color: var(--ink-2); font-size: .98rem; line-height: 1.6; max-width: 720px; }

.promo-link-hint { display: block; font-size: .74rem; font-weight: 600; color: var(--blue); margin-top: .15rem; }

.detail-extra { margin: .8rem 0; padding: .8rem 1rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.detail-extra-line { font-size: .9rem; color: var(--ink-2); padding: .15rem 0; }

/* ---------- RECORTADOR DE IMAGEN ---------- */
.crop-card { max-width: 440px; }
.crop-body { padding: 1.2rem 1.4rem 1.4rem; }
#cropCanvas {
  display: block; width: 100%; max-width: 360px; aspect-ratio: 1;
  margin: 0 auto; border-radius: var(--radius-sm);
  border: 2px dashed var(--line); background: #eef2f7;
  touch-action: none; cursor: grab;
}
#cropCanvas:active { cursor: grabbing; }
.crop-zoom { display: block; margin: .9rem 0; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.crop-zoom input { width: 100%; }
.crop-actions { display: flex; gap: .6rem; }
.crop-actions .btn { flex: 1; }
