/* ===== GENERAL ===== */
body {
    font-family: 'Poppins', sans-serif;
    background: #fff;
}

h2,
h4,
h5,
h6 {
    font-weight: 700;
}

/* ===== BANNER + TABS ===== */
.category-banner {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
}

.category-tabs {
    display: flex;
    justify-content: start;
    margin-bottom: 20px;
    gap: 40px;
    border-bottom: 3px solid #dcd0f1;
}

.category-tab {
    font-family: 'Quicksand', sans-serif;
    background: none;
    border: 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: #d4a1f3;
    position: relative;
    padding-bottom: 8px;
    transition: .3s;
}

.category-tab.active-tab {
    color: #4b007d;
}

.category-tab.active-tab::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ba54d3;
    border-radius: 10px;
}

.category-tab:hover {
    color: #a84cd4;
}

/* ===== SIDEBAR / FILTROS ===== */
.sidebar .bg-light {
    padding: 20px;
    border-radius: 20px;
    background: #f5eafe;
}

.sidebar h5 {
    color: #7a00b3;
    font-weight: 700;
}

.btn-link {
    color: #7a00b3;
    font-weight: 500;
    text-decoration: none;
    padding-left: 0;
}

.btn-link:hover {
    color: #b364d8;
    text-decoration: underline;
}

.category-btn.active-category {
    font-weight: 700;
    text-decoration: underline;
    color: #6a1b9a !important;
}

.category-btn {
    color: #b57cc4 !important;
    transition: color .2s;
    text-decoration: none !important;
}

.form-range::-webkit-slider-thumb {
    background: #7a00b3;
}

.form-range::-moz-range-thumb {
    background: #7a00b3;
}

.filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: transparent;
    border: 0;
    width: 100%;
    padding: .5rem .25rem;
    font-weight: 700;
    color: #4b007d;
}

.filter-toggle .current {
    font-weight: 600;
    color: #9c82c4;
    margin-left: .25rem;
}

.filter-toggle .chevron {
    transition: transform .25s ease;
}

.filter-toggle[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

/* ===== GRID / CARDS ===== */
.card {
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .2s ease;
    border: 1px solid var(--lila-300, #ead6ff);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(75, 0, 125, .08);
}

.card-img-top {
    height: 300px;
    object-fit: cover;
}

.card-title {
    color: #7a00b3;
    font-weight: 700;
    text-align: left;
}

.card-body p.small {
    font-size: .8rem;
    margin-bottom: 4px;
    color: #9c82c4;
    text-align: left;
}

.card-body h5 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.card-body .fw-bold {
    color: #7a00b3;
    text-align: right;
}

.product-item {
    transition: opacity .3s, transform .3s;
}

.product-item.fade-in {
    opacity: 1;
    transform: scale(1);
}

.product-item.fade-out {
    opacity: 0;
    transform: scale(.98);
    pointer-events: none;
}

#products-container .no-products-message {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    text-align: center;
    font-size: 1.3rem;
    padding: 50px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    border-radius: 12px;
    background: #f8f5ff;
}

/* Panel lila de fondo a filtros+grid */
section.text-center+.container.mb-5 {
    background: #f1e6ff;
    border: 1px solid #ead6ff;
    border-radius: 22px;
    padding: 16px 16px 8px;
    overflow: hidden;
}

section.text-center+.container.mb-5>.row {
    margin-left: 0;
    margin-right: 0;
}

section.text-center+.container.mb-5 [class^="col-"],
section.text-center+.container.mb-5 [class*=" col-"] {
    padding-left: 12px;
    padding-right: 12px;
}

/* Paginación */
.pagination {
    gap: 10px;
}

.pagination .page-link {
    border: 0;
    background: #ede1ff;
    color: rgba(75, 0, 125, .85);
    font-weight: 700;
    border-radius: 999px;
    padding: .4rem .7rem;
    box-shadow: none;
}

.page-item.active .page-link {
    background: #7b41e6;
    color: #fff;
}

/* CTA contacto */
.contact-cta {
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
}

.contact-cta-link {
    display: block;
    text-decoration: none;
    color: #b57cc4 !important;
}

.contact-cta p {
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.btn-cta {
    display: inline-block;
    margin-top: 8px;
    padding: .45rem .9rem;
    border-radius: 999px;
    background: #d493f8;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
}

.contact-cta:hover .btn-cta {
    filter: brightness(1.05);
}

/* Botones flotantes */
.floating-buttons {
    position: fixed;
    bottom: 50px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.floating-btn {
    background: #6f2c91;
    border-radius: 50%;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}

.floating-btn img {
    width: 30px;
    height: 30px;
}

.floating-btn:hover {
    background: #a364d8;
}

/* --- Lazy image + skeleton --- */
.card-img-top.lazy {
    background: linear-gradient(90deg, #eee, #f6f0ff, #eee);
    background-size: 200% 100%;
    animation: shimmer 1.1s linear infinite;
}

@keyframes shimmer {
    from {
        background-position: 200% 0
    }

    to {
        background-position: -200% 0
    }
}


/* Responsive */
@media (max-width:991.98px) {
    .product-item {
        width: 100%;
        height: 100%;
        margin-left: 0;
    }

    .card-img-top {
        height: 250px;
    }

    .category-banner {
        height: 250px;
        border-radius: 10px;
        margin-bottom: 10px;
    }
}

@media (min-width:992px) {
    #navbarResponsive {
        display: none !important;
    }

    #products-container>* {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }

    .filter-toggle {
        display: none !important;
    }

    #catCollapse {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
    }
}

@media (max-width:900px) {
    #products-container>* {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}