/* ============================================
   ANMAGO STORE - ESTILO PRINCIPAL
   ============================================
   CSS unificado, sin overrides.
   Orden: variables → reset → layout → componentes → vistas → responsive
   ============================================ */

/* ============================================
   1. VARIABLES GLOBALES
   ============================================ */
:root {
  /* Colores institucionales */
  --primary: #1B4557;
  --primary-dark: #12303d;
  --primary-light: #2a6a8f;
  --secondary: #0A8D8C;
  --accent: #3a5d75;
  --premium-gold: #C9A96E;
  --premium-bronze: #B8860B;

  /* Colores de estado */
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #0dcaf0;

  /* Colores de texto */
  --text-dark: #2C3E50;
  --text-muted: #7F8C8D;
  --text-light: #b0b8bd;
  --white: #ffffff;

  /* Fondos */
  --bg-light: #f8fafc;
  --bg-medium: #f1f4f8;
  --gray-light: #f5f7fa;
  --gray-medium: #e8edf2;
  --border-light: #dee2e6;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.12);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.15);
  --shadow-premium: 0 4px 20px rgba(201, 169, 110, 0.15);

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 50px;

  /* Transiciones */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Alturas fijas */
  --header-height: 70px;
  --header-height-mobile: 60px;
}

/* ============================================
   2. RESET Y BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-dark);
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-medium) 100%);
  min-height: 100vh;
  padding-top: var(--header-height);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 767px) {
  body { padding-top: var(--header-height-mobile); }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

button {
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

/* Accesibilidad */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   3. HEADER
   ============================================ */
.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  z-index: 1030;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 767px) {
  .header-sticky {
    height: var(--header-height-mobile);
    padding: 0 0.75rem;
  }
}

.logo img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.buscador-header {
  width: 100%;
  height: 44px;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 0.9rem;
  transition: var(--transition);
}

.buscador-header::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.buscador-header:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--premium-gold);
  box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.5);
}

/* ============================================
   4. BUSCADOR - SUGERENCIAS
   ============================================ */
.sugerencias-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: var(--white);
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
}

.sugerencias-container.mostrar {
  display: block;
}

.sugerencia-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px;
  border-bottom: 1px solid var(--gray-light);
  cursor: pointer;
  transition: var(--transition-fast);
}

.sugerencia-item:hover {
  background: var(--gray-light);
  transform: translateX(4px);
}

.sugerencia-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--gray-light);
  padding: 4px;
  border: 1px solid var(--gray-medium);
}

.sugerencia-info { flex: 1; }

.sugerencia-nombre {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.sugerencia-categoria {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sugerencia-precio {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

.sugerencia-vacia {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
}

/* ============================================
   5. CATEGORÍAS RÁPIDAS (CARRUSEL)
   ============================================ */
.categorias-carrusel {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0.5rem 0;
  padding: 0 0.5rem;
}

.categorias-carrusel-container {
  flex: 1;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 4px 0;
}

.categorias-carrusel-container::-webkit-scrollbar { height: 4px; }
.categorias-carrusel-container::-webkit-scrollbar-track {
  background: var(--gray-light);
  border-radius: 10px;
}
.categorias-carrusel-container::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 10px;
}

.categorias-scroll-wrapper {
  display: flex;
  gap: 0.5rem;
  min-width: min-content;
}

.categoria-rapida-contenedor {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.categoria-rapida {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.categoria-rapida:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  background: linear-gradient(135deg, var(--white), var(--bg-light));
  color: var(--primary);
}

.btn-carrusel-categoria {
  width: 28px;
  height: 28px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.btn-carrusel-categoria:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.categorias-indicador {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   6. VISTAS (sistema de pantallas)
   ============================================ */
.vista { display: none; min-height: 400px; }
.vista-activa { display: block; animation: fadeIn 0.4s ease-in; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   7. GRID DE PRODUCTOS
   ============================================ */
.grid-productos-ml {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  min-height: 300px;
}

@media (min-width: 576px) {
  .grid-productos-ml {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
}

@media (min-width: 768px) {
  .grid-productos-ml {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .grid-productos-ml {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1400px) {
  .grid-productos-ml {
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
  }
}

/* ============================================
   8. TARJETA DE PRODUCTO
   ============================================ */
.card-producto-ml {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  position: relative;
}

.card-producto-ml:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.card-producto-ml .card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  position: relative;
  z-index: 1;
}

.card-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--gray-light), var(--gray-medium));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Sin padding - lo controla la imagen */
}

.card-img-ml {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;   /* ← Centrado horizontal y vertical */
  transition: transform 0.5s ease;
  display: block;
}

.card-producto-ml:hover .card-img-ml {
  transform: scale(1.05);
}

/* Badges */
.badge-promo {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--premium-gold), var(--premium-bronze));
  color: var(--text-dark);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(201, 169, 110, 0.3);
}

.badge-stock {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.95);
  color: var(--secondary);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
  border: 1px solid var(--secondary);
}

/* Contenido */
.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.5rem;
}

.categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.categoria-tipo,
.categoria-subtipo {
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 0.7rem;
  font-weight: 600;
}

.categoria-tipo {
  background: var(--primary);
  color: var(--white);
}

.categoria-subtipo {
  background: var(--gray-medium);
  color: var(--text-dark);
}

.producto-nombre {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-light);
  margin-top: auto;
}

