/* ==========================================
   TIENDA PROFESIONAL - ALTODESIGN 2025
   Tema Oscuro Consistente
   ========================================== */

/* Hero Badge - Asegurar mismo estilo que servicios */
#servicios-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(58, 58, 58, 0.3) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(74, 74, 74, 0.3) !important;
  padding: 1rem 2rem;
  border-radius: var(--border-radius-large);
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-light) !important;
  font-weight: 600;
}

#servicios-hero .hero-badge i {
  color: #4a4a4a !important;
  font-size: 1.2rem;
}

/* Ajustar márgenes para coincidir con servicios */
#servicios-hero + section {
  margin-top: 0;
  padding-top: 0;
}

.store-main {
  margin-top: 0;
  padding-top: var(--spacing-2xl);
}

/* Variables de diseño profesional - TEMA OSCURO */
:root {
  /* Colores principales - Tema Oscuro */
  --primary: #6b73ff;
  --primary-dark: #5661e0;
  --primary-light: #8b92ff;
  --secondary: #f59e0b;
  --accent: #06b6d4;

  /* Colores neutros - Oscuros */
  --background: #121212;
  --surface: #1a1a1a;
  --surface-hover: #242424;
  --border: #333333;
  --border-hover: #444444;

  /* Texto */
  --text-primary: #e9e9e9;
  --text-secondary: #b6b6b6;
  --text-muted: #888888;
  --text-inverse: #121212;

  /* Estados */
  --success: #27ae60;
  --warning: #f2c94c;
  --error: #e74c3c;
  --info: #06b6d4;

  /* Sombras */
  --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 4px 6px 0 rgb(0 0 0 / 0.4), 0 2px 4px -1px rgb(0 0 0 / 0.3);
  --shadow-md: 0 8px 12px -1px rgb(0 0 0 / 0.5), 0 4px 6px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 16px 24px -3px rgb(0 0 0 / 0.6), 0 8px 12px -4px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 24px 32px -5px rgb(0 0 0 / 0.7), 0 12px 16px -6px rgb(0 0 0 / 0.6);

  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Bordes */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;

  /* Transiciones */
  --transition-fast: 150ms ease-in-out;
  --transition: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* Container global */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ==========================================
   NAVEGACIÓN DE CATEGORÍAS
   ========================================== */

.categories-nav-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 80px;
  z-index: 90;
  backdrop-filter: blur(10px);
}

/* Eliminar margen superior de la sección después del hero */
#servicios-hero + section {
  margin-top: 0;
  padding-top: 0;
}

.categories-nav {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.category-item {
  flex-shrink: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  white-space: nowrap;
}

.category-item:hover,
.category-item.active {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ==========================================
   LAYOUT PRINCIPAL DE LA TIENDA
   ========================================== */

.store-main {
  background: var(--background);
  min-height: calc(100vh - 200px);
  padding-top: 0;
  margin-top: 0;
}

.breadcrumbs {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-md) 0;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  color: var(--text-muted);
  margin-left: var(--spacing-sm);
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
}

/* Header de la tienda */
.store-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-xl) 0;
  border-bottom: 1px solid var(--border);
}

.store-header-left {
  flex: 1;
}

.store-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.store-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.store-header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.search-box {
  position: relative;
  width: 300px;
}

.search-box input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) 3rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.2);
}

.search-box i {
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filters-toggle {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.filters-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.filters-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

/* Layout de tienda */
.store-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--spacing-2xl);
}

/* Panel de filtros */
.filters-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: fit-content;
  position: sticky;
  top: 180px;
  box-shadow: var(--shadow-lg);
}

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

.filters-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.filters-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--spacing-sm);
  border-radius: var(--radius);
  transition: var(--transition);
  display: none;
}

.filters-close:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.filters-content {
  padding: var(--spacing-lg);
}

.filter-group {
  margin-bottom: var(--spacing-xl);
}

.filter-group-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

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

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.filter-option:hover {
  background: var(--surface-hover);
}

.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.filter-option label {
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Filtro de precio */
.price-filter {
  margin-top: var(--spacing-sm);
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}

.price-inputs input {
  flex: 1;
  min-width: 0;
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  background: var(--surface);
  color: var(--text-primary);
}

.price-inputs input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(107, 115, 255, 0.1);
}

