/* ========================================
   NUTRILEVEL PREMIUM - COMMERCIAL THEME
   Negro, Rojo y Grises
   ======================================== */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Nuevo esquema de colores: Negro, Rojo, Grises */
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #1a1a1a;
  --bg-hover: #252525;

  /* Accent Colors - Rojo */
  --accent-primary: #ff0000;
  --accent-secondary: #cc0000;
  --accent-gradient: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #707070;

  /* Border & Shadow */
  --border-color: #2a2a2a;
  /* Enhanced shadows for depth and premium feel */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 8px 32px rgba(255, 0, 0, 0.25);

  /* Spacing */
  /* Improved spacing scale for better visual hierarchy */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1.25rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Transitions */
  /* Smoother transitions for better premium feel */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  /* Improved line height for readability */
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  /* Updated padding to use the new spacing scale */
  padding: 0 var(--spacing-lg);
}

/* === HEADER === */
/* Estilos básicos para el header */
.header {
  background-color: #000000;
  color: rgb(0, 0, 0);
  /* Updated padding to use the new spacing scale */
  padding: 1rem 0; /* Aumenta el padding superior e inferior */
  border-bottom: 1px solid #252525;
  /* Added subtle backdrop effect */
  position: fixed;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.95);
  width: 100%;
  /* Added transition and transform for smooth hide/show effect */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

/* Hide header by translating it up when scrolling down */
.header.hidden {
  transform: translateY(-100%);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0; /* Aumenta el padding para dar más espacio a los elementos */
  /* Better responsive gap */
  gap: var(--spacing-md);
}

main {
  padding: 20px;
  /* Removed min-height: 2000px that was causing excessive vertical space */
  min-height: auto;
}

.logo h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.8px;
  /* Improved text rendering */
  -webkit-font-smoothing: antialiased;
}

.logo h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo a {
  text-decoration: none;
  color: inherit;
}

/* ensure visited/hover on the logo don't show an underline or different color */
.logo a:link,
.logo a:visited,
.logo a:hover,
.logo a:active {
  text-decoration: none;
  color: inherit;
}

/* Search Bar */
.search-bar {
  flex: 1;
  max-width: 200px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 1rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-normal);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-accent);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

/* Nav scroll + arrows for mobile */
.nav-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-scroll-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.6rem;
  padding: 6px 8px;
  cursor: pointer;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.header-nav {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.header-nav .nav-link {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 8px;
}

/* Product image hover zoom */
.product-card,
.combo-card {
  overflow: hidden;
}

.product-image,
.combo-image,
.modal-product-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.35s ease, filter 0.35s ease;
  will-change: transform;
}

.product-card:hover .product-image,
.combo-card:hover .combo-image {
  transform: none;
}

/* Apply hover zoom only on non-home pages */
body:not(.home) .product-card:hover .product-image,
body:not(.home) .combo-card:hover .combo-image {
  transform: scale(1.12);
}

/* When magnifier is active on an image, disable the CSS hover zoom to avoid conflicts */
.product-image.no-magnifier,
.combo-image.no-magnifier {
  transform: none !important;
}

/* Magnifier lens styles (default hidden) */
.img-magnifier-lens {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  width: 140px;
  height: 140px;
  pointer-events: none;
  background-repeat: no-repeat;
  z-index: 2000;
  display: none;
}

/* Slight zoom for modal image on hover for desktop */
@media (hover: hover) and (pointer: fine) {
  .modal-product-image:hover {
    transform: scale(1.05);
  }
}

@media (max-width: 720px) {
  .nav-scroll-btn {
    display: block;
  }
  .nav-wrap {
    width: 100%;
  }
  .header-nav {
    flex: 1;
  }
}

.search-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.search-btn:hover {
  color: var(--accent-primary);
}

/* Cart Button */
.cart-btn {
  position: sticky;
  background: var(--accent-gradient);
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 000;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-accent);
}

.cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 0, 0, 0.4);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #ffffff;
  color: #ff0000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
}

/* Back Button */
.back-btn {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
}

.back-btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent-primary);
}

/* Search and Filter Group */
.search-filter-group {
  display: flex;
  gap: 10px; /* Aumenta el espaciado entre los elementos (filtros y búsqueda) */
  flex-grow: 1; /* Asegura que la barra de búsqueda ocupe el espacio disponible */
}
.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 0.75rem 1rem;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  white-space: nowrap;
}

/* Navigation in Header */
.header-nav {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}

.header-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 0.5rem 1rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--accent-gradient);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