.precios { display: flex; flex-direction: column; gap: 2px; }

.precio-actual {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.precio-anterior {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.envio-gratis {
  font-size: 0.7rem;
  color: var(--success);
  font-weight: 600;
}

.btn-ver-producto {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(27, 69, 87, 0.25);
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 1rem;
}

.btn-ver-producto:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 6px 20px rgba(27, 69, 87, 0.4);
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-lg);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* ============================================
   9. CARRITO FLOTANTE
   ⚠️ OCULTO — Ya está en el header y la barra móvil
   ============================================ */
.btn-carrito-flotante {
  display: none !important;
}


.btn-carrito-flotante:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: var(--shadow-hover);
  color: var(--white);
}

.contador-carrito {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: var(--danger);
  color: var(--white);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 3px solid var(--white);
}

@media (max-width: 767px) {
  .btn-carrito-flotante { display: none !important; }
}

/* ============================================
   10. OFFCANVAS DEL CARRITO
   ============================================ */
.offcanvas {
  background: var(--white);
}

.offcanvas-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
}

.offcanvas-title {
  font-weight: 700;
  color: var(--white);
  font-size: 1.25rem;
  margin: 0;
}

.offcanvas-header .btn-close {
  filter: invert(1);
}

.offcanvas-body {
  padding: 1.25rem 1.5rem;
  background: var(--gray-light);
}

.offcanvas-footer {
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

#carrito-contenido .card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

#carrito-contenido .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

#carrito-contenido .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* ============================================
   11. BOTONES GLOBALES
   ============================================ */
.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--white);
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ============================================
   12. BANNER PROMOCIONAL
   ============================================ */
.banner-promocional {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.banner-promocional a {
  color: var(--premium-gold);
  font-weight: 700;
  text-decoration: underline;
}

/* ============================================
   13. FOOTER
   ============================================ */
.footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 2rem 1rem 1rem;
  margin-top: 3rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Primera fila: enlaces, contacto, redes */
.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .footer-main {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.footer-section h4,
.footer-section h5,
.footer-section h6 {
  color: var(--premium-gold);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--premium-gold);
  transform: translateX(3px);
}

.contacto-item {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contacto-item a {
  color: rgba(255,255,255,0.9);
}

.contacto-item a:hover {
  color: var(--premium-gold);
}

.footer-icon {
  color: var(--premium-gold);
  font-size: 1rem;
}

.redes-sociales-compactas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.red-social-link {
  display: inline-flex;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  padding: 6px;
  transition: var(--transition);
}

.red-social-link:hover {
  transform: translateY(-3px) scale(1.1);
  background: rgba(201, 169, 110, 0.2);
}

.red-social-link img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
}

/* ============================================
   SEGUNDA FILA: 3 columnas (pagos | sellos | copyright)
   ============================================ */
.footer-secondary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-secondary {
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
  }
}

/* Medios de pago */
.medios-pago-compactos {
  text-align: center;
}

@media (min-width: 768px) {
  .medios-pago-compactos {
    text-align: left;
  }
}

.medios-pago-compactos h4 {
  color: var(--premium-gold);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.logos-pago-compactos {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 768px) {
  .logos-pago-compactos {
    justify-content: flex-start;
  }
}

.logos-pago-compactos img {
  height: 28px;
  width: auto;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
}

/* Sellos de respaldo (centrados) */
.sellos-confianza {
  text-align: center;
  padding: 0 1rem;
}

.sellos-confianza .sello-titulo {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  display: block;
  letter-spacing: 0.5px;
}

.sellos-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.sellos-logos img {
  height: 55px;
  width: auto;
  object-fit: contain;
  display: inline-block;
  /* Sin fondo blanco, sin padding, sin border-radius */
}

.sellos-logos img:first-child {
  max-width: 90px;
}

.sellos-logos img:last-child {
  max-width: 170px;
}

/* Copyright */
.copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  text-align: center;
}

@media (min-width: 768px) {
  .copyright {
    text-align: right;
    margin: 0;
  }
}

/* Footer móvil compacto */
.footer-mobile-compact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-align: center;
}

