/* =========================================================================
   CHROMME THEME — Ecommerce
   Inspirado en Google Chrome Material Design 3 + Shopify Dawn.
   Paleta fría, mucho espacio blanco, sombras elevadas, hovers suaves.
   ========================================================================= */

:root {
  /* Paleta Chromme */
  --ch-primary:        #1967d2;  /* Chrome blue */
  --ch-primary-dark:   #174ea6;
  --ch-primary-light:  #d2e3fc;
  --ch-accent:         #ff6f00;  /* Naranja para CTAs destacadas */
  --ch-accent-dark:    #e65100;

  --ch-surface:        #ffffff;
  --ch-surface-2:      #f8f9fa;
  --ch-surface-3:      #f1f3f4;
  --ch-border:         #e8eaed;
  --ch-border-strong:  #dadce0;

  --ch-text:           #202124;
  --ch-text-muted:     #5f6368;
  --ch-text-disabled:  #9aa0a6;

  --ch-success:        #188038;
  --ch-warning:        #f29900;
  --ch-danger:         #d93025;

  /* Elevación — sombras Material 3 */
  --elev-1: 0 1px 2px rgba(60,64,67,.10), 0 1px 3px rgba(60,64,67,.08);
  --elev-2: 0 1px 2px rgba(60,64,67,.10), 0 2px 6px rgba(60,64,67,.10);
  --elev-3: 0 2px 6px rgba(60,64,67,.12), 0 4px 12px rgba(60,64,67,.14);
  --elev-4: 0 4px 12px rgba(60,64,67,.14), 0 8px 24px rgba(60,64,67,.18);

  /* Radios */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Transiciones */
  --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-med:  200ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 360ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset mínimo y tipografía
   ========================================================================== */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Google Sans', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  background: var(--ch-surface-2);
  color: var(--ch-text);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ch-text);
}

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

/* ==========================================================================
   Navbar / Header
   ========================================================================== */
.navbar {
  background: var(--ch-surface) !important;
  border-bottom: 1px solid var(--ch-border);
  box-shadow: var(--elev-1);
  padding: 0.75rem 0;
  transition: box-shadow var(--t-med);
}
.navbar.scrolled { box-shadow: var(--elev-2); }

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ch-text) !important;
}
.navbar-brand img { border-radius: var(--r-sm); }

.navbar .nav-link {
  color: var(--ch-text-muted) !important;
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}
.navbar .nav-link:hover {
  color: var(--ch-primary) !important;
  background: var(--ch-primary-light);
}

/* Search bar en header */
.navbar .form-search {
  background: var(--ch-surface-3);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  display: flex;
  align-items: center;
  transition: all var(--t-med);
  border: 1px solid transparent;
}
.navbar .form-search:focus-within {
  background: var(--ch-surface);
  border-color: var(--ch-primary);
  box-shadow: var(--elev-2);
}
.navbar .form-search input {
  background: transparent;
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 0;
  color: var(--ch-text);
}

/* Carrito icon flotante */
.btn-cart-header {
  position: relative;
  background: var(--ch-surface-3);
  color: var(--ch-text) !important;
  border: 0;
  border-radius: var(--r-pill);
  padding: 0.55rem 1rem;
  font-weight: 600;
  transition: all var(--t-fast);
}
.btn-cart-header:hover {
  background: var(--ch-primary-light);
  color: var(--ch-primary) !important;
  transform: translateY(-1px);
}
.badge-cart {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--ch-accent);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  min-width: 20px;
  text-align: center;
  box-shadow: var(--elev-1);
}

/* ==========================================================================
   Hero / banners
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, var(--ch-primary) 0%, var(--ch-primary-dark) 100%);
  border-radius: 0;
  color: #fff;
  padding: 3.5rem 0;
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: '';
  position: absolute;
  right: -50px; top: -50px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-banner h1 { font-size: 2.5rem; margin-bottom: 1rem; color: #fff; }
.hero-banner p  { font-size: 1.1rem; opacity: 0.9; }
.hero-banner .btn-primary {
  background: var(--ch-accent);
  border-color: var(--ch-accent);
  font-weight: 600;
  padding: 0.75rem 2rem;
  box-shadow: var(--elev-3);
}
.hero-banner .btn-primary:hover {
  background: var(--ch-accent-dark);
  border-color: var(--ch-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--elev-4);
}

/* ==========================================================================
   Cards de producto
   ========================================================================== */