/* === MAIN LAYOUT === */
.main-wrapper {
  padding: var(--spacing-xl) 0;
  min-height: calc(100vh - 200px);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  position: relative;
}

/* === HERO CAROUSEL === */
/* Improved carousel styling */
.hero-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-secondary);
  /* Added bottom margin */
  margin-bottom: var(--spacing-xl);
}

.carousel-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  height: 500px;
  /* Smoother carousel transitions */
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
  /* Added smooth filter transitions */
  transition: filter var(--transition-slow);
}

.carousel-slide.active img {
  filter: brightness(0.55);
}

.carousel-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-primary);
  z-index: 2;
  width: 90%;
  max-width: 800px;
  /* Added entrance animation */
  animation: slideInContent 0.8s ease;
}

@keyframes slideInContent {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.carousel-content h2 {
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.9);
  line-height: 1.1;
  letter-spacing: -1px;
}

.carousel-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: var(--spacing-lg);
  color: var(--text-secondary);
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.85);
  font-weight: 500;
}

.carousel-btn {
  padding: 1.1rem 2.8rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-accent);
  letter-spacing: 0.5px;
}

.carousel-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 0, 0, 0.4);
}

.carousel-control {
  /* Better carousel controls styling */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 0, 0, 0.75);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all var(--transition-normal);
  backdrop-filter: blur(8px);
}

.carousel-control:hover {
  background-color: var(--accent-primary);
  transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
  left: 20px;
}

.carousel-control.next {
  right: 20px;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-indicator.active {
  background-color: var(--accent-primary);
  width: 30px;
  border-radius: 6px;
}

/* === CATEGORIES SECTION === */
.categories-section {
  padding: var(--spacing-xl) 0;
  background-color: var(--bg-primary);
  /* Added border top for separation */
  border-top: 1px solid var(--border-color);
}

/* Updated section title styles */
.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  /* Added letter spacing for premium feel */
  letter-spacing: -1px;
  margin-top: var(--spacing-xl);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-lg);
}

.category-card {
  position: relative;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid var(--border-color);
  height: 340px;
  /* Enhanced hover effect */
}

.category-card:hover {
  transform: translateY(-12px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 60px rgba(255, 0, 0, 0.2);
}

.category-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  filter: brightness(0.65);
}

.category-card:hover .category-image img {
  transform: scale(1.08);
  filter: brightness(0.45);
}

.category-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.98), transparent);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.category-info h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.category-info p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.category-arrow {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  font-size: 2.2rem;
  color: var(--accent-primary);
  transition: transform var(--transition-normal);
}

.category-card:hover .category-arrow {
  transform: translateX(8px);
}

/* === FILTER TOGGLE === */
.filter-toggle-container {
  margin-bottom: var(--spacing-md);
}

.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 0.75rem 1.5rem;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.filter-toggle-btn:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-tertiary);
}

.filter-badge {
  background-color: var(--accent-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.filter-badge:empty {
  display: none;
}

/* === SIDEBAR (DESPLEGABLE) === */
.filter-overlay {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.filter-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -350px;
  width: 350px;
  /* Usar dvh para viewport dinámico de Chrome Android */
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  overflow-y: auto;
  transition: left var(--transition-normal);
  padding: var(--spacing-md);
  /* Agregar padding-bottom para safe-area en Android */
  padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom, 0px));
}

.sidebar.active {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--accent-primary);
}

.sidebar-header h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* Updated close-filters button to be a proper button with text */
.close-filters {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 1;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  font-weight: 500;
}

.close-filters:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.close-filters svg {
  width: 18px;
  height: 18px;
}

.filter-section {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.filter-section:last-of-type {
  border-bottom: none;
}

.filter-section h3 {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  font-weight: 600;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.filter-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}

.filter-item:hover {
  background-color: var(--bg-hover);
}

.filter-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.filter-item span {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Price Filter */
.price-filter {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

#priceRange {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  outline: none;
  -webkit-appearance: none;
}

#priceRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gradient);
  cursor: pointer;
  box-shadow: var(--shadow-accent);
}

#priceRange::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gradient);
  cursor: pointer;
  border: none;
}

.price-display {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Clear Filters Button */
.clear-filters {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-normal);
  /* Agregar margin-bottom para safe-area en Android Chrome */
  margin-bottom: env(safe-area-inset-bottom, 0px);
}

