/* Store page: filter sidebar beside the grid (right side in RTL), normal flow, no cards */
.store-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
    padding-bottom: 48px;
}

.store-sidebar {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 12px;
}

.filter-box {
    padding: 0 0 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.filter-box:last-of-type {
    border-bottom: 0;
}

.filter-box h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.store-search {
    position: relative;
}

.store-search .icon {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.store-sidebar input[type="search"],
.store-sidebar input[type="number"] {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 12px;
}

.store-search input {
    padding-inline-start: 38px !important;
}

/* checkbox rows (the box itself comes from css/controls.css) */
.store-sidebar .check {
    gap: 12px;
    padding: 8px 10px;
    margin: 0 -4px;
    border-radius: 10px;
    font-size: inherit;
    transition: background .15s;
}

.store-sidebar .check:hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.check .lbl {
    font-weight: 500;
}

.check input:checked~.lbl {
    color: var(--primary);
    font-weight: 700;
}

/* price range slider (two thumbs) */
.price-slider {
    position: relative;
    height: 28px;
    margin: 4px 6px 12px;
}

.price-slider .track {
    position: absolute;
    top: 50%;
    inset-inline: 0;
    height: 6px;
    transform: translateY(-50%);
    border-radius: 99px;
    background: color-mix(in srgb, var(--muted) 25%, transparent);
}

.price-slider .fill {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 99px;
    background: var(--primary);
}

.price-slider input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.price-slider input[type="range"]::-webkit-slider-runnable-track {
    background: none;
    height: 100%;
}

.price-slider input[type="range"]::-moz-range-track {
    background: none;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    width: 22px;
    height: 22px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    cursor: grab;
}

.price-slider input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    cursor: grab;
}

.price-slider input[type="range"]:active::-webkit-slider-thumb {
    cursor: grabbing;
    transform: scale(1.1);
}

.price-row {
    display: flex;
    gap: 8px;
}

.price-row label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--muted);
}

.price-row label span {
    display: block;
    margin-bottom: 3px;
}

.price-row input {
    padding: 7px 10px !important;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.store-filter-toggle {
    display: none;
}

.store-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 860px) {
    .store-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .store-filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        justify-self: start;
    }

    .store-sidebar {
        display: none;
    }

    .store-sidebar.open {
        display: flex;
    }
}

/* admin buttons on every product card */
.product.has-admin { position: relative; }
.pc-admin {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;   /* one corner; the buttons sit side by side */
    display: flex;
    gap: 8px;
    z-index: 2;
}
.pc-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    color: var(--text);
    backdrop-filter: blur(6px);
    transition: .2s;
}
.pc-btn svg { width: 20px; height: 20px; }
.pc-edit:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pc-del:hover { background: #e5484d; color: #fff; border-color: #e5484d; }