/* ============================================================
   EL GADGET — DESIGN SYSTEM
   Tokens y componentes compartidos por todas las páginas.
   ============================================================ */

:root {
  --ink:        #14151A;
  --ink-soft:   #2C2E36;
  --paper:      #FFFFFF;
  --cream:      #F7F6F3;
  --accent:     #FFC700;
  --accent-deep:#E0AC00;
  --accent-pale:#FFF7DD;
  --gray-100:   #F1EFEC;
  --gray-200:   #E5E2DD;
  --gray-400:   #ACA79F;
  --gray-600:   #6F6A63;
  --green-wa:   #25D366;
  --red:        #D7473A;
  --red-pale:   #FBEAE8;
  --green-ok:   #2E8B57;
  --green-pale: #E9F5EE;
  --radius:     16px;
  --radius-sm:  10px;
  --radius-xs:  6px;
  --shadow:     0 4px 18px rgba(20,21,26,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body { overflow-x: clip; max-width: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: 90px;
  text-align: center;
}

a { color: inherit; }

/* ── HEADER ── */
.header {
  background: var(--paper);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-badge {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  overflow: hidden;
  display: flex;
}
.logo-badge svg { width: 100%; height: 100%; display: block; }
.logo-text { display: flex; flex-direction: column; gap: 2px; }
.logo-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  line-height: 1;
}
.logo-name span { color: var(--accent-deep); }
.logo-tagline {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gray-600);
  line-height: 1;
}

.search-desktop { flex: 1; max-width: 420px; display: none; }
@media (min-width: 760px) { .search-desktop { display: block; } }
.search-box { position: relative; display: flex; align-items: center; }
.search-box svg {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--gray-400);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border-radius: 24px;
  border: 1.5px solid var(--gray-200);
  background: var(--cream);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  outline: none;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.search-box input:focus { border-color: var(--accent); background: var(--paper); }

.cart-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--ink);
  border: none;
  border-radius: 24px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: white;
  transition: background 0.15s;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
  text-decoration: none;
}
.cart-pill:hover { background: var(--ink-soft); }
.cart-pill svg { width: 16px; height: 16px; }
.cart-pill span.label { display: none; }
@media (min-width: 480px) { .cart-pill span.label { display: inline; } }
.cart-badge {
  background: var(--accent);
  color: var(--ink);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ── ACCOUNT PILL (header) ── */
.account-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1.5px solid var(--gray-200);
  border-radius: 24px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
}
.account-pill:hover { border-color: var(--ink); background: var(--cream); }
.account-pill svg { width: 16px; height: 16px; }
.account-pill span.label { display: none; }
@media (min-width: 480px) { .account-pill span.label { display: inline; } }

/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 1.25rem 0;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--gray-600);
  flex-wrap: wrap;
}
.breadcrumb a { text-decoration: none; font-weight: 600; color: var(--ink); }
.breadcrumb a:hover { color: var(--accent-deep); }
.breadcrumb .sep { color: var(--gray-400); }
.breadcrumb .current { color: var(--gray-600); }

/* ── PAGE HERO (páginas informativas) ── */
.page-hero {
  background: var(--ink);
  overflow: hidden;
  position: relative;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,199,0,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.2rem 1.25rem;
  position: relative;
}
.page-hero .hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.page-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(24px, 4.5vw, 36px);
  font-weight: 700;
  color: white;
  line-height: 1.25;
}
.page-hero p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  max-width: 560px;
  margin-top: 10px;
}

