/* =====================================================
   EPPO Hotel - Diseño Limpio y Moderno
   - Diseño minimalista y elegante
   - Colores suaves y profesionales
   - Mejor contraste y legibilidad
   - Responsive y accesible
   ===================================================== */

/* ---------------------- Variables de tema ---------------------- */
:root {
  /* Colores principales */
  --primary-50: #eff6ff;
  --primary-200: #bfdbfe;
  --primary-500: #2563eb;      /* Azul profesional */
  --primary-600: #1d4ed8;
  --primary-700: #1e40af;
  
  --accent-500: #f59e0b;       /* Dorado elegante */
  --accent-600: #d97706;
  
  --success-500: #10b981;      /* Verde */
  --danger-500: #ef4444;       /* Rojo */
  
  /* Colores de fondo - Modo Claro */
  --bg-white: #ffffff;
  --bg-gray-50: #f9fafb;
  --bg-gray-100: #f3f4f6;
  --bg-gray-200: #e5e7eb;
  --bg-gray-800: #1f2937;
  --bg-gray-900: #111827;
  
  /* Colores de texto - Modo Claro */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  
  /* Color específico para Groupe GM - Modo Claro */
  --groupe-gm-color: #000000;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Bordes */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Espaciado */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  
  /* Tipografía */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

/* Variables para Modo Oscuro - fondo gris neutro (sin tinte azul) para combinar con el resto */
[data-theme="dark"] body,
[data-theme="dark"] .main-content,
[data-theme="dark"] .products-main {
  background: #111827 !important;
  color: var(--text-primary);
}
[data-theme="dark"] {
  /* Colores de fondo - Modo Oscuro */
  --bg-white: #1a1a1a;
  --bg-gray-50: #2d2d2d;
  --bg-gray-100: #3a3a3a;
  --bg-gray-200: #4a4a4a;
  --bg-gray-800: #e5e7eb;
  --bg-gray-900: #f3f4f6;
  
  /* Colores de texto - Modo Oscuro */
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-white: #000000;
  
  /* Color específico para Groupe GM - Modo Oscuro (blanco/mármol) */
  --groupe-gm-color: #f5f5f5;
  
  /* Sombras ajustadas para modo oscuro */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Importar tema base */
@import url('./theme.css');

/* ---------------------- Reset y base ---------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ---------------------- Header ---------------------- */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--bg-gray-200);
  box-shadow: var(--shadow-sm);
  position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
  padding: var(--space-4) var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-600);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-line1 {
  font-size: 1em;
}

.logo-line2 {
  font-size: 1.35em;
  font-weight: 700;
}

.logo .groupe-gm,
.logo-line2.groupe-gm {
  color: var(--groupe-gm-color);
  font-weight: 700;
}

.nav {
    display: flex;
    align-items: center;
  gap: var(--space-8);
}

.nav-link {
  color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-600);
  background: var(--bg-gray-100);
}

/* Badge de contador en botón Orçamento */
.nav-link {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--primary-500);
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 0 4px;
  white-space: nowrap;
}

/* Para números mayores a 9, hacer el badge más ancho y ovalado */
.cart-badge.double-digit {
  border-radius: 10px;
  min-width: 24px;
  padding: 0 6px;
}

.language-selector {
    display: flex;
  gap: var(--space-2);
    align-items: center;
}

.flag-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
  width: 36px;
  height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.flag-btn:hover {
  border-color: var(--primary-200);
  transform: scale(1.05);
}

.flag-btn.active {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.flag-btn img {
  width: 20px;
  height: 15px;
    border-radius: 2px;
    object-fit: cover;
}

/* ---------------------- Toggle de Modo Oscuro ---------------------- */
.theme-toggle {
  background: none;
  border: 2px solid var(--bg-gray-200);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-left: var(--space-4);
}

.theme-toggle:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  transform: scale(1.05);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Iconos del toggle */
.theme-toggle .sun-icon {
  display: block;
}

.theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

/* ---------------------- Barra de usuario (nombre, rol, logout) ---------------------- */
.user-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: var(--space-4);
  padding-left: var(--space-4);
  border-left: 1px solid var(--bg-gray-200);
}

.user-bar-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-500);
}

.user-bar-sep {
  color: var(--text-muted);
  font-weight: 300;
  user-select: none;
}

