/* ============================================
   TECHSHOP PERÚ - Estilos Principales UI/UX Premium v2.0
   Diseño de alto impacto visual, moderno y responsive
   Con Dark Mode, Countdown, Animaciones y más
   ============================================ */

/* Nota: las fuentes (Outfit e Inter) se cargan desde includes/header.php
   (preconnect + Google Fonts). No importar fuentes adicionales aquí para
   evitar font-faces muertos que aumentan el peso de la página. */

/* ──────────────────────────────────────────────
   VARIABLES CSS
─────────────────────────────────────────────── */
:root {
  --ts-font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --ts-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ts-primary: #2563eb;
  --ts-primary-dark: #1d4ed8;
  --ts-primary-light: #60a5fa;
  --ts-secondary: #0284c7;
  --ts-accent: #6366f1;
  --ts-gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  --ts-gradient-primary: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  --ts-gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --ts-danger: #ef4444;
  --ts-success: #10b981;
  --ts-warning: #f59e0b;
  --ts-dark: #0f172a;
  --ts-gray-100: #f8fafc;
  --ts-gray-200: #e2e8f0;
  --ts-gray-300: #cbd5e1;
  --ts-gray-400: #94a3b8;
  --ts-gray-500: #64748b;
  --ts-gray-600: #475569;
  --ts-gray-700: #334155;
  --ts-gray-800: #1e293b;
  --ts-white: #ffffff;
  --ts-border-radius: 0.85rem;
  --ts-shadow-sm: 0 1px 3px rgba(15,23,42,0.06);
  --ts-shadow: 0 4px 14px -2px rgba(15,23,42,0.08);
  --ts-shadow-lg: 0 16px 32px -4px rgba(37,99,235,0.14);
  --ts-transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  /* Superficies (sobreescritas en dark mode) */
  --surface-bg: #f8fafc;
  --surface-card: #ffffff;
  --surface-navbar: rgba(255,255,255,0.92);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
}

body {
  font-family: var(--ts-font-body) !important;
  color: var(--text-primary);
  background-color: var(--surface-bg);
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .section-title {
  font-family: var(--ts-font-heading) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Escala tipográfica fluida y consistente */
h1 { font-size: clamp(1.9rem, 3.2vw + 1rem, 2.9rem); line-height: 1.12; }
h2 { font-size: clamp(1.55rem, 2vw + 0.9rem, 2.2rem); line-height: 1.18; }
h3 { font-size: clamp(1.25rem, 1.4vw + 0.8rem, 1.6rem); line-height: 1.25; }
h4 { font-size: clamp(1.1rem, 1vw + 0.7rem, 1.3rem); line-height: 1.3; }
h5 { font-size: 1.05rem; line-height: 1.35; }
h6 { font-size: 0.95rem; line-height: 1.4; }

/* Accesibilidad: foco visible consistente en todos los temas */
:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selección de texto a juego con la marca */
::selection {
  background: rgba(37, 99, 235, 0.2);
  color: inherit;
}

/* Glassmorphism & Neon Glow Utilities */
.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

body.dark-theme .glass-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glow-hover {
  transition: var(--ts-transition);
}
.glow-hover:hover {
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.35);
  transform: translateY(-3px);
}

/* ──────────────────────────────────────────────
   DARK MODE VARIABLES
─────────────────────────────────────────────── */
body.dark-theme {
  --surface-bg: #0b1120;
  --surface-card: #1e293b;
  --surface-navbar: rgba(15,23,42,0.97);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  /* El azul primario es demasiado oscuro sobre las cards en dark; usar el claro */
  --ts-primary: #60a5fa;
  --ts-primary-dark: #93c5fd;
}
/* Los precios usan el azul de marca: garantizar contraste AA en dark.
   Incluye .text-primary (Bootstrap) del detalle, que de otro modo quedaría
   demasiado oscuro sobre las cards oscuras. */
body.dark-theme .price-current,
body.dark-theme .product-detail-price .price-current,
body.dark-theme .product-detail-price .text-primary { color: #93c5fd !important; }

/* ──────────────────────────────────────────────
   RESET & BASE
─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: var(--ts-font-body), 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--surface-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.main-content { min-height: 65vh; }

/* Asegura que el menú de la navbar siempre se muestre en escritorio
   (independiente de la clase .collapse de Bootstrap). */
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    visibility: visible !important;
  }
}

a { color: var(--ts-primary); text-decoration: none; transition: var(--ts-transition); }
a:hover { color: var(--ts-primary-dark); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-bg); }
::-webkit-scrollbar-thumb { background: var(--ts-gray-400); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ts-primary); }