/* ── HERO (home) ── */
.hero {
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(20,21,26,0.55) 0%, rgba(20,21,26,0.92) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23FFC700' stroke-width='1.2' opacity='0.18'%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%23FFC700'/%3E%3Cpath d='M12 12H40V40'/%3E%3Ccircle cx='40' cy='40' r='2.5' fill='%23FFC700'/%3E%3Cpath d='M40 40H68V68'/%3E%3Ccircle cx='68' cy='68' r='2.5' fill='%23FFC700'/%3E%3Ccircle cx='68' cy='12' r='2.5' fill='%23FFC700'/%3E%3Cpath d='M68 12V40H40'/%3E%3Ccircle cx='12' cy='68' r='2.5' fill='%23FFC700'/%3E%3Cpath d='M12 68V40'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: cover, 80px 80px;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,199,0,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1240px; margin: 0 auto; padding: 2.4rem 1.25rem 2.2rem; position: relative;
  display: flex; flex-direction: column; align-items: center;
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 10px;
  max-width: 560px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.6; max-width: 480px; margin-bottom: 18px; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hero-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.hero-badge:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }

/* ── BANDA DE CONFIANZA ── */
.trust-strip { background: var(--cream); border-bottom: 1px solid var(--gray-200); }
.trust-strip-inner {
  max-width: 1240px; margin: 0 auto; padding: 0.85rem 1.25rem;
  display: flex; gap: 22px; flex-wrap: wrap; justify-content: center;
}
.trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
.trust-item .ico { font-size: 16px; line-height: 1; }

/* ── FILTROS / CHIPS ── */
.filters-wrap {
  background: var(--paper);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 66px;
  z-index: 90;
}
.filters-inner { max-width: 1240px; margin: 0 auto; padding: 10px 1.25rem; }
.search-mobile { display: block; margin-bottom: 10px; }
@media (min-width: 760px) { .search-mobile { display: none; } }
.chips-wrap { position: relative; }
.chips-wrap::before, .chips-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 2px; width: 24px; pointer-events: none; z-index: 1;
}
.chips-wrap::before { left: 0; background: linear-gradient(to right, var(--paper), transparent); }
.chips-wrap::after { right: 0; background: linear-gradient(to left, var(--paper), transparent); }
.chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  background: var(--paper);
  color: var(--gray-600);
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--accent); }
.chip.offer:not(.active) { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-pale); }

/* ── ORDEN Y RANGO DE PRECIO ── */
.filters-extra { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.sort-select {
  padding: 8px 32px 8px 14px; border-radius: 20px; border: 1.5px solid var(--gray-200);
  background-color: var(--paper); font-size: 12.5px; font-weight: 600; color: var(--ink);
  font-family: 'Inter', sans-serif; cursor: pointer; transition: border-color 0.15s;
  appearance: none; -webkit-appearance: none; -moz-appearance: none; text-align: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314151A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
.sort-select:hover, .sort-select:focus { border-color: var(--accent); outline: none; }
.price-range { display: flex; align-items: center; gap: 6px; }
.price-range input {
  width: 92px; padding: 8px 12px; border-radius: 20px; border: 1.5px solid var(--gray-200);
  font-size: 12.5px; font-family: 'Inter', sans-serif; color: var(--ink); background: var(--paper);
  outline: none; text-align: center; transition: border-color 0.15s;
}
.price-range input:focus { border-color: var(--accent); }
.price-range span { color: var(--gray-600); font-size: 12px; }

/* ── ESTADOS ── */
.state-msg { text-align: center; padding: 4rem 1rem; color: var(--gray-600); font-size: 14px; max-width: 1240px; margin: 0 auto; }
.state-msg .icon { font-size: 34px; margin-bottom: 10px; }
.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.retry-btn {
  margin-top: 14px;
  padding: 9px 20px;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.retry-btn:hover { background: var(--ink-soft); }

/* ── GRID / TARJETAS DE PRODUCTO ── */
.grid-wrap { max-width: 1240px; margin: 0 auto; padding: 1.4rem 1.25rem 3rem; }
.grid-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.grid-heading h2 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); }
.grid-heading span { font-size: 12.5px; color: var(--gray-600); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 560px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px)  { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(5, 1fr); } }

