/* ── Component: Desktop Filter Bar ──────────────────────────────────── */

.wb-fd {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.wb-fd__toolbar {
    width: 100%;
    padding: 0 2rem;
    height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* ── Label ─────────────────────────────────────────────────────────── */
.wb-fd__label {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* ── Sides ──────────────────────────────────────────────────────────── */
.wb-fd__left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wb-fd__right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.wb-fd__sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Dropdown Container ─────────────────────────────────────────────── */
.wb-fd__drop {
    position: relative;
}

/* Sub-category hidden until parent selected */
.wb-fd__drop--subcat {
    display: none;
}

.wb-fd__drop--subcat.is-visible {
    display: block;
}

/* ── Trigger Button ─────────────────────────────────────────────────── */
.wb-fd__trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--secondary);
    border-radius: 0;
    transition: color 0.15s;
    white-space: nowrap;
    user-select: none;
}

.wb-fd__trigger:hover {
    color: var(--primary);
    background: none;
}

.wb-fd__trigger.is-active {
    color: var(--primary);
    font-weight: 600;
}

.wb-fd__drop.is-open .wb-fd__trigger {
    color: var(--primary);
}

.wb-fd__trigger--sort {
    font-weight: 600;
}

/* ── Chevron Icon ───────────────────────────────────────────────────── */
.wb-fd__chevron {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.wb-fd__drop.is-open .wb-fd__chevron {
    transform: rotate(180deg);
}

/* ── Panel (Dropdown Content) ───────────────────────────────────────── */
.wb-fd__panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: 0 8px 24px oklch(0% 0 0 / 8%);
    padding: 6px;
    z-index: 200;
    animation: wbFdFadeIn 0.15s ease;
}

.wb-fd__panel--right {
    left: auto;
    right: 0;
    min-width: 220px;
}

.wb-fd__drop.is-open .wb-fd__panel {
    display: block;
}

@keyframes wbFdFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Options ────────────────────────────────────────────────────────── */
.wb-fd__option {
    display: block;
    width: 100%;
    padding: 8px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--text-dark);
    text-align: left;
    border-radius: 0;
    transition:
        background 0.12s,
        color 0.12s;
    white-space: nowrap;
}

.wb-fd__option:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.wb-fd__option.is-selected {
    color: var(--primary);
    font-weight: 600;
    background: none;
}

.wb-fd__panel-loading {
    padding: 10px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-ui);
}

/* ── Price Panel ────────────────────────────────────────────────────── */
.wb-fd__panel--price {
    min-width: 260px;
    padding: 14px 16px;
    display: none;
    flex-direction: column;
    gap: 12px;
}

.wb-fd__drop.is-open .wb-fd__panel--price {
    display: flex;
}

.wb-fd__price-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-ui);
    margin: 0;
}

.wb-fd__price-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wb-fd__price-field {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 6px 10px;
    flex: 1;
    transition: border-color 0.15s;
}

.wb-fd__price-field:focus-within {
    border-color: var(--primary);
}

.wb-fd__price-sym {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-ui);
    flex-shrink: 0;
}

.wb-fd__price-input {
    border: none;
    outline: none;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--text-dark);
    background: transparent;
    width: 100%;
    -moz-appearance: textfield;
}

.wb-fd__price-input::-webkit-outer-spin-button,
.wb-fd__price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.wb-fd__price-reset {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0;
    text-decoration: underline;
    transition: color 0.15s;
}

.wb-fd__price-reset:hover {
    color: var(--primary);
}

.wb-fd__price-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wb-fd__price-apply {
    flex: 1;
    padding: 8px 16px;
    background: var(--primary);
    border: none;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--white);
    border-radius: 0;
    transition: opacity 0.15s;
}

.wb-fd__price-apply:hover {
    opacity: 0.85;
}

.wb-fd__price-reset {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0;
    text-decoration: underline;
    transition: color 0.15s;
    white-space: nowrap;
}

.wb-fd__price-reset:hover {
    color: var(--primary);
}


/* ── Count ──────────────────────────────────────────────────────────── */
.wb-fd__count {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Skeleton Cards ─────────────────────────────────────────────────── */
.wb-plp__grid--skeleton {
    pointer-events: none;
}

.wb-skel-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wb-skel-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: oklch(93% 0.005 255);
    animation: wbSkelPulse 1.4s ease-in-out infinite;
}

.wb-skel-line {
    height: 12px;
    border-radius: 4px;
    background: oklch(93% 0.005 255);
    animation: wbSkelPulse 1.4s ease-in-out infinite;
    width: 100%;
}

.wb-skel-line--short {
    width: 55%;
    animation-delay: 0.1s;
}

.wb-skel-line--med {
    width: 75%;
    animation-delay: 0.2s;
}

@keyframes wbSkelPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.45;
    }
}

/* ── Grid Zone loading state ────────────────────────────────────────── */
#wb-grid-zone.is-loading {
    min-height: 400px;
}

/* ── Pagination ─────────────────────────────────────────────────────── */
.wb-plp__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 2.5rem 0 1rem;
    flex-wrap: wrap;
}

.wb-plp__page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--secondary);
    cursor: pointer;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}

.wb-plp__page-link:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.wb-plp__page-link.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    font-weight: 700;
    cursor: default;
}

/* ── Error State ────────────────────────────────────────────────────── */
.wb-plp__error {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 0.9rem;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .wb-fd {
        display: none;
    }
}