.card {
  border: 1px solid var(--ch-border);
  border-radius: var(--r-lg);
  background: var(--ch-surface);
  overflow: hidden;
  transition: all var(--t-med);
}
.card.hover-lift { cursor: pointer; }
.card.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--elev-4) !important;
  border-color: var(--ch-primary-light);
}

.product-img-wrapper {
  position: relative;
  background: var(--ch-surface-3);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform var(--t-slow);
  padding: 1rem;
}
.hover-lift:hover .product-img { transform: scale(1.08); }

/* Badges sobre imagen del producto (oferta, nuevo, agotado) */
.product-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--elev-1);
}
.product-badge.oferta { background: var(--ch-accent); color: #fff; }
.product-badge.nuevo  { background: var(--ch-success); color: #fff; }
.product-badge.agotado{ background: var(--ch-text-disabled); color: #fff; }

/* Wishlist heart */
.btn-wishlist {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255,255,255,0.92);
  border: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ch-text-muted);
  box-shadow: var(--elev-1);
  transition: all var(--t-fast);
  z-index: 2;
}
.btn-wishlist:hover { transform: scale(1.1); color: var(--ch-danger); }
.btn-wishlist.active { color: var(--ch-danger); background: #fff; }

.product-title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ch-text);
  margin-bottom: 0.25rem;
}
.product-meta { font-size: 0.8rem; color: var(--ch-text-muted); }

.product-price { font-size: 1.25rem; font-weight: 700; color: var(--ch-text); }
.product-price-old {
  font-size: 0.9rem;
  color: var(--ch-text-muted);
  text-decoration: line-through;
  margin-left: 0.4rem;
}

/* ==========================================================================
   Botones
   ========================================================================== */
.btn {
  font-weight: 500;
  border-radius: var(--r-md);
  padding: 0.55rem 1.25rem;
  transition: all var(--t-fast);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ch-primary) !important;
  border-color: var(--ch-primary) !important;
}
.btn-primary:hover {
  background: var(--ch-primary-dark) !important;
  border-color: var(--ch-primary-dark) !important;
  box-shadow: var(--elev-2);
}
.btn-accent {
  background: var(--ch-accent);
  border-color: var(--ch-accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--ch-accent-dark);
  border-color: var(--ch-accent-dark);
  color: #fff;
  box-shadow: var(--elev-2);
}
.btn-outline-primary {
  color: var(--ch-primary);
  border-color: var(--ch-border-strong);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--ch-primary);
  color: #fff;
  border-color: var(--ch-primary);
}
.btn-pill { border-radius: var(--r-pill); }

/* ==========================================================================
   Filtros y sidebar en tienda
   ========================================================================== */
.filtros-sidebar {
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  position: sticky;
  top: 90px;
}
.filtro-titulo {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ch-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ch-border);
}
.filtro-grupo { margin-bottom: 1.5rem; }
.filtro-grupo:last-child { margin-bottom: 0; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.breadcrumb-item + .breadcrumb-item::before {
  color: var(--ch-text-disabled);
  content: '›';
  font-weight: 600;
}
.breadcrumb-item a { color: var(--ch-text-muted); }
.breadcrumb-item.active { color: var(--ch-text); }

/* ==========================================================================
   Detalle de producto
   ========================================================================== */
.producto-detalle-img {
  max-height: 500px;
  object-fit: contain;
  background: var(--ch-surface-3);
  border-radius: var(--r-lg);
  padding: 2rem;
}

.galeria-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.galeria-thumb {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  border: 2px solid var(--ch-border);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--ch-surface-3);
}
.galeria-thumb img {
  width: 100%; height: 100%; object-fit: contain; padding: 4px;
}
.galeria-thumb:hover,
.galeria-thumb.active { border-color: var(--ch-primary); }

.producto-precio-bloque {
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-top: 1rem;
}

/* ==========================================================================
   Carrito / Checkout
   ========================================================================== */