.footer-links-row,
.footer-redes-row,
.footer-contacto-row,
.footer-pagos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-link-compact,
.contacto-link-compact {
  color: rgba(255,255,255,0.85);
  font-size: 0.75rem;
}

.footer-link-compact:hover,
.contacto-link-compact:hover {
  color: var(--premium-gold);
}

@media (min-width: 768px) {
  .footer-mobile-compact { display: none; }
}

@media (max-width: 767px) {
  .footer-desktop { display: none !important; }
}

/* ============================================
   14. BARRA INFERIOR MÓVIL
   ============================================ */
.navbar.fixed-bottom {
  height: 65px;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  z-index: 1030;
}

.navbar.fixed-bottom .container-fluid {
  height: 100%;
}

.navbar.fixed-bottom a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  flex: 1;
  padding: 0.5rem 0;
  transition: var(--transition-fast);
}

.navbar.fixed-bottom a:hover,
.navbar.fixed-bottom a.active {
  color: var(--primary);
}

.navbar.fixed-bottom i {
  font-size: 1.3rem;
}

/* ============================================
   15. PÁGINA DE PRODUCTO
   ============================================ */
#imagen-principal {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

#imagen-principal:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.galeria-miniaturas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;                 /* ← Reducido: menos espacio entre miniaturas */
  margin-top: 15px;
  justify-content: center;
}

.galeria-miniaturas img {
  width: 90px;              /* ← Antes 70px, ahora 90px (más grandes) */
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.galeria-miniaturas img:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.galeria-miniaturas img.border-primary {
  border-color: var(--primary) !important;
  border-width: 3px !important;
}

.selector-variable,
.selector-talla {
  max-width: 250px;
  padding: 10px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: var(--transition);
}

.selector-variable:focus,
.selector-talla:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 69, 87, 0.1);
}

#input-cantidad {
  width: 80px;
  text-align: center;
  font-weight: 700;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}

.btn-agregar-carrito {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  transition: var(--transition);
}

.btn-agregar-carrito:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 69, 87, 0.3);
  color: var(--white);
}

.btn-agregar-carrito:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.badge-oferta {
  background: linear-gradient(135deg, var(--danger), #b02a37);
  color: var(--white);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
}

.btn-consulta-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-weight: 600;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  transition: var(--transition);
}

.btn-consulta-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
  color: var(--white);
}

.resenas-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.resena-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-light);
}

.resena-item:last-child {
  border-bottom: none;
}

.resena-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.resena-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.resena-nombre {
  font-weight: 600;
  color: var(--primary);
}