.clear-filters:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* === PRODUCTS SECTION === */
.products-section {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.products-header {
  margin-bottom: var(--spacing-lg);
}

.products-header h2 {
  font-size: 1.8rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.products-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

/* Product Card */
.product-card {
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

/* Busca este bloque en tu CSS (aprox línea 545) y actualízalo así: */
.product-image,
.bestseller-image,
.combo-image {
  width: 100%;
  height: auto; /* Quitamos los 220px fijos */
  aspect-ratio: 1 / 1; /* Esto crea un cuadrado perfecto proporcional al ancho */
  object-fit: contain; /* Muestra la imagen completa sin recortar nada */
  background-color: #ffffff;
  display: block;
  padding: 5px; /* Opcional: Da un pequeño aire para que no toque los bordes */
}

.product-info {
  padding: var(--spacing-md);
}

.product-brand {
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-xs);
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

.product-category {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: var(--spacing-sm);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-md);
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.add-to-cart-btn {
  background: var(--accent-gradient);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-accent);
}

.add-to-cart-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.5);
}

/* Size Selector */
.size-selector {
  margin: var(--spacing-lg) 0;
}

.size-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  font-size: 1rem;
}

.size-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.size-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.size-option:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-hover);
}

.size-option.selected {
  border-color: var(--accent-primary);
  background-color: var(--bg-hover);
}

.size-option input[type="radio"] {
  margin-right: var(--spacing-sm);
  accent-color: var(--accent-primary);
}

.size-text {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

.size-price {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

/* No Results */
.no-results {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-secondary);
}

.no-results svg {
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

/* === CART SIDEBAR === */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100dvh;
  height: 100vh; /* Fallback para navegadores sin soporte dvh */
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: right var(--transition-normal);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@supports (height: 100dvh) {
  .cart-sidebar {
    height: 100dvh;
  }
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.cart-header h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.close-cart {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: color var(--transition-fast);
}

.close-cart:hover {
  color: var(--accent-primary);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}

/* Cart Item */
.cart-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--border-color);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: contain; /* Changed from cover to contain to show full product */
  border-radius: var(--radius-sm);
  background-color: #ffffff; /* Changed from var(--bg-hover) to white */
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.cart-item-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.cart-item-brand {
  color: var(--accent-primary);
  font-size: 0.85rem;
}

.cart-item-price {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xs);
}

.quantity-btn {
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all var(--transition-fast);
}

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

.quantity-display {
  color: var(--text-primary);
  font-weight: 600;
  min-width: 30px;
  text-align: center;
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
  transition: opacity var(--transition-fast);
}

.remove-item-btn:hover {
  opacity: 0.7;
}

/* Cart Empty */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  padding: var(--spacing-xl);
}

.cart-empty svg {
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

/* Cart Footer */
.cart-footer {
  padding: var(--spacing-md);
  padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  font-size: 1.2rem;
}

.cart-total span:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.total-amount {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.checkout-btn {
  width: 100%;
  padding: 1rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-accent);
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 0, 0, 0.5);
}

/* === MODAL === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: var(--spacing-md);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease;
}

/* Promo modal specifics (small, centered image) */
.promo-modal-content {
  max-width: 720px;
  width: 95%;
  padding: var(--spacing-md);
}

.promo-modal-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Gentle animation and lighter overlay to be less intrusive */
.modal {
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal:not(.active) {
  opacity: 0;
  visibility: hidden;
}

.modal::before {
  /* overlay */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
}

.promo-modal-content {
  animation: popIn 260ms cubic-bezier(0.2, 0.9, 0.3, 1);
  transform-origin: center;
}

@keyframes popIn {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

.modal-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background-color: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background-color: var(--bg-hover);
  color: var(--accent-primary);
}

.modal-body {
  padding: var(--spacing-lg);
}

.modal-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

.modal-product-image {
  width: 100%;
  height: 400px;
  object-fit: contain; /* Changed from cover to contain to show full product */
  border-radius: var(--radius-md);
  background-color: #ffffff; /* Changed from var(--bg-tertiary) to white */
}

/* Added styles for modal carousel */
.modal-image-container {
  position: relative;
  width: 100%;
  height: 400px;
}

.modal-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
  z-index: 2;
}

.modal-carousel-btn:hover {
  background-color: var(--accent-primary);
}

.modal-carousel-btn.prev {
  left: 10px;
}

.modal-carousel-btn.next {
  right: 10px;
}

.modal-product-info h2 {
  font-size: 1.8rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.modal-product-brand {
  color: var(--accent-primary);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
}

.modal-product-description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.modal-product-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: var(--spacing-md);
}

.modal-add-to-cart {
  width: 100%;
  padding: 1rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-accent);
}

.modal-add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 0, 0, 0.5);
}

.modal-product-footer {
  margin-top: var(--spacing-lg);
}

