/* Shared search drawer + product filter panel (themes may override) */

.search-drawer__layer[hidden] {
    display: none !important;
}

.search-drawer__layer {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.search-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 14, .45);
}

.search-drawer__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: min(420px, 100%);
    background: #fff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, .12);
    display: flex;
    flex-direction: column;
    padding: 1rem 1.1rem 1.25rem;
    overflow: auto;
}

.search-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .85rem;
}

.search-drawer__header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.search-drawer__close {
    border: 0;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.search-drawer__form {
    display: grid;
    gap: .65rem;
}

.search-drawer__input {
    width: 100%;
    border: 1px solid #e6e0db;
    border-radius: 12px;
    padding: .75rem .9rem;
    font-size: .95rem;
}

.search-drawer__submit {
    border: 0;
    border-radius: 12px;
    padding: .7rem 1rem;
    background: #c9a08a;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.search-drawer__status {
    margin: .85rem 0 .5rem;
    font-size: .84rem;
    color: #7a716b;
}

.search-drawer__results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}

.search-drawer__result {
    display: flex;
    gap: .75rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: .45rem;
    border-radius: 12px;
    border: 1px solid #efe9e4;
}

.search-drawer__result img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
    background: #f4efeb;
    flex: none;
}

.search-drawer__details {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.search-drawer__details strong {
    font-size: .9rem;
    line-height: 1.35;
}

.search-drawer__details small,
.search-drawer__stock {
    color: #8a7f78;
    font-size: .75rem;
}

.search-drawer__price {
    font-weight: 700;
    font-size: .86rem;
}

.search-drawer__all {
    display: inline-block;
    margin-top: .9rem;
    font-weight: 700;
    font-size: .9rem;
}

.search-drawer__all[hidden] {
    display: none !important;
}

/* Product filters */
.pf-panel {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.pf-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.pf-panel__close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.pf-field {
    display: grid;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 600;
}

.pf-field input {
    border: 1px solid #e6e0db;
    border-radius: 10px;
    padding: .65rem .75rem;
}

.pf-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
}

.pf-block__title {
    display: block;
    font-weight: 800;
    margin-bottom: .45rem;
}

.pf-cats,
.pf-brands {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .35rem;
    max-height: 220px;
    overflow: auto;
}

.pf-cats a {
    display: block;
    padding: .4rem .55rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.pf-cats a.is-on {
    background: #f3e8e1;
    font-weight: 700;
}

.pf-price {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
}

.pf-price label {
    display: grid;
    gap: .3rem;
    font-size: .8rem;
}

.pf-price input {
    border: 1px solid #e6e0db;
    border-radius: 10px;
    padding: .55rem .65rem;
}

.pf-price__hint {
    margin: .45rem 0 0;
    font-size: .78rem;
    color: #8a7f78;
}

.pf-btn {
    border: 1px solid #e6e0db;
    background: #fff;
    border-radius: 10px;
    padding: .55rem .85rem;
    cursor: pointer;
    font-weight: 700;
}

.pf-btn--primary {
    background: #c9a08a;
    border-color: #c9a08a;
    color: #fff;
}

.pf-panel__foot {
    display: grid;
    gap: .55rem;
    margin-top: .35rem;
}

.pf-clear {
    text-align: center;
    font-size: .85rem;
}

.catalog-layout {
    display: grid;
    gap: 1.25rem;
}

.catalog-filters--desk {
    display: none;
}

@media (min-width: 992px) {
    .catalog-layout {
        grid-template-columns: 280px minmax(0, 1fr);
        align-items: start;
    }

    .catalog-filters--desk {
        display: block;
        position: sticky;
        top: 6rem;
        padding: 1rem;
        border: 1px solid #eee;
        border-radius: 16px;
        background: #fff;
    }

    .catalog-filters--desk .pf-panel__close {
        display: none;
    }
}

.hsearch--open {
    cursor: pointer;
    text-align: right;
}

.hsearch--open .hsearch__input {
    display: block;
    opacity: .7;
}

/* Prefer icon-only opener when present (default theme navbar). */
.site-header .haction--search[data-search-open] {
    cursor: pointer;
}