.card {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--shadow); }
.card-img-wrap { position: relative; overflow: hidden; background: var(--gray-100); }
.card-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform 0.3s; }
.card:hover .card-img { transform: scale(1.04); }
.card-img-placeholder {
  width: 100%; aspect-ratio: 1; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--gray-400);
}
.card-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--accent); color: var(--ink);
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 4px 9px; border-radius: 20px; text-transform: uppercase;
}
.card-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.card-cat { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-600); font-weight: 700; margin-bottom: 4px; }
.card-name {
  font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; line-height: 1.35; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.card-btn {
  width: 100%; padding: 9px; background: var(--accent); color: var(--ink);
  border: none; border-radius: var(--radius-xs); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background 0.15s; font-family: 'Inter', sans-serif; letter-spacing: 0.3px;
}
.card-btn:hover { background: var(--accent-deep); }
.card-btn:disabled { background: var(--gray-200); color: var(--gray-600); cursor: not-allowed; }

/* ── BOTONES GENÉRICOS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700; text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-deep); }
.btn-dark { background: var(--ink); color: white; }
.btn-dark:hover { background: var(--ink-soft); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--gray-200); }
.btn-outline:hover { border-color: var(--ink); }
.btn-wa { background: var(--green-wa); color: white; }
.btn-wa:hover { background: #1ebe5b; }
.btn:disabled { background: var(--gray-200) !important; color: var(--gray-600) !important; cursor: not-allowed; }
.btn.is-disabled { background: var(--gray-200) !important; color: var(--gray-600) !important; cursor: not-allowed; pointer-events: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ── FORMULARIOS ── */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--ink); margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200); font-size: 14px; font-family: 'Inter', sans-serif;
  color: var(--ink); background: var(--paper); outline: none; transition: border-color 0.15s;
  text-align: center;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 80px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 140px; }
@media (max-width: 420px) { .field-row .field { min-width: 120px; } }
.field-hint { font-size: 12px; color: var(--gray-600); margin-top: 4px; }
.field-error { font-size: 12px; color: var(--red); margin-top: 4px; }

/* Tarjetas de contenido genéricas (FAQ, info, etc.) */
.panel {
  background: var(--paper);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* ── CART BAR ── */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--ink); color: white;
  padding: 12px 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.18);
}
.cart-bar.show { transform: translateY(0); }
.cart-bar-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cart-bar-count {
  background: var(--accent); color: var(--ink); border-radius: 50%;
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.cart-bar-text { font-size: 12.5px; color: rgba(255,255,255,0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-bar-text strong { font-family: 'Space Grotesk', sans-serif; color: white; font-size: 15px; display: block; }
.cart-bar-btn {
  flex-shrink: 0; padding: 11px 20px; background: var(--accent); color: var(--ink);
  border: none; border-radius: var(--radius-xs); font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: background 0.15s; text-decoration: none;
  display: inline-flex; align-items: center;
}
.cart-bar-btn:hover { background: var(--accent-deep); }

/* ── FOOTER ── */
.footer { background: var(--ink); color: rgba(255,255,255,0.6); margin-top: 1rem; }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 2.4rem 1.25rem; display: grid; gap: 1.6rem;
}
@media (min-width: 640px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand .logo-name, .footer-brand .logo-name span { color: white; }
.footer-brand .logo-tagline { color: rgba(255,255,255,0.45); }
.footer-brand p { font-size: 13px; line-height: 1.6; margin-top: 10px; max-width: 320px; color: rgba(255,255,255,0.5); }
.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 700; color: white;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.55); text-decoration: none; margin-bottom: 8px; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); text-align: center; padding: 1rem 1.25rem 1.6rem;
  font-size: 12px; color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.45); text-decoration: underline; }

/* ── WHATSAPP FLOTANTE ── */
.whatsapp-float {
  position: fixed; bottom: 100px; right: 18px; width: 54px; height: 54px;
  background: var(--green-wa); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25); z-index: 199;
  transition: transform 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 110px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink); color: white;
  padding: 10px 20px; border-radius: 24px;
  font-size: 13px; font-weight: 600; opacity: 0;
  transition: all 0.25s; z-index: 999;
  font-family: 'Inter', sans-serif;
  max-width: calc(100vw - 32px); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 480px) {
  .toast { white-space: normal; border-radius: 16px; }
}

