/* ========================================
   CATALOGO.CSS - CalidoHogar
   Estilos específicos para la página de catálogo
======================================== */

/* BREADCRUMB */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: #ff4400;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.breadcrumb-item a:hover {
    border-bottom-color: #ff4400;
}

.breadcrumb-item.active {
    color: #aaa;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #555;
}

/* ========================================
   SIDEBAR FILTROS
======================================== */

.filtros-container {
    background: #1c1c1c;
    border-radius: 12px;
    padding: 25px;
    position: sticky;
    top: 20px;
    border: 1px solid #333;
}

.filtro-titulo {
    color: #ff4400;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.filtro-opciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filtro-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ddd;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: 0.2s;
}

.filtro-check:hover {
    background: #2a2a2a;
}

.filtro-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff4400;
}

.filtro-check span {
    flex: 1;
}

/* Input de búsqueda */
#buscar-producto {
    background: #2a2a2a;
    border: 2px solid #444;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    transition: 0.3s;
}

#buscar-producto:focus {
    border-color: #ff4400;
    background: #1c1c1c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 68, 0, 0.1);
}

#buscar-producto::placeholder {
    color: #777;
}

/* Selects */
.form-select {
    background: #2a2a2a;
    border: 2px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    transition: 0.3s;
}

.form-select:focus {
    border-color: #ff4400;
    background: #1c1c1c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 68, 0, 0.1);
}

.form-select option {
    background: #1c1c1c;
    color: #fff;
}

/* Botón limpiar filtros */
#limpiar-filtros {
    border: 2px solid #ff4400;
    color: #ff4400;
    font-weight: 600;
    padding: 10px;
    transition: 0.3s;
}

#limpiar-filtros:hover {
    background: #ff4400;
    color: #fff;
    transform: translateY(-2px);
}

/* ========================================
   HEADER DEL CATÁLOGO
======================================== */

.catalogo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
    flex-wrap: wrap;
    gap: 15px;
}

.catalogo-header h1 {
    color: #ff4400;
    font-size: 2.5rem;
    margin: 0;
}

.catalogo-info {
    color: #aaa;
    font-size: 1rem;
}

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

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

/* Tarjeta de producto */
.producto-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 2px solid #333;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.producto-card:hover {
    transform: translateY(-8px);
    border-color: #ff4400;
    box-shadow: 0 15px 40px rgba(255, 68, 0, 0.3);
}

/* Badge destacado */
.producto-destacado-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4400;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(255, 68, 0, 0.4);
}

/* Imagen del producto */
.producto-imagen {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: 0.4s;
}

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

/* Contenido de la tarjeta */
.producto-contenido {
    padding: 20px;
}

.producto-categoria {
    color: #ff4400;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.producto-nombre {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    min-height: 2.6em;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;   
}

.producto-marca {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.producto-descripcion {
    color: #bbb;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer de la tarjeta */
.producto-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.producto-precio {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
}

.btn-ver-producto {
    background: #ff4400;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-ver-producto:hover {
    background: #ff5500;
    transform: scale(1.05);
    color: #fff;
}

/* ========================================
   LOADING Y ESTADOS
======================================== */

.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #aaa;
}

.loading-spinner .spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.4rem;
}

.sin-resultados {
    grid-column: 1 / -1;
    background: #1c1c1c;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
}

.sin-resultados h3 {
    color: #ff4400;
    margin-bottom: 15px;
}

.sin-resultados p {
    color: #aaa;
    margin-bottom: 25px;
}

/* ========================================
   PAGINACIÓN
======================================== */

.paginacion .pagination {
    gap: 8px;
}

.pagination .page-item .page-link {
    background: #2a2a2a;
    border: 2px solid #444;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    transition: 0.3s;
}

.pagination .page-item .page-link:hover {
    background: #ff4400;
    border-color: #ff4400;
    color: #fff;
}

.pagination .page-item.active .page-link {
    background: #ff4400;
    border-color: #ff4400;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: #1c1c1c;
    border-color: #333;
    color: #555;
}

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

/* Tablets */
@media (max-width: 992px) {
    .catalogo-header h1 {
        font-size: 2rem;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .filtros-container {
        position: relative;
        top: 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .catalogo-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .catalogo-header h1 {
        font-size: 1.8rem;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .producto-imagen {
        height: 200px;
    }

    .producto-nombre {
        font-size: 1.1rem;
    }

    .producto-precio {
        font-size: 1.5rem;
    }

    .filtros-container {
        margin-bottom: 30px;
    }
}

/* Extra small */
@media (max-width: 576px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }

    .producto-imagen {
        height: 250px;
    }
}

/* ========================================
   ANIMACIONES
======================================== */

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

.producto-card {
    animation: fadeIn 0.5s ease;
}

/* Animación escalonada para las tarjetas */
.producto-card:nth-child(1) { animation-delay: 0.05s; }
.producto-card:nth-child(2) { animation-delay: 0.1s; }
.producto-card:nth-child(3) { animation-delay: 0.15s; }
.producto-card:nth-child(4) { animation-delay: 0.2s; }
.producto-card:nth-child(5) { animation-delay: 0.25s; }
.producto-card:nth-child(6) { animation-delay: 0.3s; }