.resena-fecha {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.resena-estrellas {
  color: var(--warning);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.resena-comentario {
  color: var(--text-dark);
  font-size: 0.9rem;
  line-height: 1.5;
}

.resena-compra-verificada {
  font-size: 0.75rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.5rem;
}

/* ============================================
   16. CHECKOUT / FORMULARIO
   ============================================ */
.form-control,
.form-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(27, 69, 87, 0.1);
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-label .opcional {
  font-weight: normal;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.campo-deshabilitado {
  opacity: 0.6;
  background: var(--gray-light) !important;
  cursor: not-allowed;
}

.btn-finalizar {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(27, 69, 87, 0.3);
  transition: var(--transition);
}

.btn-finalizar:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(27, 69, 87, 0.4);
}

.btn-finalizar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.spinner-validacion {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

/* ============================================
   17. UTILIDADES
   ============================================ */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-light { background-color: var(--bg-light) !important; }
.bg-white { background-color: var(--white) !important; }

.anmago-notificacion {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius-md);
  border: none;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   18. RESPONSIVE — AJUSTES MÓVILES
   ============================================ */
@media (max-width: 767px) {
  .card-image-container {
    height: 160px;
    padding: 0.75rem;
  }

  .producto-nombre {
    font-size: 0.85rem;
    min-height: 38px;
  }

  .precio-actual {
    font-size: 1rem;
  }

  .btn-ver-producto {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .categoria-rapida {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
  }

  .footer { padding: 1.5rem 0.75rem 0.75rem; }
  .footer-main { grid-template-columns: 1fr; gap: 1rem; }
  .footer-section h4,
  .footer-section h5,
  .footer-section h6 { font-size: 0.9rem; }

  .offcanvas { max-width: 90%; }
  .offcanvas-body { padding: 1rem; }
}

@media (max-width: 480px) {
  .card-image-container {
    height: 150px;
    padding: 0.6rem;
  }

  .producto-nombre {
    font-size: 0.8rem;
  }

  .precio-actual {
    font-size: 0.95rem;
  }

  .banner-promocional {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
}

/* ============================================
   19. UTILIDADES DE IMPRESIÓN
   ============================================ */
@media print {
  .header-sticky,
  .footer,
  .navbar.fixed-bottom,
  .btn-carrito-flotante,
  .banner-promocional {
    display: none !important;
  }

  body {
    padding-top: 0;
    background: var(--white);
  }

  .card-producto-ml {
    box-shadow: none;
    border: 1px solid var(--border-light);
  }
}

/* ============================================
   20. FEEDBACK DE COLOR SELECCIONADO (temporal)
   ============================================ */
.feedback-color {
  position: fixed;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(12px);
  color: white;
  padding: 18px 25px;
  border-radius: 16px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: feedbackPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 90%;
  border: 1px solid rgba(255,255,255,0.15);
  pointer-events: none;
}

.feedback-color img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 10px;
  background: white;
  padding: 4px;
  border: 2px solid var(--premium-gold);
  flex-shrink: 0;
}

.feedback-color .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feedback-color .titulo {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--premium-gold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.feedback-color .nombre {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

@keyframes feedbackPop {
  0% { transform: translate(-50%, 50%) scale(0.7); opacity: 0; }
  100% { transform: translate(-50%, 50%) scale(1); opacity: 1; }
}

@media (max-width: 480px) {
  .feedback-color {
    padding: 14px 18px;
    gap: 12px;
    bottom: 40%;
  }
  .feedback-color img {
    width: 50px;
    height: 50px;
  }
  .feedback-color .nombre {
    font-size: 0.95rem;
  }
}

/* ============================================
   21. RESUMEN DE SELECCIÓN (persistente)
   ============================================ */
#resumen-seleccion {
  background: linear-gradient(135deg, rgba(27, 69, 87, 0.08), rgba(42, 106, 143, 0.05));
  border: 1px solid rgba(27, 69, 87, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-dark);
  font-size: 0.9rem;
}

#resumen-seleccion strong {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
}

/* ============================================
   22. BOTÓN TIENDA VERIFICADA MINTIC (Header)
   ============================================ */
.btn-vitrina {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  color: var(--primary-dark);
  border: 2px solid var(--premium-gold);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(201, 169, 110, 0.25);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.btn-vitrina:hover {
  background: linear-gradient(135deg, var(--premium-gold), var(--premium-bronze));
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201, 169, 110, 0.55);
}

/* Logo MINTIC dentro del botón */
.btn-vitrina img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  transition: filter 0.3s ease;
}

/* Hover: invertir el logo si el fondo es dorado */
.btn-vitrina:hover img {
  filter: brightness(0) invert(1);
}

.btn-vitrina i {
  font-size: 1rem;
}

/* En móvil: solo el logo, compacto */
@media (max-width: 767px) {
  .btn-vitrina {
    padding: 4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    gap: 0;
    border-width: 1.5px;
  }
  
  .btn-vitrina img {
    width: 22px;
    height: 22px;
  }
}

/* ============================================
   23. SELLOS EN MÓVIL Y DESKTOP (sin fondo)
   ============================================ */
.footer-sello-row {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0 1rem 0;
  width: 100%;
  flex-wrap: wrap;
}

.footer-sello-row img {
  height: 40px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  display: block;
}

.footer-sello-row .sello-mintic {
  height: 45px;
  max-width: 70px;
}

.footer-sello-row .sello-tunegocio {
  height: 40px;
  max-width: 120px;
}
/* ============================================
   24. PROTECCIÓN DE LA BARRA INFERIOR MÓVIL
   ============================================ */
@media (max-width: 767px) {
  body {
    padding-bottom: 75px;
  }
  
  .footer {
    padding-bottom: 90px;
  }
  
  .footer-copyright {
    margin-bottom: 0;
  }
}
/* ============================================
   SELECTOR DE COLORES (compacto y grande)
   ============================================ */

.selector-colores-container {
  margin-bottom: 1rem;
}

.selector-colores-container > p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Contenedor flex de los colores */
.selector-colores-container > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;                    /* ← Reducido: menos espacio entre items */
}

/* Cada item de color */
.selector-colores-container .color-item {
  width: 78px;                 /* ← Reducido: contenedor más ajustado */
  flex-shrink: 0;
  text-align: center;
  cursor: pointer;
  position: relative;
}

/* La imagen del color */
.selector-colores-container .color-item img {
  width: 78px;                 /* ← La imagen llena el contenedor */
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--border-light);
  transition: var(--transition);
  display: block;
  padding: 0;                  /* ← Sin padding para que llene */
  background: none;
}

.selector-colores-container .color-item img:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.selector-colores-container .color-item img.border-primary {
  border-color: var(--primary) !important;
  border-width: 3px !important;
}

/* El nombre del color (más pequeño y pegado) */
.selector-colores-container .color-item small {
  font-size: 0.6rem;           /* ← Más pequeño */
  display: block;
  margin-top: 2px;             /* ← Menos espacio arriba */
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

.selector-colores-container .color-item small.text-primary {
  color: var(--primary) !important;
}

/* Imágenes adicionales (también más compactas) */
.selector-colores-container .adicional {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid var(--border-light);
  transition: var(--transition);
}

/* Responsive para móvil */
@media (max-width: 767px) {
  .selector-colores-container > div {
    gap: 5px;
  }

  .selector-colores-container .color-item {
    width: 68px;
  }

  .selector-colores-container .color-item img {
    width: 68px;
    height: 68px;
  }

  .selector-colores-container .color-item small {
    font-size: 0.55rem;
  }
}

/* ============================================
   26. BOTÓN COMPARTIR PRODUCTO (flotante)
   ============================================ */
.btn-compartir-flotante {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  z-index: 10;
  font-size: 1.1rem;
}

.btn-compartir-flotante:hover {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-lg);
}

.btn-compartir-flotante:active {
  transform: scale(0.95);
}

/* Ajuste para móvil */
@media (max-width: 767px) {
  .btn-compartir-flotante {
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
    font-size: 1rem;
  }
}
/* ============================================
   BOTÓN FLOTANTE DE NOVEDADES (campanita)
   ============================================ */
.btn-novedades-flotante {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 1025;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary-light));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(10, 141, 140, 0.4);
  transition: var(--transition);
  text-decoration: none;
  border: 2px solid var(--white);
  animation: pulse-novedades 2.5s infinite;
}

