:root {
    --filter-panel-width: min(400px, 35vw);  /* Max 400px, but responsive */
    --filter-overlay-width: calc(100vw - min(400px, 35vw));
    --filter-transition: .35s ease;
    --filter-primary: #2439EA;
}

[x-cloak] { display: none !important; }

/* Tablet and small desktop - slightly wider */
@media (min-width: 768px) and (max-width: 1199px) {
    :root {
        --filter-panel-width: min(450px, 40vw);
        --filter-overlay-width: calc(100vw - min(450px, 40vw));
    }
}

/* Mobile - keep current behavior */
@media (max-width: 767px) {
    :root {
        --filter-panel-width: 75vw;
        --filter-overlay-width: 25vw;
    }
}

/* Very small mobile */
@media (max-width: 420px) {
    .filter-panel { min-width: 260px; }
    .filter-overlay { width: calc(100% - 260px); }
}

.filter-title {
    color: var(--filter-primary);
}

.filter-store-name-title {
    color: var(--filter-primary);
}

.filter-categories-title {
    color: var(--filter-primary);
}

.filter-list-item {
    color: var(--filter-primary);
    font-weight: 500;
}

.filter-panel-root {
    position: fixed;
    inset: 0;
    z-index: 1080;
    pointer-events: none;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    height: 100dvh;
}

.filter-panel {
    background: #fff;
    width: 100%;
    max-width: var(--filter-panel-width);
    height: 100%;
    transform: translateX(100%);
    transition: transform var(--filter-transition);
    box-shadow: -2px 0 12px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    border-radius: 20px 0 0 20px !important;
    overflow: hidden;
}

.filter-overlay {
    width: var(--filter-overlay-width);
    height: 100%;
    opacity: 0;
    transition: opacity var(--filter-transition);
}

/* Active state */
.filter-panel-root.is-open {
    pointer-events: auto;
    background: rgba(217, 217, 217, 0.9);
}
.filter-panel-root.is-open .filter-panel {
    transform: translateX(0);
}
.filter-panel-root.is-open .filter-overlay {
    opacity: 1;
}

@media (max-width: 420px) {
    .filter-panel { min-width: 260px; }
    .filter-overlay { width: calc(100% - 260px); }
}

body.filter-lock {
    overflow: hidden;
}

/* Checkbox/Radio: blue border + white bg (unchecked), blue border + blue bg (checked), no icons */
.filter-panel .form-check-input {
    border: 2px solid var(--filter-primary) !important;
    background-color: #fff !important;
    background-image: none !important;               /* kill Bootstrap icon */
    --bs-form-check-bg-image: none !important;       /* Bootstrap 5 variable */
    box-shadow: none;
}

.filter-panel .form-check-input:focus {
    border-color: var(--filter-primary) !important;
    box-shadow: 0 0 0 .2rem rgba(36,57,234,.25);
}

.filter-panel .form-check-input:checked {
    background-color: var(--filter-primary) !important;
    border-color: var(--filter-primary) !important;
    background-image: none !important;               /* no tick/dot when checked */
    --bs-form-check-bg-image: none !important;
}

/* Keep radio circular */
.filter-panel .form-check-input[type="radio"] {
    border-radius: 50%;
}

/* Blue close (X) icon */
.filter-panel .coupon-filter-close-icon {
    width: 1rem;
    height: 1rem;
    opacity: 1;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='%232439EA' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

.filter-panel .coupon-filter-close-icon:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='%232439EA' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

.filter-panel .coupon-reset-filters {
    color: #2439EA !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.filter-panel .coupon-reset-filters:hover,
.filter-panel .coupon-reset-filters:focus,
.filter-panel .coupon-reset-filters:active,
.filter-panel .coupon-reset-filters:visited {
    color: #2439EA !important;
    text-decoration: underline;
}

.selected-category-close-icon {
    cursor: pointer;
    color: white;
}

.selected-category-close-icon:hover {
    color: #b0b7ba;
}

.category-filter-tag {
    background-color: var(--filter-primary);
    color: white;
    border: 1px solid var(--filter-primary);
    border-radius: 16px;
    padding: 4px 8px;
    /*font-size: 12px;*/
    font-weight: 500;
    white-space: nowrap;
}
