/* ===== CARDS ELEGANTES PARA TIENDA SVINUM ===== */

/* Card principal */
.card {
    background: #ffffff;
    border: none !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    margin-bottom: 40px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    height: 92% !important;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* Contenedor de imagen */
.product-image-container {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
}

/* Imagen del producto */
.card-img-top, 
.novedad-img {
    border-radius: 0 !important;
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: top;
    transition: all 0.6s ease;
}

.card:hover .card-img-top,
.card:hover .novedad-img {
    transform: scale(1.05);
}

/* Overlay de imagen con efecto gradiente */
.product-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .product-image-overlay {
    opacity: 1;
}

/* Contenido del card */
.card-body {
    padding: 25px 20px 20px !important;
    align-content: center !important; 
}

.card-title {
    font-size: 1.1rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
    text-decoration: none !important;
}

.card-title:hover {
    color: #000;
}

.card-text, 
.card p {
    font-size: 1.1rem !important;
    color: #888 !important;
    margin-top: 5px;
    margin-bottom: 15px !important;
    line-height: 1.4;
}

/* Precio del producto */
.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 15px;
}

.product-price .original-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

/* Botón de favoritos elegante */
.btn-fav,
.btn-favorite {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 45px !important;
    height: 45px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0 !important;
}

.btn-fav:hover,
.btn-favorite:hover {
    background: #000 !important;
    color: white !important;
    transform: scale(1.1);
    opacity: 1 !important;
}

.btn-fav.active,
.btn-favorite.active {
    background: #000 !important;
    color: white !important;
}