.btn-novedades-flotante:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 25px rgba(10, 141, 140, 0.6);
  color: var(--white);
}

.btn-novedades-flotante i {
  font-size: 1.4rem;
}

/* Punto rojo de "hay novedades nuevas" */
.badge-novedades {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: var(--white);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid var(--white);
  animation: pulse-badge 1.5s infinite;
}

/* Animación de pulso */
@keyframes pulse-novedades {
  0%, 100% { 
    box-shadow: 0 4px 15px rgba(10, 141, 140, 0.4);
  }
  50% { 
    box-shadow: 0 4px 25px rgba(10, 141, 140, 0.7);
  }
}

@keyframes pulse-badge {
  0%, 100% { 
    transform: scale(1);
  }
  50% { 
    transform: scale(1.15);
  }
}

/* En escritorio, posición debajo del header */
@media (min-width: 768px) {
  .btn-novedades-flotante {
    bottom: auto;
    top: 85px;      /* ← Justo debajo del header */
    right: 20px;
    width: 50px;
    height: 50px;
  }
  
  .btn-novedades-flotante i {
    font-size: 1.2rem;
  }
}

/* En móvil, arriba de la barra inferior */
@media (max-width: 767px) {
  .btn-novedades-flotante {
    bottom: 95px;
    right: 15px;
    width: 52px;
    height: 52px;
  }
}
/* ============================================
   BUSCADOR EN HEADER MÓVIL
   ============================================ */
@media (max-width: 767px) {
  /* El buscador ocupa todo el espacio disponible */
  .buscador-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 8px !important;
  }
  
  /* Input más compacto en móvil */
  .buscador-header {
    height: 38px !important;
    padding: 0.4rem 0.9rem !important;
    font-size: 0.85rem !important;
  }
  
  /* El logo más pequeño para dar espacio */
  .logo img {
    height: 32px !important;
    width: 32px !important;
  }
  
  /* El botón de menú más compacto */
  .navbar-toggler {
    padding: 0.25rem !important;
  }
  
  .navbar-toggler i {
    font-size: 1.6rem !important;
  }
  
  /* Los botones de Novedades y Vitrina ya están ocultos en móvil */
  /* (por el d-none d-md-flex) */
}
/* ============================================
   RESUMEN DE RESEÑAS
   ============================================ */
.resenas-resumen {
  border-left: 4px solid #0d6efd;
}

.resenas-promedio {
  text-align: center;
  min-width: 80px;
}

.resenas-promedio-numero {
  font-size: 2rem;
  font-weight: bold;
  color: #0d6efd;
  line-height: 1;
}

.resenas-promedio-estrellas {
  color: #ffc107;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ============================================
   BOTONES DE RESEÑAS
   ============================================ */
#resenas-botones {
  padding: 20px 0;
}

#resenas-botones .btn {
  min-width: 250px;
  border-radius: 30px;
  padding: 10px 24px;
  font-weight: 500;
}

/* ============================================
   ANIMACIÓN AL APARECER NUEVAS RESEÑAS
   ============================================ */
.resena-item {
  animation: fadeInResena 0.4s ease;
}

