/* Product listing sidebar filters — Gems Harbor */
.plf-panel {
    --plf-brand: var(--brand-primary, #045d48);
    --plf-brand-dark: var(--brand-primary-dark, #034436);
    --plf-brand-light: var(--brand-light, #e8f5f1);
    --plf-surface: #ffffff;
    --plf-surface-muted: #f4f6f9;
    --plf-border: var(--header-border, #e5ece9);
    --plf-text: var(--header-text, #1f2937);
    --plf-text-muted: var(--header-text-muted, #6b7280);
    --plf-radius: 14px;
    --plf-radius-sm: 10px;
    --plf-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    --plf-font: "Inter", system-ui, sans-serif;

    background: var(--plf-surface);
    border: 1px solid var(--plf-border);
    border-radius: var(--plf-radius);
    box-shadow: var(--plf-shadow);
    font-family: var(--plf-font);
    overflow: hidden;
}

.plf-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, rgba(4, 93, 72, 0.06) 0%, rgba(19, 165, 122, 0.04) 100%);
    border-bottom: 1px solid var(--plf-border);
}

.plf-panel__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--plf-text);
    letter-spacing: -0.01em;
}

.plf-panel__title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--plf-brand) 0%, var(--header-secondary, #13a57a) 100%);
    color: #fff;
    font-size: 0.8rem;
}

.plf-panel__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(4, 93, 72, 0.2);
    border-radius: 8px;
    background: #fff;
    color: var(--plf-brand);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.plf-panel__clear:hover {
    background: var(--plf-brand-light);
    color: var(--plf-brand-dark);
    border-color: rgba(4, 93, 72, 0.35);
}

.plf-panel__body {
    padding: 1rem 1.15rem 1.15rem;
}

.plf-section {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f2f4;
}

.plf-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.plf-section__title {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--plf-text-muted);
}

.plf-search {
    position: relative;
}

.plf-search__icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--plf-text-muted);
    font-size: 0.88rem;
    pointer-events: none;
}

.plf-search__input {
    width: 100%;
    height: 42px;
    padding: 0 0.9rem 0 2.4rem;
    border: 1px solid var(--plf-border);
    border-radius: var(--plf-radius-sm);
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--plf-text);
    background: var(--plf-surface-muted);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.plf-search__input::placeholder {
    color: #9ca3af;
}

.plf-search__input:focus {
    outline: none;
    border-color: rgba(4, 93, 72, 0.45);
    box-shadow: 0 0 0 3px rgba(4, 93, 72, 0.1);
    background: #fff;
}

.plf-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.45rem;
}

.plf-range__sep {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--plf-text-muted);
    user-select: none;
}

.plf-range__input {
    width: 100%;
    height: 38px;
    padding: 0 0.65rem;
    border: 1px solid var(--plf-border);
    border-radius: 8px;
    font-size: 0.84rem;
    font-family: inherit;
    color: var(--plf-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.plf-range__input:focus {
    outline: none;
    border-color: rgba(4, 93, 72, 0.45);
    box-shadow: 0 0 0 3px rgba(4, 93, 72, 0.08);
}

.plf-range__input::-webkit-outer-spin-button,
.plf-range__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.plf-dimension {
    margin-bottom: 0.65rem;
}

.plf-dimension:last-child {
    margin-bottom: 0;
}

.plf-dimension__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--plf-text);
}

.plf-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.plf-pill {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.plf-pill__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.plf-pill__text {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--plf-border);
    border-radius: 999px;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--plf-text);
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.plf-pill:hover .plf-pill__text {
    border-color: rgba(4, 93, 72, 0.35);
    background: var(--plf-brand-light);
}