.user-bar-role {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.user-bar-logout {
  background: var(--bg-gray-200);
  color: var(--text-primary);
  border: none;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: var(--space-2);
}

.user-bar-logout:hover {
  background: var(--primary-500);
  color: var(--text-white);
}

[data-theme="dark"] .user-bar {
  border-left-color: var(--bg-gray-200);
}

[data-theme="dark"] .user-bar-logout {
  background: var(--bg-gray-200);
  color: var(--text-primary);
}

[data-theme="dark"] .user-bar-logout:hover {
  background: var(--primary-500);
  color: var(--text-white);
}

/* Ocultar barra de usuario en móvil si no hay espacio (opcional) */
@media (max-width: 768px) {
  .user-bar {
    gap: var(--space-2);
    margin-left: var(--space-2);
    padding-left: var(--space-2);
  }
  .user-bar-name { font-size: 0.8rem; }
  .user-bar-role { font-size: 0.75rem; }
  .user-bar-logout { padding: var(--space-1) var(--space-3); font-size: 0.8rem; }
}

/* ---------------------- Contenido principal ---------------------- */
.main-content {
  min-height: calc(100vh - 80px);
  padding: var(--space-12) var(--space-6);
}

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

.main-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-12);
}

/* ---------------------- Grid de categorías ---------------------- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.category-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
    overflow: hidden;
  box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
  position: relative;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-image {
  height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: var(--space-6);
  color: var(--text-white);
}

.card-overlay h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* ---------------------- Página de productos ---------------------- */
.products-main {
  min-height: calc(100vh - 80px);
  padding: var(--space-8) var(--space-6);
}

.products-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-8);
  align-items: start;
}

/* Sidebar de filtros */
.filters-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
    height: fit-content;
  position: sticky;
  top: 100px;
}

/* Scroll para el sidebar completo (aside.card con position sticky) */
.products-container aside.card {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    margin-right: -8px;
}

/* Estilos personalizados para la barra de desplazamiento del sidebar */
.products-container aside.card::-webkit-scrollbar {
    width: 8px;
}

.products-container aside.card::-webkit-scrollbar-track {
    background: var(--bg-gray-100);
    border-radius: 4px;
}

.products-container aside.card::-webkit-scrollbar-thumb {
    background: var(--primary-500);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.products-container aside.card::-webkit-scrollbar-thumb:hover {
    background: var(--primary-600);
}

[data-theme="dark"] .products-container aside.card::-webkit-scrollbar-track {
    background: var(--bg-gray-800);
}

[data-theme="dark"] .products-container aside.card::-webkit-scrollbar-thumb {
    background: var(--primary-600);
}

[data-theme="dark"] .products-container aside.card::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}

.sidebar-title {
  font-family: var(--font-display);
    font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--primary-500);
}

.filter-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--bg-gray-200);
}

.filter-section:last-child {
    border-bottom: none;
  margin-bottom: 0;
}

.filter-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.filter-options {
    display: flex;
    flex-direction: column;
  gap: var(--space-3);
}

/* Scroll para el contenedor de categorías */
#category-filters-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    margin-right: -8px;
}

/* Estilos personalizados para la barra de desplazamiento */
#category-filters-container::-webkit-scrollbar {
    width: 8px;
}

#category-filters-container::-webkit-scrollbar-track {
    background: var(--bg-gray-100);
    border-radius: 4px;
}

#category-filters-container::-webkit-scrollbar-thumb {
    background: var(--primary-500);
    border-radius: 4px;
    transition: background 0.2s ease;
}

#category-filters-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-600);
}

[data-theme="dark"] #category-filters-container::-webkit-scrollbar-track {
    background: var(--bg-gray-800);
}

[data-theme="dark"] #category-filters-container::-webkit-scrollbar-thumb {
    background: var(--primary-600);
}

[data-theme="dark"] #category-filters-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}