@keyframes fadeInResena {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ============================================
   27. NAVEGACIÓN DE CATEGORÍAS (2 NIVELES)
   ============================================ */

/* ============================================
   CATEGORÍA ACTIVA (resaltada)
   ============================================ */
.categoria-rapida.activo {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(27, 69, 87, 0.35);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.categoria-rapida.activo div {
  color: white !important;
}

.categoria-rapida.activo:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white !important;
  transform: translateY(-3px);
}

/* ============================================
   BREADCRUMB DE CATEGORÍAS
   ============================================ */
#breadcrumb-categorias-container {
  margin-bottom: 0.75rem;
  animation: fadeInBreadcrumb 0.3s ease;
}

@keyframes fadeInBreadcrumb {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#breadcrumb-categorias {
  background: var(--white);
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  font-size: 0.875rem;
  flex-wrap: wrap;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

#breadcrumb-categorias .breadcrumb-item {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

#breadcrumb-categorias .breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#breadcrumb-categorias .breadcrumb-item a:hover {
  color: var(--primary-light);
  text-decoration: underline;
  transform: translateX(-2px);
}

#breadcrumb-categorias .breadcrumb-item.active {
  color: var(--text-dark);
  font-weight: 700;
}

#breadcrumb-categorias .breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--text-muted);
  font-weight: bold;
  padding: 0 0.5rem;
  font-size: 1.1rem;
}

/* ============================================
   SEPARADOR ENTRE BARRA NIVEL 1 Y NIVEL 2
   ============================================ */
#contenedor-nivel-2 {
  border-top: 1px dashed var(--border-light);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  animation: fadeInNivel2 0.3s ease;
}

@keyframes fadeInNivel2 {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   AJUSTES PARA LA SEGUNDA BARRA
   ============================================ */
#categorias-nivel-2 .categoria-rapida {
  background: linear-gradient(135deg, var(--bg-light), var(--white));
  border-color: var(--gray-medium);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
}

#categorias-nivel-2 .categoria-rapida:hover {
  background: linear-gradient(135deg, var(--white), var(--bg-light));
}

#categorias-nivel-2 .categoria-rapida.activo {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--primary);
}

/* ============================================
   RESPONSIVE — BREADCRUMB EN MÓVIL
   ============================================ */
@media (max-width: 767px) {
  #breadcrumb-categorias {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
  
  #breadcrumb-categorias .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 0.35rem;
  }
  
  .categoria-rapida.activo {
    transform: none;
  }
  
  #contenedor-nivel-2 {
    padding-top: 0.5rem;
    margin-top: 0.25rem;
  }
}
/* ============================================
   BOTÓN VOLVER EN PÁGINA DE PRODUCTO
   ============================================ */
.btn-volver-producto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white !important;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(27, 69, 87, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 10px;
}

.btn-volver-producto:hover {
  transform: translateX(-4px);
  box-shadow: 0 6px 20px rgba(27, 69, 87, 0.35);
  color: white !important;
}

.btn-volver-producto i {
  font-size: 1.2rem;
}

.btn-volver-producto strong {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Ajuste móvil */
@media (max-width: 767px) {
  .btn-volver-producto {
    padding: 6px 14px;
    font-size: 0.75rem;
    gap: 6px;
  }
  
  .btn-volver-producto i {
    font-size: 1rem;
  }
}

/* Eliminar estilos de breadcrumb antiguos si interfieren */
#breadcrumb-producto-mobile .breadcrumb-item,
#breadcrumb-producto-desktop .breadcrumb-item {
  display: inline-block;
}

#breadcrumb-producto-mobile .breadcrumb-item::before,
#breadcrumb-producto-desktop .breadcrumb-item::before {
  display: none;
}

#breadcrumb-producto-mobile .breadcrumb-item + .breadcrumb-item::before,
#breadcrumb-producto-desktop .breadcrumb-item + .breadcrumb-item::before {
  content: none;
}
/* ============================================
   BARRA INFERIOR MÓVIL — 5 ITEMS
   ============================================ */
.nav-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 1;
    padding: 4px 2px;
    min-width: 0;
    transition: transform 0.2s ease;
    font-size: 0.65rem;
    line-height: 1.1;
}

