.header.scrolled {
    background-color: rgba(7, 12, 16, 0.8);
}

.product-card {
    background: #fff;
    border: 2px solid #dfe1e4;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-search:focus {
    border-color: #dfe1e4 !important;
    box-shadow: none !important;
}

.input-group-text {
    border-color: #ced4da;
}

@media (min-width: 992px) {
    .product-search {
        width: 100%;
    }
}

.badge-featured {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ffc107 !important;
    color: #000 !important;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    z-index: 99 !important;
    opacity: 1 !important;
    display: block !important;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-img-wrapper {
    position: relative;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.product-img {
    height: 200px;
    width: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
}

.product-img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-overlay .btn {
    position: relative;
    z-index: 11;
    font-weight: 600;
}

.product-item {
    transition: opacity 0.3s ease-in-out;
}

.product-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #212529;
}

.product-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-actions {
    margin-top: auto;
    padding-top: 10px;
}

/* =====================
   SIDEBAR DE FILTROS
   ===================== */

.filter-sidebar {
    position: sticky;
    top: 20px;
}

.custom-filter {
    padding: 5px 8px;
    transition: background 0.2s;
    border-radius: 4px;
    cursor: pointer;
}

.custom-filter:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.form-check-label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #444;
}

.form-check-input {
    cursor: pointer;
    border-color: #969696;
}

.filter-group h6 {
    border-bottom: 2px solid #007bff;
    display: inline-block;
    margin-bottom: 15px;
    padding-bottom: 3px;
}

#clear-filters-mobile {
    color: var(--heading-color);
    font-weight: bold;
    display: none;
}

#clear-filters-desktop {
    color: var(--heading-color);
    font-weight: bold;
    display: none;
}

.form-check-input:checked {
    background-color: var(--heading-color);
    border-color: var(--heading-color);
}

.btn-filter-mobile,
.btn-filter-mobile:hover,
.btn-filter-mobile:focus,
.btn-filter-mobile:active,
.btn-filter-mobile:active:focus {
    padding: 6px 12px;
    font-size: 0.85rem;
    height: fit-content;
    white-space: nowrap;
    border-radius: 6px;
    background-color: var(--heading-color);
    color: #ffffff !important;
    box-shadow: none !important;
    outline: none !important;
}

.btn-filter-mobile:hover {
    opacity: 0.9;
}

@media (min-width: 992px) {
    .filter-sidebar.collapse {
        display: block !important;
        height: auto !important;
        position: sticky;
        top: 20px;
    }
}

@media (max-width: 991.98px) {
    .div-products h4 {
        font-size: 1.1rem;
    }

    #collapseFiltersMobile {
        width: 100%;
    }
}

.filter-group h6[data-bs-toggle="collapse"] {
    border-bottom: 2px solid var(--heading-color);;
    display: inline-block;
    margin-bottom: 8px;
    padding-bottom: 3px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
    width: 100%;
}

.filter-group h6[data-bs-toggle="collapse"]:hover {
    color: #007bff;
}

.filter-group h6 .bi-chevron-down {
    transition: transform 0.3s ease;
}

.filter-group .collapse.show .list-wrapper {
    padding-top: 5px;
    width: 100%;
}

.filter-group .collapse {
    max-height: 400px;
    overflow-y: auto;
}

.filter-group .collapse::-webkit-scrollbar {
    width: 6px;
}

.filter-group .collapse::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.filter-group .collapse::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.filter-group .collapse::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* =====================
   PAGINACIÓN MINIMALISTA
   ===================== */
#pagination-container .pagination {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 0;
}

#pagination-container .page-item .page-link {
    border: 1.5px solid #d0d8e4;
    border-radius: 6px;
    padding: 7px 15px;
    font-size: 0.85rem;
    font-weight: 400;
    color: #4a6080;
    background: transparent;
    box-shadow: none;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
    text-decoration: none;
}

#pagination-container .page-item:not(.active):not(.disabled) .page-link:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: transparent;
}

#pagination-container .page-item.active .page-link {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    pointer-events: none;
}

#pagination-container .page-item:first-child .page-link,
#pagination-container .page-item:last-child .page-link {
    padding: 7px 20px;
    color: #7a90aa;
}

#pagination-container .page-item.disabled .page-link {
    border-color: #e8ecf1;
    color: #c5cdd8;
    cursor: not-allowed;
    background: transparent;
}