/* ==========================================================================
   Mercado Óptimo — hoja de estilos principal
   ========================================================================== */

/* ---------- Reset básico ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Variables ---------- */
:root {
  --color-bg: #f6f8fb;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-text-faint: #94a3b8;

  --color-primary: #16241c;
  --color-primary-light: #1f3a2c;

  --color-accent: #1a7a4c;
  --color-accent-dark: #12603a;
  --color-accent-light: #e6f2ec;

  --color-orange: #f97316;
  --color-orange-dark: #ea580c;
  --color-gold: #f4c430;

  --color-success: #16a34a;
  --color-success-light: #f0fdf4;
  --color-danger: #dc2626;
  --color-star: #ff8a00;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.14);

  --container-width: 1240px;
  --header-height: 128px;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Poppins", var(--font-body);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--color-text); font-family: var(--font-heading); }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

main { display: block; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14.5px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-dark { background: var(--color-primary); color: #fff; }
.btn-dark:hover { background: var(--color-primary-light); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-orange { background: var(--color-orange); color: #fff; }
.btn-orange:hover { background: var(--color-orange-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Cabecera ---------- */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 50; }
.header-main { padding: 16px 0; }
.header-main .container { display: flex; align-items: center; gap: 28px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; color: var(--color-primary); flex-shrink: 0; }
.logo .logo-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--color-accent), #4fd18c); display: flex; align-items: center; justify-content: center; color: #fff; }
.logo span.brand-alt { color: var(--color-accent); }
.logo-img { height: 44px; width: auto; display: block; }

/* Elementos exclusivos del tiroir móvil: ocultos por defecto, se activan en la media query táctil */
.nav-drawer-head, .nav-drawer-call, .nav-drawer-footer { display: none; }
.nav-list-icon { display: none; flex-shrink: 0; }

.header-search { flex: 1; max-width: 640px; }
.header-search form { display: flex; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.header-search input { flex: 1; border: none; padding: 12px 16px; font-size: 14.5px; outline: none; }
.header-search button { background: var(--color-primary); color: #fff; padding: 0 18px; display: flex; align-items: center; justify-content: center; }
.header-search button:hover { background: var(--color-accent); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-action {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; border-radius: var(--radius-md); position: relative; text-align: center;
}
.header-action:hover { background: var(--color-bg); }
.header-action .icon-label { font-size: 11.5px; color: var(--color-text-muted); font-weight: 600; }
.cart-badge {
  position: absolute; top: -2px; right: 4px; background: var(--color-orange); color: #fff;
  font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

.nav-toggle { display: none; align-items: center; justify-content: center; padding: 8px; }

/* ---------- Navegación principal ---------- */
.main-nav { background: var(--color-primary); }
.main-nav .container { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; }
.nav-list a {
  display: flex; align-items: center; padding: 13px 18px; color: #e2e8f0; font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent; transition: all 0.15s ease; white-space: nowrap;
}
.nav-list a:hover, .nav-list a.active { color: #fff; border-bottom-color: var(--color-accent); background: rgba(255,255,255,0.04); }
.nav-list a.nav-offers { color: var(--color-orange); font-weight: 700; }

/* Menú desplegable de categorías — primer elemento del menú, con fondo propio a modo de botón */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-toggle {
  display: flex; align-items: center; gap: 7px; padding: 9px 16px; margin: 10px 6px 10px 0;
  color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap;
  background: var(--color-accent); border-radius: var(--radius-full); transition: background 0.15s ease;
}
.nav-dropdown-toggle:hover { background: var(--color-accent-dark); }
.nav-dropdown-toggle .nav-caret { transition: transform 0.15s ease; flex-shrink: 0; }
.nav-dropdown.open .nav-dropdown-toggle { background: var(--color-accent-dark); }
.nav-dropdown.open .nav-dropdown-toggle .nav-caret { transform: rotate(180deg); }
/* El icono de "Categorías" es el único del nav-list visible también en escritorio (los demás
   enlaces del menú horizontal se quedan solo con texto, como en el diseño original) */
.nav-dropdown-toggle .nav-list-icon { display: inline-flex; }

/* Teléfono de contacto, en la misma línea que el menú, siempre a la derecha */
.nav-phone-item { margin-left: auto; }
.nav-list a.nav-phone {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; margin: 10px 0;
  color: #fff; font-weight: 700; border: 1.5px solid rgba(255,255,255,0.28); border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06); border-bottom: none;
}
.nav-list a.nav-phone:hover {
  color: #fff; background: var(--color-accent); border-color: var(--color-accent); border-bottom: none;
}
.nav-list a.nav-phone svg { flex-shrink: 0; }

.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 6px; z-index: 60;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 16px 18px 8px; width: 760px; max-width: 90vw; max-height: 78vh; overflow-y: auto;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { color: var(--color-text); }
.nav-dropdown-menu a.nav-dropdown-all {
  display: block; margin-top: 4px; padding: 12px 4px; border-top: 1px solid var(--color-border);
  font-weight: 700; font-size: 13.5px; color: var(--color-accent);
}

.cat-menu-list { column-count: 2; column-gap: 22px; }
.cat-menu-group { break-inside: avoid; margin-bottom: 16px; }
.cat-menu-main { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: var(--radius-sm); }
.cat-menu-main:hover { background: var(--color-accent-light); }
.cat-menu-main:hover strong { color: var(--color-accent-dark); }
.cat-menu-main strong { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.cat-menu-photo {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.cat-menu-photo img { width: 78%; height: 78%; object-fit: contain; mix-blend-mode: multiply; }
.cat-menu-subs { display: flex; flex-direction: column; padding-left: 50px; margin-top: 2px; }
.cat-menu-subs a { font-size: 12.5px; color: var(--color-text-muted); padding: 3px 4px; border-radius: var(--radius-sm); }
.cat-menu-subs a:hover { background: var(--color-accent-light); color: var(--color-accent-dark); }

/* ---------- Carrusel de categorías (bajo la cabecera, en todas las páginas) ---------- */
.cat-carousel-wrap { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.cat-carousel-inner { display: flex; align-items: center; gap: 8px; padding: 12px 0; }
.cat-carousel {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-behavior: smooth;
  flex: 1; min-width: 0; padding: 2px 0; scrollbar-width: none; -ms-overflow-style: none;
}
.cat-carousel::-webkit-scrollbar { display: none; }
.cat-carousel-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px; flex-shrink: 0;
  width: 82px; scroll-snap-align: start; text-align: center;
}
.cat-carousel-icon {
  width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cat-carousel-icon img { width: 76%; height: 76%; object-fit: contain; }
.cat-carousel-item:hover .cat-carousel-icon { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-carousel-item span:last-child { font-size: 11.5px; font-weight: 600; color: var(--color-text); line-height: 1.25; }
.cat-carousel-arrow {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--color-border);
  background: #fff; display: flex; align-items: center; justify-content: center; color: var(--color-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.cat-carousel-arrow:hover { background: var(--color-accent-light); color: var(--color-accent-dark); }
.cat-carousel-arrow:disabled { opacity: 0.3; pointer-events: none; }

/* ---------- Migas de pan ---------- */
.breadcrumbs { font-size: 13px; color: var(--color-text-muted); padding: 16px 0; }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs .sep { margin: 0 6px; color: var(--color-text-faint); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--color-primary); }
.hero-slides { position: relative; min-height: 420px; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.5s ease;
  display: flex; align-items: center;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  background-color: var(--color-primary); /* color de respaldo mientras carga la foto */
}
.hero-slide.active { opacity: 1; visibility: visible; }
/* Velo oscuro de izquierda a derecha: la foto queda visible a la derecha y el texto,
   siempre a la izquierda, mantiene buen contraste sea cual sea la foto de fondo */
.hero-slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15,22,18,0.82) 0%, rgba(15,22,18,0.55) 42%, rgba(15,22,18,0.12) 75%);
}
.hero-slide .container { position: relative; z-index: 1; display: flex; align-items: center; }
.hero-copy { max-width: 520px; color: #fff; padding: 60px 0; }
.hero-eyebrow { display: inline-block; background: rgba(255,255,255,0.12); color: #fff; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: var(--radius-full); margin-bottom: 16px; letter-spacing: 0.02em; }
.hero-copy h1 { color: #fff; font-size: 38px; margin-bottom: 14px; letter-spacing: -0.02em; }
.hero-copy p { color: #cbd5e1; font-size: 15.5px; margin-bottom: 24px; }

/* Foto de cada slide: escritorio 1920×420 (paisaje), sustituida en móvil por la variante -mobile */
.hero-1 { background-image: url('../images/hero-1-desktop.jpg'); }
.hero-2 { background-image: url('../images/hero-2-desktop.jpg'); }
.hero-3 { background-image: url('../images/hero-3-desktop.jpg'); }

.hero-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.35); }
.hero-dots button.active { background: #fff; width: 22px; border-radius: var(--radius-full); }

/* ---------- Franja de servicios ---------- */
.perks-strip { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.perks-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 22px 20px; }
.perk { display: flex; align-items: center; gap: 12px; }
.perk .perk-icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--color-accent-light); color: var(--color-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.perk strong { display: block; font-size: 13.5px; }
.perk span { font-size: 12.5px; color: var(--color-text-muted); }

/* ---------- Secciones genéricas ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.section-head h2 { font-size: 24px; letter-spacing: -0.01em; }
.section-head p.section-sub { color: var(--color-text-muted); font-size: 14px; margin-top: 4px; }
.section-link { font-size: 13.5px; font-weight: 600; color: var(--color-accent); white-space: nowrap; }
.section-link:hover { text-decoration: underline; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

/* ---------- Categorías ---------- */
.category-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.category-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 14px 8px; text-align: center; transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.category-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: transparent; }
.category-card .cat-photo {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* multiply "borra" el fondo blanco de las fotos de producto para que se fundan con el círculo de color */
.category-card .cat-photo img { width: 76%; height: 76%; object-fit: contain; mix-blend-mode: multiply; }
.category-card h3 { font-size: 11.5px; margin-bottom: 2px; line-height: 1.25; }
.category-card span { font-size: 10.5px; color: var(--color-text-muted); }

/* ---------- Rejilla de productos ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.product-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.product-thumb { position: relative; aspect-ratio: 1 / 0.82; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-thumb svg { width: 42%; height: 42%; }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10%; }
.product-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 1; }
.product-badge {
  font-size: 11px; font-weight: 700; padding: 4px 9px;
  border-radius: var(--radius-full); color: #fff; letter-spacing: 0.01em;
}
.badge-oferta { background: var(--color-orange); }
.badge-nuevo { background: var(--color-accent); }
.badge-vendido { background: var(--color-success); }
.badge-discount { position: absolute; top: 10px; right: 10px; background: var(--color-primary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: var(--radius-sm); }

.product-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-brand { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-faint); font-weight: 700; }
.product-name { font-size: 14px; font-weight: 600; line-height: 1.35; min-height: 38px; }
.product-name a:hover { color: var(--color-accent); }
.product-rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-text-muted); }
.product-rating-empty { color: var(--color-text-faint); font-style: italic; }
.stars { color: var(--color-star); letter-spacing: 1px; font-size: 13px; }
.product-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; flex-wrap: wrap; row-gap: 4px; }
.price-current { font-size: 18px; font-weight: 800; color: var(--color-text); }
.price-old { font-size: 13px; color: var(--color-text-faint); text-decoration: line-through; }
.product-stock { font-size: 11.5px; font-weight: 600; }
.stock-in { color: var(--color-success); }
.stock-low { color: var(--color-orange); }
.stock-out { color: var(--color-danger); }
.product-actions { margin-top: auto; padding-top: 10px; }
.product-actions .btn { width: 100%; }

/* Paletas de fondo por categoría (thumb + icono de categoría) — 16 categorías reales de electrosye.es */
.pal-tv-sonido { background: linear-gradient(135deg, #dbeafe, #eff6ff); } .pal-tv-sonido svg, .cat-icon.pal-tv-sonido { color: #2563eb; }
.pal-telefonia-wearables { background: linear-gradient(135deg, #ede9fe, #f5f3ff); } .pal-telefonia-wearables svg { color: #7c3aed; }
.pal-portatiles { background: linear-gradient(135deg, #e0f2fe, #f0f9ff); } .pal-portatiles svg { color: #0284c7; }
.pal-frigorificos-congelacion { background: linear-gradient(135deg, #dcfce7, #f0fdf4); } .pal-frigorificos-congelacion svg { color: #16a34a; }
.pal-lavado-secado { background: linear-gradient(135deg, #cffafe, #ecfeff); } .pal-lavado-secado svg { color: #0891b2; }
.pal-electrodomesticos-cocina { background: linear-gradient(135deg, #ffedd5, #fff7ed); } .pal-electrodomesticos-cocina svg { color: #ea580c; }
.pal-pequeno-electrodomestico { background: linear-gradient(135deg, #fce7f3, #fdf2f8); } .pal-pequeno-electrodomestico svg { color: #db2777; }
.pal-climatizacion { background: linear-gradient(135deg, #ccfbf1, #f0fdfa); } .pal-climatizacion svg { color: #0d9488; }
.pal-gaming { background: linear-gradient(135deg, #e0e7ff, #eef2ff); } .pal-gaming svg { color: #4f46e5; }
.pal-energia-renovable { background: linear-gradient(135deg, #ecfccb, #f7fee7); } .pal-energia-renovable svg { color: #65a30d; }
.pal-juguetes { background: linear-gradient(135deg, #fef3c7, #fffbeb); } .pal-juguetes svg { color: #d97706; }
.pal-fotografia-drones { background: linear-gradient(135deg, #e2e8f0, #f8fafc); } .pal-fotografia-drones svg { color: #475569; }
.pal-movilidad-electrica { background: linear-gradient(135deg, #ffe4e6, #fff1f2); } .pal-movilidad-electrica svg { color: #e11d48; }
.pal-jardin-y-exterior { background: linear-gradient(135deg, #e7f5d0, #f8faf0); } .pal-jardin-y-exterior svg { color: #4d7c0f; }
.pal-salud-y-bienestar { background: linear-gradient(135deg, #fee2e2, #fef2f2); } .pal-salud-y-bienestar svg { color: #dc2626; }
.pal-aspiradores { background: linear-gradient(135deg, #e5e7eb, #f9fafb); } .pal-aspiradores svg { color: #4b5563; }

.cat-icon { color: #fff; }
.cat-icon.pal-tv-sonido { background: #dbeafe; color: #2563eb; }
.cat-icon.pal-telefonia-wearables { background: #ede9fe; color: #7c3aed; }
.cat-icon.pal-portatiles { background: #e0f2fe; color: #0284c7; }
.cat-icon.pal-frigorificos-congelacion { background: #dcfce7; color: #16a34a; }
.cat-icon.pal-lavado-secado { background: #cffafe; color: #0891b2; }
.cat-icon.pal-electrodomesticos-cocina { background: #ffedd5; color: #ea580c; }
.cat-icon.pal-pequeno-electrodomestico { background: #fce7f3; color: #db2777; }
.cat-icon.pal-climatizacion { background: #ccfbf1; color: #0d9488; }
.cat-icon.pal-gaming { background: #e0e7ff; color: #4f46e5; }
.cat-icon.pal-energia-renovable { background: #ecfccb; color: #65a30d; }
.cat-icon.pal-juguetes { background: #fef3c7; color: #d97706; }
.cat-icon.pal-fotografia-drones { background: #e2e8f0; color: #475569; }
.cat-icon.pal-movilidad-electrica { background: #ffe4e6; color: #e11d48; }
.cat-icon.pal-jardin-y-exterior { background: #e7f5d0; color: #4d7c0f; }
.cat-icon.pal-salud-y-bienestar { background: #fee2e2; color: #dc2626; }
.cat-icon.pal-aspiradores { background: #e5e7eb; color: #4b5563; }

/* ---------- Franja de marcas ---------- */
.brand-strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }
.brand-strip span { font-weight: 800; font-size: 17px; color: var(--color-text-faint); letter-spacing: -0.01em; }

/* ---------- Newsletter / CTA banda ---------- */
.newsletter { background: var(--color-primary); color: #fff; border-radius: var(--radius-lg); padding: 34px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.newsletter h3 { font-size: 20px; margin-bottom: 6px; }
.newsletter p { color: #cbd5e1; font-size: 13.5px; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input { padding: 11px 14px; border-radius: var(--radius-md); border: none; width: 260px; font-size: 14px; }
.newsletter-msg { font-size: 13px; color: #86efac; margin-top: 8px; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--color-primary); color: #cbd5e1; margin-top: 40px; }
.footer-top { padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 16px; letter-spacing: 0.01em; }
.footer-col ul li { margin-bottom: 10px; font-size: 13.5px; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 13.5px; margin-bottom: 8px; color: #94a3b8; }
.footer-logo { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 19px; margin-bottom: 14px; }
.footer-logo-img { height: 38px; width: auto; display: block; }
.footer-badges { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.footer-badge { display: flex; align-items: center; gap: 6px; font-size: 11.5px; background: rgba(255,255,255,0.06); padding: 6px 10px; border-radius: var(--radius-full); color: #e2e8f0; }

/* Columna 1 del footer: datos de contacto y sellos de confianza, cada uno con su icono, en columna */
.footer-contact { display: flex; flex-direction: column; gap: 11px; margin: 16px 0 0; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.4; color: #94a3b8; }
.footer-contact-item svg { flex-shrink: 0; margin-top: 2px; color: #4fd18c; }
.footer-contact-item a { color: #94a3b8; }
.footer-contact-item a:hover { color: #fff; }

.footer-trust { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-trust-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #e2e8f0; }
.footer-trust-item svg { flex-shrink: 0; color: #4fd18c; }
.payment-icons { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.payment-icons span { background: rgba(255,255,255,0.08); font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 5px; color: #e2e8f0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: #94a3b8; }
.footer-bottom-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom-links a:hover { color: #fff; }

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; max-width: 620px; margin: 0 auto;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 20px 22px; z-index: 200; display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { font-size: 13px; color: var(--color-text-muted); margin-bottom: 14px; }
.cookie-banner p a { color: var(--color-accent); font-weight: 600; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Tienda: filtros + listado ---------- */
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.filters { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: 168px; max-height: calc(100vh - 188px); overflow-y: auto; }
/* Cabecera/pie/backdrop y botón "Filtros" son exclusivos del tiroir móvil */
.filters-drawer-head, .filters-drawer-footer, .filters-backdrop, .filters-toggle { display: none; }
.filter-block { border-bottom: 1px solid var(--color-border); padding-bottom: 16px; margin-bottom: 16px; }
.filter-scroll { max-height: 220px; overflow-y: auto; padding-right: 4px; }
.filter-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-block h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-muted); margin-bottom: 12px; }
.filter-option { display: flex; align-items: center; gap: 9px; font-size: 13.5px; margin-bottom: 9px; cursor: pointer; }
.filter-option input { width: 15px; height: 15px; accent-color: var(--color-accent); }
.filter-option .count { margin-left: auto; color: var(--color-text-faint); font-size: 12px; }
.price-inputs { display: flex; align-items: center; gap: 8px; }
.price-inputs input { width: 100%; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 13px; }
.clear-filters { font-size: 12.5px; color: var(--color-accent); font-weight: 600; margin-top: 4px; }

.shop-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.shop-toolbar .results-count { font-size: 13.5px; color: var(--color-text-muted); }
.shop-toolbar select { padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 13.5px; background: #fff; }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.active-filter-chip { display: flex; align-items: center; gap: 6px; background: var(--color-accent-light); color: var(--color-accent-dark); font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: var(--radius-full); }
.active-filter-chip button { font-size: 13px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--color-text-faint); }
.empty-state h3 { color: var(--color-text); margin-bottom: 8px; }

.shop-loading { text-align: center; padding: 60px 20px; color: var(--color-text-muted); font-size: 14px; grid-column: 1 / -1; }

.shop-pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 32px 0 8px; flex-wrap: wrap; }
.shop-pager button { min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--color-text); cursor: pointer; }
.shop-pager button:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }
.shop-pager button.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.shop-pager button:disabled { opacity: 0.35; cursor: default; }
.shop-pager .pager-ellipsis { color: var(--color-text-faint); padding: 0 4px; }

/* ---------- Página de producto ---------- */
.product-detail { display: grid; grid-template-columns: 460px 1fr; gap: 44px; }
.product-gallery-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.product-gallery { position: relative; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-gallery svg { width: 44%; height: 44%; }
.product-gallery img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }

.gallery-thumbs { display: flex; gap: 10px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; min-width: 0; width: 100%; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  width: 68px; height: 68px; flex-shrink: 0; border-radius: var(--radius-sm); border: 2px solid var(--color-border);
  background: var(--color-surface); overflow: hidden; padding: 0; transition: border-color 0.15s ease;
}
.gallery-thumb:hover { border-color: var(--color-text-faint); }
.gallery-thumb.active { border-color: var(--color-accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.product-main h1 { font-size: 26px; margin-bottom: 6px; letter-spacing: -0.01em; }
.product-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.product-sku { font-size: 12px; color: var(--color-text-faint); padding-right: 12px; border-right: 1px solid var(--color-border); }
.product-ean { font-size: 12px; color: var(--color-text-faint); margin-bottom: 14px; }
.brand-link { display: inline-flex; align-items: center; }
.brand-logo { display: block; object-fit: contain; filter: grayscale(0.15); transition: filter 0.15s ease, opacity 0.15s ease; }
.brand-link:hover .brand-logo { filter: grayscale(0); }
.brand-link:hover .product-brand { color: var(--color-accent); }
.brand-logo-sm { height: 16px; max-width: 84px; }
.brand-logo-lg { height: 24px; max-width: 130px; }
.product-meta-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-size: 13px; color: var(--color-text-muted); flex-wrap: wrap; }
.product-price-block { display: flex; align-items: baseline; gap: 12px; padding: 18px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); margin: 16px 0; flex-wrap: wrap; row-gap: 8px; }
.product-price-block .price-current { font-size: 30px; }
.savings-tag { background: var(--color-success-light); color: var(--color-success); font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: var(--radius-sm); }
.product-highlights { margin: 18px 0; display: grid; gap: 8px; }
.product-highlights li { display: flex; gap: 9px; font-size: 13.5px; align-items: flex-start; }
.product-highlights svg { width: 17px; height: 17px; color: var(--color-success); flex-shrink: 0; margin-top: 2px; }

.qty-selector { display: flex; align-items: center; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; width: fit-content; }
.qty-selector button { width: 38px; height: 42px; font-size: 17px; font-weight: 600; }
.qty-selector button:hover { background: var(--color-bg); }
.qty-selector input { width: 44px; text-align: center; border: none; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); height: 42px; }
.purchase-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.purchase-row .btn { padding: 13px 26px; }

.trust-mini { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--color-text-muted); }
.trust-mini span { display: flex; align-items: center; gap: 6px; }
.trust-mini svg { width: 15px; height: 15px; color: var(--color-accent); }

.tabs-nav {
  display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin: 48px 0 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }
.tabs-nav button { padding: 12px 18px; font-size: 14px; font-weight: 600; color: var(--color-text-muted); border-bottom: 2px solid transparent; white-space: nowrap; flex-shrink: 0; }
.tabs-nav button.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.tab-panel { display: none; padding: 26px 0; font-size: 14px; color: var(--color-text); }
.tab-panel.active { display: block; }
.specs-table td { padding: 10px 14px; border-bottom: 1px solid var(--color-border); font-size: 13.5px; }
.specs-table td:first-child { color: var(--color-text-muted); width: 220px; }
.specs-table tr:nth-child(odd) { background: var(--color-bg); }

/* ---------- Carrito ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.cart-table-wrap { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.cart-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-muted); padding: 14px 18px; background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.cart-table td { padding: 16px 18px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }
.cart-product { display: flex; align-items: center; gap: 14px; }
.cart-product .cart-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.cart-product .cart-thumb svg { width: 60%; height: 60%; }
.cart-product .cart-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.cart-product-name { font-size: 13.5px; font-weight: 600; }
.cart-product-brand { font-size: 11.5px; color: var(--color-text-faint); }
.cart-remove { color: var(--color-danger); font-size: 12.5px; font-weight: 600; margin-top: 4px; display: inline-block; }
.cart-qty { display: flex; align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-sm); width: fit-content; }
.cart-qty button { width: 28px; height: 28px; }
.cart-qty input { width: 34px; text-align: center; border: none; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); height: 28px; font-size: 13px; }
.cart-subtotal { font-weight: 700; }

.order-summary { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 22px; }
.order-summary h3 { font-size: 16px; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 10px; color: var(--color-text-muted); }
.summary-row.total { font-size: 16px; font-weight: 800; color: var(--color-text); border-top: 1px solid var(--color-border); padding-top: 12px; margin-top: 4px; }
.summary-row .free-tag { color: var(--color-success); font-weight: 700; }
.promo-row { display: flex; gap: 8px; margin: 14px 0; }
.promo-row input { flex: 1; padding: 9px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 13px; }

.cart-empty { text-align: center; padding: 70px 20px; }
.cart-empty svg { width: 72px; height: 72px; color: var(--color-text-faint); margin: 0 auto 18px; }
.cart-empty h2 { margin-bottom: 8px; }
.cart-empty p { color: var(--color-text-muted); margin-bottom: 22px; }

/* ---------- Formularios (checkout / contacto) ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--color-text-muted); }
.field input, .field select, .field textarea {
  padding: 11px 13px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); font-size: 14px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--color-accent); }
.field textarea { resize: vertical; min-height: 110px; }
.form-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 26px; }
.form-card h2 { font-size: 18px; margin-bottom: 4px; }
.form-card > p.hint { font-size: 13px; color: var(--color-text-muted); margin-bottom: 20px; }

.auth-tabs { display: flex; border-bottom: 1px solid var(--color-border); }
.auth-tab { flex: 1; padding: 10px; font-size: 14px; font-weight: 600; color: var(--color-text-muted); border-bottom: 2px solid transparent; }
.auth-tab.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.auth-panel { margin-top: 20px; }

.payment-options { display: grid; gap: 10px; margin: 6px 0 20px; }
.payment-option { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); padding: 13px 16px; cursor: pointer; }
.payment-option input { accent-color: var(--color-accent); width: 16px; height: 16px; }
.payment-option.selected { border-color: var(--color-accent); background: var(--color-accent-light); }
.payment-option .po-title { font-size: 13.5px; font-weight: 700; }
.payment-option .po-desc { font-size: 12px; color: var(--color-text-muted); }

.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.checkout-note { background: var(--color-accent-light); border: 1px solid #a7d7bd; color: var(--color-accent-dark); font-size: 12.5px; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; }

.confirmation-box { text-align: center; padding: 60px 20px; max-width: 560px; margin: 0 auto; }
.confirmation-box .check-circle { width: 74px; height: 74px; border-radius: 50%; background: var(--color-success-light); color: var(--color-success); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.confirmation-box .check-circle svg { width: 38px; height: 38px; }
.confirmation-box h1 { font-size: 24px; margin-bottom: 10px; }
.confirmation-box p { color: var(--color-text-muted); margin-bottom: 6px; }
.order-number { display: inline-block; background: var(--color-bg); border: 1px dashed var(--color-border); padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 700; margin: 16px 0 26px; letter-spacing: 0.03em; }

/* ---------- Página de contacto ---------- */
.contact-layout { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.contact-info-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; }
.contact-info-item { display: flex; gap: 12px; margin-bottom: 18px; }
.contact-info-item:last-child { margin-bottom: 0; }
.contact-info-item .ci-icon { width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--color-accent-light); color: var(--color-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info-item strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.contact-info-item span, .contact-info-item a { font-size: 13px; color: var(--color-text-muted); }
.form-success { background: var(--color-success-light); border: 1px solid #bbf7d0; color: #15803d; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 13.5px; display: none; margin-bottom: 16px; }
.form-success.show { display: block; }

/* ---------- Página de seguimiento de pedido ---------- */
.tracking-layout { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.tracking-result-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 26px; }
.tracking-summary { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.tracking-summary .label { display: block; font-size: 11.5px; color: var(--color-text-muted); margin-bottom: 3px; }
.tracking-summary strong { font-size: 14.5px; }
.tracking-timeline { display: flex; flex-direction: column; }
.tracking-step { display: flex; gap: 14px; position: relative; padding-bottom: 24px; }
.tracking-step:last-child { padding-bottom: 0; }
.tracking-step::before {
  content: ""; position: absolute; left: 8px; top: 20px; bottom: -4px; width: 2px; background: var(--color-border);
}
.tracking-step:last-child::before { display: none; }
.tracking-step.done::before { background: var(--color-success); }
.tracking-dot {
  width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--color-border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; z-index: 1;
}
.tracking-step.done .tracking-dot { background: var(--color-success); border-color: var(--color-success); }
.tracking-step.current .tracking-dot { background: var(--color-accent); border-color: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-light); }
.tracking-step > div { padding-top: 1px; }
.tracking-step strong { display: block; font-size: 14px; margin-bottom: 2px; color: var(--color-text-faint); }
.tracking-step.done strong, .tracking-step.current strong { color: var(--color-text); }
.tracking-step span { display: block; font-size: 12.5px; color: var(--color-text-muted); }
.tracking-step-date { font-weight: 600; margin-top: 3px; color: var(--color-text-faint) !important; }
.tracking-step.done .tracking-step-date { color: var(--color-success) !important; }
.tracking-step.current .tracking-step-date { color: var(--color-accent) !important; }

/* ---------- Página "Sobre nosotros" (hero) ---------- */
.page-hero { background: var(--color-primary); color: #fff; padding: 40px 0; text-align: center; }
.page-hero h1 { font-size: 30px; margin-bottom: 8px; color: #fff; }
.page-hero p { color: #cbd5e1; }

/* ---------- Página de marca ---------- */
.brand-page-hero {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 32px; text-align: center; margin: 8px 0 28px;
}
.brand-page-hero h1 { font-size: 24px; }
.brand-page-logo { height: 44px; max-width: 260px; object-fit: contain; margin: 0 auto; }
.brand-page-count { font-size: 13.5px; color: var(--color-text-muted); margin-top: 12px; }

/* ---------- Páginas legales ---------- */
.legal-page { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 40px 48px; margin: 32px auto; max-width: 880px; }
.legal-page h1 { font-size: 26px; margin-bottom: 18px; }
.legal-page h2 { font-size: 18px; margin: 30px 0 12px; padding-top: 6px; }
.legal-page h3 { font-size: 15px; margin: 20px 0 8px; }
.legal-page h4 { font-size: 13.5px; margin: 16px 0 6px; }
.legal-page p { margin-bottom: 12px; color: var(--color-text); }
.legal-page ul, .legal-page ol { margin: 0 0 12px 22px; list-style: disc; }
.legal-page ol { list-style: decimal; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--color-accent); }
.legal-page a:hover { text-decoration: underline; }
.legal-page hr { border: none; border-top: 1px solid var(--color-border); margin: 28px 0; }
.legal-page table { margin: 14px 0; font-size: 13px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
.legal-page th, .legal-page td { padding: 10px 12px; border: 1px solid var(--color-border); text-align: left; }
.legal-page th { background: var(--color-bg); font-weight: 700; }
.legal-page em { color: var(--color-text-muted); font-size: 13px; }
.legal-toc { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px 20px; margin-bottom: 24px; font-size: 13.5px; }
.legal-toc strong { display: block; margin-bottom: 8px; }
.legal-toc a { color: var(--color-accent); }

/* ---------- Opiniones de producto ---------- */
.reviews-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.review-empty { color: var(--color-text-muted); font-size: 14px; margin-bottom: 28px; }
.review-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px 18px; background: var(--color-surface); }
.review-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.review-card-head strong { font-size: 13.5px; }
.review-date { font-size: 12px; color: var(--color-text-faint); margin-left: auto; }
.review-card p { font-size: 13.5px; color: var(--color-text); line-height: 1.6; }

.review-form-wrap { max-width: 480px; }
.review-form { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px; background: var(--color-bg); }
.review-form h4 { font-size: 14px; margin-bottom: 12px; }
.review-form textarea {
  width: 100%; min-height: 90px; padding: 11px 13px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; resize: vertical; margin-bottom: 12px;
}
.review-form textarea:focus { outline: none; border-color: var(--color-accent); }
.review-form-note { font-size: 12px; color: var(--color-text-muted); margin-top: 10px; }

.star-input { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; }
.star-input button { font-size: 26px; line-height: 1; color: var(--color-border); transition: color 0.1s ease; }
.star-input button.filled { color: var(--color-star); }
.star-input button:hover { color: var(--color-star); }

.review-login-prompt {
  border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px; background: var(--color-bg);
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.review-login-prompt p { font-size: 13.5px; color: var(--color-text-muted); }

.review-submitted {
  display: flex; align-items: center; gap: 10px; border: 1px solid #bbf7d0; background: var(--color-success-light);
  color: #15803d; border-radius: var(--radius-md); padding: 16px 18px; font-size: 13.5px; max-width: 480px;
}
.review-submitted svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Sobre nosotros: extras ---------- */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.value-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px; }
.value-card strong { display: block; margin-bottom: 6px; font-size: 13.5px; }
.value-card span { font-size: 13px; color: var(--color-text-muted); }

/* ---------- Etiqueta energética de la UE — réplica del pictograma real de electrosye.es ---------- */

/* Pentágono: franja de color con la letra + franja blanca. En tamaño grande la franja blanca
   lleva el texto "A↑G"; en tamaño compacto se deja vacía (ese texto es ilegible a 36x24px). */
.energy-pentagon { position: relative; display: inline-block; width: 40px; height: 27px; flex-shrink: 0; line-height: 0; }
.energy-pentagon .energy-pentagon-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.energy-pentagon-letter {
  position: absolute; top: 0; left: 0; bottom: 0; width: 63.3333%; display: flex; align-items: center; justify-content: center;
  padding-left: 8%; color: #fff; font-weight: 800; font-size: 13px; line-height: 1;
}
.energy-pentagon-scale {
  position: absolute; top: 0; right: 0; bottom: 0; width: 36.6667%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #14161a; font-weight: 800; line-height: 1; font-size: 8px;
}
.energy-pentagon-scale span:nth-child(2) { font-size: 9px; margin: 1px 0; }

.energy-pentagon-sm .energy-pentagon-letter { font-size: 12px; }

.energy-pentagon-lg { width: 66px; height: 44px; }
.energy-pentagon-lg .energy-pentagon-letter { font-size: 20px; }
.energy-pentagon-lg .energy-pentagon-scale { font-size: 8px; }
.energy-pentagon-lg .energy-pentagon-scale span:nth-child(2) { font-size: 9px; }

.thumb-energy-badge { position: absolute; bottom: 10px; left: 10px; z-index: 1; }

/* Filtro de tienda: casilla con muestra de color + letra */
.energy-filter-swatch {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 4px; color: #fff; font-size: 10.5px; font-weight: 800; margin-right: 4px; flex-shrink: 0;
}

/* Ficha técnica (página de producto): pentágono grande + texto, como el resumen de electrosye.es */
.energy-summary-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg);
  padding: 14px 18px; margin: 16px 0;
}
.energy-summary-trigger { display: flex; align-items: center; gap: 12px; background: none; border-radius: var(--radius-sm); }
.energy-summary-trigger:hover { opacity: 0.85; }
.energy-summary-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.energy-summary-text strong { font-size: 13.5px; }
.energy-summary-text span { font-size: 12px; color: var(--color-text-muted); }
.energy-summary-caption { font-size: 12px; color: var(--color-text-muted); }

/* Etiqueta completa (pestaña "Eficiencia energética"): barras en escalón A→G, réplica del modal real */
.energy-full-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px; max-width: 440px; background: #fff; }
.energy-scale-col { display: flex; flex-direction: column; gap: 6px; }
.energy-scale-row { display: flex; align-items: center; gap: 10px; }
.energy-scale-bar {
  height: 36px; display: flex; align-items: center; padding-left: 16px; color: #fff; font-weight: 800; font-size: 14px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); transition: all 0.15s ease;
}
.energy-scale-bar.active { height: 44px; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2); outline: 2.5px solid #14161a; outline-offset: 1px; }
.energy-scale-tag { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--color-text); white-space: nowrap; }
.energy-scale-tag svg { width: 16px; height: 16px; }
.energy-full-caption { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); margin-top: 16px; }
.energy-full-note { font-size: 12.5px; color: var(--color-text-muted); margin-top: 10px; line-height: 1.6; }

/* ---------- Toast de notificación ---------- */
.tm-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--color-primary); color: #fff; padding: 13px 22px; border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease; z-index: 300;
}
.tm-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- Utilidades responsive ---------- */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .perks-strip .container { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
  .product-gallery { max-width: 420px; }
  .cart-layout, .checkout-layout, .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .header-main .container { flex-wrap: wrap; gap: 10px; }
  .nav-toggle { order: 1; display: flex; padding: 4px; }
  .logo { order: 2; font-size: 17px; gap: 6px; }
  .logo .logo-mark { width: 26px; height: 26px; }
  .logo-img { height: 32px; }
  .header-actions { order: 3; margin-left: auto; gap: 2px; }
  .header-action { padding: 4px 8px; }
  .header-action .icon-label { display: none; }
  .header-search { order: 4; max-width: 100%; flex-basis: 100%; }
  /* Menú móvil: tiroir lateral (sidebar) con fondo oscuro detrás, en vez de un panel que empuja el contenido */
  /* El header es sticky y crea su propio contexto de apilamiento: si no se eleva por encima del
     nav-backdrop (z-index 205), el fondo oscuro pinta ENCIMA del tiroir aunque este tenga z-index 210,
     y los toques sobre los enlaces del menú terminan cerrando el tiroir en vez de navegar. */
  .site-header { z-index: 220; }

  .main-nav {
    position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 84vw;
    background: #fff; z-index: 210; transform: translateX(-100%); transition: transform 0.28s ease;
    box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column;
  }
  .main-nav.open { transform: translateX(0); }
  /* Solo el bloque de enlaces (container > nav-list) hace scroll; la cabecera, la llamada
     y el pie de cuenta quedan siempre fijos arriba/abajo del tiroir. */
  .main-nav .container {
    max-width: none; padding: 0; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    flex-direction: column; align-items: stretch; flex-wrap: nowrap;
  }

  .nav-drawer-head {
    display: flex; align-items: center; justify-content: space-between; padding: 16px 18px;
    border-bottom: 1px solid var(--color-border); flex-shrink: 0;
  }
  .nav-drawer-head .nav-drawer-logo { display: flex; align-items: center; }
  .nav-drawer-head .nav-drawer-logo img { height: 28px; width: auto; display: block; }
  .nav-drawer-close { display: flex; align-items: center; justify-content: center; padding: 6px; color: var(--color-text-muted); border-radius: var(--radius-sm); }
  .nav-drawer-close:hover { background: var(--color-bg); color: var(--color-text); }

  /* Franja de llamada directa, encima del menú: primer contacto visible para quien prefiere llamar */
  .nav-drawer-call {
    display: flex; align-items: center; gap: 12px; margin: 14px 16px; padding: 12px 14px;
    background: var(--color-accent); color: #fff; border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(26, 122, 76, 0.28); flex-shrink: 0; transition: background 0.15s ease;
  }
  .nav-drawer-call:hover, .nav-drawer-call:active { background: var(--color-accent-dark); }
  .nav-drawer-call-icon {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.18);
  }
  .nav-drawer-call-text { display: flex; flex-direction: column; line-height: 1.3; }
  .nav-drawer-call-text strong { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.9; }
  .nav-drawer-call-text span { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; }

  /* Pie del tiroir: acceso a cuenta, siempre fijo al fondo (fuera del área con scroll) */
  .nav-drawer-footer { display: block; flex-shrink: 0; padding: 12px 16px 16px; border-top: 1px solid var(--color-border); }
  .nav-drawer-account {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border: 1.5px solid var(--color-border); border-radius: var(--radius-md); transition: border-color 0.15s ease, background 0.15s ease;
  }
  .nav-drawer-account:hover { border-color: var(--color-accent); background: var(--color-accent-light); }
  .nav-drawer-account-icon {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 50%; background: var(--color-accent-light); color: var(--color-accent);
  }
  .nav-drawer-account-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
  .nav-drawer-account-text strong { font-size: 13.5px; font-weight: 700; color: var(--color-text); }
  .nav-drawer-account-text span { font-size: 12px; color: var(--color-text-muted); }
  .nav-drawer-account-arrow { margin-left: auto; color: var(--color-text-faint); flex-shrink: 0; }

  .nav-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 205;
    opacity: 0; transition: opacity 0.28s ease;
  }
  .nav-backdrop.show { display: block; opacity: 1; }
  body.nav-open-lock { overflow: hidden; }

  .main-nav .nav-list { display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: 6px 8px 24px; }
  .nav-list a {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 12px; color: var(--color-text); font-size: 14.5px; font-weight: 600;
    border-bottom: none; border-radius: var(--radius-sm); box-sizing: border-box;
  }
  .nav-list a:hover, .nav-list a.active { color: var(--color-accent); background: var(--color-accent-light); border-bottom: none; }
  .nav-list a.nav-offers { color: var(--color-orange); }
  /* El teléfono ya vive en la franja "Llámanos ahora" del tiroir; no repetirlo dentro de la lista */
  .nav-phone-item { display: none; }
  .nav-list-icon { display: inline-flex; color: var(--color-text-faint); }
  .nav-list a:hover .nav-list-icon, .nav-list a.active .nav-list-icon { color: var(--color-accent); }
  .nav-list a.nav-offers .nav-list-icon { color: var(--color-orange); }

  .nav-dropdown { display: block; }
  .nav-dropdown-toggle {
    width: 100%; justify-content: flex-start; gap: 12px; margin: 0; padding: 13px 12px;
    background: none; color: var(--color-text); font-size: 14.5px; font-weight: 600; border-radius: var(--radius-sm);
  }
  .nav-dropdown-toggle .nav-caret { margin-left: auto; }
  .nav-dropdown-toggle:hover { background: var(--color-accent-light); }
  .nav-dropdown.open .nav-dropdown-toggle { background: var(--color-accent-light); color: var(--color-accent-dark); }
  .nav-dropdown-menu {
    display: none; position: static; width: 100%; max-width: none; margin-top: 0; max-height: none; overflow-y: visible;
    background: transparent; border: none; border-radius: 0; box-shadow: none; padding: 4px 12px 10px;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a.nav-dropdown-all { border-top-color: var(--color-border); color: var(--color-accent); }

  /* Categorías del tiroir en cuadrícula de iconos: más rápido de escanear que la lista con subcategorías.
     2 columnas (no 3): con nombres largos en español ("Frigoríficos y congelación") 3 columnas
     dejaba muy poco ancho por celda y el texto se veía cortado contra el borde del tiroir. */
  .cat-menu-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; column-count: initial; }
  .cat-menu-group { break-inside: auto; margin-bottom: 0; }
  .cat-menu-main {
    flex-direction: column; gap: 5px; padding: 8px 4px; text-align: center; border-radius: var(--radius-md);
  }
  .cat-menu-main strong { white-space: normal; font-size: 11px; font-weight: 600; line-height: 1.25; }
  .cat-menu-photo { width: 40px; height: 40px; }
  .cat-menu-subs { display: none; }
  .shop-layout { grid-template-columns: 1fr; }
  /* Filtros en tiroir lateral: mismo patrón que el menú (posición fija + fondo oscuro + zona con scroll).
     z-index por encima del header (220): el header es sticky y si no se supera, se queda pintado
     encima de la parte superior del tiroir en vez de quedar debajo del fondo oscuro. */
  .filters {
    position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 84vw;
    background: #fff; z-index: 230; transform: translateX(-100%); transition: transform 0.28s ease;
    display: flex; flex-direction: column; border: none; border-radius: 0; box-shadow: var(--shadow-lg);
    padding: 0; margin: 0; max-height: none;
  }
  .filters.open { transform: translateX(0); }

  .filters-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 225;
    opacity: 0; transition: opacity 0.28s ease;
  }
  .filters-backdrop.show { display: block; opacity: 1; }
  body.filters-open-lock { overflow: hidden; }

  .filters-drawer-head {
    display: flex; align-items: center; justify-content: space-between; padding: 16px 18px;
    border-bottom: 1px solid var(--color-border); flex-shrink: 0;
  }
  .filters-drawer-head strong { font-size: 16px; }
  .filters-close { display: flex; align-items: center; justify-content: center; padding: 6px; color: var(--color-text-muted); border-radius: var(--radius-sm); }
  .filters-close:hover { background: var(--color-bg); color: var(--color-text); }

  .filters-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 18px; }

  .filters-drawer-footer { display: block; flex-shrink: 0; padding: 12px 16px 16px; border-top: 1px solid var(--color-border); }

  .filters-toggle {
    display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md); font-size: 13.5px; font-weight: 600; color: var(--color-text); background: #fff;
  }
  .filters-toggle:hover, .filters-toggle:active { border-color: var(--color-accent); color: var(--color-accent); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .legal-page { padding: 28px 22px; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  /* Cuadro 1:1 exacto: las fotos móviles son 900×900, así se muestran completas y sin recortar */
  .hero-slides { aspect-ratio: 1 / 1; min-height: 0; }
  /* El producto ocupa la mitad inferior de las 3 fotos; el texto se ancla arriba para no pisarlo nunca */
  .hero-slide { align-items: flex-start; }
  .hero-slide .container { flex-direction: column; text-align: center; justify-content: flex-start; width: 100%; }
  /* Velo de arriba hacia abajo: cubre solo la franja donde va el texto (~45%) y deja el producto,
     en la mitad inferior de la foto, completamente despejado y sin ningún velo encima */
  .hero-slide::before {
    background: linear-gradient(180deg, rgba(15,22,18,0.82) 0%, rgba(15,22,18,0.66) 32%, rgba(15,22,18,0) 50%);
  }
  .hero-copy { padding: 18px 14px 0; max-width: none; }
  .hero-eyebrow { margin-bottom: 8px; }
  .hero-copy h1 { font-size: 18px; line-height: 1.2; margin-bottom: 10px; }
  /* El párrafo se omite en móvil: no cabe sin invadir la zona del producto y el titular + botón ya venden la oferta */
  .hero-copy p { display: none; }
  .hero-copy .btn { padding: 9px 18px; font-size: 13.5px; }
  .hero-1 { background-image: url('../images/hero-1-mobile.png'); }
  .hero-2 { background-image: url('../images/hero-2-mobile.png'); }
  .hero-3 { background-image: url('../images/hero-3-mobile.png'); }
  .form-grid { grid-template-columns: 1fr; }

  /* Carrusel de categorías: en tablet/móvil se desliza al tacto, sin flechas */
  .cat-carousel-arrow { display: none; }
  .cat-carousel-inner { padding: 10px 0; }
  .cat-carousel { scroll-padding-left: 20px; }
  .cat-carousel-item { width: 72px; }
  .cat-carousel-icon { width: 48px; height: 48px; }
  .cat-carousel-icon svg { width: 22px; height: 22px; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .perks-strip .container { grid-template-columns: 1fr; }
  .newsletter { flex-direction: column; align-items: flex-start; }
  .newsletter-form { width: 100%; }
  .newsletter-form input { width: 100%; flex: 1; }
  .hero-copy h1 { font-size: 28px; }
  .values-grid { grid-template-columns: 1fr; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 16px; }

  .cat-carousel-item { width: 64px; }
  .cat-carousel-icon { width: 44px; height: 44px; }
  .cat-carousel-icon svg { width: 20px; height: 20px; }
  .cat-carousel-item span:last-child { font-size: 10.5px; }
}

