.product-filters {
    margin: 0 0 2rem;
    padding: 1.25rem;
    border: 1px solid rgba(18, 18, 18, 0.1);
    border-radius: 18px;
    background: #fff;
}

.product-filters__header,
.product-filters__sidebar-header,
.product-filter-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.product-filters__header {
    margin-bottom: 1rem;
}

.product-filters__eyebrow {
    margin: 0 0 0.15rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(18, 18, 18, 0.55);
}

.product-filters h2,
.product-filter-dialog h2 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.product-filters__clear {
    flex: 0 0 auto;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.product-filters__groups {
    display: grid;
    gap: 0.9rem;
}

.product-filter-group {
    min-width: 0;
}

.product-filter-group__label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
}

.product-filter-group__options {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0 0 0.25rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.product-filter-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(18, 18, 18, 0.14);
    border-radius: 999px;
    background: #f7f7f7;
    color: #191919;
    font-size: 0.86rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.product-filter-chip small {
    display: inline-grid;
    place-items: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(18, 18, 18, 0.08);
    color: inherit;
    font-size: 0.72rem;
}

.product-filter-chip:hover,
.product-filter-chip:focus-visible {
    border-color: rgba(18, 18, 18, 0.42);
    background: #fff;
}

.product-filter-chip.is-active {
    border-color: #111;
    background: #111;
    color: #fff;
}

.product-filter-chip.is-active small {
    background: rgba(255, 255, 255, 0.18);
}

.product-filters--sidebar {
    position: sticky;
    top: 1.25rem;
    max-height: calc(100vh - 2.5rem);
    margin: 0;
    padding: 1.15rem;
    overflow-y: auto;
    border-radius: 14px;
    background: #fbfaf9;
    scrollbar-width: thin;
}

.product-filters__sidebar-header {
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(18, 18, 18, 0.1);
}

.product-filters__clear--sidebar {
    padding: 0.45rem 0.65rem;
    font-size: 0.76rem;
}

.product-filters__groups--sidebar {
    gap: 0;
}

.product-filter-group--sidebar {
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(18, 18, 18, 0.08);
}

.product-filter-group--sidebar:first-child {
    padding-top: 0;
}

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

.product-filter-group--sidebar .product-filter-group__label {
    margin-bottom: 0.6rem;
    font-size: 0.83rem;
    letter-spacing: 0.01em;
}

.product-filter-group__options--sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    overflow: visible;
    padding: 0;
}

.product-filter-chip--sidebar {
    width: 100%;
    justify-content: space-between;
    min-height: 34px;
    padding: 0.42rem 0.6rem;
    border-radius: 8px;
    background: #fff;
    white-space: normal;
}

.product-filter-chip--sidebar span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.product-filter-dialog {
    width: min(430px, calc(100vw - 1.25rem));
    max-width: none;
    height: min(760px, calc(100dvh - 1.25rem));
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: transparent;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.product-filter-dialog::backdrop {
    background: rgba(20, 17, 15, 0.52);
    backdrop-filter: blur(2px);
}

.product-filter-dialog__surface {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.product-filter-dialog__header {
    flex: 0 0 auto;
    padding: 1rem 1rem 0.9rem;
    border-bottom: 1px solid rgba(18, 18, 18, 0.1);
}

.product-filter-dialog__close {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 40px;
    padding: 0;
    border: 1px solid rgba(18, 18, 18, 0.12);
    border-radius: 50%;
    background: #f7f7f7;
    color: #111;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.product-filter-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 1rem 1rem;
    overscroll-behavior: contain;
}

.product-filter-group--modal {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(18, 18, 18, 0.08);
}

.product-filter-group--modal:last-child {
    border-bottom: 0;
}

.product-filter-group__options--modal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow: visible;
    padding: 0;
}

.product-filter-chip--modal {
    white-space: normal;
}

.product-filter-dialog__footer {
    flex: 0 0 auto;
    padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(18, 18, 18, 0.1);
    background: #fff;
}

.product-filters__clear--modal {
    width: 100%;
    display: flex;
    justify-content: center;
    border-radius: 10px;
}

@media (min-width: 921px) {
    .product-filter-dialog {
        display: none;
    }
}

@media (max-width: 920px) {
    .product-filters--sidebar {
        display: none;
    }
}

@media (max-width: 640px) {
    .product-filters:not(.product-filters--sidebar) {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding: 1rem;
        border-radius: 14px;
    }

    .product-filters__header {
        align-items: flex-start;
    }

    .product-filters__clear {
        padding: 0.5rem 0.65rem;
        font-size: 0.78rem;
    }

    .product-filter-dialog {
        width: calc(100vw - 0.75rem);
        height: calc(100dvh - 0.75rem);
        border-radius: 16px;
    }
}