/* Botones principales */
main .btn,
.btn-add-cart {
    background: #000 !important;
    color: white !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-add-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-add-cart:hover::before {
    left: 100%;
}

main .btn:hover,
.btn-add-cart:hover {
    background: #333 !important;
    color: white !important;
    opacity: 1 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Botón de vista rápida */
.btn-quick-view {
    width: 45px;
    height: 45px;
    background: transparent !important;
    border: 1px solid #ddd !important;
    color: #666 !important;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-quick-view:hover {
    background: #f0f0f0 !important;
    color: #000 !important;
    border-color: #bbb !important;
}

/* Botones de acción */
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.product-actions .btn-add-cart {
    flex: 1;
}

/* ===== HEADER DE TIENDA ===== */
.shop-header {
    text-align: center;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    justify-content: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #666;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #000;
}

.products-count {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

/* ===== SIDEBAR DE FILTROS ===== */
.filters-sidebar {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    position: sticky;
    top: 20px;
}

.filters-header h5 {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.filter-group {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 20px;
}

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

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

/* Búsqueda */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-right: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-box .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

/* Lista de categorías */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px; 
    overflow-y: auto;
}

/* Scrollbar personalizada para categorías */
.category-list::-webkit-scrollbar {
    width: 6px;
}

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

.category-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    color: #666;
    text-decoration: none !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-item:hover {
    background: #e9ecef;
    color: #000;
}

.category-item.active {
    background: #000;
    color: white;
}

.category-item .count {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    min-width: 20px;
    text-align: center;
}

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

/* Filtro de precio */
.price-filter .form-control {
    font-size: 0.85rem;
    height: 35px;
}

/* Filtros rápidos */
.quick-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
}

.quick-filter-btn:hover {
    background: #f8f9fa;
    border-color: #bbb;
    color: #000;
}

.quick-filter-btn.active {
    background: #000;
    border-color: #000;
    color: white;
}

/* ===== BARRA DE HERRAMIENTAS ===== */
.shop-toolbar {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.view-options {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #f0f0f0;
    color: #000;
}

.view-btn.active {
    background: #000;
    color: white;
    border-color: #000;
}

.sort-options .form-select {
    min-width: 200px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

/* ===== FILTROS ACTIVOS ===== */
.active-filters {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.filter-tags .badge {
    font-size: 0.8rem;
    padding: 5px 8px;
}

/* ===== VISTA LISTA ===== */
.products-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.products-grid.list-view .col-lg-4,
.products-grid.list-view .col-md-6 {
    width: 100%;
    max-width: none;
    flex: none;
}

.products-grid.list-view .card {
    display: flex;
    flex-direction: row;
    height: auto !important;
    margin-bottom: 0;
}

.products-grid.list-view .product-image-container {
    width: 200px;
    flex-shrink: 0;
}

.products-grid.list-view .card-img-top,
.products-grid.list-view .novedad-img {
    height: 150px;
    width: 100%;
}

.products-grid.list-view .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px !important;
}

.products-grid.list-view .product-actions {
    margin-top: auto;
    justify-content: flex-start;
    max-width: 300px;
}

/* ===== SIN PRODUCTOS ===== */
.no-products {
    color: #666;
}

.no-products .display-1 {
    font-size: 4rem;
    opacity: 0.3;
}

.no-products h4 {
    margin-bottom: 10px;
    color: #333;
}

/* ===== PAGINACIÓN ELEGANTE ===== */
.pagination {
    display: flex;
    flex-wrap:wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-block: 0;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #ffffff;
    border: 1px solid #e0e0e0 !important;
    color: #666 !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pagination .page-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    transition: left 0.5s ease;
}

.pagination .page-link:hover {
    background: #f8f8f8 !important;
    border-color: #bbb !important;
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pagination .page-link:hover::before {
    left: 100%;
}

.pagination .page-item.active .page-link {
    background: #000 !important;
    border-color: #000 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Botones de navegación (anterior/siguiente) */
.pagination .page-link:first-child,
.pagination .page-link:last-child {
    width: 50px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* ===== TÍTULOS DE SECCIÓN ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    letter-spacing: 2px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

.filters-sidebar {
    animation: fadeInUp 0.6s ease 0.2s both;
}

.shop-toolbar {
    animation: fadeInUp 0.6s ease 0.3s both;
}

/* Botón de filtros móvil */
#toggle-filters-mobile {
    position: sticky;
    top: 80px; /* Ajustado para que no se superponga con el header */
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: fadeInUp 0.6s ease 0.1s both;
}

#toggle-filters-mobile i {
    margin-right: 8px;
}

/* Ocultar el botón en desktop */
@media (min-width: 992px) {
    #toggle-filters-mobile {
        display: none !important;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    #filters-sidebar-container {
        display: none;
        animation: slideDown 0.3s ease;
        /* Cambiar de col-lg-3 a ancho completo en móvil */
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    #filters-sidebar-container.show-mobile {
        display: block !important;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .shop-toolbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .view-options {
        justify-content: center;
    }
    
    .sort-options .form-select {
        min-width: auto;
        width: 100%;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 768px) {
    .card-img-top, 
    .novedad-img {
        height: 500px;
    }
    
    .card-body {
        padding: 20px 15px 15px !important;
    }
    
    .btn-add-cart {
        font-size: 0.8rem;
        padding: 10px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-quick-view {
        width: 100%;
        height: 40px;
    }
    
    .btn-fav,
    .btn-favorite {
        width: 40px !important;
        height: 40px !important;
        top: 15px !important;
        right: 15px !important;
    }
    
    .filters-sidebar {
        padding: 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-grid.list-view .card {
        flex-direction: column;
    }
    
    .products-grid.list-view .product-image-container {
        width: 100%;
    }
    
    .products-grid.list-view .card-img-top,
    .products-grid.list-view .novedad-img {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .pagination .page-link {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
    
    .pagination .page-link:first-child,
    .pagination .page-link:last-child {
        width: 45px;
        font-size: 1rem;
    }
    
    .pagination {
        gap: 4px;
        margin: 30px 0;
    }
    
    .category-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .quick-filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .filters-sidebar {
        padding: 15px;
    }
}

/* ===== CHIPS DE TALLA ===== */
.size-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.size-chip {
    display: inline-block;
    font-size: 1rem;
    min-width: 30px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    line-height: 1;
    color: #333;
    user-select: none;
}

.size-chip.first {
    background: #f3f3f3;
}

/* ===== MEJORAS ADICIONALES ===== */
.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

/* Estados especiales */
.card.sold-out {
    opacity: 0.6;
}

.card.sold-out .card-img-top,
.card.sold-out .novedad-img {
    filter: grayscale(100%);
}

@media (max-width: 768px) {
    .filters-sidebar.show-mobile{
        position:relative !important;
        z-index:1 !important;
    }
}

.sold-out-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 15;
}

/* Efecto de carga en hover */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #000, transparent);
    transition: left 0.6s ease;
    z-index: 20;
}

.card:hover::before {
    left: 100%;
}

/* FILTROS PROVEEDORES */

.provider-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px; /* Altura máxima con scroll */
    overflow-y: auto;
}

/* Scrollbar personalizada */
.provider-list::-webkit-scrollbar {
    width: 6px;
}

.provider-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.provider-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
} 

.provider-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    color: #666;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

/* Línea vertical animada */
.provider-item::before {
    content: '';
    position: absolute;
    left: 0;
    width: 3px;
    background: #000;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.provider-item:hover::before {
    transform: scaleY(1);
}

/* Estado activo */
.provider-item.active {
    background: #000;
    color: white;
    padding-left: 18px;
}

/* ===== Contador (badge) en PROVEEDORES ===== */
.provider-item .count {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
    position:relative;
    z-index:1;
}

/* Cuando el proveedor está activo, mismo estilo que categorías activas */
.provider-item.active .count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Ajustes finos opcionales para alinear mejor */
.provider-item {
    padding: 10px 15px; /* ya lo tienes, lo dejo por claridad */
}
.provider-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}