/**
 * EL GALLO PIZZERÍA - E-COMMERCE
 * Estilos para productos y menú
 * @version 2.0
 * @date Diciembre 2025
 */

/* ============================================================================
   SECCIÓN DE MENÚ
============================================================================ */

.menu-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #fff 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* ============================================================================
   FILTROS DE CATEGORÍAS
============================================================================ */

.category-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.category-filters::-webkit-scrollbar {
    height: 6px;
}

.category-filters::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.category-filters::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 10px;
}

.category-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-filter i {
    font-size: 1.1rem;
}

.category-filter .category-count {
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-filter:hover {
    border-color: #FF6B35;
    color: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.category-filter.active {
    background: linear-gradient(135deg, #FF6B35 0%, #ff8c5a 100%);
    border-color: #FF6B35;
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.category-filter.active .category-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ============================================================================
   GRID DE PRODUCTOS
============================================================================ */

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.producto-card {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.producto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Badge de producto */
.producto-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-popular {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
}

.badge-oferta {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
}

/* Imagen del producto */
.producto-imagen {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ebef 100%);
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.producto-card:hover .producto-imagen img {
    transform: scale(1.1);
}

.personalizable-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 50%;
    font-size: 0.9rem;
    color: #FF6B35;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Información del producto */
.producto-info {
    padding: 20px;
}

.producto-nombre {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 2.6em;
}

.producto-descripcion {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

/* Precios */
.producto-precio {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.precio-actual {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF6B35;
}

.precio-anterior {
    font-size: 1.1rem;
    color: #95a5a6;
    text-decoration: line-through;
}

.descuento-badge {
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Acciones del producto */
.producto-acciones {
    display: flex;
    gap: 10px;
}

.btn-agregar-carrito,
.btn-personalizar {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #FF6B35 0%, #ff8c5a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-agregar-carrito:hover,
.btn-personalizar:hover {
    background: linear-gradient(135deg, #e65a25 0%, #ff7b4a 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-ver-detalle {
    padding: 12px;
    background: white;
    color: #FF6B35;
    border: 2px solid #FF6B35;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-ver-detalle:hover {
    background: #FF6B35;
    color: white;
    transform: scale(1.05);
}

/* ============================================================================
   RESULTADOS DE BÚSQUEDA
============================================================================ */

.search-results-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search-header h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.btn-cerrar-busqueda {
    padding: 8px 16px;
    background: #e0e0e0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cerrar-busqueda:hover {
    background: #d0d0d0;
}

.search-no-results {
    text-align: center;
    padding: 60px 20px;
}

.search-no-results i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.search-no-results h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.search-no-results p {
    color: #7f8c8d;
}

/* ============================================================================
   ESTADO VACÍO
============================================================================ */

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* ============================================================================
   NOTIFICACIONES TOAST
============================================================================ */

.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    z-index: 10000;
    transition: bottom 0.3s ease;
    max-width: 400px;
}

.toast.show {
    bottom: 30px;
}

.toast-success {
    border-left: 4px solid #51cf66;
}

.toast-error {
    border-left: 4px solid #ff6b6b;
}

/* ============================================================================
   SKELETON LOADER
============================================================================ */

.loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.skeleton-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.skeleton-card::before {
    content: '';
    display: block;
    width: 100%;
    height: 220px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

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

@media (max-width: 768px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .producto-card {
        border-radius: 12px;
    }
    
    .producto-imagen {
        height: 150px;
    }
    
    .producto-info {
        padding: 12px;
    }
    
    .producto-nombre {
        font-size: 0.95rem;
        min-height: auto;
    }
    
    .producto-descripcion {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
        min-height: auto;
    }
    
    .precio-actual {
        font-size: 1.2rem;
    }
    
    .btn-agregar-carrito,
    .btn-personalizar {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .btn-ver-detalle {
        width: 40px;
        height: 40px;
    }
    
    .category-filters {
        gap: 8px;
    }
    
    .category-filter {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}
