/* ================================================================
   Alosmania Frontend — Shop Page Styles
   ================================================================ */

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

/* ===== Sidebar ===== */
.shop-sidebar{position:sticky;top:80px;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:20px;max-height:calc(100vh - 100px);overflow-y:auto}
.sidebar-section{margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid var(--border2)}
.sidebar-section:last-child{border-bottom:none;margin-bottom:0}
.sidebar-section h4{font-size:14px;font-weight:700;color:var(--text);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;cursor:pointer}
.sidebar-section h4 svg{width:14px;height:14px;transition:transform .2s}
.sidebar-section.collapsed h4 svg{transform:rotate(-90deg)}
.sidebar-section.collapsed .sidebar-section-body{display:none}
.sidebar-cat-list a{display:flex;align-items:center;justify-content:space-between;padding:6px 0;font-size:13px;color:var(--text2);transition:color .15s}
.sidebar-cat-list a:hover,.sidebar-cat-list a.active{color:var(--accent);font-weight:600}
.sidebar-cat-list .cat-count{font-size:11px;background:var(--bg-alt);padding:2px 6px;border-radius:10px;color:var(--text2)}
.sidebar-cat-list .sub-cats{padding-left:16px}

/* Price Range */
.price-range{display:flex;gap:8px;align-items:center;margin-bottom:10px}
.price-range input{width:100%;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius);font-size:13px;text-align:center}
.price-range span{color:var(--text2);font-size:12px;flex-shrink:0}

/* ===== Toolbar ===== */
.shop-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;flex-wrap:wrap}
.shop-result-count{font-size:13px;color:var(--text2)}
.shop-toolbar-right{display:flex;align-items:center;gap:10px}
.shop-sort select{padding:8px 32px 8px 12px;border:1px solid var(--border);border-radius:var(--radius);font-size:13px;color:var(--text);background:#fff;cursor:pointer}
.shop-perpage select{padding:8px 28px 8px 12px;border:1px solid var(--border);border-radius:var(--radius);font-size:13px;color:var(--text);background:#fff}
.shop-view-toggle{display:flex;gap:4px}
.shop-view-btn{width:36px;height:36px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;display:flex;align-items:center;justify-content:center;color:var(--text2);cursor:pointer;transition:all .15s}
.shop-view-btn.active,.shop-view-btn:hover{background:var(--accent);color:#fff;border-color:var(--accent)}

/* ===== Mobile Filter ===== */
.mobile-filter-bar{display:none;position:fixed;bottom:calc(56px + env(safe-area-inset-bottom,0px));left:0;right:0;width:100%;max-width:100vw;box-sizing:border-box;background:#fff;border-top:1px solid var(--border);padding:8px 12px;z-index:99;gap:8px}
.mobile-filter-btn{flex:1;padding:10px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;font-size:13px;font-weight:600;color:var(--text);display:flex;align-items:center;justify-content:center;gap:6px}
.filter-slide-panel{position:fixed;top:0;right:-320px;width:300px;height:100vh;background:#fff;z-index:1001;transition:right .3s ease;overflow-y:auto;padding:20px;box-shadow:-4px 0 24px rgba(0,0,0,.1)}
.filter-slide-panel.open{right:0}
.filter-panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;padding-bottom:12px;border-bottom:1px solid var(--border)}
.filter-panel-close{width:32px;height:32px;border:none;background:var(--bg-alt);border-radius:50%;display:flex;align-items:center;justify-content:center}

/* ===== Shop product grid (same as homepage on phone: 2 per row) ===== */
.shop-main .product-grid{
    display:grid;
    width:100%;
}

/* ===== Mobile ===== */
@media(max-width:768px){
    .shop-layout{display:block}
    .shop-main{padding-bottom:56px}
    .shop-main .pagination{margin-top:20px}
    .shop-sidebar{display:none!important}
    .shop-main{width:100%;min-width:0;max-width:100%}
    .mobile-filter-bar{display:flex}
    .shop-toolbar{flex-direction:column;align-items:stretch}
    .shop-result-count{text-align:center}
    .shop-view-toggle{display:none}

    /* 2 products per row — match homepage / New Arrivals */
    .shop-main .product-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:10px;
    }
    .shop-main .product-card{min-width:0}
    .shop-main .product-card-title{font-size:12px;min-height:34px;-webkit-line-clamp:2;line-clamp:2}
    .shop-main .product-card-price .current{font-size:13px}
    .shop-main .btn-add-cart{font-size:11px;padding:7px 8px;gap:4px}
    .shop-main .btn-add-cart svg{width:14px;height:14px}
}

@media(max-width:380px){
    .shop-main .product-grid{gap:8px}
    .shop-main .product-card-info{padding:6px 8px}
}