/* ── PRODUCTO: GALERÍA Y FICHA ── */
.product-wrap { max-width: 1240px; margin: 0 auto; padding: 1.4rem 1.25rem 3rem; }
.product-grid { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
@media (min-width: 860px) { .product-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }

.gallery { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (min-width: 860px) { .gallery { position: sticky; top: 90px; height: fit-content; } }
.main-image-wrap {
  position: relative;
  background: var(--paper); border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  touch-action: pan-y; min-width: 0;
}
.main-image { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; min-width: 0; min-height: 0; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.85); color: var(--ink);
  font-size: 20px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; box-shadow: 0 2px 8px rgba(20,21,26,0.15);
  transition: background 0.15s, color 0.15s;
}
.gallery-arrow:hover { background: var(--accent); color: var(--ink); }
.gallery-arrow-prev { left: 10px; }
.gallery-arrow-next { right: 10px; }
.gallery.single-image .gallery-arrow,
.gallery.single-image .thumbnails-wrap { display: none; }
.thumbnails-wrap { position: relative; }
.thumbnails-wrap::before, .thumbnails-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 4px; width: 24px; pointer-events: none; z-index: 1;
}
.thumbnails-wrap::before { left: 0; background: linear-gradient(to right, var(--paper), transparent); }
.thumbnails-wrap::after { right: 0; background: linear-gradient(to left, var(--paper), transparent); }
.thumbnails {
  display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; padding: 2px 2px 4px;
}
.thumbnails::-webkit-scrollbar { display: none; }
.thumbnail {
  flex: 0 0 64px; width: 64px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-xs);
  cursor: pointer; border: 1.5px solid var(--gray-200); transition: border-color 0.15s; background: var(--paper);
}
.thumbnail:hover, .thumbnail.active { border-color: var(--accent); }

.product-info { display: flex; flex-direction: column; gap: 1.1rem; }
.product-cat-badge {
  display: inline-block; align-self: flex-start; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--gray-600);
  background: var(--gray-100); padding: 5px 12px; border-radius: 20px;
}
.product-title {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700; color: var(--ink); line-height: 1.25;
}
.product-price {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(28px, 4vw, 38px);
  font-weight: 700; color: var(--ink);
}
.product-sku { font-size: 12px; color: var(--gray-600); margin-top: 4px; }

.stock-badge {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 20px;
}
.stock-badge.in-stock { background: var(--green-pale); color: var(--green-ok); }
.stock-badge.out-of-stock { background: var(--red-pale); color: var(--red); }

.variants-section { border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); padding: 1.1rem 0; }
.variant-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--ink); margin-bottom: 10px; display: block; }
.variant-select {
  width: 100%; padding: 12px 40px 12px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  background-color: var(--paper); font-size: 14px; font-weight: 600; color: var(--ink);
  font-family: 'Inter', sans-serif; cursor: pointer; transition: border-color 0.15s;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314151A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.variant-select:hover, .variant-select:focus { border-color: var(--accent); outline: none; }

.product-description h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--ink);
}
.description { font-size: 14px; line-height: 1.7; color: var(--gray-600); white-space: pre-wrap; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .btn { flex: 1; min-width: 160px; }

.related-section { margin-top: 3rem; }
.related-section .grid-heading { margin-bottom: 14px; }

/* ── PÁGINAS GENÉRICAS (carrito, checkout, confirmación, etc.) ── */
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 1.4rem 1.25rem 3rem; }
.page-title {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 700; color: var(--ink); margin-bottom: 1.1rem;
}

/* ── CARRITO ── */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 860px) { .cart-layout { grid-template-columns: 1fr 360px; } }
.items-section, .cart-layout .summary { min-width: 0; }

