/* ===== ESTILOS ESPECÍFICOS PARA PRODUCTOS.PHP ===== */

/* ===== SECCIÓN DE FILTROS ===== */
/* ===== SECCIÓN DE FILTROS (SIDEBAR) ===== */
/* Styles moved to .catalog-sidebar */

section.filters-section .container {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Barra de búsqueda principal */
.sidebar-header {
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(185, 78, 72, 0.1);
}

.sidebar-header h3 {
  font-family: "Montserrat", sans-serif;
  color: #b94e48;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-bar-wrapper {
  margin-bottom: 1.5rem;
}

.search-form-main {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  color: #c5a065; /* Antique Gold */
  font-size: 1.1rem;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(185, 78, 72, 0.2);
  border-radius: 1rem; /* Straight edges */
  font-family: "Didact Gothic", sans-serif;
  font-size: 1rem;
  color: #4a403a;
  background: white;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #c5a065; /* Gold focus */
  background: white;
  box-shadow: 0 0 0 4px rgba(197, 160, 101, 0.1);
}

.search-input::placeholder {
  color: #999;
}

.btn-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: white;
  color: #b94e48;
  border: 1px solid #b94e48;
  border-radius: 1rem; /* Straight edges */
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-search:hover {
  background: #b94e48;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(185, 78, 72, 0.3);
}

.btn-search i {
  font-size: 1rem;
}

/* Wrapper de filtros */
.filters-wrapper {
  margin-top: 1.5rem;
}

/* Botón toggle de filtros */
.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
  color: #b94e48;
  border: 2px solid rgba(185, 78, 72, 0.2);
  border-radius: 15px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  justify-content: center;
}

.filter-toggle-btn:hover {
  border-color: #b94e48;
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(185, 78, 72, 0.15);
}

.filter-toggle-btn i {
  font-size: 1rem;
}

.filter-arrow {
  transition: transform 0.3s ease;
  margin-left: auto;
}

.filter-toggle-btn.active .filter-arrow {
  transform: rotate(180deg);
}

/* Panel de filtros */
.filters-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  margin-top: 0;
}

.filters-panel.active {
  max-height: 800px;
  opacity: 1;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(197, 160, 101, 0.2); /* Antique Gold */
}

.filters-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.filters-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #b94e48;
}

.filter-group label i {
  font-size: 0.9rem;
}

.filter-select {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 2px solid rgba(185, 78, 72, 0.2);
  border-radius: 12px;
  font-family: "Didact Gothic", sans-serif;
  font-size: 1rem;
  color: #4a403a;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B94E48' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.filter-select:focus {
  outline: none;
  border-color: #c5a065;
  background-color: white;
  box-shadow: 0 0 0 4px rgba(197, 160, 101, 0.1);
}

.filter-select:hover {
  border-color: rgba(185, 78, 72, 0.4);
}

/* Price range specific */
/* .price-filter-group removed as it is no longer needed */

.price-range-inputs {
  display: flex;
  align-items: center;
  gap: 0.6rem; /* Tighter gap for sidebar */
}

.price-input {
  flex: 1;
  padding: 0.8rem; /* Smaller padding */
  border: 2px solid rgba(185, 78, 72, 0.2);
  border-radius: 10px;
  font-family: "Didact Gothic", sans-serif;
  font-size: 0.9rem;
  color: #4a403a;
  background: #fafafa;
  transition: all 0.3s ease;
  min-width: 0; /* Important for flex items */
}

.price-input:focus {
  outline: none;
  border-color: #c5a065;
  background-color: white;
}

.price-separator {
  color: #b94e48;
  font-weight: 600;
}

