/* ==========================================================================
   PRODUCTOS - DISEÑO CON SIDEBAR Y TARJETAS COMPACTAS
   Algodón Todo Evento
   ========================================================================== */

/* --------------------------------------------------------------------------
   VARIABLES
   -------------------------------------------------------------------------- */
:root {
  --color-primary: #FE7700;
  --color-primary-light: #E19100;
  --color-primary-dark: #6B1B00;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-deluxe: #f59e0b;

  --white: #FFFFFF;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* --------------------------------------------------------------------------
   BASE
   -------------------------------------------------------------------------- */
.products-main {
  --header-height: 145px; /* Altura del header + nav combinados */
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--gray-900);
  background: #E1CEC7;
}

/* --------------------------------------------------------------------------
   HERO SECTION - MÁS COMPACTO
   -------------------------------------------------------------------------- */
.products-hero {
  padding: 2rem 1rem;
  text-align: center;
  background: #6B1B00;
  color: white;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.hero-badge i {
  color: var(--color-warning);
}

.products-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.hero-description {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: var(--gray-300);
  line-height: 1.5;
  margin: 0;
}

/* --------------------------------------------------------------------------
   HORARIOS INFO - COMPACTO
   -------------------------------------------------------------------------- */
.horarios-info {
  padding: 1rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
}

.horarios-info h3 {
  font-size: 0.9rem;
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-700);
}

.horarios-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.horario-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.horario-item i {
  color: var(--color-primary);
  font-size: 0.9rem;
}

