/* ============ IndiStore — accesorios electrónicos ============
   Paleta: blanco cálido + negro tinta + naranja eléctrico (vibra JBL) */
:root {
  --ink: #101418;
  --ink-soft: #1b2129;
  --muted: #6b7280;
  --accent: #ff4d1f;
  --accent-dark: #e63c0f;
  --accent-soft: #fff0eb;
  --amber: #ffb020;
  --green: #16a34a;
  --bg: #ffffff;
  --paper: #f6f5f3;
  --border: #e7e5e2;
  --shadow: 0 8px 28px rgba(16, 20, 24, 0.07);
  --shadow-lg: 0 26px 60px rgba(16, 20, 24, 0.16);
  --radius: 18px;
  --font-title: 'Kumbh Sans', 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

h1, h2, h3, .logo { font-family: var(--font-title); letter-spacing: -0.02em; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
header.scrolled { border-bottom-color: var(--border); box-shadow: 0 4px 20px rgba(16,20,24,.06); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.logo { font-size: 1.45rem; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 9px; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--accent); font-size: 1.05rem;
  transition: transform .3s, background .3s;
}
.logo:hover .mark { transform: rotate(-12deg) scale(1.08); background: var(--accent); color: #fff; }
.logo span.indi { color: var(--accent); }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 600; font-size: .95rem; position: relative; }
.nav-links a:not(.cart-btn)::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 2.5px; width: 0;
  background: var(--accent); border-radius: 2px; transition: width .25s;
}
.nav-links a:hover::after { width: 100%; }

.cart-btn {
  position: relative; background: var(--ink); border: none;
  color: #fff; border-radius: 12px; padding: 10px 18px; font-size: .95rem; font-weight: 700;
  transition: transform .15s, background .2s;
}
.cart-btn:hover { background: var(--accent); transform: translateY(-2px); }
.cart-count {
  position: absolute; top: -8px; right: -8px;
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800;
  min-width: 21px; height: 21px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
  box-shadow: 0 3px 10px rgba(255,77,31,.45);
}
.cart-count.bump { animation: bump .4s; }
@keyframes bump { 30% { transform: scale(1.5); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(700px 420px at 85% 10%, rgba(255, 77, 31, 0.09), transparent 65%),
    radial-gradient(500px 380px at 5% 90%, rgba(255, 176, 32, 0.1), transparent 60%),
    var(--bg);
  padding: 76px 0 70px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; position: relative; z-index: 2; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .hero-showcase { display: none; } }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.035em;
}
.hero h1 .word { display: inline-block; opacity: 0; transform: translateY(30px) rotate(2deg); animation: word-in .7s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes word-in { to { opacity: 1; transform: none; } }
.hero h1 .swap-box { display: inline-grid; text-align: left; vertical-align: baseline; overflow: hidden; }
.hero h1 .swap {
  grid-area: 1/1; white-space: nowrap; color: var(--accent);
  opacity: 0; transform: translateY(110%);
  transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .4s;
}
.hero h1 .swap.on { opacity: 1; transform: translateY(0); }
.hero h1 .swap.off { opacity: 0; transform: translateY(-110%); }
.hero p.lead {
  color: var(--muted); font-size: clamp(1.02rem, 2vw, 1.18rem); max-width: 520px;
  margin: 22px 0 30px; opacity: 0; animation: fade-up .8s .5s forwards;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-cta { opacity: 0; animation: fade-up .8s .7s forwards; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; opacity: 0; animation: fade-up .8s .9s forwards; }
.hero-tag {
  background: #fff; border: 1.5px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: .82rem; font-weight: 600; color: var(--muted);
}

.btn {
  display: inline-block; border: none; border-radius: 14px;
  padding: 15px 32px; font-size: 1rem; font-weight: 700; font-family: var(--font-title);
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 26px rgba(255,77,31,.32); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-3px); box-shadow: 0 16px 36px rgba(255,77,31,.4); }
.btn-ghost { background: transparent; border: 2px solid var(--ink); color: var(--ink); margin-left: 12px; }
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-3px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* Showcase de destacados en el hero */
.hero-showcase { position: relative; height: 430px; }
.show-card {
  position: absolute; width: 210px; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; padding: 18px; box-shadow: var(--shadow-lg);
  opacity: 0; animation: show-in .8s cubic-bezier(.2,.8,.2,1) forwards; will-change: transform;
}
@keyframes show-in { from { opacity: 0; transform: translateY(40px) scale(.9); } to { opacity: 1; transform: var(--tilt, none); } }
.show-card .sc-emoji {
  height: 96px; display: flex; align-items: center; justify-content: center; font-size: 3.4rem;
  background: var(--paper); border-radius: 14px; margin-bottom: 12px; overflow: hidden;
}
.show-card .sc-emoji img { width: 100%; height: 100%; object-fit: cover; }
.show-card h4 { font-family: var(--font-title); font-size: .95rem; line-height: 1.25; }
.show-card .sc-price { color: var(--accent); font-weight: 800; font-family: var(--font-title); margin-top: 4px; }
.show-card .float-wrap { animation: float 6s ease-in-out infinite; }
.show-1 { top: 6%; left: 4%; --tilt: rotate(-5deg); animation-delay: .55s; z-index: 2; }
.show-2 { top: 30%; right: 2%; --tilt: rotate(4deg); animation-delay: .75s; z-index: 3; }
.show-3 { bottom: 2%; left: 16%; --tilt: rotate(-2deg); animation-delay: .95s; z-index: 1; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.hero-showcase .ring {
  position: absolute; inset: 8% 6%; border: 2px dashed rgba(255,77,31,.25); border-radius: 32px;
  animation: spin-slow 30s linear infinite; pointer-events: none;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: #fff; overflow: hidden; padding: 13px 0; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 26s linear infinite; font-family: var(--font-title); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.marquee-track span { display: flex; align-items: center; gap: 48px; }
.marquee-track b { color: var(--accent); font-weight: 700; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Categorías destacadas ---------- */
.cats { padding: 74px 0 10px; }
.cats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 28px; }
.cat-tile {
  background: var(--paper); border: 1.5px solid transparent; border-radius: var(--radius);
  padding: 24px 18px; text-align: center; cursor: pointer;
  transition: transform .22s, box-shadow .22s, border-color .22s, background .22s;
}
.cat-tile:hover { transform: translateY(-6px); background: #fff; border-color: var(--accent); box-shadow: var(--shadow-lg); }
.cat-tile .ct-emoji { font-size: 2.4rem; display: block; transition: transform .25s; }
.cat-tile:hover .ct-emoji { transform: scale(1.25) rotate(-8deg); }
.cat-tile h3 { font-size: 1rem; margin-top: 10px; }
.cat-tile span { color: var(--muted); font-size: .82rem; font-weight: 600; }

/* ---------- Banda oscura: stats ---------- */
.stats { background: var(--ink); color: #fff; padding: 58px 0; margin-top: 70px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; text-align: center; }
.stat b { display: block; font-family: var(--font-title); font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 800; color: var(--accent); }
.stat span { color: #9aa3ad; font-weight: 600; font-size: .9rem; }

/* ---------- Catálogo ---------- */
.shop { background: var(--paper); padding: 80px 0 90px; }
.section-title { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; }
.section-title em { font-style: normal; color: var(--accent); }
.section-sub { color: var(--muted); margin: 8px 0 28px; font-size: 1.02rem; }

.promo-banner {
  display: none; align-items: center; gap: 10px;
  background: var(--accent-soft);
  border: 1.5px dashed var(--accent); border-radius: var(--radius);
  padding: 13px 20px; margin-bottom: 26px; font-weight: 700; color: var(--accent-dark);
}

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; position: sticky; top: 74px; z-index: 5; }
.chip {
  background: #fff; border: 1.5px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 9px 20px; font-size: .92rem; font-weight: 700; font-family: var(--font-title);
  transition: transform .15s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.chip:hover { transform: translateY(-2px); border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(16,20,24,.28); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  transform-style: preserve-3d; will-change: transform;
  transition: box-shadow .25s, border-color .25s;
  opacity: 0; animation: card-in .55s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--i) * 60ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
.card:hover { box-shadow: var(--shadow-lg); border-color: transparent; z-index: 2; }
.card .thumb {
  height: 175px; display: flex; align-items: center; justify-content: center;
  font-size: 4.2rem; background: transparent; overflow: visible; padding: 16px 16px 6px;
}
.card .thumb > *, .card .thumb { transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s, box-shadow .35s; }
.card:hover .thumb .emoji { transform: scale(1.15) rotate(-6deg) translateY(-6px); }
.card .thumb .emoji { filter: drop-shadow(0 16px 14px rgba(16,20,24,.22)); }
/* Todas las fotos en el mismo rectángulo apaisado (se recortan al centro), flotando */
.card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 16px 28px rgba(16,20,24,.22);
}
.card:hover .thumb img { transform: scale(1.04) translateY(-6px); box-shadow: 0 26px 38px rgba(16,20,24,.3); }
.card .body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .cat { color: var(--accent); font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.card h3 { font-size: 1.05rem; line-height: 1.3; }
.card .desc { color: var(--muted); font-size: .85rem; flex: 1; }
/* Variantes (colores) */
.variant-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.v-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 999px;
  padding: 4px 11px; font-size: .78rem; font-weight: 700; color: var(--muted);
  transition: border-color .15s, color .15s, transform .15s;
}
.v-pill:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.v-pill.sel { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.v-pill.out { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.v-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.18); flex-shrink: 0;
}

.price-row { display: flex; align-items: baseline; gap: 9px; margin-top: 8px; }
.price { font-family: var(--font-title); font-size: 1.28rem; font-weight: 800; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .9rem; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--accent); color: #fff; font-size: .76rem; font-weight: 800;
  border-radius: 9px; padding: 4px 10px; box-shadow: 0 4px 12px rgba(255,77,31,.35);
}
.badge.stock-low { background: var(--amber); color: #3d2800; left: auto; right: 12px; }
.badge.stock-out { background: #9b9b9b; left: auto; right: 12px; box-shadow: none; }
.card .btn-add {
  margin: 0 18px 18px; background: #fff; border: 2px solid var(--ink);
  color: var(--ink); border-radius: 12px; padding: 11px; font-weight: 800; font-family: var(--font-title);
  transition: background .2s, color .2s, transform .15s, border-color .2s;
}
.card .btn-add:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.03); }
.card .btn-add:disabled { border-color: var(--border); color: #b8b5b1; }

/* Precio mayorista */
.wh-hint { color: var(--muted); font-size: .78rem; font-weight: 700; margin-top: 4px; }
.wh-title { font-weight: 800; font-size: .92rem; margin: 12px 0 6px; font-family: var(--font-title); }
.wh-title small { font-weight: 600; color: var(--muted); font-family: var(--font-body); }
.wh-table { border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.wh-row { display: grid; grid-template-columns: 1fr 1fr .7fr; padding: 7px 14px; font-size: .88rem; border-bottom: 1px solid var(--border); }
.wh-row:last-child { border-bottom: none; }
.wh-row.wh-head { background: var(--paper); color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.wh-row span:last-child { color: var(--green); font-weight: 800; }
.wh-row.wh-head span:last-child { color: var(--muted); }

/* Emoji que vuela al carrito */
.fly-emoji { position: fixed; z-index: 200; font-size: 2rem; pointer-events: none; transition: all .7s cubic-bezier(.4,-0.1,.6,1); }

/* ---------- Modal de detalle de producto ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16,20,24,.5); z-index: 110;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
body.modal-open .modal-overlay { opacity: 1; pointer-events: auto; }
.product-modal {
  position: fixed; top: 50%; left: 50%; z-index: 120;
  width: min(860px, 94vw); max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 24px; box-shadow: 0 40px 100px rgba(16,20,24,.35);
  transform: translate(-50%, -46%) scale(.95); opacity: 0; pointer-events: none;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .25s;
}
body.modal-open .product-modal { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: var(--paper); border: none; color: var(--ink); font-size: 1.1rem;
  width: 38px; height: 38px; border-radius: 11px; transition: transform .2s, background .2s;
}
.modal-close:hover { background: var(--border); transform: rotate(90deg); }
.pm-grid { display: grid; grid-template-columns: 1fr 1.1fr; }
@media (max-width: 720px) { .pm-grid { grid-template-columns: 1fr; } .pm-image { min-height: 220px; } }
.pm-image {
  background: var(--paper); display: flex; align-items: center; justify-content: center;
  font-size: 7rem; min-height: 100%; overflow: hidden; border-radius: 24px 0 0 24px;
}
@media (max-width: 720px) { .pm-image { border-radius: 24px 24px 0 0; max-height: 280px; } }
.pm-image img { width: 100%; height: 100%; object-fit: cover; }
.pm-info { padding: 34px 30px 30px; }
.pm-info .cat { color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.pm-info h2 { font-size: 1.7rem; line-height: 1.2; margin: 6px 0 10px; }
.pm-info .price { font-size: 1.7rem; }
.pm-promo {
  background: var(--accent); color: #fff; font-size: .76rem; font-weight: 800;
  border-radius: 8px; padding: 3px 9px; align-self: center;
}
.pm-desc { color: var(--muted); font-size: .95rem; margin: 12px 0 6px; }
.pm-details { list-style: none; margin: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.pm-details li {
  font-size: .9rem; color: var(--ink); padding-left: 24px; position: relative;
}
.pm-details li::before {
  content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 800;
}
.pm-stock { font-size: .85rem; font-weight: 700; margin: 10px 0 4px; color: var(--green); }
.pm-stock.low { color: #8a6400; }
.pm-stock.out { color: var(--accent-dark); }
.pm-actions { display: flex; gap: 14px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.pm-qty { background: var(--paper); border-radius: 12px; padding: 6px 10px; }
.pm-qty button { width: 32px; height: 32px; font-size: 1.1rem; }
.pm-qty span { min-width: 24px; text-align: center; font-weight: 800; font-family: var(--font-title); }
.pm-actions .btn { flex: 1; min-width: 200px; text-align: center; }

/* ---------- Confirmación de agregado ---------- */
.added-confirm {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 130%); z-index: 150;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 14px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: nowrap;
  box-shadow: 0 24px 60px rgba(16,20,24,.28);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
  width: max-content; max-width: min(960px, 96vw);
}
.added-confirm.show { transform: translate(-50%, 0); }
.ac-check {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); color: #fff; font-size: 1.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.added-confirm.show .ac-check { animation: pop .45s; }
.ac-info { display: flex; flex-direction: column; min-width: 130px; }
.ac-info b { font-family: var(--font-title); white-space: nowrap; }
.ac-info span { color: var(--muted); font-size: .85rem; max-width: 240px; }
.ac-upsell {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; border-radius: 12px;
  background: var(--accent-soft); border: 1px dashed var(--accent);
}
.ac-upsell span {
  color: var(--accent-dark); font-weight: 700; font-size: .85rem; line-height: 1.35;
  max-width: 380px;
}
.ac-upsell-btn {
  background: var(--accent); border-color: var(--accent); color: #fff;
  white-space: nowrap; font-weight: 800;
}
.ac-upsell-btn:hover { background: var(--accent-dark); }
.ac-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ac-actions .btn-sm { white-space: nowrap; }
@media (max-width: 900px) {
  .added-confirm { flex-wrap: wrap; width: auto; }
  .ac-upsell { flex: 1 1 100%; justify-content: space-between; }
}

/* Encargue + envío */
.pm-encargue { color: var(--muted); font-size: .84rem; margin: 8px 0 2px; }
.pm-encargue a { color: var(--accent); font-weight: 700; }
.total-sub.ship { color: var(--muted); font-size: .85rem; }

/* Sección revendedores */
.reseller { padding: 70px 0 10px; }
.reseller-box {
  background: linear-gradient(120deg, #fff7f3, var(--accent-soft));
  border: 1.5px dashed var(--accent); border-radius: 24px; padding: 40px 36px;
}
.reseller-list { list-style: none; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.reseller-list li { font-size: .97rem; }
.reseller-soon {
  background: #fff; border-radius: 12px; padding: 12px 16px; margin: 14px 0 20px;
  color: var(--muted); font-size: .92rem; border: 1px solid var(--border);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 80px); z-index: 150;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 22px;
  font-weight: 600; font-size: .93rem; opacity: 0; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .3s;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Drawer del carrito ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(16,20,24,.45); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer {
  position: fixed; top: 0; right: 0; width: min(410px, 94vw); height: 100dvh;
  background: #fff; z-index: 100; display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
  box-shadow: -20px 0 60px rgba(16,20,24,.2);
}
body.cart-open .drawer { transform: none; }
body.cart-open .drawer-overlay { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 1.2rem; }
.drawer-close { background: var(--paper); border: none; color: var(--ink); font-size: 1.1rem; width: 36px; height: 36px; border-radius: 10px; transition: transform .2s, background .2s; }
.drawer-close:hover { background: var(--border); transform: rotate(90deg); }
.drawer-items { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 16px; }
.cart-item { display: flex; gap: 12px; align-items: center; animation: fade-up .3s; }
.cart-item .ci-thumb { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; background: var(--paper); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; overflow: hidden; }
.cart-item .ci-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-info h4 { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item .ci-info .ci-price { color: var(--muted); font-size: .85rem; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-ctrl button { width: 28px; height: 28px; border-radius: 9px; border: 1.5px solid var(--border); background: #fff; color: var(--ink); font-size: 1rem; font-weight: 700; transition: border-color .2s, background .2s; }
.qty-ctrl button:hover { border-color: var(--accent); background: var(--accent-soft); }
.drawer-foot { border-top: 1px solid var(--border); padding: 20px 22px; }
.total-row { display: flex; justify-content: space-between; font-weight: 800; font-family: var(--font-title); font-size: 1.2rem; margin-bottom: 14px; }
.total-sub { display: flex; justify-content: space-between; font-size: .92rem; color: var(--muted); padding: 2px 0; }
.total-sub.promo { color: var(--green); font-weight: 700; }
.drawer-foot .btn { width: 100%; text-align: center; }
.empty-msg { color: var(--muted); text-align: center; margin-top: 40px; }

/* ---------- Checkout / formularios ---------- */
.page { padding: 46px 0 90px; }
.checkout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 800px) { .checkout-grid { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.2rem; margin-bottom: 18px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: .88rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: #fff; border: 1.5px solid var(--border); color: var(--ink);
  border-radius: 11px; padding: 11px 13px; font-size: .95rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,77,31,.12); }
.summary-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: .95rem; }
.summary-line.muted { color: var(--muted); }
.summary-line.total { font-weight: 800; font-family: var(--font-title); font-size: 1.2rem; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 13px; }
.coupon-row { display: flex; gap: 8px; margin: 14px 0; }
.coupon-row input { flex: 1; border: 1.5px solid var(--border); border-radius: 11px; padding: 10px 13px; font-family: inherit; }
.coupon-row input:focus { outline: none; border-color: var(--accent); }
.msg { border-radius: 11px; padding: 11px 15px; font-size: .9rem; margin: 10px 0; display: none; font-weight: 600; }
.msg.error { display: block; background: rgba(230,60,15,.07); border: 1.5px solid var(--accent-dark); color: var(--accent-dark); }
.msg.ok { display: block; background: rgba(22,163,74,.08); border: 1.5px solid var(--green); color: var(--green); }

/* ---------- Página de resultado ---------- */
.result-box { max-width: 540px; margin: 70px auto; text-align: center; }
.result-box .big { font-size: 4.5rem; animation: pop .6s; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.result-box h1 { margin: 12px 0; font-size: 2rem; }
.result-box p { color: var(--muted); margin-bottom: 26px; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: #9aa3ad; padding: 46px 0; font-size: .92rem; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer .logo { color: #fff; }
footer .logo .mark { background: var(--accent); color: #fff; }
footer a { color: #cdd3d9; }
footer a:hover { color: #fff; }

/* ---------- WhatsApp comunidad ---------- */
.wa-float {
  position: fixed; bottom: 24px; left: 24px; z-index: 80;
  display: flex; align-items: center; gap: 9px;
  background: #25d366; color: #fff; border-radius: 999px;
  padding: 12px 18px 12px 14px; font-weight: 800; font-family: var(--font-title); font-size: .92rem;
  box-shadow: 0 10px 28px rgba(37, 211, 102, .45);
  transition: transform .2s, box-shadow .2s;
  animation: wa-pulse 2.6s ease-in-out infinite;
}
.wa-float:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 36px rgba(37,211,102,.55); color: #fff; }
@keyframes wa-pulse { 0%,100% { box-shadow: 0 10px 28px rgba(37,211,102,.45); } 50% { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 12px rgba(37,211,102,.12); } }
@media (max-width: 640px) { .wa-float span { display: none; } .wa-float { padding: 13px; } }
.btn-wa { background: #25d366; color: #fff; margin-left: 12px; }
.btn-wa:hover { background: #1eb857; color: #fff; transform: translateY(-3px); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 80;
  width: 46px; height: 46px; border-radius: 14px; border: none;
  background: var(--ink); color: #fff; font-size: 1.15rem;
  opacity: 0; pointer-events: none; transform: translateY(16px);
  transition: opacity .3s, transform .3s, background .2s;
  box-shadow: 0 10px 26px rgba(16,20,24,.3);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--accent); }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 8px; margin: 22px 0; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 700; }
td input { width: 90px; background: #fff; border: 1.5px solid var(--border); color: var(--ink); border-radius: 9px; padding: 6px 9px; }
td input.wide { width: 180px; }
.btn-sm { padding: 6px 14px; border-radius: 9px; font-size: .84rem; font-weight: 700; border: 1.5px solid var(--border); background: #fff; color: var(--ink); transition: all .15s; }
.btn-sm:hover { transform: translateY(-1px); }
.btn-sm.danger { border-color: var(--accent-dark); color: var(--accent-dark); }
.btn-sm.danger:hover { background: var(--accent-dark); color: #fff; }
.btn-sm.primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-sm.primary:hover { background: var(--accent); border-color: var(--accent); }
.pill { border-radius: 999px; padding: 3px 11px; font-size: .78rem; font-weight: 800; }
.pill.paid { background: rgba(22,163,74,.12); color: var(--green); }
.pill.pending { background: rgba(255,176,32,.18); color: #8a6400; }
.pill.rejected, .pill.cancelled { background: rgba(230,60,15,.1); color: var(--accent-dark); }
.form-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; margin-bottom: 16px; }
.form-inline input, .form-inline select { border: 1.5px solid var(--border); border-radius: 9px; padding: 8px 10px; font-family: inherit; }

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