.nav-bottom-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.nav-bottom-item .small {
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.nav-bottom-item:hover {
    transform: translateY(-2px);
}

.nav-bottom-item:hover i {
    transform: scale(1.1);
}

/* Ajuste del contador del carrito para la barra inferior */
.nav-bottom-item .contador-carrito {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.6rem;
    background: var(--danger, #dc3545);
    color: white;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid white;
}

/* En pantallas muy pequeñas (< 360px) hacer los textos aún más pequeños */
@media (max-width: 360px) {
    .nav-bottom-item {
        font-size: 0.58rem;
    }
    .nav-bottom-item i {
        font-size: 1.15rem;
    }
    .nav-bottom-item .small {
        font-size: 0.58rem;
    }
}
/* ============================================
   FIX: MENÚ LATERAL OFFCANVAS
   ============================================ */
.offcanvas {
  visibility: hidden;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.offcanvas.show {
  visibility: visible;
  transform: translateX(0);
}

.offcanvas.offcanvas-end {
  transform: translateX(100%);
}

.offcanvas.offcanvas-end.show {
  transform: translateX(0);
}
/* ============================================
   POPUP DE CONFIANZA
   ✅ ACTUALIZADO: Bootstrap Icons en lugar de Material Symbols
   ============================================ */
.trust-popup {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 41, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: trustPopupFadeIn 0.4s ease;
}

@keyframes trustPopupFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.trust-popup-content {
  background: white;
  border-radius: 24px;
  padding: 2rem 1.75rem;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  animation: trustPopupSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.trust-popup-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #135bec, #10b981, #C9A96E);
}

@keyframes trustPopupSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================
   Botón cerrar
   ✅ CAMBIO: .material-symbols-outlined → i (Bootstrap Icons)
   ============================================ */
.trust-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.trust-popup-close:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

/* ✅ CAMBIO: Selector actualizado para Bootstrap Icons */
.trust-popup-close i {
  font-size: 18px;
  color: #64748b;
}

/* ============================================
   Header con ícono
   ============================================ */
.trust-popup-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.trust-popup-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 8px 24px rgba(19, 91, 236, 0.25);
  animation: trustPopupPulse 2s ease-in-out infinite;
}

@keyframes trustPopupPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 24px rgba(19, 91, 236, 0.25);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(19, 91, 236, 0.4);
  }
}

/* ✅ CAMBIO: Selector actualizado para Bootstrap Icons */
.trust-popup-icon i {
  font-size: 40px;
  color: #135bec;
}

.trust-popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1.5px solid #6ee7b7;
  border-radius: 9999px;
  color: #065f46;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Título */
.trust-popup-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.trust-popup-title strong {
  color: #135bec;
}

/* Texto */
.trust-popup-text {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* ============================================
   Badges de confianza
   ============================================ */
.trust-popup-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  margin-bottom: 1.25rem;
  border-top: 1.5px solid #f1f5f9;
  border-bottom: 1.5px solid #f1f5f9;
  flex-wrap: wrap;
}

.trust-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease;
}

.trust-badge-item:hover {
  transform: translateY(-3px);
}

.trust-badge-item img {
  width: auto;
  height: 32px;
  object-fit: contain;
}

.trust-badge-item span {
  font-size: 0.6rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   Beneficios
   ✅ CAMBIO: Selector actualizado para Bootstrap Icons
   ============================================ */
.trust-popup-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trust-popup-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #1e293b;
  font-weight: 500;
}

/* ✅ CAMBIO: Selector actualizado para Bootstrap Icons */
.trust-popup-benefits i {
  font-size: 18px;
  color: #10b981;
  flex-shrink: 0;
}

/* ============================================
   Botón principal
   ✅ CAMBIO: Selector actualizado para Bootstrap Icons
   ============================================ */
.trust-popup-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #135bec, #2563eb);
  color: white;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(19, 91, 236, 0.3);
}

.trust-popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(19, 91, 236, 0.45);
}

/* ✅ CAMBIO: Selector actualizado para Bootstrap Icons */
.trust-popup-btn i {
  font-size: 18px;
}