.carrito-item {
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  border-radius: var(--r-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all var(--t-fast);
}
.carrito-item:hover { box-shadow: var(--elev-1); }

.resumen-carrito {
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
  box-shadow: var(--elev-1);
}
.resumen-carrito hr { border-color: var(--ch-border); }

.input-cantidad-carrito,
#cantidadDetalle {
  -moz-appearance: textfield;
  text-align: center;
  border: 1px solid var(--ch-border);
  border-radius: var(--r-sm);
  color: #202124;
  background: #fff;
  font-weight: 600;
  font-size: 1rem;
  min-width: 48px;
  padding: .375rem .25rem;
  -webkit-text-fill-color: #202124;
  opacity: 1;
}
.input-cantidad-carrito::-webkit-outer-spin-button,
.input-cantidad-carrito::-webkit-inner-spin-button,
#cantidadDetalle::-webkit-outer-spin-button,
#cantidadDetalle::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* En móvil: prevenir zoom de iOS Safari y números invisibles por
   color heredado del navegador en inputs de tipo number */
@media (max-width: 768px) {
  .input-cantidad-carrito,
  #cantidadDetalle {
    font-size: 16px !important;
    min-width: 56px;
    height: 42px;
    color: #202124 !important;
    -webkit-text-fill-color: #202124 !important;
    background: #fff !important;
  }
  /* Asegura que el contenedor del selector de cantidad sea suficientemente ancho */
  .producto-detalle-cantidad .input-group { width: 150px !important; }
  .producto-detalle-cantidad .btn { min-width: 42px; }
}

/* Pasos del checkout */
.checkout-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  counter-reset: step;
}
.checkout-step {
  flex: 1;
  text-align: center;
  position: relative;
  color: var(--ch-text-muted);
  font-size: 0.85rem;
}
.checkout-step::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  width: 36px; height: 36px;
  background: var(--ch-surface-3);
  border: 2px solid var(--ch-border);
  border-radius: 50%;
  line-height: 32px;
  margin: 0 auto 0.5rem;
  font-weight: 700;
}
.checkout-step.active { color: var(--ch-primary); }
.checkout-step.active::before {
  background: var(--ch-primary);
  color: #fff;
  border-color: var(--ch-primary);
}
.checkout-step.done::before {
  background: var(--ch-success);
  color: #fff;
  border-color: var(--ch-success);
  content: '✓';
}

/* ==========================================================================
   Formularios
   ========================================================================== */
.form-control, .form-select {
  border: 1px solid var(--ch-border-strong);
  border-radius: var(--r-md);
  padding: 0.6rem 0.9rem;
  transition: all var(--t-fast);
  background: var(--ch-surface);
}
.form-control:focus, .form-select:focus {
  border-color: var(--ch-primary);
  box-shadow: 0 0 0 3px var(--ch-primary-light);
  outline: 0;
}
.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ch-text-muted);
  margin-bottom: 0.35rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--ch-text) !important;
  color: #d2e3fc;
  padding: 3rem 0 1.5rem !important;
  margin-top: 4rem;
}
footer h5, footer h6 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
footer a {
  color: #d2e3fc !important;
  font-size: 0.9rem;
  transition: color var(--t-fast);
}
footer a:hover { color: #fff !important; }
footer .social-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
footer .social-links a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: all var(--t-fast);
}
footer .social-links a:hover {
  background: var(--ch-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   WhatsApp flotante
   ========================================================================== */
.fab-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px; height: 56px;
  background: #25d366;
  color: #fff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: var(--elev-3);
  z-index: 999;
  transition: all var(--t-fast);
  text-decoration: none;
}
.fab-whatsapp:hover {
  transform: scale(1.08);
  box-shadow: var(--elev-4);
  color: #fff !important;
}
.fab-whatsapp::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  opacity: 0.3;
  animation: pulseWa 2s infinite;
  z-index: -1;
}
@keyframes pulseWa {
  0%   { transform: scale(1);   opacity: 0.3; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ==========================================================================
   Skeleton loader (para fetch diferidos)
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, var(--ch-surface-3) 0%, var(--ch-surface-2) 50%, var(--ch-surface-3) 100%);
  background-size: 200% 100%;
  animation: sk 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
}
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==========================================================================
   Paginación
   ========================================================================== */
.pagination {
  gap: 0.25rem;
}
.pagination .page-link {
  color: var(--ch-text);
  border: 1px solid var(--ch-border);
  border-radius: var(--r-md) !important;
  margin: 0;
  padding: 0.5rem 0.85rem;
  font-weight: 500;
  transition: all var(--t-fast);
}
.pagination .page-link:hover {
  background: var(--ch-primary-light);
  color: var(--ch-primary);
  border-color: var(--ch-primary-light);
}
.pagination .page-item.active .page-link {
  background: var(--ch-primary);
  border-color: var(--ch-primary);
}
.pagination .page-item.disabled .page-link { color: var(--ch-text-disabled); }