/* ──────────────────────────────────────────────
   TICKER DE OFERTAS (top bar)
─────────────────────────────────────────────── */
.offers-ticker {
  background: linear-gradient(90deg, #1d4ed8, #7c3aed, #dc2626, #1d4ed8);
  background-size: 300% 100%;
  animation: tickerGradient 8s ease infinite;
  padding: 6px 0;
  overflow: hidden;
}
@keyframes tickerGradient {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.ticker-track {
  display: flex;
  gap: 3rem;
  animation: ticker 30s linear infinite;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item { white-space: nowrap; font-size: 0.82rem; font-weight: 600; color: #fff; }

/* ──────────────────────────────────────────────
   TOP BAR
─────────────────────────────────────────────── */
.top-bar {
  background: var(--ts-dark) !important;
  font-size: 0.825rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.top-bar a:hover { color: var(--ts-primary-light) !important; }

/* ──────────────────────────────────────────────
   NAVBAR
─────────────────────────────────────────────── */
.main-navbar {
  border-bottom: 1px solid var(--border-color);
  background: var(--surface-navbar) !important;
  backdrop-filter: blur(12px);
  transition: background 0.3s ease;
}
.brand-icon {
  font-size: 1.6rem; color: var(--ts-white);
  background: var(--ts-gradient-primary);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.6rem;
  box-shadow: 0 4px 10px rgba(37,99,235,0.3);
}
.brand-text { display: flex; align-items: baseline; gap: 0.35rem; line-height: 1; }
.brand-name { font-weight: 800; font-size: 1.25rem; color: var(--text-primary); letter-spacing: -0.5px; }
.brand-country { font-size: 0.72rem; font-weight: 800; color: var(--ts-danger); text-transform: uppercase; letter-spacing: 0.12em; }
.nav-link { font-weight: 600; color: var(--text-secondary) !important; padding: 0.5rem 0.9rem !important; border-radius: 0.5rem; transition: var(--ts-transition); }
.nav-link:hover, .nav-link.active { color: var(--ts-primary) !important; background: rgba(37,99,235,0.06); }

/* Mega menú */
.dropdown-mega .mega-menu { width: 600px; border: 0; border-radius: 1rem; box-shadow: var(--ts-shadow-lg); background: var(--surface-card); }
.mega-item { color: var(--text-secondary); transition: var(--ts-transition); font-weight: 500; }
.mega-item:hover { background: rgba(37,99,235,0.08); color: var(--ts-primary); transform: translateX(4px); }

/* Buscador */
.search-group .form-control { border-radius: 2rem 0 0 2rem; border-color: var(--border-color); padding-left: 1.2rem; font-size: 0.9rem; background: var(--surface-card); color: var(--text-primary); }
.search-group .form-control:focus { border-color: var(--ts-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.search-group .btn { border-radius: 0 2rem 2rem 0; padding: 0 1.2rem; }

/* Toggle dark mode */
#darkModeToggle {
  width: 42px; height: 24px; border-radius: 12px; border: none; cursor: pointer;
  background: var(--ts-gray-300); position: relative; transition: background 0.3s;
  flex-shrink: 0;
}
#darkModeToggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: white;
  transition: transform 0.3s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
body.dark-theme #darkModeToggle { background: var(--ts-primary); }
body.dark-theme #darkModeToggle::after { transform: translateX(18px); }

/* ──────────────────────────────────────────────
   HERO BANNER ANIMADO
─────────────────────────────────────────────── */
.hero-section { padding: 1rem 0; }
.hero-slide {
  background: var(--ts-gradient-hero);
  padding: 3.5rem 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 20px 30px -10px rgba(15,23,42,0.25);
  position: relative;
  overflow: hidden;
}
.hero-slide::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
  pointer-events: none; animation: heroPulse 6s ease-in-out infinite;
}
.hero-slide::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none; animation: heroPulse 8s ease-in-out infinite reverse;
}
@keyframes heroPulse {
  0%,100% { transform: scale(1) translate(0,0); opacity: 0.8; }
  50% { transform: scale(1.15) translate(20px,-20px); opacity: 1; }
}
.hero-title {
  font-weight: 800; font-size: clamp(2rem, 4vw + 0.8rem, 3rem); line-height: 1.12;
  background: linear-gradient(to right, #ffffff, #bfdbfe);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInUp 0.6s ease both;
}
.hero-subtitle { color: var(--ts-primary-light); font-weight: 600; animation: slideInUp 0.7s ease both; }
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-btn {
  border-radius: 2rem; padding: 0.75rem 2rem; font-weight: 700;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15); transition: var(--ts-transition);
  animation: slideInUp 0.8s ease both;
  position: relative; overflow: hidden;
}
.hero-btn::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg); transition: left 0.6s ease;
}
.hero-btn:hover::after { left: 120%; }
.hero-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 30px rgba(0,0,0,0.28); }
.hero-btn:active { transform: translateY(-1px) scale(0.98); }

/* ──────────────────────────────────────────────
   COUNTDOWN TIMER (en ofertas)
─────────────────────────────────────────────── */
.countdown-wrapper {
  display: inline-flex; gap: 6px; align-items: center;
  background: rgba(0,0,0,0.6); border-radius: 8px; padding: 4px 10px;
}
.countdown-unit {
  text-align: center; min-width: 34px;
}
.countdown-num {
  font-size: 1.2rem; font-weight: 800; color: #fff; line-height: 1;
  display: block;
}
.countdown-label { font-size: 0.55rem; color: rgba(255,255,255,0.6); text-transform: uppercase; }
.countdown-sep { color: rgba(255,255,255,0.5); font-size: 1.1rem; font-weight: 700; margin-top: -4px; }

/* Oferta section con gradiente */
.ofertas-section-bg {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border-radius: 1.25rem; padding: 2rem; margin-bottom: 2rem;
}

/* ──────────────────────────────────────────────
   PRODUCT CARDS
─────────────────────────────────────────────── */
.product-card {
  background: var(--surface-card);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  transition: var(--ts-transition);
  height: 100%; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.product-card {
  border-radius: 1.1rem;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 44px -12px rgba(37,99,235,0.22), 0 8px 16px -6px rgba(15,23,42,0.12);
  border-color: var(--ts-primary-light);
}
.product-card .card-img-wrapper {
  position: relative; padding: 1.5rem;
  background: var(--ts-gray-100);
  display: flex; align-items: center; justify-content: center;
  height: 210px; overflow: hidden;
  transition: background 0.3s ease;
}
body.dark-theme .product-card .card-img-wrapper { background: #0f172a; }
.product-card .card-img-wrapper img {
  max-height: 170px; width: auto; max-width: 100%;
  object-fit: contain; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.product-card:hover .card-img-wrapper img { transform: scale(1.06); }
.product-card .badge-discount {
  box-shadow: 0 4px 10px rgba(239,68,68,0.35);
}
.product-card .btn-fav:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.product-card .badge-discount {
  position: absolute; top: 12px; left: 12px;
  background: var(--ts-danger); color: var(--ts-white);
  font-weight: 700; font-size: 0.75rem;
  padding: 0.3rem 0.6rem; border-radius: 2rem; z-index: 2;
  box-shadow: 0 4px 8px rgba(239,68,68,0.3);
}
.badge-nuevo {
  position: absolute; top: 12px; left: 12px;
  background: var(--ts-success); color: white;
  font-weight: 700; font-size: 0.7rem;
  padding: 0.25rem 0.5rem; border-radius: 2rem; z-index: 2;
}
.product-card .btn-fav {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-card); border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--ts-gray-400); box-shadow: var(--ts-shadow);
  transition: var(--ts-transition); z-index: 2;
}
.product-card .btn-fav:hover, .product-card .btn-fav.active { color: var(--ts-danger); transform: scale(1.1); }

/* ====== BADGES INTELIGENTES AUTOMÁTICOS (Mejora 16) ====== */
.badge-smart {
  position: absolute; bottom: 12px; left: 12px; z-index: 3;
  font-size: 0.68rem; font-weight: 700; padding: 0.25rem 0.6rem;
  border-radius: 2rem; letter-spacing: 0.3px; box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.badge-danger { background: #ef4444; color: #fff; }
.badge-gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.badge-fire { background: linear-gradient(135deg, #f97316, #ef4444); color: #fff; }

/* ====== BOTÓN QUICK VIEW (Mejora 7) ====== */
/* ── Tarjeta de producto estilo retail tech (magitech / pcfactory) ── */
.product-brand {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ts-primary);
}
.product-sku {
  font-size: 0.62rem; color: var(--text-secondary);
  font-family: 'Inter', monospace; letter-spacing: 0.03em;
}
.product-card .product-title a {
  font-size: 0.95rem; line-height: 1.3; font-weight: 600;
  color: var(--text-primary); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: var(--ts-transition);
}
.product-card:hover .product-title a { color: var(--ts-primary); }

/* Chips de especificaciones técnicas */
.product-specs { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.spec-chip {
  font-size: 0.65rem; font-weight: 600; color: var(--text-secondary);
  background: var(--ts-gray-100); border: 1px solid var(--border-color);
  border-radius: 0.45rem; padding: 0.15rem 0.45rem;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  transition: var(--ts-transition);
}
.product-card:hover .spec-chip { border-color: rgba(37,99,235,0.3); color: var(--text-primary); }

/* Precio con jerarquía retail */
.product-price-row { display: flex; align-items: center; }
.product-price-row .price-current {
  font-size: 1.22rem; font-weight: 800; color: var(--ts-primary);
  letter-spacing: -0.01em;
}
.product-price-row .price-original {
  font-size: 0.82rem; color: var(--text-secondary); text-decoration: line-through;
}

/* Alinear las acciones de la tarjeta al fondo (retail uniforme) */
.product-card .card-body .product-price-row { margin-top: auto; }
.product-card .card-body .add-to-cart-btn,
.product-card .card-body > .d-flex { margin-top: auto; }

/* Stock */
.stock-ok { color: var(--ts-success); font-weight: 600; }
.stock-out { color: var(--ts-danger); font-weight: 600; }

/* Overrides dark mode */
body.dark-theme .spec-chip { background: #0f172a; border-color: var(--border-color); }
body.dark-theme .product-brand { color: var(--ts-primary-light); }
body.dark-theme .product-card .product-title a { color: #e2e8f0; }
body.dark-theme .product-card:hover .product-title a { color: var(--ts-primary-light); }

.product-card .btn-quick-view {
  position: absolute; bottom: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(37,99,235,0.9); border: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,0.35);
  transition: var(--ts-transition); z-index: 2;
  opacity: 0; transform: scale(0.8);
}
.product-card:hover .btn-quick-view { opacity: 1; transform: scale(1); }
.product-card .btn-quick-view:hover { background: var(--color-primary, #1d4ed8); transform: scale(1.12); }

/* ====== BANNER GLOBAL DE ANUNCIOS (Mejora 19) ====== */
.global-announcement-bar {
  background: linear-gradient(90deg, #7c3aed, #2563eb);
  color: #fff; text-align: center; padding: 0.55rem 1rem;
  font-size: 0.88rem; font-weight: 600; letter-spacing: 0.3px;
  position: relative; z-index: 1040;
}
.global-announcement-bar a { color: #fbbf24; text-decoration: underline; }
.global-announcement-bar .btn-close-bar {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.7);
  cursor: pointer; font-size: 1rem; padding: 0;
}
.global-announcement-bar .btn-close-bar:hover { color: #fff; }

.product-card .card-body { padding: 1.25rem; display: flex; flex-direction: column; flex-grow: 1; background: var(--surface-card); }
.product-card .product-title {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.4; margin-bottom: 0.5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.25s ease;
}
.product-card:hover .product-title { color: var(--ts-primary); }
.product-card .price-current { font-size: 1.25rem; font-weight: 800; color: var(--ts-primary); }
.product-card .price-original { font-size: 0.85rem; color: var(--ts-gray-400); text-decoration: line-through; }
/* Botón de carrito siempre visible con micro-interacción */
.product-card .btn-outline-primary,
.product-card .btn-primary {
  transition: var(--ts-transition);
}
.product-card .btn-outline-primary:hover,
.product-card .btn-primary:hover {
  transform: translateY(-2px);
}

/* ──────────────────────────────────────────────
   SECCIONES Y TITLES
─────────────────────────────────────────────── */
.section-title {
  font-weight: 800; font-size: clamp(1.3rem, 1.6vw + 0.8rem, 1.6rem);
  color: var(--text-primary); letter-spacing: -0.5px;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}
.section-header::after {
  content: ''; position: absolute; left: 0; bottom: -1px;
  width: 56px; height: 3px; border-radius: 2px;
  background: var(--ts-gradient-primary);
}
.section-header .section-title { margin-bottom: 0; }
.section-header .btn { border-radius: 2rem; padding: 0.35rem 1.1rem; }

/* Benefits bar */
.benefits-bar { border-radius: 1rem; background: var(--surface-card); box-shadow: var(--ts-shadow-sm); }
/* Badge del hero con gradiente premium */
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  padding: 0.45rem 1.1rem; border-radius: 2rem;
  box-shadow: 0 6px 16px -4px rgba(37,99,235,0.55);
}

/* Botón con efecto shine (reflejo que cruza al hover) */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: ''; position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}
.btn-shine:hover::after { left: 130%; }

/* Barra de beneficios con iconos en círculo */
.benefit-icon {
  width: 58px; height: 58px; margin: 0 auto 0.7rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--ts-primary);
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(2,132,199,0.06));
  border: 1px solid rgba(37,99,235,0.18);
  border-radius: 50%;
  transition: var(--ts-transition);
}
.benefit-item:hover .benefit-icon {
  transform: translateY(-3px) scale(1.05);
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 10px 20px -6px rgba(37,99,235,0.5);
}
.benefit-title { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
body.dark-theme .benefit-icon {
  background: rgba(37,99,235,0.18); border-color: rgba(96,165,250,0.35);
  color: var(--ts-primary-light);
}
body.dark-theme .benefit-item:hover .benefit-icon {
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%); color: #fff;
}

/* Categorías */
.category-card {
  background: var(--surface-card); border-radius: 1rem; padding: 1.4rem 1rem;
  text-align: center; border: 1px solid var(--border-color);
  transition: var(--ts-transition); display: block; color: var(--text-primary);
  height: 100%;
}
.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--ts-primary);
  box-shadow: var(--ts-shadow-lg); color: var(--ts-primary);
}
.category-icon {
  width: 64px; height: 64px; margin: 0 auto 0.8rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; color: var(--ts-primary);
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(2,132,199,0.06));
  border: 1px solid rgba(37,99,235,0.18);
  border-radius: 1.1rem;
  transition: var(--ts-transition);
}
.category-card:hover .category-icon {
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  color: #fff; transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 10px 20px -6px rgba(37,99,235,0.5);
}
.category-name { font-weight: 700; font-size: 0.98rem; }
body.dark-theme .category-icon {
  background: rgba(37,99,235,0.18); border-color: rgba(96,165,250,0.35);
  color: var(--ts-primary-light);
}
body.dark-theme .category-card:hover .category-icon {
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%); color: #fff;
}

/* ── Mini-stats de confianza en el hero ── */
.hero-stats { position: relative; }
.hero-stat {
  display: flex; flex-direction: column; line-height: 1.15;
  padding-right: 1.25rem;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-num {
  font-family: var(--ts-font-heading);
  font-size: 1.15rem; font-weight: 800; color: #fff;
}
.hero-stat-label {
  font-size: 0.72rem; color: rgba(255,255,255,0.65);
  text-transform: uppercase; letter-spacing: 0.06em;
}
@media (max-width: 576px) {
  /* Stats en grilla compacta de 3 columnas en móvil (evita apilar en 3 filas) */
  .hero-stats { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 0.5rem !important; width: 100%; }
  .hero-stat { padding-right: 0; border-right: 1px solid rgba(255,255,255,0.12); text-align: center; }
  .hero-stat:nth-child(3n) { border-right: none; }
  .hero-stat-num { font-size: 0.92rem; }
  .hero-stat-label { font-size: 0.55rem; letter-spacing: 0.02em; }
}

/* ── Buscador de navbar más prominente ── */
.search-nav-form { width: 340px; }
.search-nav-form .search-group { border-radius: 2rem; overflow: hidden; box-shadow: var(--ts-shadow-sm); }
.search-nav-form .search-prefix {
  background: var(--surface-card); border: 1px solid var(--border-color);
  border-right: 0; color: var(--ts-gray-400);
}
.search-nav-form .form-control {
  border-radius: 0 !important;
  border-left: 0; border-right: 0;
}
.search-nav-form .btn {
  border-radius: 0 !important;
  padding: 0 1.3rem; font-weight: 600;
}
@media (max-width: 1199.98px) {
  .search-nav-form { width: 220px; }
  .search-nav-form .btn { padding: 0 0.9rem; }
}
@media (max-width: 1099.98px) {
  .search-nav-form { width: 190px; }
}
@media (max-width: 991.98px) {
  .search-nav-form { width: 100%; order: 5; margin-top: 0.75rem; }
  .search-nav-form .search-group { border-radius: 2rem; }
  .search-nav-form .form-control { border-radius: 0 !important; }
}
body.dark-theme .search-nav-form .search-prefix {
  background: #0f172a; border-color: var(--border-color); color: var(--text-secondary);
}

/* Brand cards – carrusel automático */
.brands-track {
  display: flex; gap: 1rem;
  animation: brandsScroll 20s linear infinite;
  width: max-content;
}
.brands-track:hover { animation-play-state: paused; }
@keyframes brandsScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.brand-card {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-card); border: 1px solid var(--border-color);
  border-radius: 1rem; padding: 1.2rem 1.8rem; min-width: 140px;
  transition: var(--ts-transition); flex-shrink: 0;
  font-size: 1.1rem; font-weight: 800; color: var(--ts-gray-500);
  letter-spacing: -0.5px;
}
.brand-card:hover { transform: translateY(-3px); box-shadow: var(--ts-shadow-lg); border-color: var(--ts-primary); color: var(--ts-primary); }

/* Testimonios */
.testimonial-card {
  background: var(--surface-card); border-radius: 1.25rem;
  border: 1px solid var(--border-color); padding: 2rem;
  transition: var(--ts-transition);
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--ts-shadow-lg); }

/* Cards de testimonio del home (bg-light) en ambos temas */
body.dark-theme .card.bg-light { background: var(--surface-card) !important; border-color: var(--border-color) !important; }
body.dark-theme .card.bg-light .card-text { color: var(--text-secondary) !important; }
body.dark-theme .card.bg-light .fw-bold.text-dark { color: var(--text-primary) !important; }

/* ──────────────────────────────────────────────
   BOTONES
─────────────────────────────────────────────── */
.btn-primary {
  background: var(--ts-gradient-primary); border: none;
  font-weight: 600; border-radius: 0.6rem;
  box-shadow: 0 4px 12px rgba(37,99,235,0.28);
  transition: var(--ts-transition);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg); transition: left 0.55s ease;
}
.btn-primary:hover::after { left: 120%; }
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0369a1 100%);
  transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,0.4);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-outline-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(37,99,235,0.18); }