.price-separator {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0 var(--spacing-xs);
}

.price-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

/* Responsive para filtros de precio */
@media (max-width: 768px) {
  .price-inputs {
    gap: var(--spacing-xs);
  }

  .price-inputs input {
    font-size: 0.75rem;
    padding: var(--spacing-xs);
  }

  .price-separator {
    font-size: 0.8rem;
    padding: 0 var(--spacing-xs);
  }
}

/* Select de ordenar */
.sort-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  font-size: 0.875rem;
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Opciones de disponibilidad */
.availability-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
  transition: var(--transition);
}

.checkbox-option input[type="checkbox"]:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-option input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-inverse);
  font-size: 12px;
  font-weight: bold;
}

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

/* Botones de filtro */
.filter-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.btn-primary,
.btn-secondary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: var(--text-inverse);
}

/* Contenido de la tienda */
.store-content {
  min-height: 600px;
}

/* Controles de vista */
.view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

/* Ensure view controls stay above the product list and adapt on small screens */
.view-controls {
  position: relative;
  z-index: 6;
  gap: 0.5rem;
}

/* estilos aplicados al contenedor de opciones dentro de .view-controls */
.view-controls > div {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--spacing-xs);
  border: 1px solid var(--border);
}

/* On small screens stack view controls and show sort select */
@media (max-width: 720px) {
  .view-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .view-controls > div {
    justify-content: flex-start;
  }

  .sort-mobile {
    display: block;
    margin-top: 0.5rem;
  }
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.view-btn:hover,
.view-btn.active {
  background: var(--primary);
  color: var(--text-inverse);
}

.sort-mobile {
  display: none;
}

/* Grid de productos */
.products-section {
  position: relative;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: calc(var(--spacing-2xl) / 2);
}

/* Tarjeta de producto */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

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

.product-image-container {
  position: relative;
  width: 100%;
  height: 240px;
  background: var(--background);
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

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

.product-badge {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: linear-gradient(135deg, var(--secondary), #d97706);
  color: var(--text-inverse);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: var(--shadow);
}

.product-content {
  padding: var(--spacing-lg);
}

.product-category {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
}

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

.product-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: var(--spacing-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

.price,
.price-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.price-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.product-stock {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.stock-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stock-indicator.in-stock {
  background: var(--success);
}

.stock-indicator.low-stock {
  background: var(--warning);
}

.stock-indicator.out-of-stock {
  background: var(--error);
}

.stock-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.product-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.product-actions .btn-primary,
.product-actions .btn-secondary {
  flex: 1;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.875rem;
}

/* Estados */
.loading-state,
.error-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-2xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 400px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--spacing-lg);
}

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

.loading-state h3,
.error-state h3,
.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.loading-state p,
.error-state p,
.empty-state p {
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: var(--spacing-lg);
}

.error-state i,
.empty-state i {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
}

/* Paginación */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.pagination-btn:hover:not(:disabled),
.pagination-btn.active {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

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

.pagination-numbers {
  display: flex;
  gap: var(--spacing-xs);
}

/* Lista: estilos para la vista en lista */
.products-grid.list-view {
  display: block;
  gap: 0;
}

.products-grid.list-view .product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
}

/* Añadir separación vertical entre productos en la vista lista */
.products-grid.list-view .product-card {
  margin-bottom: var(--spacing-lg);
}

.products-grid.list-view .product-card:last-child {
  margin-bottom: 0;
}

.products-grid.list-view .product-image-container {
  width: 40%;
  height: 160px;
  flex: 0 0 40%;
}

.products-grid.list-view .product-content {
  width: 60%;
  flex: 1 1 auto;
  padding: 0;
}

.product-card.list-item {
  /* Asegurar que las tarjetas en modo lista tengan estilo coherente */
}

@media (max-width: 720px) {
  .products-grid.list-view .product-card {
    flex-direction: column;
  }

  .products-grid.list-view .product-image-container {
    width: 100%;
    height: 200px;
    flex: 0 0 auto;
  }

  .products-grid.list-view .product-content {
    width: 100%;
  }
}

/* ==========================================
   FOOTER PROFESIONAL
   ========================================== */

.footer {
  background: var(--surface);
  color: var(--text-primary);
  padding: var(--spacing-2xl) 0 var(--spacing-xl);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-logo-img {
  width: 48px;
  height: 48px;
  filter: brightness(0) invert(0.9);
}

.footer-brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-tagline {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.footer-badges {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.footer-badges .badge {
  background: rgba(107, 115, 255, 0.15);
  color: var(--text-primary);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.footer-section h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

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

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-nav a:hover,
.footer-nav a.active {
  color: var(--primary);
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.contact-item:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(107, 115, 255, 0.15);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  color: var(--text-inverse);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--spacing-lg);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-legal {
  display: flex;
  gap: var(--spacing-lg);
}

.footer-legal a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--primary);
}

/* ==========================================
   OVERLAY Y UTILIDADES
   ========================================== */

.filters-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

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

/* Ocultar elementos específicos en móvil/desktop */
.filters-close {
  display: none;
}

@media (max-width: 1024px) {
  .filters-close {
    display: flex;
  }
  
  .filters-toggle {
    display: flex !important;
  }
}

@media (min-width: 1025px) {
  .filters-toggle {
    display: none !important;
  }
  
  .filters-overlay {
    display: none;
  }
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Overlay para filtros en móvil */
.filters-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Prevenir scroll cuando filtros están abiertos */
body.filters-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .store-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .filters-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100vh;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--border);
    overflow-y: auto;
    background: var(--background);
  }

  .filters-panel.active,
  .filters-panel.is-open {
    transform: translateX(0);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  }

  .filters-close {
    display: flex;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
  }

  .filters-header {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
  }

  .filters-toggle {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 99;
    padding: 14px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    color: var(--text-inverse);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: none;
    border: none;
  }

  .filters-toggle i {
    font-size: 1.1rem;
  }

  .filters-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.5);
  }

  .filters-toggle:active {
    transform: translateY(0);
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
  }

  .hero-visual {
    order: -1;
  }

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

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .hero-section {
    min-height: auto;
    padding: var(--spacing-2xl) 0;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-actions {
    justify-content: center;
  }

  .store-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }

  .store-header-right {
    justify-content: space-between;
  }

  .search-box {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
  }

  .view-controls {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: stretch;
  }

  .sort-mobile {
    display: block;
  }

  .sort-mobile select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
  }

  /* centrar los botones de vista dentro del contenedor dentro de .view-controls */
  .view-controls > div {
    justify-content: center;
  }

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

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }

  .filters-panel {
    width: 100vw !important;
    max-width: 100vw;
  }

  .filters-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .categories-nav {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }

  .categories-nav::-webkit-scrollbar {
    height: 4px;
  }

  .categories-nav::-webkit-scrollbar-track {
    background: transparent;
  }

  .categories-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary-large,
  .btn-secondary-large {
    justify-content: center;
  }

  .store-layout {
    gap: var(--spacing-lg);
  }

  .filters-panel {
    width: 100vw;
  }

  .filter-actions {
    flex-direction: column;
  }

  .product-actions {
    flex-direction: column;
  }
}