.modal-price-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.modal-price-label {
  color: var(--text-secondary);
  font-size: 1rem;
}

.modal-price {
  color: var(--accent-primary);
  font-size: 1.8rem;
  font-weight: 700;
}

/* === FOOTER === */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.footer-section h3 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section h4 {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-xs);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* === SECCIÓN DE MARCAS DESTACADAS === */
.brands-section {
  padding: var(--spacing-xl) 0;
  background-color: var(--bg-secondary);
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
}

.brand-card {
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.brand-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: var(--spacing-sm);
}

.brand-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* === HEADER DE CATEGORÍA === */
.category-header {
  background-color: var(--bg-secondary);
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--border-color);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--accent-primary);
}

.category-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.category-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* === SECCIÓN DE COMBOS Y PROMOCIONES === */
.combos-section,
.bestsellers-section {
  /* Added proper spacing and background styling */
  padding: var(--spacing-xl) 0;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: var(--spacing-xl);
  font-weight: 500;
}

.combos-grid,
.bestsellers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.combo-card {
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  /* Added hover effects */
  position: relative;
  cursor: pointer;
}

.combo-card:hover {
  transform: translateY(-12px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 60px rgba(255, 0, 0, 0.2);
}

.combo-badge {
  /* Improved badge styling */
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-gradient);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 5;
  box-shadow: var(--shadow-md);
}

.combo-image {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background-color: #ffffff;
  display: block;
  padding: 0.75rem;
  transition: transform var(--transition-slow);
}

.combo-card:hover .combo-image {
  transform: scale(1.05);
}

.combo-info {
  padding: var(--spacing-md);
}

.combo-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  line-height: 1.3;
}

.combo-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.5;
}

.combo-prices {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.combo-original-price {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 0.9rem;
}

.combo-price {
  color: var(--accent-primary);
  font-size: 1.4rem;
  font-weight: 800;
}

.combo-btn {
  /* Improved button styling */
  width: 100%;
  padding: 0.85rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.combo-btn:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-accent);
}

.combo-btn:active {
  transform: scale(0.98);
}

/* Estilos para el carrusel de productos más vendidos */
.bestsellers-carousel-section {
  padding: var(--spacing-xl) 0;
  background-color: var(--bg-primary);
}

.bestsellers-carousel-container {
  position: relative;
  overflow: hidden;
  padding: var(--spacing-md) 0;
}

.bestsellers-carousel-track {
  display: flex;
  gap: var(--spacing-md);
  transition: transform 0.5s ease;
  padding: 0 var(--spacing-md);
}

.bestseller-card {
  min-width: 280px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.bestseller-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.bestseller-image {
  width: 100%;
  height: 400px;
  object-fit: contain; /* Changed from cover to contain to show full product */
  background-color: #ffffff; /* Changed from var(--bg-hover) to white */
}

.bestseller-info {
  padding: var(--spacing-md);
}

.bestseller-brand {
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-xs);
}

.bestseller-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

.bestseller-category {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: var(--spacing-sm);
}

.bestseller-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-md);
}

.bestseller-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.bestseller-add-btn {
  background: var(--accent-gradient);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-accent);
}

.bestseller-add-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.5);
}

.bestsellers-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 0, 0, 0.8);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all var(--transition-normal);
}

.bestsellers-control:hover {
  background-color: var(--accent-primary);
  transform: translateY(-50%) scale(1.1);
}

.bestsellers-control.prev {
  left: 0;
}