.in-stock { color: var(--ts-success); font-weight: 600; }
.out-of-stock { color: var(--ts-danger); font-weight: 600; }

/* ──────────────────────────────────────────────
   FOOTER
─────────────────────────────────────────────── */
.site-footer {
  background: #0b1120 !important;
  color: var(--ts-gray-300);
  border-top: 4px solid var(--ts-primary);
}
.footer-links a { color: var(--ts-gray-400); display: block; margin-bottom: 0.5rem; transition: var(--ts-transition); }
.footer-links a:hover { color: var(--ts-white); transform: translateX(4px); }
.footer-contact-link { transition: var(--ts-transition); }
.footer-contact-link:hover { color: var(--ts-white) !important; }
.footer-title { font-weight: 700; font-size: 1rem; letter-spacing: 0.3px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; margin-bottom: 1rem !important; }
.brand-text-footer { font-size: 1.3rem; font-weight: 800; color: var(--ts-white); letter-spacing: -0.5px; margin-left: 0.5rem; }
.social-links .btn { transition: var(--ts-transition); }
.social-links .btn:hover { transform: translateY(-3px); }

/* ──────────────────────────────────────────────
   WHATSAPP FLOTANTE
─────────────────────────────────────────────── */
.whatsapp-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 58px; height: 58px;
  background: #25d366; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; box-shadow: 0 6px 20px rgba(37,211,102,0.5);
  z-index: 1080; transition: var(--ts-transition);
}
.whatsapp-float:hover { background: #128C7E; color: #fff; transform: scale(1.12); box-shadow: 0 10px 28px rgba(37,211,102,0.6); }

/* ──────────────────────────────────────────────
   STAR RATING
─────────────────────────────────────────────── */
.star-rating { display: inline-flex; gap: 1px; font-size: 0.85rem; }
.star-rating i { color: #f59e0b; }
.rating-count { color: var(--text-secondary); }

/* ──────────────────────────────────────────────
   DARK THEME OVERRIDES
─────────────────────────────────────────────── */
body.dark-theme .bg-white { background: var(--surface-card) !important; }
body.dark-theme .bg-light { background: #0f172a !important; color: var(--text-primary) !important; }
body.dark-theme .card { background: var(--surface-card) !important; border-color: var(--border-color) !important; color: var(--text-primary) !important; }
body.dark-theme .table { color: var(--text-primary) !important; }
body.dark-theme .table-light { background: #0f172a !important; color: var(--text-primary) !important; }
body.dark-theme .form-control,
body.dark-theme .form-select { background: #0f172a !important; color: var(--text-primary) !important; border-color: var(--border-color) !important; }
body.dark-theme .dropdown-menu { background: var(--surface-card) !important; border-color: var(--border-color) !important; }
body.dark-theme .dropdown-item { color: var(--text-primary) !important; }
body.dark-theme .dropdown-item:hover { background: rgba(37,99,235,0.1) !important; }
body.dark-theme .text-dark { color: var(--text-primary) !important; }
body.dark-theme .text-muted { color: var(--text-secondary) !important; }
body.dark-theme .hero-slide { background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%); }
body.dark-theme .benefits-bar,
body.dark-theme .testimonial-card,
body.dark-theme .category-card { background: var(--surface-card) !important; border-color: var(--border-color) !important; }
body.dark-theme .section-header { border-color: var(--border-color); }
body.dark-theme .accordion-button { background: var(--surface-card) !important; color: var(--text-primary) !important; }
body.dark-theme .accordion-item { background: var(--surface-card) !important; border-color: var(--border-color) !important; }
body.dark-theme .faq-section .accordion-button:not(.collapsed) {
  background: rgba(37,99,235,0.18) !important;
  color: var(--ts-primary-light) !important;
}
body.dark-theme .faq-section .accordion-button:not(.collapsed)::after { filter: brightness(1.4); }
body.dark-theme .cuenta-section .list-group-item:hover { background: rgba(37,99,235,0.14); }
body.dark-theme .auth-card .rounded-circle i { color: var(--ts-primary-light) !important; }
body.dark-theme .modal-content { background: var(--surface-card) !important; border-color: var(--border-color) !important; }
body.dark-theme .modal-header { border-bottom-color: var(--border-color) !important; }
body.dark-theme .list-group-item { background: var(--surface-card) !important; border-color: var(--border-color) !important; color: var(--text-primary) !important; }
body.dark-theme .alert { border-color: var(--border-color); }
body.dark-theme .badge.bg-light { background: #334155 !important; color: var(--text-primary) !important; }
body.dark-theme .mega-menu { background: var(--surface-card) !important; }
body.dark-theme .input-group-text { background: #0f172a !important; border-color: var(--border-color) !important; color: var(--text-primary) !important; }

/* Detalle de producto dark */
body.dark-theme .product-zoom-wrapper { background: #0f172a !important; }
body.dark-theme .tab-content { background: var(--surface-card) !important; border-color: var(--border-color) !important; }
body.dark-theme .nav-tabs .nav-link { color: var(--text-secondary) !important; }
body.dark-theme .nav-tabs .nav-link.active { background: var(--surface-card) !important; color: var(--ts-primary) !important; border-color: var(--border-color) var(--border-color) var(--surface-card) !important; }

/* ──────────────────────────────────────────────
   RESPONSIVE
─────────────────────────────────────────────── */
@media (max-width: 576px) {
  /* Stepper de compra: evitar overflow horizontal en móvil */
  .checkout-steps { flex-wrap: wrap; gap: 0.5rem 0.25rem; padding: 0.6rem 0.75rem; }
  .checkout-steps .step-item { font-size: 0.72rem; }
  .checkout-steps .step-dot { width: 22px; height: 22px; font-size: 0.65rem; }
  .checkout-steps .step-sep { min-width: 12px; }
  .hero-title { font-size: 1.75rem; }
  .hero-slide { padding: 2.25rem 1.25rem; }
  .section-title { font-size: 1.15rem; }
  .product-card .card-img-wrapper { height: 160px; }
  .offers-ticker { display: none; }
  .page-header { padding: 2rem 0; }

  /* Evitar scroll horizontal en el bloque de ofertas (countdown + botón) */
  .ofertas-section-bg .d-flex.align-items-center.gap-4 {
    flex-wrap: wrap;
    gap: 0.75rem !important;
  }
  .ofertas-section-bg .countdown-wrapper { padding: 4px 8px; gap: 4px; }
  .ofertas-section-bg .countdown-unit { min-width: 26px; }
  .ofertas-section-bg .countdown-num { font-size: 1rem; }

  /* Botones del hero: permitir salto de línea en pantallas muy estrechas */
  .hero-slide .d-flex.gap-3 { flex-wrap: wrap; }
}

/* ──────────────────────────────────────────────
   ANIMACIONES DE CARGA
─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.5s ease both;
}
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* ──────────────────────────────────────────────
   PÁGINAS INTERNAS
─────────────────────────────────────────────── */
.page-header {
  background: var(--ts-gradient-hero); padding: 2.6rem 0;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; top: -60%; right: -10%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(37,99,235,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.page-header h1 { color: #fff !important; position: relative; }
.page-header .breadcrumb-item, .page-header .breadcrumb-item a { color: rgba(255,255,255,0.7); }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,0.9); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

/* Línea de acento inferior del header */
.page-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--ts-gradient-primary); opacity: 0.85;
}

/* ── Tarjetas de autenticación (login / registro) ── */
.auth-card {
  position: relative;
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: var(--ts-shadow-lg) !important;
  transition: var(--ts-transition);
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--ts-gradient-primary); z-index: 1;
}
.auth-card:hover { box-shadow: 0 22px 44px -10px rgba(37,99,235,0.22) !important; }
.auth-card .rounded-circle {
  background: linear-gradient(135deg, rgba(37,99,235,0.10), rgba(2,132,199,0.10)) !important;
  border: 1px solid rgba(37,99,235,0.18);
  box-shadow: 0 8px 20px -6px rgba(37,99,235,0.25);
}
.auth-card .input-group-text { color: var(--ts-primary); border-color: var(--border-color); }

/* ── Tarjeta de información de contacto ── */
.contact-info-card {
  background: var(--ts-gradient-hero);
  border-radius: 1.15rem;
  padding: 2rem;
  color: #fff;
  position: relative; overflow: hidden;
  box-shadow: var(--ts-shadow-lg);
}
.contact-info-card::before {
  content: ''; position: absolute; top: -40%; right: -15%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(96,165,250,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.contact-info-card h3 { color: #fff; position: relative; }
.contact-info-card p { color: rgba(255,255,255,0.75); position: relative; }
.contact-info-card > div,
.contact-info-card > a > div {
  position: relative;
  display: flex; align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem !important;
  transition: var(--ts-transition);
}
.contact-info-card > a:hover > div,
.contact-info-card > div:hover { background: rgba(255,255,255,0.12); transform: translateX(4px); }
.contact-info-card > div:last-child,
.contact-info-card > a:last-child > div { margin-bottom: 0 !important; }
.contact-info-card > div i,
.contact-info-card > a > div i { color: var(--ts-primary-light); font-size: 1.15rem; width: 28px; }

/* Enlaces de contacto efectivos: bloque clicable completo */
.contact-info-card a { display: block; color: #fff; text-decoration: none; }
.contact-info-card a:hover i { color: #fff; }

/* ── Accordion FAQ ── */
.faq-section .accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 0.9rem !important;
  margin-bottom: 0.9rem;
  overflow: hidden;
  box-shadow: var(--ts-shadow-sm);
  transition: var(--ts-transition);
}
.faq-section .accordion-item:hover { box-shadow: var(--ts-shadow); border-color: rgba(37,99,235,0.35); }
.faq-section .accordion-item:first-of-type,
.faq-section .accordion-item:last-of-type { border-radius: 0.9rem !important; }
.faq-section .accordion-button {
  font-family: var(--ts-font-heading);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 1.1rem 1.3rem;
  color: var(--text-primary);
  background: var(--surface-card);
  border: none;
  transition: var(--ts-transition);
}
.faq-section .accordion-button:not(.collapsed) {
  color: var(--ts-primary);
  background: linear-gradient(135deg, rgba(37,99,235,0.07), rgba(2,132,199,0.04));
  box-shadow: none;
}
.faq-section .accordion-button:focus { box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.faq-section .accordion-button:not(.collapsed)::after {
  background-image: var(--bs-accordion-btn-active-icon);
  filter: hue-rotate(0deg);
}
.faq-section .accordion-body { padding: 0 1.3rem 1.2rem; }

/* ── Sidebar de cuenta (list-group) ── */
.cuenta-section .list-group-item {
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 0.95rem 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface-card);
  transition: var(--ts-transition);
}
.cuenta-section .list-group-item:last-child { border-bottom: none; }
.cuenta-section .list-group-item:hover {
  background: rgba(37,99,235,0.06);
  color: var(--ts-primary);
  padding-left: 1.35rem;
}
.cuenta-section .list-group-item.active {
  background: var(--ts-gradient-primary);
  border-color: transparent;
  color: #fff !important;
  font-weight: 600;
  box-shadow: inset 4px 0 0 rgba(255,255,255,0.35);
}
.cuenta-section .list-group-item.active:hover { padding-left: 1.15rem; background: var(--ts-gradient-primary); color: #fff !important; }
.cuenta-section .list-group-item.active i { color: #fff !important; }
.cuenta-section .list-group-item.active .badge { background: rgba(255,255,255,0.25) !important; color: #fff; }

/* ── Estado vacío (cuenta: pedidos / favoritos) ── */
.empty-state .bi {
  font-size: 3.4rem !important; /* vencer a display-1 de Bootstrap */
  background: linear-gradient(135deg, rgba(37,99,235,0.10), rgba(2,132,199,0.10));
  width: 96px; height: 96px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ts-primary);
}

/* Detalle de producto */
.product-detail-title { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }
.product-detail-price .price-current { font-size: 2rem; font-weight: 800; color: var(--ts-primary); }
.product-detail-price .price-original { color: var(--ts-gray-400); text-decoration: line-through; }

/* ── Badges de confianza junto al precio (garantía / cuotas / envío) ── */
.detail-trust-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
  background: var(--ts-gray-100); border: 1px solid var(--border-color);
  border-radius: 2rem; padding: 0.35rem 0.8rem;
  transition: var(--ts-transition);
}
.detail-trust-badge i { color: var(--ts-primary); }
.detail-trust-badge strong { color: var(--ts-primary); }
.detail-trust-badge:hover {
  border-color: rgba(37,99,235,0.4);
  transform: translateY(-1px);
  box-shadow: var(--ts-shadow-sm);
}
body.dark-theme .detail-trust-badge {
  background: #0f172a; border-color: var(--border-color); color: var(--text-secondary);
}
body.dark-theme .detail-trust-badge i,
body.dark-theme .detail-trust-badge strong { color: var(--ts-primary-light); }

/* ── Selector de cantidad grande y visible (detalle) ── */
.detail-qty {
  display: inline-flex; align-items: stretch;
  border: 1.5px solid var(--border-color);
  border-radius: 0.8rem;
  overflow: hidden;
  background: var(--surface-card);
  box-shadow: var(--ts-shadow-sm);
  transition: var(--ts-transition);
}
.detail-qty:focus-within {
  border-color: var(--ts-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.detail-qty-btn {
  width: 46px; border: none; background: var(--ts-gray-100);
  color: var(--text-secondary); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--ts-transition);
}
.detail-qty-btn:hover { background: var(--ts-primary); color: #fff; }
.detail-qty-btn:active { transform: scale(0.92); }
.detail-qty-input {
  width: 64px; border: none !important; text-align: center;
  font-weight: 700; font-size: 1.05rem;
  color: var(--text-primary); background: var(--surface-card);
  -moz-appearance: textfield; appearance: textfield;
  border-radius: 0 !important;
}
.detail-qty-input::-webkit-outer-spin-button,
.detail-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.detail-qty-input:focus { box-shadow: none !important; }
body.dark-theme .detail-qty { background: #0f172a; border-color: var(--border-color); }
body.dark-theme .detail-qty-btn { background: #1e293b; color: var(--text-secondary); }
body.dark-theme .detail-qty-btn:hover { background: var(--ts-primary); color: #fff; }
body.dark-theme .detail-qty-input { background: #0f172a; color: var(--text-primary); }

/* ── Tabla de especificaciones con iconos (retail) ── */
.specs-table td { border-color: var(--border-color) !important; }
.specs-table tr { transition: var(--ts-transition); }
.specs-table tr:hover { background: rgba(37,99,235,0.04); }
.specs-table td:first-child { font-weight: 600; color: var(--text-secondary); }
.specs-table td:first-child i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 0.55rem;
  background: linear-gradient(135deg, rgba(37,99,235,0.10), rgba(2,132,199,0.06));
  border: 1px solid rgba(37,99,235,0.18);
  color: var(--ts-primary);
  vertical-align: middle;
}
body.dark-theme .specs-table tr:hover { background: rgba(37,99,235,0.08); }
body.dark-theme .specs-table td:first-child i {
  background: rgba(37,99,235,0.18); border-color: rgba(96,165,250,0.35);
  color: var(--ts-primary-light) !important; /* vencer a .text-primary de Bootstrap */
}

/* Cart */
.cart-item-img { width: 80px; height: 80px; object-fit: contain; border-radius: 8px; background: var(--ts-gray-100); padding: 4px; }
.cart-summary { background: var(--surface-card); border-radius: 1rem; border: 1px solid var(--border-color); }

/* ──────────────────────────────────────────────
   FLUJO DE COMPRA (carrito / checkout)
─────────────────────────────────────────────── */

/* Indicador de pasos */
.checkout-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0.4rem; margin: 1.25rem auto 1.75rem;
  max-width: 560px; padding: 0.9rem 1rem;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: 2rem; box-shadow: var(--ts-shadow-sm);
}
.step-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap;
}
.step-item .step-dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  background: var(--ts-gray-100); color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
  transition: var(--ts-transition);
}
.step-item.active { color: var(--text-primary); }
.step-item.active .step-dot {
  background: var(--ts-gradient-primary); color: #fff; border-color: transparent;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}
.step-item.done .step-dot {
  background: rgba(16,185,129,0.12); color: var(--ts-success); border-color: rgba(16,185,129,0.4);
}
.step-sep { flex: 1; min-width: 18px; height: 2px; background: var(--ts-gray-200); border-radius: 2px; }
.step-sep.done { background: var(--ts-success); opacity: 0.5; }

/* Cards numeradas del checkout */
.checkout-section-card {
  border: 1px solid var(--border-color) !important;
  border-radius: 1rem !important;
  overflow: hidden;
  transition: var(--ts-transition);
}
.checkout-section-card .section-head {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 1rem 1.35rem;
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(2,132,199,0.03));
  border-bottom: 1px solid var(--border-color);
}
.checkout-section-card .section-num {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: #fff;
  background: var(--ts-gradient-primary);
  box-shadow: 0 4px 10px -2px rgba(37,99,235,0.4);
}
.checkout-section-card .card-body { padding: 1.35rem; }

/* Radios de método de pago / comprobante con estado seleccionado */
.pay-option {
  border: 1.5px solid var(--border-color) !important;
  border-radius: 0.85rem !important;
  cursor: pointer;
  transition: var(--ts-transition);
}
.pay-option:hover { border-color: rgba(37,99,235,0.45) !important; box-shadow: var(--ts-shadow-sm); }
.pay-option.has-check {
  border-color: var(--ts-primary) !important;
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(2,132,199,0.03)) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.pay-option .form-check-input:checked { background-color: var(--ts-primary); border-color: var(--ts-primary); }

/* Caja de voucher */
.voucher-box {
  border: 1.5px dashed var(--ts-primary) !important;
  background: linear-gradient(135deg, rgba(37,99,235,0.05), rgba(2,132,199,0.03)) !important;
  border-radius: 0.85rem !important;
}

/* Resumen sticky del pedido */
.order-summary-sticky {
  border: 1px solid var(--border-color) !important;
  border-radius: 1rem !important;
  overflow: hidden;
}
.summary-total-row {
  background: linear-gradient(135deg, rgba(37,99,235,0.07), rgba(2,132,199,0.04));
  border-radius: 0.7rem; padding: 0.7rem 0.9rem;
}
.cart-mini-item {
  border: 1px solid var(--border-color);
  border-radius: 0.7rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface-card);
  transition: var(--ts-transition);
}
.cart-mini-item:hover { border-color: rgba(37,99,235,0.4); box-shadow: var(--ts-shadow-sm); }

/* Filas del carrito */
.cart-item-row { transition: var(--ts-transition); }
.cart-item-row:hover { background: rgba(37,99,235,0.035); }
.cart-item-row .cart-item-img { transition: var(--ts-transition); }
.cart-item-row:hover .cart-item-img { transform: scale(1.05); box-shadow: var(--ts-shadow-sm); }
.cart-item-row .qty-btn { transition: var(--ts-transition); }
.cart-item-row .qty-btn:hover { background: var(--ts-primary); color: #fff; border-color: var(--ts-primary); }

/* Pantalla de éxito con check animado */
.success-icon {
  width: 96px; height: 96px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(16,185,129,0.05));
  color: var(--ts-success);
  border: 2px solid rgba(16,185,129,0.35);
  position: relative;
  animation: success-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.success-icon::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(16,185,129,0.35);
  animation: success-ring 1.6s ease-out infinite;
}
@keyframes success-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes success-ring { from { transform: scale(0.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }

body.dark-theme .step-item .step-dot { background: #0f172a; border-color: var(--border-color); }
body.dark-theme .cart-item-row:hover { background: rgba(37,99,235,0.08); }
body.dark-theme .pay-option.has-check {
  background: rgba(37,99,235,0.16) !important;
  border-color: var(--ts-primary-light) !important;
}
body.dark-theme .checkout-section-card .section-head {
  background: rgba(37,99,235,0.12);
  border-bottom-color: var(--border-color);
}
body.dark-theme .voucher-box {
  background: rgba(37,99,235,0.10) !important;
  border-color: rgba(96,165,250,0.5) !important;
}
body.dark-theme .order-summary-sticky .summary-total-row { background: rgba(37,99,235,0.14); }

/* Cuenta/Perfil */
.cuenta-section { background: var(--surface-bg); }

/* Specs table (ver bloque completo en la sección de detalle de producto) */

/* Formulario focus */
.form-control:focus, .form-select:focus {
  border-color: var(--ts-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Admin stat card override for dark */
body.dark-theme .admin-stat-card { background: var(--surface-card) !important; border-color: var(--border-color) !important; }
