@media (min-width: 1024px) {
    .catalog-sidebar {
        position: sticky;
        top: 80px;
    }
}

:root {
    --product-filters-header-start: #1f9a72;
    --product-filters-header-end: #2f7d69;
    --product-filters-surface-start: #ffffff;
    --product-filters-surface-end: #f7faf8;
    --product-filters-panel: #f4f8f5;
    --product-filters-panel-border: #d8e5dd;
    --product-filters-border: #b8cdc0;
    --product-filters-border-strong: #9db9a8;
    --product-filters-text: #21323a;
    --product-filters-muted: #5c6f66;
    --product-filters-accent: #2f7d69;
    --product-filters-accent-hover: #276a59;
    --product-filters-focus: rgba(47, 125, 105, 0.18);
}

.dark {
    --product-filters-header-start: #176a51;
    --product-filters-header-end: #23916f;
    --product-filters-surface-start: #111827;
    --product-filters-surface-end: #0f172a;
    --product-filters-panel: rgba(19, 30, 42, 0.9);
    --product-filters-panel-border: #314456;
    --product-filters-border: #41556b;
    --product-filters-border-strong: #57718b;
    --product-filters-text: #e2edf7;
    --product-filters-muted: #9cb0c0;
    --product-filters-accent: #2da87d;
    --product-filters-accent-hover: #24926d;
    --product-filters-focus: rgba(45, 168, 125, 0.2);
}

.product-filters-modal {
    background: linear-gradient(180deg, var(--product-filters-surface-start), var(--product-filters-surface-end));
}

.product-filters-header {
    background: linear-gradient(120deg, var(--product-filters-header-start), var(--product-filters-header-end));
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.product-filters-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.88);
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.product-filters-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.product-filters-close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

.product-filters-section {
    border: 1px solid var(--product-filters-panel-border);
    background: var(--product-filters-panel);
}

.product-filters-section-title {
    color: var(--product-filters-text);
}

.product-filters-section-copy {
    color: var(--product-filters-muted);
}

.product-filters-input {
    border-color: var(--product-filters-border) !important;
    color: var(--product-filters-text);
    box-shadow: none;
}

.product-filters-input::placeholder {
    color: var(--product-filters-muted);
}

.product-filters-input:focus {
    border-color: var(--product-filters-border-strong) !important;
    box-shadow: 0 0 0 4px var(--product-filters-focus);
    outline: none;
}

.product-filters-divider {
    border-color: rgba(148, 163, 184, 0.24);
}

.dark .product-filters-divider {
    border-color: rgba(87, 113, 139, 0.45);
}

.product-filters-accent-btn {
    background: var(--product-filters-accent);
    color: #fff;
}

.product-filters-accent-btn:hover {
    background: var(--product-filters-accent-hover);
}

.product-filters-scroll {
    scrollbar-gutter: stable;
}

.product-filters-scroll::-webkit-scrollbar {
    width: 10px;
}

.product-filters-scroll::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.14);
    border-radius: 999px;
}

.product-filters-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--product-filters-header-start), var(--product-filters-header-end));
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.product-filters-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--product-filters-header-end), var(--product-filters-accent));
}

.dark .product-filters-scroll::-webkit-scrollbar-track {
    background: rgba(65, 85, 107, 0.3);
}

.dark .product-filters-scroll::-webkit-scrollbar-thumb {
    border-color: rgba(15, 23, 42, 0.5);
}

/* Diagonal offer ribbon */
.offer-ribbon {
    position: absolute;
    top: 0.7rem;
    right: -2.6rem;
    width: 9rem;
    transform: rotate(45deg);
    transform-origin: center;
    padding: 0.22rem 0;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #f97316 0%, #ef4444 55%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
    z-index: 20;
    pointer-events: none;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar:hover::-webkit-scrollbar-thumb {
    background: #059669;
}

.catalog-products-pagination,
.catalog-products-pagination nav {
    width: 100%;
}

.catalog-products-pagination nav > div:first-child,
.catalog-products-pagination nav > div:last-child > div:first-child {
    display: none;
}

.catalog-products-pagination nav > div:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.catalog-products-pagination nav > div:last-child > div {
    max-width: 100%;
}

.catalog-products-pagination nav .relative.z-0 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.catalog-products-pagination [aria-current="page"] > span {
    color: white;
    background: #059669;
    border-color: #059669;
    font-weight: 700;
}

@media (max-width: 639.98px) {
    .catalog-products-pagination nav .relative.z-0 {
        gap: 0.25rem;
        box-shadow: none;
    }

    .catalog-products-pagination nav .relative.z-0 > a,
    .catalog-products-pagination nav .relative.z-0 > span > span {
        justify-content: center;
        min-width: 2.25rem;
        height: 2.75rem;
        margin-left: 0;
        padding: 0.5rem;
        border-radius: 0.5rem;
    }

    .catalog-products-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.625rem;
    }

    .catalog-products-list .catalog-product-card {
        min-width: 0;
        border-radius: 0.875rem;
    }

    .catalog-product-card-layout {
        flex-direction: row;
        align-items: stretch;
    }

    .catalog-product-image {
        width: clamp(5.5rem, 27vw, 7rem);
        height: auto;
        min-height: 7rem;
    }

    .catalog-product-image > a {
        position: absolute;
        inset: 0;
    }

    .catalog-product-image-placeholder img {
        object-fit: contain;
        background: white;
    }

    .catalog-product-video {
        top: auto;
        right: 0.5rem;
        bottom: 0.5rem;
        padding: 0.125rem 0.375rem;
        font-size: 0.625rem;
        line-height: 1rem;
    }

    .catalog-product-installments {
        margin-bottom: 0.375rem;
        font-size: 0.6875rem;
        line-height: 1rem;
        overflow-wrap: anywhere;
    }

    .catalog-product-content {
        min-width: 0;
        padding: 0.5rem 0.625rem;
    }

    .catalog-product-category {
        max-width: 100%;
        padding: 0.125rem 0.375rem;
        font-size: 0.6875rem;
        line-height: 1rem;
        white-space: nowrap;
    }

    .catalog-product-category span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .catalog-product-title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: 0.875rem;
        line-height: 1.25rem;
        overflow-wrap: anywhere;
    }

    .catalog-product-description {
        -webkit-line-clamp: 1;
        margin-bottom: 0.25rem;
    }

    .catalog-product-content > .grow {
        display: none;
    }

    .catalog-product-price {
        flex-wrap: wrap;
        gap: 0.25rem 0.375rem;
        margin-bottom: 0.25rem;
    }

    .catalog-product-price-current {
        order: -1;
        font-size: 1rem;
        line-height: 1.25rem;
    }

    .catalog-product-price > span {
        white-space: nowrap;
    }

    .catalog-product-price > span:not(.catalog-product-price-current) {
        font-size: 0.625rem;
        line-height: 1rem;
    }

    .catalog-product-meta {
        gap: 0.25rem 0.5rem;
        font-size: 0.6875rem;
        line-height: 1rem;
        overflow-wrap: anywhere;
    }

    .catalog-product-meta > span {
        max-width: 100%;
    }

    .catalog-product-delivery {
        padding: 0;
        background: transparent;
    }

    .catalog-product-card .offer-ribbon {
        top: 10px;
        left: -39px;
        right: auto;
        padding: 3px 40px;
        font-size: 9px;
        transform: rotate(-45deg);
    }
}
