/*=============================================
                PRODUCTOS - CSS
                COMPLETAMENTE INDEPENDIENTE
=============================================*/

/* Contenedor principal */
.productos-section {
    background-color: #f8f9fa;
    min-height: 60vh;
    padding: 3rem 0;
}

/* Breadcrumb */
.productos-section .breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eaeaea;
}

.productos-section .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
    padding: 0 8px;
}

.productos-section .breadcrumb-item.active {
    color: #0d6efd;
    font-weight: 600;
}

.productos-section .breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.productos-section .breadcrumb-item a:hover {
    color: #0d6efd;
}

/* Cabecera */
.productos-section h1 {
    color: #2c3e50;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.productos-section h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd, #20c997);
    border-radius: 2px;
}

.productos-section #categoryDescription {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
}

/* Dropdown de ordenamiento */
.productos-section .dropdown-toggle {
    min-width: 160px;
    justify-content: space-between;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid #ced4da;
    background: white;
    color: #495057;
    font-weight: 500;
}

.productos-section .dropdown-toggle:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.productos-section .dropdown-menu {
    min-width: 200px;
    border: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
    border-radius: 8px;
    padding: 8px 0;
}

.productos-section .dropdown-item {
    padding: 8px 20px;
    color: #495057;
    font-weight: 500;
    transition: all 0.2s;
}

.productos-section .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    transform: translateX(5px);
}

.productos-section .dropdown-divider {
    margin: 8px 0;
    border-top-color: #eee;
}

/* Contador de resultados */
.productos-section .text-muted span {
    font-weight: 700;
    color: #0d6efd;
}

/* Tarjetas de productos */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #0d6efd;
}

.product-card .card-img-top {
    height: 240px;
    object-fit: contain;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    transition: all 0.4s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.08);
    padding: 15px;
}

.product-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #f1f3f5;
}

.product-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    height: 3.2rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.product-card .product-category {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.product-card .product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0d6efd;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0d6efd, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Botón ver producto */
.btn-view-product {
    background: linear-gradient(135deg, #0d6efd 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-view-product:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #1ba87e 100%);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.btn-view-product:active {
    transform: translateY(0);
}

.btn-view-product i {
    font-size: 1.1rem;
}

/* Paginación */
#paginationContainer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
}

#productPagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0d6efd, #20c997);
    border-color: #0d6efd;
    color: white;
    font-weight: 600;
}

#productPagination .page-link {
    color: #495057;
    border: 1px solid #dee2e6;
    margin: 0 4px;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s;
}

#productPagination .page-link:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-2px);
}

#productPagination .page-item.disabled .page-link {
    color: #adb5bd;
    pointer-events: none;
    background-color: #f8f9fa;
}

/* Mensaje sin productos */
.productos-section .text-center {
    padding: 4rem 0;
}

.productos-section .text-center .fa-box-open {
    color: #dee2e6;
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.productos-section .text-center h4 {
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 1rem;
}

.productos-section .text-center p {
    color: #adb5bd;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .productos-section {
        padding: 2rem 0;
    }
    
    .product-card .card-img-top {
        height: 200px;
        padding: 15px;
    }
    
    .product-card .card-title {
        font-size: 1rem;
        height: auto;
    }
    
    .product-card .card-body {
        padding: 1.25rem;
    }
    
    .btn-view-product {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .productos-section .col-md-4.text-end {
        text-align: left !important;
        margin-top: 1.5rem;
    }
    
    .productos-section h1 {
        font-size: 1.75rem;
    }
    
    .product-card .product-price {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .product-card {
        margin-bottom: 2rem;
    }
    
    .product-card .card-img-top {
        height: 180px;
    }
    
    .product-card .product-price {
        font-size: 1.2rem;
    }
    
    .productos-section h1 {
        font-size: 1.5rem;
    }
    
    .productos-section .breadcrumb {
        font-size: 0.9rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease-out;
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }