/* Shared shop page — loaded by default/shop.php for all themes */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shop-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    margin-bottom: 1.25rem;
}
.shop-page-header h1 { margin: 0; }
.shop-result-count {
    margin: 0;
    font-size: .9rem;
    color: var(--muted, #64748b);
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) 1fr;
    gap: 1.75rem;
    align-items: start;
}

.shop-sidebar {
    background: var(--panel, #fff);
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 12px;
    padding: 1.25rem;
    position: sticky;
    top: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.shop-sidebar-section {
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--line, #e8edf3);
}
.shop-sidebar-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.shop-sidebar h3 {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted, #64748b);
    margin: 0 0 .65rem;
}

.shop-sidebar-filters label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-muted, #475569);
    margin-bottom: .35rem;
}

.shop-sidebar-filters input[type="search"],
.shop-sidebar-filters input[type="number"],
.shop-sidebar-filters select {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--line, #cbd5e1);
    border-radius: 8px;
    background: var(--input-bg, #fff);
    color: inherit;
    font-size: .9rem;
    box-sizing: border-box;
}
.shop-sidebar-filters input:focus,
.shop-sidebar-filters select:focus {
    outline: none;
    border-color: var(--accent, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.shop-price-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}
.shop-price-range .shop-field span {
    display: block;
    font-size: .72rem;
    color: var(--muted, #94a3b8);
    margin-bottom: .25rem;
}

.shop-sidebar-nav { list-style: none; margin: 0; padding: 0; }
.shop-sidebar-nav li { margin: 0; }
.shop-sidebar-nav a {
    display: block;
    padding: .45rem .6rem;
    margin: 0 -.6rem;
    border-radius: 6px;
    color: var(--text-muted, #475569);
    text-decoration: none;
    font-size: .9rem;
    line-height: 1.35;
    transition: background .15s, color .15s;
}
.shop-sidebar-nav a:hover {
    background: var(--hover-bg, #f1f5f9);
    color: var(--text, #0f172a);
}
.shop-sidebar-nav a.active {
    background: var(--accent-soft, #eff6ff);
    color: var(--accent, #2563eb);
    font-weight: 600;
}

.shop-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .25rem;
}
.shop-sidebar-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}
.shop-clear-link {
    display: block;
    text-align: center;
    font-size: .85rem;
    color: var(--muted, #64748b);
    text-decoration: none;
}
.shop-clear-link:hover { color: var(--accent, #2563eb); text-decoration: underline; }

.shop-main { min-width: 0; }

.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.shop-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line, #e2e8f0);
    flex-wrap: wrap;
}
.shop-pagination .btn,
.shop-pagination .shop-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 .85rem;
    border-radius: 8px;
    font-size: .9rem;
    text-decoration: none;
    border: 1px solid var(--line, #cbd5e1);
    background: var(--panel, #fff);
    color: inherit;
    transition: border-color .15s, background .15s;
}
.shop-pagination .btn:hover,
.shop-pagination .shop-page-num:hover {
    border-color: var(--accent, #3b82f6);
    background: var(--accent-soft, #eff6ff);
}
.shop-pagination .shop-page-num.is-current {
    background: var(--accent, #2563eb);
    border-color: var(--accent, #2563eb);
    color: #fff;
    font-weight: 600;
    pointer-events: none;
}
.shop-pagination .shop-page-ellipsis {
    padding: 0 .35rem;
    color: var(--muted, #94a3b8);
}

.shop-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted, #64748b);
    background: var(--panel, #fff);
    border: 1px dashed var(--line, #cbd5e1);
    border-radius: 12px;
}

@media (max-width: 768px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; }
}