/* ===================================
   TIENDA HERO - Usa los estilos del .hero en styles.css
   =================================== */

#tienda-hero {
  /* Los estilos base vienen de .hero en styles.css */
}

/* ==========================================
   MODALES - Quote y Product Details
   ========================================== */

/* Quote Modal (Contactar) */
.quote-modal-overlay,
.product-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    overflow-y: auto;
}

.quote-modal-container,
.product-modal-container {
    background: linear-gradient(150deg, #1a1a1a 0%, #121212 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s ease-out;
}

.product-modal-container {
    max-width: 900px;
}

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

.quote-modal-header,
.product-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.quote-modal-header h2,
.product-modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.quote-modal-header h2 i,
.product-modal-header h2 i {
    color: var(--accent-color);
}

.quote-modal-close,
.product-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.quote-modal-close:hover,
.product-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.quote-modal-body,
.product-modal-body {
    padding: 1.75rem;
}

/* Quote Product Info */
.quote-product-info {
    margin-bottom: 1.5rem;
}

.quote-product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.quote-product-card {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
}

.quote-product-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.quote-product-details {
    flex: 1;
}

.quote-product-details h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.quote-product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.quote-product-specs span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.quote-product-specs i {
    color: var(--accent-color);
}

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

/* Quote Form */
.quote-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.quote-form .form-group {
    margin-bottom: 1rem;
}

.quote-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quote-form .form-group label i {
    color: var(--accent-color);
    font-size: 0.85rem;
}

.quote-form .form-group input,
.quote-form .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.quote-form .form-group input:focus,
.quote-form .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.1);
}