/* ==========================================================================
   Responsive fine-tuning
   ========================================================================== */
@media (max-width: 768px) {
  .hero-banner { padding: 2.5rem 0; }
  .hero-banner h1 { font-size: 1.75rem; }
  .fab-whatsapp { bottom: 16px; right: 16px; width: 48px; height: 48px; font-size: 24px; }
  .filtros-sidebar { position: static; margin-bottom: 1rem; }
  .resumen-carrito { position: static; }
}

/* ==========================================================================
   Utilidades varias
   ========================================================================== */
.text-accent    { color: var(--ch-accent) !important; }
.bg-accent      { background: var(--ch-accent) !important; color: #fff; }
.text-primary-ch{ color: var(--ch-primary) !important; }
.bg-surface     { background: var(--ch-surface) !important; }
.bg-surface-2   { background: var(--ch-surface-2) !important; }
.radius-md      { border-radius: var(--r-md) !important; }
.radius-lg      { border-radius: var(--r-lg) !important; }
.elev-1         { box-shadow: var(--elev-1) !important; }
.elev-2         { box-shadow: var(--elev-2) !important; }
.elev-3         { box-shadow: var(--elev-3) !important; }

/* Empty states */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ch-text-muted);
}
.empty-state-icon {
  font-size: 4rem;
  color: var(--ch-border-strong);
  margin-bottom: 1rem;
}

/* Footer links con iconos */
.footer-links li {
  margin-bottom: 6px;
}
.footer-links li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  transition: color .15s ease, transform .15s ease;
  opacity: .85;
}
.footer-links li a:hover {
  opacity: 1;
  transform: translateX(2px);
}
.footer-links li a i {
  width: 18px;
  text-align: center;
  font-size: .9rem;
  color: rgba(255,255,255,.7);
}
.footer-links li a:hover i {
  color: #fff;
}