/* Timestamp */
.trust-popup-timestamp {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-style: italic;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 767px) {
  .trust-popup {
    align-items: flex-end;
    padding: 0;
    border-radius: 0;
  }

  .trust-popup-content {
    border-radius: 24px 24px 0 0;
    max-width: 100%;
    padding: 1.75rem 1.25rem 1.5rem;
    animation: trustPopupSlideUpMobile 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes trustPopupSlideUpMobile {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .trust-popup-title {
    font-size: 1rem;
  }

  .trust-popup-icon {
    width: 60px;
    height: 60px;
  }

  /* ✅ CAMBIO: Selector actualizado para Bootstrap Icons */
  .trust-popup-icon i {
    font-size: 32px;
  }

  .trust-popup-badges {
    gap: 0.75rem;
  }

  .trust-badge-item img {
    height: 26px;
  }

  .trust-badge-item span {
    font-size: 0.55rem;
  }

  /* ✅ CAMBIO: Ajustes para botón e íconos en mobile */
  .trust-popup-btn i {
    font-size: 16px;
  }

  .trust-popup-benefits i {
    font-size: 16px;
  }
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark .trust-popup-content {
  background: #1a2332;
  border-color: #2d3748;
}

body.dark .trust-popup-title {
  color: #f1f5f9;
}

body.dark .trust-popup-text {
  color: #94a3b8;
}

body.dark .trust-popup-close {
  background: #243044;
}

body.dark .trust-popup-close:hover {
  background: #334155;
}

/* ✅ CAMBIO: Selector actualizado para Bootstrap Icons */
body.dark .trust-popup-close i {
  color: #cbd5e1;
}

body.dark .trust-popup-badges {
  border-color: #2d3748;
}

body.dark .trust-popup-benefits li {
  color: #e2e8f0;
}
/* ============================================
   FIX: SELLO "TU NEGOCIO EN LÍNEA" EN POPUP
   El logo es blanco, necesita fondo para contraste
   ============================================ */
.trust-badge-item img[alt="Tu Negocio en Línea"] {
  background: linear-gradient(135deg, #1e3a5f, #0f1729);
  border-radius: 8px;
  padding: 6px 10px;
  height: 36px !important;
  width: auto !important;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(15, 23, 41, 0.2);
}

/* Efecto hover para todos los sellos */
.trust-badge-item:hover img[alt="Tu Negocio en Línea"] {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(15, 23, 41, 0.3);
}

/* En móvil, ajustar tamaño */
@media (max-width: 767px) {
  .trust-badge-item img[alt="Tu Negocio en Línea"] {
    height: 30px !important;
    padding: 4px 8px;
  }
}
/* ============================================
   MODAL DE ZOOM DE IMAGEN PRINCIPAL
   ============================================ */

/* Fondo negro que ocupa toda la pantalla */
#modalZoomImagen .modal-dialog {
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

#modalZoomImagen .modal-content {
  background: rgba(0, 0, 0, 0.96);
  border: none;
  border-radius: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#modalZoomImagen .modal-header {
  border: none;
  padding: 10px 15px;
  flex-shrink: 0;
  min-height: 50px;
}

#modalZoomImagen .modal-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 70px;        /* espacio lateral para las flechas */
  overflow: hidden;
  position: relative;
}

/* ============================================
   IMAGEN AMPLIADA — ocupa todo el espacio
   ============================================ */
#imagen-zoom {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
  user-select: none;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

@keyframes zoomIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ============================================
   BOTÓN CERRAR — más visible
   ============================================ */
#modalZoomImagen .btn-close {
  opacity: 1;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  background-size: 45%;
  transition: all 0.2s;
  z-index: 20;
}

#modalZoomImagen .btn-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ============================================
   FLECHAS DE NAVEGACIÓN (ESCRITORIO)
   ============================================ */
.btn-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #1B4557;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 15;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.btn-zoom-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

.btn-zoom-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.btn-zoom-prev { left: 20px; }
.btn-zoom-next { right: 20px; }

/* ============================================
   INDICADOR "5 / 7"
   ============================================ */
.zoom-indicador {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 15;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============================================
   HINT DE SWIPE (solo móvil)
   ============================================ */
.zoom-swipe-hint {
  display: none;   /* oculto por defecto, se muestra solo en móvil */
}

/* ============================================
   RESPONSIVE — MÓVIL
   ✅ Sin flechas (se navega con swipe)
   ✅ Imagen ocupa casi toda la pantalla
   ============================================ */
@media (max-width: 768px) {
  #modalZoomImagen .modal-header {
    padding: 5px 10px;
    min-height: 40px;
  }

  #modalZoomImagen .modal-body {
    padding: 0 10px;   /* casi sin padding: la imagen ocupa todo */
  }

  #imagen-zoom {
    border-radius: 4px;
  }

  /* ✅ Ocultar flechas en móvil — se navega con swipe */
  .btn-zoom-nav {
    display: none !important;
  }

  .zoom-indicador {
    bottom: 15px;
    font-size: 0.8rem;
    padding: 4px 14px;
  }

  #modalZoomImagen .btn-close {
    width: 36px;
    height: 36px;
  }

  /* ✅ Pista visual de swipe (primera vez) */
  .zoom-swipe-hint {
    display: flex;
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    align-items: center;
    gap: 8px;
    animation: swipeHintAnim 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 15;
    white-space: nowrap;
  }

  .zoom-swipe-hint i {
    font-size: 1.2rem;
    animation: swipeHintIcon 2s ease-in-out infinite;
  }

  @keyframes swipeHintAnim {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
  }

  @keyframes swipeHintIcon {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(6px); }
  }
}

/* ============================================
   FIN DEL MODAL DE ZOOM
   ============================================ */
/* ============================================
   FIN DEL CSS
   ============================================ */