.horario-details {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.horario-details strong {
  font-size: 0.75rem;
  color: var(--gray-700);
}

.horario-details span {
  font-size: 0.7rem;
  color: var(--gray-500);
}

.nota-importante {
  margin-top: 0.75rem;
  padding: 8px 12px;
  background: #fef3c7;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: #92400e;
}

.nota-importante p {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   LAYOUT PRINCIPAL - ARQUITECTURA MAX.COM
   Un único contenedor scrolleable que contiene sidebar sticky + contenido + footer
   El scroll ocurre en .products-layout, NO en el body
   -------------------------------------------------------------------------- */
.products-layout {
  display: flex;
  overflow-x: clip;
  position: relative;
}

/* --------------------------------------------------------------------------
   SIDEBAR STICKY (como Max.com)
   - position: sticky dentro del contenedor scrolleable
   - top: 0 porque el scroll ocurre en .products-layout, no en el body
   - align-self: flex-start es CLAVE para que sticky funcione en flexbox
   - El sidebar "termina" naturalmente cuando el contenedor termina (no se superpone al footer)
   -------------------------------------------------------------------------- */
.products-sidebar {
  position: sticky;
  top: calc(var(--topbar-height, 32px) + var(--header-height, 60px) + var(--nav-height, 44px));
  align-self: flex-start;
  width: 280px;
  height: fit-content;
  max-height: calc(100vh - var(--topbar-height, 32px) - var(--header-height, 60px) - var(--nav-height, 44px) - 20px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 100;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

/* Scrollbar elegante */
.products-sidebar::-webkit-scrollbar {
  width: 6px;
}

.products-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.products-sidebar::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 10px;
}

.products-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* --------------------------------------------------------------------------
   CONTENIDO PRINCIPAL - Contiene todo el contenido + footer
   NO tiene scroll propio - el scroll lo maneja .products-layout
   -------------------------------------------------------------------------- */
.products-content {
  flex: 1;
  min-width: 0;
  padding: 1.5rem;
}

/* Hero y Horarios dentro del contenido scrolleable */
.products-hero {
  border-radius: var(--radius-xl);
  margin-bottom: 1.5rem;
}

.horarios-info {
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
}

/* --------------------------------------------------------------------------
   SIDEBAR SECTIONS
   -------------------------------------------------------------------------- */
.sidebar-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.sidebar-title i {
  color: var(--color-primary);
}

/* Filtros */
.filter-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-option {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

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

.filter-option input {
  display: none;
}

.filter-option input:checked + .filter-label {
  color: var(--color-primary);
  font-weight: 600;
}

.filter-option input:checked ~ .filter-count {
  background: var(--color-primary);
  color: white;
}

.filter-label {
  flex: 1;
  font-size: 0.8rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label i {
  font-size: 0.75rem;
  width: 16px;
  text-align: center;
}

.filter-count {
  font-size: 0.7rem;
  background: var(--gray-200);
  color: var(--gray-600);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* Lista de incluidos */
.includes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.includes-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--gray-600);
}

.includes-list li i {
  color: var(--color-success);
  font-size: 0.75rem;
}

/* Rangos de precios */
.price-ranges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-range-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}

.range-label {
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 500;
}

.range-value {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* CTA Sidebar */
.sidebar-cta {
  background: #6B1B00;
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  color: white;
}

.sidebar-cta p {
  margin: 0 0 0.75rem 0;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sidebar-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: #25d366;
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.sidebar-whatsapp-btn:hover {
  background: #128c7e;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   CONTENIDO PRINCIPAL - Estilos adicionales
   -------------------------------------------------------------------------- */

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.results-info {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.view-options {
  display: flex;
  gap: 4px;
}

.view-btn {
  padding: 8px 12px;
  background: var(--gray-100);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
}

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

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

/* --------------------------------------------------------------------------
   PRODUCTS GRID - TARJETAS COMPACTAS
   -------------------------------------------------------------------------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  align-items: stretch;
}

/* Vista lista */
.products-grid.list-view {
  grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
  flex-direction: row;
}

.products-grid.list-view .product-image-wrapper {
  width: 200px;
  flex-shrink: 0;
}

.products-grid.list-view .product-info {
  flex: 1;
}

/* --------------------------------------------------------------------------
   PRODUCT CARD - COMPACTA CON EFECTOS MEJORADOS
   -------------------------------------------------------------------------- */
.product-card {
  position: relative;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              background-color 0.3s ease;
  contain: layout style;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(255, 255, 255, 0.9);
}

@media (hover: none) {
  .product-card:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  }
}

.product-card .product-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Badge */
.product-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 10;
}

.product-badge.basic {
  background: var(--color-success);
  color: white;
}

.product-badge.premium {
  background: var(--color-primary);
  color: white;
}

.product-badge.deluxe {
  background: var(--color-deluxe);
  color: white;
}

/* Badge Pendiente */
.product-badge.badge-pending {
  background: #f59e0b;
  color: white;
}

/* Badge No Disponible */
.product-badge.badge-unavailable {
  background: #64748b;
  color: white;
}

/* Producto Pendiente */
.product-card.product-pending {
  opacity: 0.85;
}

.product-card.product-pending .product-image-wrapper {
  filter: grayscale(30%);
}

/* Producto No Disponible */
.product-card.product-unavailable {
  opacity: 0.7;
}

.product-card.product-unavailable .product-image-wrapper {
  filter: grayscale(60%);
}

/* Botón Cotizar */
.btn-cotizar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-cotizar:hover {
  background: #128c7e;
  transform: translateY(-1px);
}

.btn-cotizar:active {
  transform: scale(0.95);
  transition-duration: 0.05s;
}

/* Botón No Disponible */
.btn-unavailable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--gray-400);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: not-allowed;
}

/* Imagen */
.product-image-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--gray-100);
  overflow: hidden;
}

.product-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(107, 27, 0, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.product-card:hover .product-image-wrapper::after {
  opacity: 1;
}

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

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

/* Info */
.product-info {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.product-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.3;
}

.product-card:hover .product-title {
  color: var(--color-primary);
}

.product-description {
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Features */
.product-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feature-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  background: var(--gray-100);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--gray-600);
}

.feature-item i {
  font-size: 0.65rem;
  color: var(--color-primary);
}

/* Footer */
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray-100);
}