/* Acciones de filtros */
.filter-actions {
  display: flex;
  gap: 1rem;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

.btn-filter-apply,
.btn-filter-clear {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem; /* Reduced padding slightly for better proportion */
  border-radius: 12px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  flex: 1;
  min-width: 140px;
  justify-content: center;
}

/* Apply Filter - Primary Style (Red) */
.btn-filter-apply {
  background: #b94e48;
  color: white;
  border: 1px solid #b94e48;
}

.btn-filter-apply:hover {
  background: #9e3b36;
  border-color: #9e3b36;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(185, 78, 72, 0.3);
}

/* Clear Filter - Secondary Style (Gray to Red) */
.btn-filter-clear {
  background: white;
  color: #666;
  border: 1px solid #ddd;
}

.btn-filter-clear:hover {
  background: rgba(185, 78, 72, 0.05); /* Soft red background */
  color: #b94e48;
  border-color: #b94e48;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(185, 78, 72, 0.1);
}

/* ===== LAYOUT PRINCIPAL (SIDEBAR) ===== */
.catalog-section {
  padding: 8rem 1rem 4rem;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: min-content 1fr;
  grid-template-areas: 
    "sidebar search"
    "sidebar main";
  gap: 0.9rem 2rem;
  align-items: start;
}

.search-bar-wrapper.main-search {
  grid-area: search;
  margin: 0 !important;
}

.catalog-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 100px;
  background: white;
  padding: 1.5rem;
  border: 1px solid rgba(185, 78, 72, 0.08);
  border-radius: 2px; /* Straight edges */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.catalog-main {
  grid-area: main;
  min-width: 0;
}

/* ===== REESTILO DE FILTROS EN SIDEBAR ===== */
.filters-section {
  display: contents;
}

.search-bar-wrapper {
  margin-bottom: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #eee;
}

.filters-panel {
  max-height: none !important;
  opacity: 1 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
  display: block !important;
}

.filter-toggle-btn {
  display: none;
}

/* Nuevos Botones de Filtro */
.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Increased gap */
}

.btn-filter-apply,
.btn-filter-clear {
  width: 100%;
  padding: 0.8rem; /* Slightly smaller padding */
  border-radius: 25px; /* Rounder like view-details */
  justify-content: center;
  font-size: 0.95rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  
  /* Initial State: Outline Gray (Like Ver Detalles) */
  background: white;
  color: #666;
  border: 1px solid #ddd;
  box-shadow: none;
}

/* APLICAR - HOVER VERDE */
.btn-filter-apply:hover {
  background: white;
  color: #4caf50;
  border-color: #4caf50;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* LIMPIAR - HOVER DORADO (Match Price Focus) */
.btn-filter-clear:hover {
  background: white; /* Gold from price input focus */
  color: #c5a065;
  border-color: #c5a065;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(197, 160, 101, 0.3);
}


.btn-filter-apply i,
.btn-filter-clear i {
  font-size: 0.9rem;
}

/* ===== ESTILOS PARA LA CABECERA DE RESULTADOS (PREMIUM) ===== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem; 
    padding-bottom: 0.8rem; /* Reduced from 1rem */
    border-bottom: 1px solid rgba(185, 78, 72, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

.results-info p {
    font-family: 'Montserrat', sans-serif;
    color: #888;
    font-size: 1.1rem;
    font-weight: 500;
}

.section-title-small {
    font-family: "Montserrat", sans-serif;
    color: #b94e48;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.view-options {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.3rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Sombra sutil premium */
    border: 1px solid rgba(185, 78, 72, 0.1); 
}

.view-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.view-btn:hover {
    color: #B94E48;
    background: rgba(185, 78, 72, 0.05);
}

.view-btn.active {
    background: #B94E48;
    color: white;
    box-shadow: 0 4px 10px rgba(185, 78, 72, 0.3);
    transform: scale(1.05);
}

/* ===== FOOTER ESPECÍFICO DE PRODUCTOS ===== */
.footer-social.social-labeled {
    display: flex;
    justify-content: center;
    gap: 3rem; /* Mayor separación entre elementos */
    flex-wrap: wrap;
    margin: 0 auto;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer; /* Pointer on the whole item */
}

/* Estilo para el texto de la red social */
.social-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #b94e48; /* Romantic Red */
    letter-spacing: 0.5px;
    /* Efecto sutil de borde/sombra */
    text-shadow: 1px 1px 2px rgba(185, 78, 72, 0.15);
    transition: color 0.3s ease;
}

.social-item:hover .social-label {
    color: #842f36; /* Darker red on hover */
}

.social-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    color: #b94e48;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(185, 78, 72, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(185, 78, 72, 0.1);
}