.bestsellers-control.next {
  right: 0;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .carousel-content h2 {
    font-size: 2.5rem;
  }

  .carousel-content p {
    font-size: 1.1rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .modal-product {
    grid-template-columns: 1fr;
  }

  .modal-product-image {
    height: 300px;
  }

  .bestseller-card {
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }

  .search-bar {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }

  .carousel-container {
    height: 400px;
  }

  .carousel-content h2 {
    font-size: 2rem;
  }

  .carousel-content p {
    font-size: 1rem;
  }

  .carousel-control {
    width: 40px;
    height: 40px;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .sidebar {
    width: 100%;
    left: -100%;
  }

  .search-filter-group {
    flex-direction: column;
    max-width: 100%;
    width: 100%;
  }

  .filter-toggle-btn {
    width: 100%;
    justify-content: center;
  }

  .header-nav {
    gap: var(--spacing-xs);
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  .brands-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .bestseller-card {
    min-width: 220px;
  }

  .bestsellers-control {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 1.4rem;
  }

  .carousel-container {
    height: 300px;
  }

  .carousel-content h2 {
    font-size: 1.5rem;
  }

  .carousel-content p {
    font-size: 0.9rem;
  }

  .carousel-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .products-grid {
    /* Volver a una sola columna en móviles (como antes) */
    grid-template-columns: 1fr;
  }

  .product-card {
    max-width: 100%;
  }

  .bestseller-card {
    min-width: 200px;
  }

  .bestsellers-control {
    width: 35px;
    height: 35px;
  }

  /* reduce image heights to fit multi-column layout on small screens */
  .product-image,
  .combo-image,
  .bestseller-image {
    height: auto !important;
    aspect-ratio: 4 / 3 !important; /* Proporción más ancha/baja */
    object-fit: contain;
    padding: 0 !important; /* Eliminamos relleno interno de la imagen */
    margin-bottom: 0 !important; /* Aseguramos que no haya margen abajo */
  }

  /* 2. Reducimos el espacio entre la imagen y el texto (Título/Precio) */
  .product-info,
  .combo-info,
  .bestseller-info {
    padding: 10px !important; /* Reducido de 1.5rem a 10px */
    padding-top: 5px !important; /* Mínimo espacio superior para pegar el texto a la imagen */
  }

  /* 3. (Opcional) Aumentar un poco el tamaño visual de la imagen (Zoom) */
  /* Si aún sientes la imagen pequeña, esto la "acerca" un 10% */
  .product-card .product-image {
    transform: scale(1.05);
  }
  .combo-info,
  .product-info {
    padding: 0.75rem;
  }

  .combo-name,
  .product-name {
    font-size: 1rem;
  }

  /* For category pages (other HTML files) show products as 2 columns on small screens */
  .category-page .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  /* Alinear consistentemente el contenido de las tarjetas en category pages */
  .category-page .product-card,
  .category-page .combo-card {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .category-page .product-info,
  .category-page .combo-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
  }

  /* Empujar el footer / botón al final para que todos los botones queden alineados */
  .category-page .product-footer,
  .category-page .combo-btn {
    margin-top: auto;
  }

  /* En móviles, poner el precio arriba del botón para evitar desalineo */
  .category-page .product-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem; /* mantener separación del contenido */
  }

  .category-page .product-footer .product-price {
    order: 1;
  }

  .category-page .product-footer .add-to-cart-btn {
    order: 2;
    width: 100%;
    margin: 0;
  }

  /* Combos: asegurar que el bloque de precios aparezca antes del botón */
  .category-page .combo-prices {
    order: 1;
  }

  .category-page .combo-btn {
    order: 2;
    margin-top: 0;
    width: 100%;
  }

  /* Mostrar 2 columnas para marcas y combos únicamente en móviles */
  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .combos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .combo-price,
  .product-price,
  .bestseller-price {
    font-size: 1.2rem;
  }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}
/* ================================
  FIX GRID + CARDS MOBILE
  (Pegar AL FINAL del CSS)
   ================================ */

/* 1️⃣ Grid: PC normal, móvil 2 columnas reales */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* 2️⃣ Card estructurada para empujar botón abajo */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 3️⃣ Imagen SIN estirarse y ocupando ancho completo */
.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background-color: #ffffff;
  padding: 6px;
}

/* 4️⃣ Info como columna flexible */
.product-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 12px;
}

/* 5️⃣ Textos más compactos en móvil */
@media (max-width: 768px) {
  .product-brand {
    font-size: 0.75rem;
  }

  .product-name {
    font-size: 0.9rem;
    line-height: 1.2;

    display: -webkit-box;
    -webkit-line-clamp: 2; /* máximo 2 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* 6️⃣ Footer siempre abajo */
.product-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 7️⃣ Precio ajustado para móvil */
@media (max-width: 768px) {
  .product-price {
    font-size: 1.2rem;
  }
}

/* 8️⃣ Botón ancho completo abajo */
.add-to-cart-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
}

/* 9️⃣ Evitar que en pantallas muy chicas vuelva a 1 columna */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ================================
  FIX ANCHO REAL EN MÓVIL
   ================================ */
@media (max-width: 768px) {
  .products-container,
  .products-section,
  .container {
    max-width: 100%;
    padding-left: 8px;
    padding-right: 8px;
  }

  .products-grid {
    width: 100%;
    margin: 0;
  }
}
/* ================================
   BOTONES PERFECTAMENTE ALINEADOS
   ================================ */

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Contenido flexible */
.product-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Bloque de precio con altura fija */
.product-price {
  min-height: 48px; /* ajusta si usas 2 precios */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Footer empuja el botón abajo */
.product-footer {
  margin-top: auto;
}

/* Botón */
.add-to-cart-btn {
  width: 100%;
}