.quote-form .form-group input::placeholder,
.quote-form .form-group textarea::placeholder {
    color: var(--text-muted);
}

.quote-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.quote-form-actions .btn-cancel,
.quote-form-actions .btn-submit {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.quote-form-actions .btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.quote-form-actions .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.quote-form-actions .btn-submit {
    background: linear-gradient(135deg, var(--accent-color), #5a63f0);
    color: #fff;
    box-shadow: 0 4px 15px rgba(107, 115, 255, 0.3);
}

.quote-form-actions .btn-submit:hover {
    background: linear-gradient(135deg, #5a63f0, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 115, 255, 0.4);
}

.quote-form-actions .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Quote Notification */
.quote-notification {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.quote-notification.success {
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: #27ae60;
}

.quote-notification.error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.quote-notification i {
    font-size: 1.2rem;
}

/* Product Details Modal */
.product-modal-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
}

.product-modal-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.product-modal-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.product-badge-large {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--accent-color), #5a63f0);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(107, 115, 255, 0.4);
}

.product-modal-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.product-modal-category {
    display: inline-block;
    background: rgba(107, 115, 255, 0.15);
    color: var(--accent-color);
    padding: 0.4rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
}

.product-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.product-modal-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.product-modal-price .price-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

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

.product-modal-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-weight: 600;
}

.product-modal-stock .stock-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.product-modal-stock.in-stock .stock-indicator {
    background: #27ae60;
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
}

.product-modal-stock.low-stock .stock-indicator {
    background: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.product-modal-stock.out-of-stock .stock-indicator {
    background: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.product-modal-stock.in-stock {
    color: #27ae60;
}

.product-modal-stock.low-stock {
    color: #f39c12;
}

.product-modal-stock.out-of-stock {
    color: #e74c3c;
}

.product-modal-description h4,
.product-modal-specs h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-modal-description h4 i,
.product-modal-specs h4 i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.product-modal-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.specs-grid {
    display: grid;
    gap: 0.875rem;
}

.spec-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.spec-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(107, 115, 255, 0.2);
}

.spec-item > i {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.spec-item > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spec-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.spec-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.product-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.btn-modal-contact,
.btn-modal-close {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn-modal-contact {
    background: linear-gradient(135deg, var(--accent-color), #5a63f0);
    color: #fff;
    box-shadow: 0 4px 15px rgba(107, 115, 255, 0.3);
}

.btn-modal-contact:hover {
    background: linear-gradient(135deg, #5a63f0, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 115, 255, 0.4);
}

.btn-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Responsive Modal Styles */
@media (max-width: 920px) {
    .product-modal-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-modal-image img {
        height: 300px;
    }
    
    .quote-modal-container,
    .product-modal-container {
        max-width: 95%;
    }
}

@media (max-width: 640px) {
    .quote-modal-header,
    .product-modal-header {
        padding: 1.25rem;
    }
    
    .quote-modal-body,
    .product-modal-body {
        padding: 1.25rem;
    }
    
    .quote-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .quote-product-card {
        flex-direction: column;
    }
    
    .quote-product-image {
        width: 100%;
        height: 180px;
    }
    
    .product-modal-image img {
        height: 240px;
    }
    
    .product-modal-title {
        font-size: 1.4rem;
    }
    
    .product-modal-price .price-value {
        font-size: 1.6rem;
    }
    
    .product-modal-actions {
        flex-direction: column;
    }
    
    .quote-form-actions {
        flex-direction: column;
    }
}