.social-item a:hover {
    transform: translateY(-3px) scale(1.1);
    background: #b94e48;
    color: white;
    box-shadow: 0 8px 20px rgba(185, 78, 72, 0.3);
}

.social-item a i {
    font-size: 1.2rem;
}

/* Responsive para filtros y footer de productos */
/* Responsive y Reordenamiento */
@media (max-width: 992px) {
  .catalog-layout {
    grid-template-columns: 240px 1fr;
    gap: 1rem 1.5rem;
  }
}

@media (max-width: 550px) {
  .catalog-section {
    padding: 6.5rem 1rem !important;
  }
}

@media (max-width: 768px) {
  .catalog-section {
    padding: 8rem 1rem;
  }
}

@media (max-width: 680px) {
  .catalog-section {
    padding: 8.5rem 1rem;
  }


  .catalog-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.2rem !important;
  }

  /* 1. BUSCADOR PRIMERO */
  .search-bar-wrapper.main-search {
    order: 1 !important;
    grid-area: auto !important;
    margin-bottom: 0 !important;
    width: 100% !important;
  }

  /* 2. FILTROS SEGUNDO */
  .sidebar-header {
    display: none !important;
  }

  .catalog-sidebar {
    order: 2 !important;
    grid-area: auto !important;
    width: 100% !important;
    position: relative !important;
    top: auto !important;
    margin-bottom: 0 !important;
    padding: 0 !important; 
    display: block !important;
    background: transparent !important; 
    box-shadow: none !important;
    border: none !important;
  }

  /* 3. TÍTULO / INFO TERCERO */
  .results-header {
    order: 3 !important;
    grid-area: auto !important;
    margin-top: 0;
    padding: 0.5rem 0;
    border-bottom: none !important;
    flex-direction: column;
    gap: 1rem;
  }

  /* 4. PRODUCTOS CUARTO */
  .catalog-main {
    order: 4 !important;
    grid-area: auto !important;
    padding: 0 !important;
  }

  .filter-toggle-btn {
    display: flex !important; /* Restore toggle */
    padding: 1rem 1.6rem;
    font-size: 0.85rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(185, 78, 72, 0.1);
    width: 100%;
    justify-content: space-between;
    align-items: center;
    color: #b94e48;
    margin-bottom: 0.5rem;
  }

  .filters-panel {
    display: none !important; /* Hidden until toggled */
    background: white;
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-top: 0.5rem;
  }

  .filters-panel.active {
    display: block !important;
    padding: 1.8rem 2rem !important;
  }

  /* 4. PRODUCTOS CUARTO */
  .catalog-main {
    order: 4 !important;
    grid-area: auto !important;
  }

  #productsContainer, .pagination, .no-results {
    order: 5 !important;
  }
}

@media (max-width: 600px) {
  .results-header {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }

  .catalog-main {
    padding: 1rem 0; /* Reduced */
  }

  /* 2 COLUMNS FOR MOBILE GRILLA (CHIQUITITO) */
  .catalog-main .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
  }

  .catalog-main .product-image {
    height: 160px;
  }

  .catalog-main .product-info h3 {
    font-size: 0.95rem;
  }

  .catalog-main .product-price .price {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .search-input-top, .search-input {
    padding: 0.7rem 0.7rem 0.7rem 2.5rem !important;
    font-size: 0.8rem !important;
  }

  .search-icon-top, .search-icon {
    left: 0.8rem !important;
    font-size: 0.9rem !important;
  }

  .filter-toggle-btn {
    padding: 1rem 1.8rem;
    font-size: 0.8rem;
  }

  .filters-panel {
    padding: 0.8rem;
  }

  .filter-select, .price-input {
    font-size: 0.75rem;
    height: 34px;
  }
}

/* ===== ESTILOS PARA TARJETAS DE PRODUCTOS ===== */
/* Estos estilos tienen mayor especificidad para sobrescribir style.css */

.catalog-main {
  background: transparent;
  width: 100%;
}

