/* Estilos específicos para el catálogo */

/* Layout del catálogo */
.catalog-container {
    min-height: 60vh;
}

.catalog-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.75rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border: 1px solid #dee2e6;
}

/* Panel de filtros */
.filters-panel .card {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 0.75rem;
}

.filters-panel .card-header {
    /* Usar color corporativo en lugar de azul hardcodeado */
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary-700) 100%);
    border-radius: 0.75rem 0.75rem 0 0 !important;
    border: none;
    padding: 1rem 1.25rem;
    color: white;
}

.filter-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* REMOVIDO: Estilos de formularios que interfieren con Bootstrap corporativo */
/* .filter-group .form-select, .filter-group .form-control - Bootstrap ya los maneja */
/* .filter-group .form-select:focus, .filter-group .form-control:focus - Bootstrap ya los maneja */
/* .filter-group .form-check-input:checked - Bootstrap ya los maneja */

.filter-group .form-check {
    margin-bottom: 0.5rem;
}

.filter-group .form-check-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

/* Grid de productos */

/* Grid personalizado para 5 columnas en pantallas grandes */
@media (min-width: 1200px) {
    .col-lg-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .col-lg-2-4 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Tarjetas de productos */
.product-card .card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

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

.product-image-container {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f8f9fa;
}

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

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-image-container .badge {
    font-size: 0.75rem;
    border-radius: 0.5rem;
    padding: 0.4rem 0.8rem;
    z-index: 10;
}

/* REMOVIDO: Estilos de badges que interfieren con Bootstrap */
/* .product-image-container .badge.bg-warning - Bootstrap ya los maneja */
/* .product-image-container .badge.bg-danger - Bootstrap ya los maneja */

/* Contenido de la tarjeta */
.product-card .card-body {
    padding: 1.25rem;
}

.brand-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    /* Usar color corporativo en lugar de azul hardcodeado */
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.product-title {
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-title a {
    color: #212529;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.product-title a:hover {
    /* Usar color corporativo en lugar de azul hardcodeado */
    color: var(--bs-primary);
}

.product-description {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

/* Precios */
.product-price {
    margin-bottom: 0.75rem;
}

.price-offer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-old {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.875rem;
}

.price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: #198754;
}

.price-offer .price-current {
    color: #dc3545;
}

/* Información de stock */
.stock-info {
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* Botones de acción - Solo mantener animaciones, colores ya están en Bootstrap */
.product-actions .btn {
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

/* Animación hover para todos los botones */
.product-actions .btn:hover {
    transform: translateY(-1px);
}

/* REMOVIDO: Estilos específicos de btn-primary y btn-outline-success */
/* Bootstrap ya los maneja con los colores corporativos */

/* Estilos para consultar precio */
.price-consult {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

.price-consult i {
    color: #28a745;
}

.price-consult p {
    margin-bottom: 0;
    font-weight: 500;
}

/* Botón de solicitar precio */
.solicitar-precio {
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.solicitar-precio:hover {
    background: linear-gradient(135deg, #1ebe5a, #0f7568);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
    color: white;
}

.solicitar-precio:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
    color: white;
}

/* Animación para el ícono de WhatsApp */
.solicitar-precio i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Paginación - Solo mantener animaciones, colores ya están en Bootstrap */
.pagination {
    margin-top: 3rem;
}

.pagination .page-link {
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    transform: translateY(-1px);
}

/* REMOVIDO: Estilos de colores específicos de paginación */
/* Bootstrap ya los maneja con los colores corporativos */

/* Buscador - Solo mantener border-radius específicos */
.input-group-sm .form-control {
    border-radius: 0.5rem 0 0 0.5rem;
}

.input-group-sm .btn {
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Select de ordenamiento - Solo mantener border-radius */
.form-select-sm {
    border-radius: 0.5rem;
}

/* REMOVIDO: Estilos de colores de formularios que interfieren con Bootstrap */
/* Bootstrap ya los maneja con los colores corporativos */

/* Estado vacío */
.text-center .fa-search {
    color: #6c757d;
    opacity: 0.5;
}

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

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

.product-card:nth-child(even) {
    animation-delay: 0.1s;
}

.product-card:nth-child(odd) {
    animation-delay: 0.2s;
}

/* Responsive */
@media (max-width: 991.98px) {
    .filters-panel {
        position: static !important;
        margin-bottom: 2rem;
    }
    
    .catalog-header {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .catalog-header .row > div {
        margin-bottom: 1rem;
    }
    
    .catalog-header .row > div:last-child {
        margin-bottom: 0;
    }
    
    .product-image-container {
        height: 200px;
    }
}

@media (max-width: 767.98px) {
    .product-image-container {
        height: 180px;
    }
    
    .product-card .card-body {
        padding: 1rem;
    }
    
    .catalog-header {
        padding: 1rem !important;
    }
    
    .catalog-header h1 {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 575.98px) {
    .col-12 {
        margin-bottom: 1rem;
    }
    
    .product-image-container {
        height: 160px;
    }
    
    .product-title a {
        font-size: 0.9rem;
    }
    
    .price-current {
        font-size: 1rem;
    }
    
    .product-actions .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Mejoras de accesibilidad - Usar colores corporativos */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Sticky header para móviles */
@media (max-width: 991.98px) {
    .filters-panel .card {
        position: sticky;
        top: 20px;
        z-index: 100;
    }
}

/* Loading state - Usar colores corporativos */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--bs-primary);
    border-radius: 50%;
    animation: loading-spin 1s linear infinite;
}

@keyframes loading-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================================================
   MODO OSCURO PARA CATÁLOGO - Bootstrap 5.3 Native
   ================================================ */

/* Header del catálogo en modo oscuro */
[data-bs-theme="dark"] .catalog-header {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
    border-color: #6c757d !important;
    color: #f8f9fa !important;
}

/* Panel de filtros en modo oscuro */
[data-bs-theme="dark"] .filters-panel .card {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .filter-title {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .filter-group {
    border-bottom-color: #495057 !important;
}

[data-bs-theme="dark"] .form-check-label {
    color: #dee2e6 !important;
}

/* Tarjetas de productos en modo oscuro */
[data-bs-theme="dark"] .product-card .card {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .product-image-container {
    background: #495057 !important;
}

[data-bs-theme="dark"] .brand-name {
    color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .product-title a {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .product-title a:hover {
    color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .product-description {
    color: #adb5bd !important;
}

/* Precios en modo oscuro */
[data-bs-theme="dark"] .price-old {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .price-current {
    color: #198754 !important;
}

[data-bs-theme="dark"] .price-offer .price-current {
    color: #dc3545 !important;
}

/* Información de stock y precio consulta en modo oscuro */
[data-bs-theme="dark"] .stock-info {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .price-consult {
    background: #495057 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .price-consult i {
    color: #198754 !important;
}

/* Estado vacío en modo oscuro */
[data-bs-theme="dark"] .text-center .fa-search {
    color: #adb5bd !important;
}

/* Efectos hover en modo oscuro */
[data-bs-theme="dark"] .product-card .card:hover {
    box-shadow: 0 8px 30px rgba(255,255,255,0.1) !important;
}