.item-card {
  background: var(--paper); border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  padding: 14px; display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; margin-bottom: 12px;
}
.item-img-wrap {
  width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 26px; color: var(--gray-400);
}
.item-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-info { min-width: 0; }
.item-nombre { font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-variante { font-size: 12px; color: var(--gray-600); margin-bottom: 10px; }
.item-controls { display: flex; align-items: center; gap: 10px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--gray-200); background: var(--paper);
  font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ink); transition: all 0.15s; line-height: 1;
}
.qty-btn:hover { border-color: var(--accent); }
.qty-value { font-weight: 700; font-size: 15px; min-width: 22px; text-align: center; }
.item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.item-subtotal { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; color: var(--ink); }
.btn-eliminar { background: none; border: none; color: var(--gray-600); cursor: pointer; font-size: 12.5px; font-family: 'Inter', sans-serif; padding: 4px 0; transition: color 0.15s; }
.btn-eliminar:hover { color: var(--red); }

.empty-state { background: var(--paper); border: 1.5px solid var(--gray-200); border-radius: var(--radius); padding: 3.5rem 1.5rem; text-align: center; }
.empty-state .emoji { font-size: 50px; margin-bottom: 14px; }
.empty-state h2 { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.empty-state p { color: var(--gray-600); font-size: 14px; margin-bottom: 20px; }

.summary { background: var(--paper); border: 1.5px solid var(--gray-200); border-radius: var(--radius); padding: 1.25rem; position: sticky; top: 90px; }
.summary h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--gray-200); color: var(--ink);
}
.summary-line { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--gray-600); margin-bottom: 10px; }
.summary-line.total {
  font-size: 17px; font-weight: 700; color: var(--ink); padding-top: 14px; margin-top: 4px;
  border-top: 1.5px solid var(--gray-200); font-family: 'Space Grotesk', sans-serif;
}
.shipping-badge { background: var(--accent-pale); color: var(--accent-deep); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: 0.3px; }
.shipping-info { font-size: 11.5px; color: var(--gray-600); margin-top: -6px; }
.security-note { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--gray-600); }

/* ── CHECKOUT ── */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 900px) { .checkout-layout { grid-template-columns: 1fr 380px; } }
.checkout-layout .form-panel, .checkout-layout .summary { min-width: 0; }

/* ── LOGIN / CREAR CUENTA ── */
.auth-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 760px) { .auth-layout { grid-template-columns: 1fr 1fr; } }
.auth-layout .form-panel { min-width: 0; }

.form-panel { background: var(--paper); border: 1.5px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; }
.form-panel h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; color: var(--ink);
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--gray-200);
}
.form-section-title {
  font-size: 11px; font-weight: 700; color: var(--accent-deep); text-transform: uppercase;
  letter-spacing: 1.5px; margin: 22px 0 12px;
}
.form-section-title:first-of-type { margin-top: 0; }
.field input.error, .field select.error { border-color: var(--red); }
.field .optional { color: var(--gray-400); font-weight: 400; text-transform: none; letter-spacing: 0; }

.summary-item {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px;
}
.summary-item .item-info { flex: 1; min-width: 0; }
.summary-item .item-nombre { font-weight: 600; color: var(--ink); }
.summary-item .item-qty { font-size: 12px; color: var(--gray-600); }
.summary-item .item-precio { font-weight: 700; color: var(--ink); white-space: nowrap; font-family: 'Space Grotesk', sans-serif; }

/* ── OVERLAY DE CARGA ── */
.overlay {
  display: none; position: fixed; inset: 0; background: rgba(20,21,26,0.6);
  z-index: 9999; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  color: white; font-size: 14px; font-weight: 600; text-align: center; padding: 1rem;
}
.overlay.show { display: flex; }
.overlay .spinner { width: 44px; height: 44px; border: 4px solid rgba(255,255,255,0.25); border-top-color: var(--accent); margin: 0; }

/* ── BADGES DE ESTADO (pedidos) ── */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 20px;
}
.status-badge.ok    { background: var(--green-pale); color: var(--green-ok); }
.status-badge.pend  { background: var(--accent-pale); color: var(--accent-deep); }
.status-badge.bad   { background: var(--red-pale); color: var(--red); }
.status-badge.info  { background: var(--gray-100); color: var(--gray-600); }

/* ── PÁGINAS DE RESULTADO (confirmación / pago) ── */
.result-wrap { max-width: 640px; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; text-align: center; }
.result-wrap.wide { max-width: 860px; }
.result-icon {
  width: 88px; height: 88px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 40px;
}
.result-icon.ok   { background: var(--green-pale); }
.result-icon.pend { background: var(--accent-pale); }
.result-icon.bad  { background: var(--red-pale); }
.result-wrap h1 {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(22px, 4vw, 30px); font-weight: 700; color: var(--ink); margin-bottom: 10px;
}
.result-wrap .subtitle { font-size: 14px; color: var(--gray-600); line-height: 1.6; margin-bottom: 22px; }

.order-badge {
  display: inline-flex; flex-direction: column; gap: 2px; align-items: center;
  background: var(--paper); border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  padding: 12px 26px; margin-bottom: 24px;
}
.order-badge .label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-600); }
.order-badge .num { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; color: var(--ink); }

.info-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
@media (min-width: 680px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-grid .info-card.full { grid-column: 1 / -1; }

.info-card {
  background: var(--paper); border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 16px; text-align: center;
}
.info-card h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; color: var(--ink);
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--gray-200);
}
.info-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 7px 0; border-bottom: 1px solid var(--gray-100); }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--gray-600); }
.info-valor { font-weight: 600; color: var(--ink); }

.step-row { display: flex; gap: 10px; font-size: 13.5px; color: var(--gray-600); margin-bottom: 10px; align-items: flex-start; }
.step-row:last-child { margin-bottom: 0; }
.step-icon { font-size: 17px; flex-shrink: 0; }

.alert-box {
  background: var(--accent-pale); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 14px 16px; font-size: 13.5px; color: var(--accent-deep); margin-bottom: 18px; text-align: center; line-height: 1.6;
}

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.result-actions .btn { flex: 1; min-width: 180px; }

/* Tabla de productos (confirmación) */
.order-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.order-table thead tr { background: var(--gray-100); }
.order-table th { padding: 9px 10px; text-align: center; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-600); }
.order-table td { padding: 10px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; font-weight: 600; color: var(--ink); }
.order-table td:nth-child(2), .order-table td:nth-child(3) { font-weight: 400; color: var(--gray-600); }
.order-table tfoot td {
  font-weight: 700; font-size: 15px; border-top: 1.5px solid var(--gray-200); border-bottom: none; padding: 12px 10px;
  font-family: 'Space Grotesk', sans-serif; color: var(--ink);
}
.order-table .sku-small { font-size: 11px; color: var(--gray-600); font-weight: 400; }

/* ── FAQ ── */
.faq-category { margin-bottom: 28px; }
.faq-category h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 700; color: var(--ink);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.faq-item { border: 1.5px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; background: var(--paper); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: var(--ink); text-align: center;
}
.faq-question .icon { font-size: 18px; transition: transform 0.2s; flex-shrink: 0; color: var(--gray-600); }
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer-inner { padding: 0 18px 16px; font-size: 13.5px; color: var(--gray-600); line-height: 1.7; }
.faq-answer-inner a { color: var(--ink); font-weight: 600; }