.plf-pill__input:checked + .plf-pill__text {
    border-color: transparent;
    background: linear-gradient(135deg, var(--plf-brand) 0%, var(--header-secondary, #13a57a) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(4, 93, 72, 0.22);
}

.plf-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.plf-checklist--tall {
    max-height: 260px;
}

.plf-checklist::-webkit-scrollbar {
    width: 5px;
}

.plf-checklist::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.plf-check-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.42rem 0.45rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.plf-check-row:hover {
    background: var(--plf-surface-muted);
}

.plf-check-row__input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--plf-brand);
    cursor: pointer;
}

.plf-check-row__text {
    flex: 1;
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--plf-text);
    line-height: 1.3;
}

.plf-check-row__count {
    flex-shrink: 0;
    min-width: 1.75rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: var(--plf-surface-muted);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--plf-text-muted);
    text-align: center;
}

.plf-check-row:hover .plf-check-row__count {
    background: #e8edf2;
}

.plf-show-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.45rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--plf-brand);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.plf-show-more:hover {
    color: var(--plf-brand-dark);
    text-decoration: underline;
}

.plf-about {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--plf-radius-sm);
    background: var(--plf-brand-light);
    color: var(--plf-brand);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.plf-about:hover {
    background: #dff0ea;
    color: var(--plf-brand-dark);
    transform: translateX(2px);
}

.plf-about i {
    font-size: 0.75rem;
}

.plf-description {
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--plf-radius-sm);
    border: 1px solid var(--plf-border);
    background: var(--plf-surface-muted);
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--plf-text-muted);
}

/* Legacy class hooks + layout helpers */
.filter-sidebar {
    position: sticky;
    top: 20px;
    height: auto;
    max-height: none;
    overflow: visible;
    padding-right: 15px;
}

.filter-container {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

#products-grid > * {
    padding-right: calc(var(--bs-gutter-x) * 0.2) !important;
    padding-left: calc(var(--bs-gutter-x) * 0.2) !important;
}

#products-grid .gems-harbor-card {
    margin-bottom: 0 !important;
}

.listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.listing-toolbar__count {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--plf-text, #1f2937);
    white-space: nowrap;
}

.listing-toolbar__controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.listing-toolbar__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-shrink: 0;
    height: 40px;
    padding: 0 0.9rem;
    border: 1px solid rgba(4, 93, 72, 0.25);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--plf-brand-light, #e8f5f1) 0%, #fff 100%);
    color: var(--plf-brand, #045d48);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.listing-toolbar__clear:hover {
    border-color: var(--plf-brand, #045d48);
    background: var(--plf-brand-light, #e8f5f1);
    box-shadow: 0 4px 12px rgba(4, 93, 72, 0.1);
}

.listing-toolbar__clear:focus-visible {
    outline: 2px solid var(--plf-brand, #045d48);
    outline-offset: 2px;
}

.listing-toolbar__search {
    position: relative;
    flex: 1;
    max-width: 420px;
    min-width: 160px;
}

.listing-toolbar__search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--plf-text-muted, #6b7280);
    font-size: 0.88rem;
    pointer-events: none;
}

.listing-toolbar__search-input {
    width: 100%;
    height: 40px;
    padding: 0 0.9rem 0 2.35rem;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--plf-text, #1f2937);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.listing-toolbar__search-input::placeholder {
    color: #9ca3af;
}

.listing-toolbar__search-input:focus {
    outline: none;
    border-color: rgba(4, 93, 72, 0.45);
    box-shadow: 0 0 0 3px rgba(4, 93, 72, 0.1);
}

.listing-sort-select {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    height: 40px;
    min-width: 155px;
    padding: 0 36px 0 12px;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: #333;
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.4;
}

.listing-sort-select:focus {
    border-color: #045d48;
    box-shadow: 0 0 0 3px rgba(4, 93, 72, 0.1);
    outline: none;
}

@media (max-width: 575.98px) {
    .listing-toolbar__controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .listing-toolbar__clear,
    .listing-toolbar__search,
    .listing-sort-select {
        width: 100%;
    }

    .listing-toolbar__search {
        max-width: none;
    }
}