.product-price {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.6rem;
  color: var(--gray-400);
  text-transform: uppercase;
}

.price-amount {
  font-size: 1rem;
  color: var(--gray-900);
  font-weight: 700;
}

/* Botón Agregar */
.btn-add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(37, 99, 235, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-add-to-cart::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-add-to-cart:hover::before {
  left: 100%;
}

.btn-add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  background: rgba(59, 130, 246, 0.95);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-add-to-cart:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.btn-add-to-cart i {
  font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   PRODUCT SEARCH / REQUEST SECTION
   -------------------------------------------------------------------------- */
.product-search-section {
  padding: 2.5rem 1.5rem;
  margin: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 2px solid var(--gray-200);
  text-align: center;
}

.search-section-content {
  max-width: 800px;
  margin: 0 auto;
}

.search-section-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.search-section-content h2 i {
  margin-right: 0.5rem;
  color: var(--color-primary);
}

.search-section-content > p {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.search-product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-product-card {
  cursor: pointer;
}

.search-product-card {
  position: relative;
}

.search-product-card input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.search-product-card .card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  transition: all 0.2s ease;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.search-product-card .card-inner i {
  font-size: 1.5rem;
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.search-product-card:hover .card-inner {
  border-color: var(--color-primary);
  background: rgba(107, 27, 0, 0.04);
}

.search-product-card input:checked + .card-inner,
.search-product-card.selected .card-inner {
  border-color: var(--color-primary);
  background: rgba(107, 27, 0, 0.08);
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(107, 27, 0, 0.15);
}

.search-product-card input:checked + .card-inner i,
.search-product-card.selected .card-inner i {
  color: var(--color-primary);
}

.search-text-area {
  text-align: left;
  margin-bottom: 1.25rem;
}

.search-text-area label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.search-text-area textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--gray-800);
  resize: vertical;
  transition: border-color 0.2s ease;
}

.search-text-area textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.btn-send-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

.btn-send-whatsapp:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.btn-send-whatsapp i {
  font-size: 1.15rem;
}

/* --------------------------------------------------------------------------
   CTA SECTION
   -------------------------------------------------------------------------- */
.products-cta {
  padding: 3rem 1.5rem;
  margin: 2rem 1.5rem;
  background: #6B1B00;
  border-radius: var(--radius-xl);
  text-align: center;
  color: white;
}

.cta-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
}

.cta-content p {
  font-size: 0.95rem;
  color: var(--gray-300);
  margin: 0 0 1.5rem 0;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.cta-btn.primary {
  background: white;
  color: var(--gray-900);
}

.cta-btn.primary:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
}

.cta-btn.secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.cta-btn.secondary:hover {
  background: white;
  color: var(--gray-900);
}

/* --------------------------------------------------------------------------
   RESPONSIVE - EXTRA LARGE DESKTOP (1600px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1600px) {
  .products-sidebar {
    width: 300px;
  }

  .products-content {
    max-width: calc(100% - 300px);
    padding: 2rem;
  }

  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE - LARGE DESKTOP (1200px - 1599px)
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) and (max-width: 1599px) {
  .products-sidebar {
    width: 280px;
  }

  .products-content {
    max-width: calc(100% - 280px);
  }

  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE - DESKTOP (1024px - 1199px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) and (max-width: 1199px) {
  .products-sidebar {
    width: 260px;
  }

  .products-content {
    max-width: calc(100% - 260px);
    padding: 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE - TABLET (768px - 1023px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .products-sidebar {
    width: 220px;
    padding: 1rem;
  }

  .products-content {
    max-width: calc(100% - 220px);
    padding: 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .product-description {
    display: block;
    font-size: 0.7rem;
    -webkit-line-clamp: 2;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE - MOBILE
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .products-layout {
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
    height: auto;
    overflow: visible;
  }

  /* Ocultar sidebar completo en móvil - filtros y secciones laterales */
  .products-sidebar {
    display: none;
  }

  /* Contenido sin margin-left */
  .products-content {
    margin-left: 0;
    max-width: 100%;
    padding: 0;
  }

  /* Hero compacto */
  .products-hero {
    padding: 1.25rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-lg);
  }

  /* Horarios compactos */
  .horarios-info {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-lg);
  }

  .horarios-info h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .horarios-grid {
    gap: 0.5rem;
  }

  .horario-item {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .nota-importante {
    margin-top: 0.5rem;
    padding: 8px 10px;
    font-size: 0.75rem;
  }

  /* Hero más compacto */
  .hero-badge {
    padding: 4px 10px;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
  }

  .products-hero h1 {
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
  }

  .hero-description {
    font-size: 0.8rem;
  }

  /* Grid de productos - 2 columnas bien alineadas */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .content-header {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
  }

  .results-info {
    font-size: 0.75rem;
  }

  .view-options {
    display: none;
  }

  /* Ocultar features en tarjetas móvil - se ven en la página del producto */
  .product-features {
    display: none;
  }

  /* Tarjetas compactas - misma altura con flexbox */
  .product-card {
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .product-card .product-link {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .product-image-wrapper {
    aspect-ratio: 4 / 3;
  }

  .product-badge {
    top: 6px;
    right: 6px;
    padding: 3px 7px;
    font-size: 0.6rem;
  }

  .product-info {
    padding: 0.5rem;
    gap: 0.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .product-title {
    font-size: 0.8rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-description {
    display: -webkit-box;
    font-size: 0.7rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--gray-600);
  }

  .product-footer {
    padding-top: 0.4rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    margin-top: auto;
  }

  .price-label {
    display: none;
  }

  .price-amount {
    font-size: 0.85rem;
  }

  .btn-add-to-cart {
    padding: 8px 10px;
    font-size: 0.7rem;
    gap: 4px;
    min-height: 36px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    justify-content: center;
  }

  .btn-add-to-cart span {
    display: inline;
  }

  .btn-add-to-cart i {
    font-size: 0.7rem;
  }

  .btn-add-to-cart:active {
    transform: scale(0.95);
    transition-duration: 0.05s;
  }

  /* Product Search Section mobile */
  .product-search-section {
    padding: 1.5rem 1rem;
    margin: 1rem 0.5rem;
  }

  .search-product-cards {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
  }

  .search-product-card .card-inner {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
  }

  .search-product-card .card-inner i {
    font-size: 1.25rem;
  }

  .btn-send-whatsapp {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.5rem;
  }

  /* CTA compacto */
  .products-cta {
    padding: 1.75rem 1rem;
    margin: 1rem 0.5rem;
  }

  .cta-content h2 {
    font-size: 1.1rem;
  }

  .cta-content p {
    font-size: 0.8rem;
  }

  .cta-btn {
    padding: 12px 20px;
    font-size: 0.8rem;
    min-height: 44px;
    touch-action: manipulation;
  }

  .cta-btn:active {
    transform: scale(0.97);
    transition-duration: 0.05s;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE - MOBILE EXTRA PEQUEÑO (<360px)
   -------------------------------------------------------------------------- */
@media (max-width: 359px) {
  .products-layout {
    flex-direction: column;
    padding: 0.3rem;
    gap: 0.3rem;
  }

  /* Sidebar oculto en pantallas pequeñas */
  .products-sidebar {
    display: none;
  }

  /* Contenido */
  .products-content {
    margin-left: 0;
    max-width: 100%;
    padding: 0;
  }

  /* Hero compacto */
  .products-hero {
    padding: 0.75rem 0.5rem;
    margin-bottom: 0.3rem;
  }

  .hero-badge {
    display: none;
  }

  .products-hero h1 {
    font-size: 1.1rem;
  }

  /* Grid 2 columnas */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem;
  }

  .content-header {
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.3rem;
  }

  .results-info {
    font-size: 0.7rem;
  }

  /* Tarjetas legibles */
  .product-card {
    border-radius: 6px;
  }

  .product-image-wrapper {
    aspect-ratio: 4 / 3;
  }

  .product-badge {
    top: 4px;
    right: 4px;
    padding: 2px 5px;
    font-size: 0.5rem;
  }

  .product-info {
    padding: 0.4rem;
    gap: 0.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .product-title {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  /* Ocultar descripción en pantallas muy pequeñas para dar espacio */
  .product-description {
    display: none;
  }

  .product-footer {
    padding-top: 0.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    margin-top: auto;
  }

  .price-amount {
    font-size: 0.75rem;
  }

  .btn-add-to-cart {
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    min-height: 32px;
    width: 100%;
    justify-content: center;
  }

  .btn-add-to-cart i {
    font-size: 0.6rem;
  }

  /* CTA */
  .products-cta {
    padding: 1.25rem 0.75rem;
    margin: 0.5rem 0.25rem;
    border-radius: var(--radius-md);
  }

  .cta-content h2 {
    font-size: 1rem;
  }

  .cta-content p {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .cta-btn {
    padding: 10px 16px;
    font-size: 0.7rem;
    min-height: 40px;
  }
}

/* --------------------------------------------------------------------------
   SIDEBAR-FOOTER FIX - Transiciones suaves
   El sidebar se ajusta dinámicamente para no superponerse con el footer
   -------------------------------------------------------------------------- */
.products-sidebar {
  transition: height 0.3s ease-out;
  overflow-y: auto;
}

/* Asegurar que el sidebar tenga un mínimo de altura */
@media (min-width: 768px) {
  .products-sidebar {
    min-height: 200px;
  }
}

/* --------------------------------------------------------------------------
   ZOOM HANDLING
   -------------------------------------------------------------------------- */
@media (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

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

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

/* --------------------------------------------------------------------------
   NOTIFICACIÓN DE ÉXITO PARA CARRITO
   -------------------------------------------------------------------------- */
.producto-notificacion-exito {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 10001;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.producto-notificacion-exito.show {
  transform: translateX(0);
  opacity: 1;
}

.producto-notificacion-exito .notif-icon {
  width: 40px;
  height: 40px;
  background: #E19100;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.producto-notificacion-exito .notif-icon i {
  color: white;
  font-size: 1.25rem;
}

.producto-notificacion-exito .notif-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.producto-notificacion-exito .notif-content strong {
  font-size: 0.9rem;
  color: var(--gray-900);
}

.producto-notificacion-exito .notif-content span {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.producto-notificacion-exito .notif-close {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--gray-400);
  transition: color 0.2s;
  margin-left: 8px;
}

.producto-notificacion-exito .notif-close:hover {
  color: var(--gray-600);
}

@media (max-width: 480px) {
  .producto-notificacion-exito {
    left: 16px;
    right: 16px;
    bottom: 16px;
    transform: translateY(120%);
  }

  .producto-notificacion-exito.show {
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   MEJORAS DE RENDIMIENTO Y SCROLL SUAVE
   -------------------------------------------------------------------------- */

/* GPU-accelerated elements - solo los interactivos */
.btn-add-to-cart,
.sidebar-whatsapp-btn,
.cta-btn {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Scroll suave y momentum nativo */
.products-layout {
  -webkit-overflow-scrolling: touch;
}

/* Mejorar legibilidad del texto */
.product-title,
.product-description {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Contenment para tarjetas - reduce repaints */
.product-card {
  contain: layout style;
}

/* GPU hint solo en hover, no permanente */
@media (hover: hover) {
  .product-card:hover {
    will-change: transform;
  }
}
/* ======= FUERZA 2 COLUMNAS EN TODO MÓVIL ======= */
@media (max-width: 767px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem;
  }
}

@media (max-width: 359px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.4rem;
  }
}
@media (max-width: 767px) {
  .sidebar-section:has(.includes-list) {
    display: none !important;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Esto es muy recomendable para el diseño */
}

/* ==========================================================================
   ESTILOS DE PROMOCIONES - Diseño Elegante y Profesional
   Colores armoniosos con el tema azul del sitio
   ========================================================================== */

/* Variables de promoción - Paleta elegante */
:root {
  --promo-primary: #FE7700;
  --promo-primary-dark: #E19100;
  --promo-accent: #06b6d4;       /* Cyan elegante */
  --promo-accent-dark: #0891b2;
  --promo-gold: #f59e0b;         /* Dorado para ofertas especiales */
  --promo-gold-dark: #d97706;
  --promo-success: #10b981;      /* Verde esmeralda */
  --promo-success-dark: #059669;
}

/* Badge de Promoción - Estilo elegante */
.product-badge.promo {
  background: rgba(254, 119, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  animation: pulse-promo 2.5s ease-in-out infinite;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-badge.promo i,
.product-badge.oferta i {
  font-size: 0.65em;
}

.product-badge.oferta {
  background: rgba(225, 145, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

@keyframes pulse-promo {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(254, 119, 0, 0.3);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(254, 119, 0, 0.4);
  }
}

/* Contenedor de precios con promoción */
.product-price.has-promo {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 0;
}

/* Precio anterior (tachado) - Estilo sutil */
.price-before {
  font-size: 0.68rem;
  color: var(--gray-400);
  text-decoration: line-through;
  font-weight: 400;
  opacity: 0.8;
}

/* Precio promocional (destacado) - Elegante */
.price-promo {
  font-size: 1.2rem;
  color: var(--promo-primary-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-promo .promo-label {
  font-size: 0.5rem;
  background: rgba(224, 242, 254, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--promo-primary-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid rgba(254, 119, 0, 0.2);
}

/* Botón cuando ya se agregó la promoción */
.btn-add-to-cart.promo-added {
  background: #E19100 !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35) !important;
  pointer-events: none;
}

.btn-add-to-cart.promo-added:hover {
  transform: none !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35) !important;
}

/* Tarjeta con promoción activa - Borde elegante */
.product-card.has-promotion {
  border: 2px solid rgba(254, 119, 0, 0.4);
  box-shadow: 0 4px 20px rgba(254, 119, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
}

.product-card.has-promotion:hover {
  border-color: var(--promo-primary-dark);
  box-shadow: 0 20px 40px rgba(254, 119, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Cinta de descuento - Diseño profesional */
.discount-ribbon {
  position: absolute;
  top: 12px;
  left: -8px;
  background: #FE7700;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  padding: 6px 16px 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 15;
  box-shadow: 0 4px 12px rgba(254, 119, 0, 0.4);
  letter-spacing: 0.02em;
  border-radius: 0 4px 4px 0;
}

.discount-ribbon::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  border-width: 3px 4px;
  border-style: solid;
  border-color: var(--promo-primary-dark) var(--promo-primary-dark) transparent transparent;
}

/* Icono de descuento en ribbon */
.discount-ribbon i {
  margin-right: 3px;
  font-size: 0.6rem;
}

/* Responsive para promociones */
@media (max-width: 767px) {
  .price-before {
    font-size: 0.68rem;
  }

  .price-promo {
    font-size: 0.95rem;
  }

  .price-promo .promo-label {
    font-size: 0.48rem;
    padding: 2px 5px;
  }

  .discount-ribbon {
    font-size: 0.62rem;
    padding: 4px 12px 4px 8px;
    top: 8px;
    left: -6px;
    max-width: calc(100% - 14px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-card.has-promotion .product-badge {
    display: none;
  }
}

@media (max-width: 359px) {
  .price-before {
    font-size: 0.6rem;
  }

  .price-promo {
    font-size: 0.8rem;
  }

  .price-promo .promo-label {
    display: none;
  }

  .discount-ribbon {
    font-size: 0.55rem;
    padding: 3px 8px 3px 6px;
  }
}
/* ==================== CATALOGO PROFESIONAL FINAL ==================== */
.products-main {
  background: linear-gradient(180deg, #fff8f1 0%, #fffaf6 42%, #ffffff 100%);
}

.products-layout {
  align-items: flex-start;
}

.products-hero {
  border: 1px solid rgba(107, 27, 0, 0.12);
  background:
    linear-gradient(135deg, rgba(36, 17, 10, 0.92), rgba(107, 27, 0, 0.82)),
    url("/Imagenesalg/algodon1.webp") center/cover;
  box-shadow: 0 18px 42px rgba(107, 27, 0, 0.14);
}

.catalog-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 1rem 0 1.2rem;
}

.guide-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 6px 12px;
  align-items: center;
  min-height: 112px;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid rgba(107, 27, 0, 0.12);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(107, 27, 0, 0.07);
}

.guide-card i {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #fe7700, #ff9b3d);
  border-radius: 10px;
}

.guide-card strong {
  color: #111827;
  font-family: var(--font-display);
  font-size: 1rem;
}

.guide-card span {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

.products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  background: #ffffff;
  border: 1px solid rgba(107, 27, 0, 0.12);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(107, 27, 0, 0.07);
}

.product-card:hover {
  border-color: rgba(254, 119, 0, 0.45);
  box-shadow: 0 18px 36px rgba(107, 27, 0, 0.12);
}

.product-image-wrapper {
  background: #fff4ea;
}

.product-info {
  padding: 0.9rem;
}

.product-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
}

.product-description {
  min-height: 2.1rem;
  color: #475569;
}

.product-badge {
  border-radius: 999px;
  letter-spacing: 0;
}

.product-badge.promo,
.product-badge.oferta {
  background: #fe7700;
  color: #ffffff;
}

.badge-coming {
  background: #24110a;
  color: #ffffff;
}

.product-coming-soon {
  border-style: dashed;
  background: linear-gradient(180deg, #ffffff, #fff8f1);
}

.product-coming-soon .product-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(254, 119, 0, 0.14), transparent 52%),
    linear-gradient(135deg, #fff7ed, #ffffff);
}

.product-coming-soon .product-image-wrapper img {
  width: min(78px, 42%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(107, 27, 0, 0.18));
}

.product-coming-soon:hover .product-image-wrapper img {
  transform: scale(1.04);
}

.product-coming-soon .btn-cotizar {
  background: #24110a;
}

.filter-option:has(input[value="listos"]) .filter-label i,
.filter-option:has(input[value="servicios"]) .filter-label i,
.filter-option:has(input[value="paquetes"]) .filter-label i,
.filter-option:has(input[value="proximamente"]) .filter-label i {
  color: #fe7700;
}

.seo-info-section {
  max-width: 1240px;
  margin: 46px auto 0;
  padding: 34px;
  border: 1px solid rgba(107, 27, 0, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(107, 27, 0, 0.08);
}

.seo-info-header {
  max-width: 760px;
  margin-bottom: 24px;
}

.seo-info-header h2 {
  margin: 8px 0 10px;
  color: #2b130b;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.seo-info-header p,
.seo-info-grid p {
  color: #69554c;
  line-height: 1.7;
}

.seo-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.seo-info-grid article {
  padding: 22px;
  border: 1px solid rgba(107, 27, 0, 0.12);
  border-radius: 12px;
  background: #fffaf7;
}

.seo-info-grid h3 {
  margin: 0 0 8px;
  color: #6b1b00;
  font-size: 1.05rem;
}

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .catalog-guide {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

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

@media (max-width: 520px) {
  .product-info {
    padding: 0.75rem;
  }

  .product-footer {
    align-items: flex-start;
  }

  .btn-add-to-cart,
  .btn-cotizar,
  .btn-ver-producto {
    width: 100%;
    justify-content: center;
  }

  .seo-info-section {
    padding: 24px 18px;
    margin-top: 34px;
  }
}