/* ── PÁGINAS DE CONTENIDO (Sobre nosotros, etc.) ── */
.content-section { margin-bottom: 28px; }
.content-section h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 10px;
}
.content-section p { font-size: 14px; color: var(--gray-600); line-height: 1.75; margin-bottom: 10px; }
.content-section ul { margin: 0 0 10px 1.25rem; font-size: 14px; color: var(--gray-600); line-height: 1.75; }
.value-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px 0; }
@media (min-width: 680px) { .value-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card {
  background: var(--paper); border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.1rem; text-align: center;
}
.value-card .emoji { font-size: 30px; margin-bottom: 8px; }
.value-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.value-card p { font-size: 12.5px; color: var(--gray-600); margin: 0; line-height: 1.6; }

/* ── POPUP DE BIENVENIDA (10% OFF) ── */
.eg-popup-overlay {
  display: none; position: fixed; inset: 0; background: rgba(20,21,26,0.6);
  z-index: 1000; align-items: center; justify-content: center; padding: 1rem;
}
.eg-popup-overlay.show { display: flex; }
.eg-popup-card {
  background: var(--paper); border-radius: var(--radius); max-width: 380px; width: 100%;
  padding: 1.75rem; text-align: center; position: relative; box-shadow: 0 10px 40px rgba(20,21,26,0.25);
}
.eg-popup-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--gray-100); color: var(--gray-600); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1;
}
.eg-popup-close:hover { background: var(--gray-200); color: var(--ink); }
.eg-popup-emoji { font-size: 40px; margin-bottom: 10px; }
.eg-popup-card h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 8px;
}
.eg-popup-card p { font-size: 13.5px; color: var(--gray-600); line-height: 1.6; margin-bottom: 16px; }
.eg-popup-card .field { text-align: center; margin-bottom: 12px; }
.eg-popup-error { font-size: 12px; color: var(--red); margin-top: -6px; margin-bottom: 10px; display: none; }

/* ── BANNER DE BIENVENIDA (10% OFF por registro) ── */
.eg-welcome-banner {
  background: var(--accent); color: var(--ink);
  font-size: 12.5px; font-weight: 700; line-height: 1.4;
  padding: 9px 16px;
}

/* ── BANNER PROMOCIONAL (home) ── */
.promo-banner { display: none; max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; }
.promo-banner.show { display: block; }
.promo-banner-inner {
  margin-top: 14px; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  border-radius: var(--radius); padding: 14px 20px; display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; justify-content: space-between;
}
.promo-banner-text { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.promo-banner-text strong { font-family: 'Space Grotesk', sans-serif; font-size: 16px; display: block; margin-bottom: 2px; }
.promo-banner-code {
  background: rgba(20,21,26,0.1); border-radius: 20px; padding: 6px 14px; font-weight: 700;
  font-size: 12.5px; color: var(--ink); letter-spacing: 0.5px;
}

/* ── PRECIOS DE OFERTA (catálogo) ── */
.card-price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.card-price-row .price-old { font-size: 12px; color: var(--gray-400); text-decoration: line-through; }
.card-price-row .card-price { margin-bottom: 0; color: var(--red); }
.card-badge.offer-badge { left: auto; right: 8px; background: var(--red); color: white; }

/* ── PRECIOS DE OFERTA (producto) ── */
.product-price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.product-price-old {
  font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700;
  color: var(--gray-400); text-decoration: line-through;
}
.product-price-offer {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(28px, 4vw, 38px); font-weight: 700; color: var(--red);
}
.discount-pill {
  background: var(--red); color: white; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px; align-self: center;
}

/* ── STOCK BAJO ── */
.stock-badge.low-stock { background: var(--accent-pale); color: var(--accent-deep); }
.card-stock-badge { font-size: 11px; font-weight: 700; color: var(--accent-deep); margin: -4px 0 8px; }

/* ── SKELETON DE CARGA ── */
@keyframes skeleton-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.skeleton-block, .skeleton-line {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 37%, var(--gray-100) 63%);
  background-size: 400% 100%; animation: skeleton-shimmer 1.4s ease infinite;
}
.skeleton-line { height: 12px; border-radius: 6px; margin-bottom: 8px; }
.skeleton-line.sm { width: 60%; }
.skeleton-line.price { width: 40%; height: 17px; margin-top: 4px; }
.card.skeleton { pointer-events: none; }

/* ── SIN RESULTADOS ── */
.no-results {
  grid-column: 1 / -1; text-align: center; padding: 3rem 1rem 1.5rem; color: var(--gray-600);
}
.sugerencias-wrap { grid-column: 1 / -1; margin-top: 1.5rem; }
.sugerencias-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--gray-600); margin-bottom: 12px;
}
