/* =========================================================
   Vin Socialhub — Shop / Category / Search pages
   ========================================================= */

.shop-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1rem 1.5rem 4rem;
}

.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ---------- Sidebar ---------- */
.shop-sidebar {
    position: sticky;
    top: 90px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.shop-sidebar h3 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 1rem;
}
.filter-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.filter-list:last-child { margin-bottom: 0; }
.filter-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-radius: var(--r-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.filter-list a:hover { background: var(--bg); color: var(--text); }
.filter-list a.active {
    background: var(--grad-soft);
    color: var(--primary);
    font-weight: 700;
}
.filter-list .count {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    background: var(--bg);
    border-radius: 999px;
    color: var(--text-muted);
}
.filter-list a.active .count {
    background: rgba(99,102,241,0.15);
    color: var(--primary);
}

.filter-group { margin-bottom: 1.5rem; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group h3 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 0.85rem;
}
.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.price-inputs input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
}
.price-inputs input:focus { outline: none; border-color: var(--primary); }
.price-inputs span { color: var(--text-muted); font-size: 0.85rem; }

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    cursor: pointer;
}
.filter-checkbox input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* ---------- Toolbar ---------- */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.result-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.result-count strong { color: var(--text); font-weight: 700; }
.sort-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.sort-form select {
    padding: 0.5rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}
.sort-form select:focus { outline: none; border-color: var(--primary); }

/* View toggle */
.view-toggle {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
}
.view-btn {
    width: 32px; height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.view-btn:hover { color: var(--text); }
.view-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ---------- Product grid ---------- */
.shop-main .product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* List view */
.product-grid.list-view {
    grid-template-columns: 1fr;
}
.product-grid.list-view .product-card {
    flex-direction: row;
    align-items: stretch;
}
.product-grid.list-view .product-card-media {
    width: 220px;
    aspect-ratio: auto;
    flex-shrink: 0;
}
.product-grid.list-view .product-card-body {
    padding: 1.5rem;
    justify-content: center;
}

/* Mobile filter toggle */
.filter-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar {
        position: static;
        display: none;
        margin-bottom: 1.5rem;
    }
    .shop-sidebar.open { display: block; }
    .filter-toggle { display: inline-flex; }
    .product-grid.list-view .product-card { flex-direction: column; }
    .product-grid.list-view .product-card-media { width: 100%; aspect-ratio: 4 / 3; }
}