/* Accessibility focus outline */
*:focus-visible {
  outline: 2px solid var(--ch-primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ============================================================
   Navbar ecommerce — compacto en móvil
   ============================================================ */
.navbar-ecom .navbar-logo {
  height: 40px;
  width: auto;
  transition: height .15s ease;
}
.navbar-ecom .navbar-toggler {
  padding: .35rem .55rem;
  font-size: 1rem;
  border-radius: 8px;
  border-color: rgba(0,0,0,.08);
}
.navbar-ecom .navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(25,103,210,.25); }

.badge-carrito-mobile {
  font-size: .65rem;
  padding: .2em .45em;
}

@media (max-width: 991.98px) {
  .navbar-ecom { padding-top: .35rem; padding-bottom: .35rem; }
  .navbar-ecom .container { padding-left: .75rem; padding-right: .75rem; }
  .navbar-ecom .navbar-brand { padding-top: 0; padding-bottom: 0; margin-right: .5rem; }
  .navbar-ecom .navbar-logo { height: 32px; max-width: 140px; object-fit: contain; }
  .navbar-ecom .navbar-actions-mobile .nav-link { padding: .25rem .4rem; }
  .navbar-ecom .navbar-actions-mobile .fa-shopping-cart { font-size: 1.1rem; }

  .navbar-ecom .navbar-collapse {
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(0,0,0,.06);
  }
  .navbar-ecom .navbar-nav .nav-link { padding: .5rem .25rem; font-size: .95rem; }
  .navbar-ecom .busqueda-live-form {
    width: 100%;
    margin-right: 0 !important;
    margin-bottom: .5rem;
    min-width: 0;
  }
  .navbar-ecom .busqueda-live-input { min-width: 0; flex: 1; }
}

/* ============================================================
   Búsqueda en vivo (autocompletar del navbar)
   ============================================================ */
.busqueda-live-form {
  min-width: 260px;
}
.busqueda-live-form .busqueda-live-input {
  min-width: 220px;
}
.busqueda-live-resultados {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 460px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--r-md, 10px);
  box-shadow: var(--elev-3, 0 8px 24px rgba(0,0,0,.12));
  z-index: 1050;
  padding: 6px 0;
}
.busqueda-live-resultados[hidden] {
  display: none !important;
}
.busqueda-live-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: inherit;
  transition: background .12s ease;
  border-left: 3px solid transparent;
}
.busqueda-live-item:hover,
.busqueda-live-item:focus,
.busqueda-live-item.active {
  background: rgba(25, 103, 210, .06);
  border-left-color: var(--ch-primary, #1967d2);
  color: inherit;
  text-decoration: none;
}
.busqueda-live-item img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #f5f5f5;
}
.busqueda-live-item .info {
  flex: 1;
  min-width: 0;
}
.busqueda-live-item .nombre {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.busqueda-live-item .meta {
  font-size: .72rem;
  color: #5f6368;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.busqueda-live-item .precio-box {
  text-align: right;
  flex-shrink: 0;
}
.busqueda-live-item .precio {
  font-weight: 700;
  font-size: .9rem;
  color: var(--ch-primary, #1967d2);
  line-height: 1;
}
.busqueda-live-item .precio-tachado {
  font-size: .72rem;
  color: #9aa0a6;
  text-decoration: line-through;
  display: block;
}
.busqueda-live-item.oferta .precio { color: #d93025; }
.busqueda-live-item .agotado {
  font-size: .7rem;
  color: #d93025;
  font-weight: 600;
}
.busqueda-live-empty,
.busqueda-live-loading {
  padding: 18px 14px;
  text-align: center;
  color: #5f6368;
  font-size: .85rem;
}
.busqueda-live-loading i {
  color: var(--ch-primary, #1967d2);
}
.busqueda-live-footer {
  border-top: 1px solid rgba(0,0,0,.06);
  padding: 8px 12px;
  text-align: center;
  font-size: .82rem;
}
.busqueda-live-footer a {
  color: var(--ch-primary, #1967d2);
  text-decoration: none;
  font-weight: 600;
}
.busqueda-live-footer a:hover { text-decoration: underline; }
.busqueda-live-highlight {
  background: #fff59d;
  border-radius: 2px;
  padding: 0 1px;
}
@media (max-width: 768px) {
  .busqueda-live-form { min-width: 100%; }
  .busqueda-live-resultados { max-height: 60vh; }
}

/* ============================================================
   Galería de miniaturas (página detalle producto)
   ============================================================ */
.galeria-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.galeria-thumb {
  width: 68px;
  height: 68px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  flex-shrink: 0;
}
.galeria-thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--elev-2, 0 4px 12px rgba(0,0,0,.08));
}
.galeria-thumb.active {
  border-color: var(--ch-primary, #1967d2);
  box-shadow: 0 0 0 3px rgba(25, 103, 210, .18);
}
.galeria-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.producto-detalle-img {
  transition: opacity .2s ease;
  max-height: 420px;
  object-fit: contain;
}
.producto-detalle-img.cambiando {
  opacity: 0;
}

/* ============================================================
   Grid de Categorías (home) — chips pequeños y centrados
   ============================================================ */
.categorias-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #202124;
}
.categorias-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
}
.categoria-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 104px;
  padding: 12px 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: var(--r-md, 12px);
  text-decoration: none;
  color: #3c4043;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  box-shadow: var(--elev-1, 0 1px 3px rgba(0,0,0,.05));
}
.categoria-chip:hover,
.categoria-chip:focus {
  transform: translateY(-3px);
  border-color: var(--ch-primary, #1967d2);
  box-shadow: var(--elev-2, 0 4px 12px rgba(0,0,0,.08));
  color: var(--ch-primary, #1967d2);
  text-decoration: none;
  background: #fafcff;
}
.categoria-chip-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(25,103,210,.10), rgba(25,103,210,.04));
  color: var(--ch-primary, #1967d2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background .18s ease, color .18s ease;
}
.categoria-chip:hover .categoria-chip-icon,
.categoria-chip:focus .categoria-chip-icon {
  background: var(--ch-primary, #1967d2);
  color: #fff;
}
.categoria-chip-label {
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  word-break: break-word;
}
@media (max-width: 576px) {
  .categoria-chip { width: 88px; padding: 10px 6px; }
  .categoria-chip-icon { width: 38px; height: 38px; font-size: 1rem; }
  .categoria-chip-label { font-size: .72rem; }
}

/* Botón "Consultar por WhatsApp" */
.btn-consultar-wa {
  color: #25d366 !important;
  border-color: #25d366 !important;
}
.btn-consultar-wa:hover,
.btn-consultar-wa:focus {
  background: #25d366 !important;
  color: #fff !important;
}
.btn-consultar-wa i { margin-right: 4px; }