.filter-checkbox {
    display: flex;
    align-items: center;
  gap: var(--space-3);
    cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.filter-checkbox:hover {
  background: var(--bg-gray-100);
}

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

.filter-checkbox span {
  color: var(--text-secondary);
    font-weight: 500;
}

/* Rango de precio */
.price-range {
  padding: var(--space-4) 0;
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
  background: var(--bg-gray-200);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
  margin: var(--space-3) 0;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
  background: var(--primary-500);
    cursor: pointer;
  box-shadow: var(--shadow-md);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
  background: var(--primary-500);
    cursor: pointer;
    border: none;
  box-shadow: var(--shadow-md);
}

.price-display {
    text-align: center;
    font-weight: 600;
  color: var(--primary-600);
  margin-top: var(--space-2);
}

/* Filtro de colores */
.color-options {
    display: flex;
    flex-direction: column;
  gap: var(--space-3);
}

.color-option {
    display: flex;
    align-items: center;
  gap: var(--space-3);
    cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.color-option:hover {
  background: var(--bg-gray-100);
}

.color-option input[type="checkbox"] {
    display: none;
}

.color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
  border: 2px solid var(--bg-gray-300);
    position: relative;
}

.color-circle.black { background: #1f2937; }
.color-circle.white { background: #ffffff; border-color: #d1d5db; }
.color-circle.silver { background: #9ca3af; }
.color-circle.pink { background: #ec4899; }

.color-option input[type="checkbox"]:checked + .color-circle {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.color-option span {
  color: var(--text-secondary);
    font-weight: 500;
}

/* Botones de filtros */
.filter-actions {
    display: flex;
    flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.btn {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-clear {
  background: var(--bg-gray-100);
  color: var(--text-secondary);
}

.btn-clear:hover {
  background: var(--bg-gray-200);
}

.btn-apply {
  background: var(--primary-500);
  color: var(--text-white);
}

.btn-apply:hover {
  background: var(--primary-600);
}

/* Contenido de productos */
.products-content {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
}

.products-header {
    text-align: center;
  margin-bottom: var(--space-8);
}

.products-title {
  font-family: var(--font-display);
    font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.products-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Grid de productos */
.products-grid {
    display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}

.product-card {
  background: var(--bg-white);
  border: 1px solid var(--bg-gray-200);
  border-radius: var(--radius-lg);
    overflow: hidden;
  box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.product-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: #f8f9fa;
}

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

.product-badge {
    position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: var(--danger-500);
  color: var(--text-white);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-info {
  padding: var(--space-3);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.3;
  text-align: center;
}

.product-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
    line-height: 1.5;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex: 1;
}

.feature {
  background: var(--bg-gray-100);
  color: var(--text-secondary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
    font-weight: 500;
}

.product-price {
    text-align: center;
  padding-top: var(--space-3);
  border-top: 1px solid var(--bg-gray-200);
  margin-top: auto;
}

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

/* Mensaje sin productos */
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-12);
  color: var(--text-secondary);
  background: var(--bg-gray-100);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--bg-gray-300);
}

/* ---------------------- Página de detalle del producto ---------------------- */
.product-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-white);
  color: var(--text-secondary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--bg-gray-200);
  transition: all 0.2s ease;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.back-button:hover {
  background: var(--bg-gray-50);
  color: var(--text-primary);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.product-image-section {
  position: relative;
}

.product-main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.product-info-section {
  padding: var(--space-4) 0;
}

.product-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
    font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.product-price {
  font-size: 2rem;
  color: var(--accent-500);
  font-weight: 700;
  margin-bottom: var(--space-6);
  text-align: center;
}

.product-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

.product-specs {
  background: var(--bg-gray-50);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
  border: 1px solid var(--bg-gray-200);
}

.specs-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--bg-gray-200);
}

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

.spec-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.spec-value {
  color: var(--text-primary);
  font-weight: 600;
}

.product-features {
  margin-bottom: var(--space-8);
}

.features-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.feature-tag {
  background: var(--primary-500);
  color: var(--text-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  flex-direction: column;
  gap: var(--space-4);
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--bg-gray-200);
  border-top: 4px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-container {
  text-align: center;
  padding: var(--space-12);
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--bg-gray-200);
}

.error-title {
  font-size: 1.5rem;
  color: var(--danger-500);
  margin-bottom: var(--space-4);
}

.error-message {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.retry-button {
  background: var(--primary-500);
  color: var(--text-white);
  border: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.retry-button:hover {
  background: var(--primary-600);
}

/* ---------------------- Responsive ---------------------- */
@media (max-width: 1024px) {
    .products-container {
        grid-template-columns: 1fr;
  }
  
  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .filters-sidebar {
    position: static;
    margin-bottom: var(--space-6);
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: var(--space-4);
  }
  
  .nav {
    gap: var(--space-4);
  }
  
  .main-content {
    padding: var(--space-8) var(--space-4);
  }
  
  .main-title {
    font-size: 2rem;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
  
  .product-detail-container {
    padding: var(--space-6) var(--space-4);
  }
  
  .product-detail {
    padding: var(--space-6);
  }
  
  .product-title {
    font-size: 2rem;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1rem;
  }
  .logo-line2 {
    font-size: 1.2em;
  }
  
  .nav {
    gap: var(--space-2);
  }
  
  .nav-link {
    padding: var(--space-1) var(--space-2);
    font-size: 0.875rem;
  }
  
  .main-title {
    font-size: 1.75rem;
  }
  
  .products-title {
    font-size: 2rem;
  }
}

/* ---------------------- Animaciones ---------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-card {
  animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }

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

:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* ---------------------- Estilos para nuevas secciones ---------------------- */
.product-specs-mini {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.spec-mini {
  background: var(--primary-500);
  color: var(--text-white);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.additional-images {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--bg-gray-200);
}

.additional-images h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.additional-image {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.product-characteristics,
.product-specifications,
.product-dimensions {
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: var(--bg-gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-gray-200);
}

.characteristics-title,
.specifications-title,
.dimensions-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.characteristics-text,
.specifications-text,
.dimensions-text {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ---------------------- Botón de descarga ---------------------- */
.download-section {
  margin: var(--space-6) 0;
  padding: var(--space-4);
  background: var(--primary-50);
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary-200);
  text-align: center;
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--primary-500);
  color: var(--text-white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--primary-500);
}

.download-button:hover {
  background: var(--primary-600);
  color: var(--text-white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-600);
}

.download-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.download-button i {
  font-size: 1.1rem;
}

/* ---------------------- Especificaciones técnicas ---------------------- */
.specifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  background: var(--bg-gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.spec-label {
  font-weight: 600;
  color: var(--text-primary);
}

.spec-value {
  font-weight: 500;
  color: var(--primary-600);
}

.characteristics-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.feature-tag {
  background: var(--primary-100);
  color: var(--primary-700);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--primary-200);
}

/* ---------------------- Carrusel de imágenes ---------------------- */
.image-carousel {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.product-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-arrow:hover {
  background: var(--text-white);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-lg);
}

.carousel-prev {
  left: 15px;
}

.carousel-next {
  right: 15px;
}

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

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.indicator.active {
  background: var(--text-white);
  border-color: var(--primary-500);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Ocultar flechas en móvil si hay pocas imágenes */
@media (max-width: 768px) {
  .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .carousel-prev {
    left: 10px;
  }
  
  .carousel-next {
    right: 10px;
  }
  
  .indicator {
    width: 10px;
    height: 10px;
  }
}

/* ---------------------- Página de Comparación ---------------------- */
.category-selection {
  margin-bottom: var(--space-8);
  padding: var(--space-6);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.category-selection h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.category-buttons {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-gray-100);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background: var(--primary-50);
  color: var(--primary-600);
  border-color: var(--primary-200);
}

.category-btn.active {
  background: var(--primary-500);
  color: var(--text-white);
  border-color: var(--primary-500);
}

.product-selection {
  margin-bottom: var(--space-8);
  padding: var(--space-6);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.product-search {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.search-input {
  flex: 1;
  padding: var(--space-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
}

.search-btn {
  padding: var(--space-3) var(--space-4);
  background: var(--primary-500);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: var(--primary-600);
}

.product-card-compare {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.product-card-compare .product-image {
  height: 150px;
  overflow: hidden;
}

.product-card-compare .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card-compare:hover .product-image img {
  transform: scale(1.05);
}

.product-card-compare .product-info {
  padding: var(--space-4);
  text-align: center;
}

.product-card-compare .product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.product-card-compare .product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-500);
  margin-bottom: var(--space-3);
  text-align: center;
}

.add-to-compare-btn {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--primary-500);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.add-to-compare-btn:hover:not(:disabled) {
  background: var(--primary-600);
}

.add-to-compare-btn:disabled {
  background: var(--success-500);
  cursor: not-allowed;
}

.selected-products {
  margin-bottom: var(--space-8);
  padding: var(--space-6);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.selected-products h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.selected-list {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.selected-product {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.selected-product img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.remove-btn {
  background: var(--danger-500);
  color: var(--text-white);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.remove-btn:hover {
  background: var(--danger-600);
}

.comparison-section {
  margin-bottom: var(--space-8);
  padding: var(--space-6);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.comparison-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

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

.clear-comparison-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--danger-500);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-comparison-btn:hover {
  background: var(--danger-600);
}

.comparison-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
  background: var(--bg-gray-50);
  font-weight: 600;
  color: var(--text-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.comparison-table .feature-column {
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 600;
  min-width: 200px;
}

.comparison-table .product-column {
  text-align: center;
  min-width: 200px;
  vertical-align: top;
}

.comparison-table .product-column img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
}

.comparison-table .product-column h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.comparison-table .product-column .product-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent-500);
  text-align: center;
}

.comparison-table .feature-label {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-gray-50);
}

.comparison-table .feature-value {
  text-align: center;
  color: var(--text-secondary);
}

.comparison-table .no-data {
  color: var(--text-muted);
  font-style: italic;
}

.comparison-table .text-success {
  color: var(--success-500);
}

.comparison-table .text-danger {
  color: var(--danger-500);
}

.no-products {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: var(--space-8);
}

/* Responsive para comparación */
@media (max-width: 768px) {
  .category-buttons {
    flex-direction: column;
  }
  
  .category-btn {
    justify-content: center;
  }
  
  .product-search {
    flex-direction: column;
  }
  
  .selected-list {
    flex-direction: column;
  }
  
  .comparison-header {
    flex-direction: column;
    gap: var(--space-4);
    align-items: stretch;
  }
  
  .comparison-table .product-column {
    min-width: 150px;
  }
  
  .comparison-table .product-column img {
    width: 60px;
    height: 60px;
  }
}

/* ---------------------- Utilidades ---------------------- */
.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;
}

/* ---------------------- Mejoras para Modo Oscuro ---------------------- */
[data-theme="dark"] .category-card {
  border: 1px solid var(--bg-gray-200);
}

[data-theme="dark"] .category-card:hover {
  border-color: var(--primary-500);
}

[data-theme="dark"] .product-card {
  border-color: var(--bg-gray-200);
}

[data-theme="dark"] .product-card:hover {
  border-color: var(--primary-200);
}

[data-theme="dark"] .filters-sidebar,
[data-theme="dark"] .products-content,
[data-theme="dark"] .product-detail {
  border: 1px solid var(--bg-gray-200);
}

[data-theme="dark"] .filter-checkbox:hover,
[data-theme="dark"] .color-option:hover {
  background: var(--bg-gray-100);
}

[data-theme="dark"] .range-slider {
  background: var(--bg-gray-200);
}

[data-theme="dark"] .range-slider::-webkit-slider-thumb {
  background: var(--primary-500);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .range-slider::-moz-range-thumb {
  background: var(--primary-500);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Transiciones suaves para todos los elementos */
* {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Excluir elementos que no necesitan transición */
*:not(*) {
  transition: none;
}

/* Mejoras para tarjetas de productos más compactas */
.product-card .media {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.product-card .media img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .media img {
    transform: scale(1.05);
}

.product-card .title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    text-align: center;
}

.product-card .meta {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.product-card .meta .badge {
    font-size: 0.75rem;
    padding: 2px 6px;
}

.product-card .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    margin-right: 4px;
}

.product-price-trigger:hover {
  text-decoration: underline;
}

.product-price-tiers-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(15, 23, 42, 0.7);
  padding: 24px;
}

.product-price-tiers-modal-content {
  width: min(680px, 100%);
  max-height: 90vh;
  overflow: hidden;
  margin: 4vh auto 0;
  background: #ffffff;
  color: #111827;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.product-price-tiers-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
}

.product-price-tiers-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.product-price-tiers-modal-close {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.product-price-tiers-modal-close:hover {
  color: #111827;
}

.product-price-tiers-modal-body {
  padding: 20px 22px 22px;
  max-height: calc(90vh - 76px);
  overflow: auto;
}

.product-price-tiers-empty {
  text-align: center;
  color: #6b7280;
  padding: 16px 0;
  margin: 0;
}

.product-price-tiers-current {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.product-price-tiers-current-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.product-price-tiers-current-label {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 4px;
}

.product-price-tiers-current-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.product-price-tiers-current-icon {
  color: var(--brand-gold, #d4af37);
  font-size: 1.1rem;
}

.product-price-tiers-table {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.product-price-tiers-table table {
  width: 100%;
  border-collapse: collapse;
}

.product-price-tiers-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  font-size: 0.9rem;
}

.product-price-tiers-table td {
  padding: 12px 14px;
  border-top: 1px solid #e5e7eb;
}

.product-price-tiers-table tr.active-tier {
  background: rgba(212, 175, 55, 0.12);
}

.product-price-tiers-table .price-cell {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.product-price-tiers-table .check-icon {
  margin-left: 8px;
  color: #16a34a;
}

@media (max-width: 640px) {
  .product-price-tiers-modal {
    padding: 12px;
  }

  .product-price-tiers-modal-content {
    margin-top: 2vh;
  }

  .product-price-tiers-modal-header,
  .product-price-tiers-modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .product-price-tiers-table th,
  .product-price-tiers-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }
}