.catalog-main .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}



/* ===== REDUCED SIZE CARDS FOR CATALOG (PER USER REQUEST - ITERATION 4: 4 COLUMNS) ===== */
.catalog-main .products-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

.catalog-main .product-card {
  box-shadow: 0 5px 15px rgba(196, 79, 72, 0.08); /* Slightly stronger shadow for larger cards */
}

.catalog-main .product-image {
  height: 220px; /* Increased height for 4 columns */
}

.catalog-main .product-info {
  padding: 1rem;
}

.catalog-main .product-info h3 {
  font-size: 1.1rem; /* Restored slightly larger font */
  margin-bottom: 0.3rem;
}

.catalog-main .product-subtitle {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.catalog-main .product-price {
  margin: 0.3rem 0 0.6rem 0;
}

.catalog-main .product-price .price {
  font-size: 1.2rem;
}

.catalog-main .stock-info {
  font-size: 0.8rem;
  margin: 0.3rem 0 0.8rem 0;
}

/* Compact Buttons */
.catalog-main .product-actions-row {
  gap: 0.5rem;
}

.catalog-main .btn-add-cart {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.catalog-main .btn-add-cart i {
  font-size: 0.95rem;
}

.catalog-main .btn-view-details {
  height: 40px;
  font-size: 0.85rem;
  padding: 0 1rem;
}

/* Responsive para productos */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .product-image {
    height: 240px;
  }
  
  .product-info {
    padding: 1.25rem;
  }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .catalog-main .product-card {
    max-width: 100%;
  }
}


/* ===== VISTA DE LISTA (Horizontal) ===== */
.products-grid[data-view="list"] {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.products-grid[data-view="list"] .product-card {
  display: grid;
  grid-template-columns: 160px 1fr; /* Imagen más pequeña */
  gap: 0;
  max-width: 100%;
  padding: 0;
  align-items: stretch;
}

/* Imagen en lista */
.products-grid[data-view="list"] .product-image {
  width: 100%;
  height: 100%;
  min-height: 140px; /* Altura reducida */
}

.products-grid[data-view="list"] .product-image img {
  height: 100%;
  object-fit: cover;
}

.products-grid[data-view="list"] .btn-favorite-icon {
  top: 8px;
  left: 8px;
  right: auto;
}

/* Info en lista - GRID AVANZADO */
.products-grid[data-view="list"] .product-info {
  display: grid;
  /* Columnas: Contenido | Precio | Carrito */
  grid-template-columns: 1fr auto auto; 
  /* Filas: Titulo | Descripcion (con rowspan implícito para llenar) | Stock | Botón Detalles */
  grid-template-rows: min-content min-content auto min-content;
  grid-template-areas: 
    "title price cart"
    "desc  stock stock"
    "desc  details details";
  padding: 1rem; /* Padding reducido */
  column-gap: 1rem;
  row-gap: 0.4rem;
  align-items: start;
}

/* Título */
.products-grid[data-view="list"] .product-info h3 {
  grid-area: title;
  font-size: 1.1rem; /* Fuente reducida */
  margin-bottom: 0.3rem;
  align-self: center;
}

/* Descripción */
.products-grid[data-view="list"] .product-subtitle {
  grid-area: desc;
  font-size: 0.85rem;
  margin: 0;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  align-self: start;
}

/* Precio */
.products-grid[data-view="list"] .product-price {
  grid-area: price;
  text-align: right;
  margin: 0;
  align-self: center; /* Centrar verticalmente con el título o carrito */
  font-size: 1.2rem !important; /* Asegurar tamaño */
}

.products-grid[data-view="list"] .product-price .price {
    font-size: 1.2rem;
}

/* Stock */
.products-grid[data-view="list"] .stock-info {
  grid-area: stock;
  margin: 0.3rem 0;
  text-align: right;
  font-size: 0.75rem;
  color: #888;
}

/* Contenedor de acciones (desaparece visualmente para que los hijos usen el grid padre) */
.products-grid[data-view="list"] .product-actions-row {
  display: contents;
}

/* Botón Carrito */
.products-grid[data-view="list"] .btn-add-cart {
  grid-area: cart;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  padding: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.products-grid[data-view="list"] .btn-add-cart::after {
  content: none;
  display: none;
}

/* Botón Ver Detalles */
.products-grid[data-view="list"] .btn-view-details {
  grid-area: details;
  width: 100%;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  text-align: center;
  justify-content: center;
  margin-top: auto; /* Empujar al fondo si sobra espacio */
}



/* RESPONSIVE: MÓVIL (Compact Horizontal List) */
@media (max-width: 992px) {
  .products-grid[data-view="list"] .product-card {
    grid-template-columns: 140px 1fr;
  }
}

@media (max-width: 800px) {
  .products-grid[data-view="list"] .product-card {
    grid-template-columns: 170px 1fr; /* Wider image */
    align-items: stretch;
    overflow: hidden;
  }

  .products-grid[data-view="list"] .product-image {
    aspect-ratio: auto;
    width: 100%; /* Flexible width */
    height: 100% !important;
    object-fit: cover;
    margin: 0;
    border-radius: 12px 0 0 12px;
  }

  .btn-favorite-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
  }

  .products-grid[data-view="list"] .product-info {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    justify-content: flex-start; /* Align to top */
    text-align: left;
    min-width: 0; /* Add this to prevent flex items from overflowing */
  }

  .products-grid[data-view="list"] .product-info h3 {
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    text-align: left;
  }

  /* Description hidden below 800px */
  .products-grid[data-view="list"] .product-subtitle {
    display: none !important;
  }

  /* Stock simplification */
  .products-grid[data-view="list"] .stock-label {
    display: none;
  }
  .products-grid[data-view="list"] .stock-info::before {
    content: "Disp.: ";
    font-weight: 600;
  }
  .products-grid[data-view="list"] .stock-info {
    font-size: 0.75rem !important;
    margin: 0.2rem 0 !important;
    text-align: left;
  }

  .products-grid[data-view="list"] .product-price {
    text-align: left;
    font-size: 1rem !important;
    margin: 0.1rem 0;
  }

  .products-grid[data-view="list"] .product-price .price {
    font-size: 0.95rem;
  }

  /* Button grouping */
  .products-grid[data-view="list"] .product-actions-row {
    display: flex !important;
    justify-content: flex-start;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.5rem;
  }

  .products-grid[data-view="list"] .btn-add-cart {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .products-grid[data-view="list"] .btn-view-details {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    border-radius: 12px;
    height: 32px;
    flex: 0 1 auto;
  }
}

/* Breakpoint para móviles medianos/pequeños */
@media (max-width: 480px) {
  .products-grid[data-view="list"] .product-card {
    grid-template-columns: 130px 1fr; /* Reducido de 170px */
  }
}

/* Breakpoint para móviles muy pequeños */
@media (max-width: 425px) {
  .products-grid[data-view="list"] .product-card {
    grid-template-columns: 115px 1fr; /* Más aire para el texto */
  }
  
  .products-grid[data-view="list"] .product-info {
    padding: 0.6rem; /* Menos padding */
  }
  
  .products-grid[data-view="list"] .product-info h3 {
    font-size: 0.95rem;
  }
}

/* Breakpoint para pantallas críticas (angostas) */
@media (max-width: 380px) {
  .products-grid[data-view="list"] .product-card {
    grid-template-columns: 100px 1fr; /* Imagen aún más pequeña */
  }
  
  .products-grid[data-view="list"] .product-info {
    padding: 0.5rem;
  }

  .products-grid[data-view="list"] .product-info h3 {
    font-size: 0.88rem; /* Evitar que "Programación" se corte */
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  
  .products-grid[data-view="list"] .btn-view-details {
    padding: 0.3rem 0.5rem;
    font-size: 0.65rem;
    height: 30px;
  }

  .products-grid[data-view="list"] .btn-add-cart {
    width: 30px;
    height: 30px;
  }
}

/* Pantallas extremas */
@media (max-width: 330px) {
  .products-grid[data-view="list"] .product-card {
    grid-template-columns: 85px 1fr;
  }
}
