/* books/category.css — сторінка каталогу (breadcrumb / cat-head / toolbar / sort / chips /
   sidebar-фасети / price / pager). Картки товару — у critical.css (спільні). Loads only on Category. */

/* -- Breadcrumb -- */
.crumb{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:16px 0 4px;font-size:12.5px;color:var(--muted)}
.crumb a:hover{color:var(--primary)}
.crumb .sep{opacity:.6}
.crumb b{color:var(--ink);font-weight:600}

/* -- Catalog header -- */
.cat-head{padding:6px 0 4px}
.cat-head h1{font-family:var(--font-head);font-weight:500;font-size:clamp(28px,5vw,44px);line-height:1.08;letter-spacing:0}
.cat-head p{color:var(--ink-2);font-size:14.5px;margin-top:8px;max-width:70ch;text-wrap:pretty}

/* -- Layout: sidebar + main -- */
.shop{display:block;padding:18px 0 0}
.shop-in{display:grid;grid-template-columns:1fr;gap:22px}
.shop-empty{padding:40px 0;color:var(--muted);font-size:14.5px}

/* -- Toolbar -- */
.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:14px}
.tb-count{font-size:13px;color:var(--muted)}
.tb-count b{color:var(--ink);font-weight:700}
.tb-spring{flex:1}
.filters-toggle{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 16px;border:1.5px solid var(--ink);border-radius:var(--pill);font-size:14px;font-weight:700;transition:background .18s,color .18s}
.filters-toggle:hover{background:var(--ink);color:var(--bg)}
.sort{position:relative}
.store .sort-btn{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 14px;border:1px solid var(--line);border-radius:var(--pill);background:var(--surface);font-size:13.5px;font-weight:600;color:var(--ink);transition:border-color .18s ease,color .18s ease}
.store .sort-btn:hover{border-color:var(--primary);color:var(--primary)}
.sort-menu{position:absolute;top:calc(100% + 12px);right:0;min-width:214px;display:none;flex-direction:column;gap:2px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);z-index:60}
.sort-menu[data-open="true"]{display:flex}
.store .sort-opt{display:flex;align-items:center;padding:9px 12px;font-size:13.5px;border-radius:8px;color:var(--ink-2);text-align:left;transition:background .18s ease,color .18s ease}
.sort-opt:hover,.sort-opt[data-active="true"]{background:rgba(43,57,214,.1);color:var(--ink)}

/* -- Active filter chips -- */
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.chip{display:inline-flex;align-items:center;gap:8px;padding:7px 13px;background:var(--surface);border:1px solid var(--line);border-radius:var(--pill);font-size:12.5px;font-weight:600;color:var(--ink)}
.chip:hover{border-color:var(--primary);color:var(--primary)}

/* -- Sidebar / filter drawer -- */
.sb-overlay{position:fixed;inset:0;z-index:80;background:rgba(43,29,20,.5);backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s}
.sb-overlay[data-open="true"]{opacity:1;visibility:visible}
.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:81;width:min(86vw,340px);overflow-y:auto;background:var(--surface);border-right:1px solid var(--line);padding:18px;transform:translateX(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}
.sidebar[data-open="true"]{transform:none}
.sb-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.sb-head h3{font-family:var(--font-head);font-size:20px}
.sb-close{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--line);border-radius:999px}
.fgroup{padding:16px 0;border-bottom:1px solid var(--line)}
.fgroup:last-child{border-bottom:none}
.ftitle{font-family:var(--font-head);font-size:15px;margin-bottom:12px}
.fopt{display:flex;align-items:center;gap:10px;padding:6px 0;min-height:44px;box-sizing:border-box;width:100%;text-align:left;font-size:13.5px;color:var(--ink-2);transition:color .16s}
.fopt:hover{color:var(--ink)}
.fopt-link{justify-content:space-between}
.cbox{flex:none;width:18px;height:18px;display:grid;place-items:center;border:1.5px solid var(--line);border-radius:5px;transition:background .16s,border-color .16s}
.cbox[data-on="true"]{background:var(--primary);border-color:var(--primary)}
.cbox .ck{color:var(--primary-ink);opacity:0;transition:opacity .16s}
.cbox[data-on="true"] .ck{opacity:1}
.fopt .fc-count{margin-left:auto;font-size:11.5px;color:var(--muted)}
.price-row{display:flex;align-items:center;gap:10px;margin-top:4px}
.price-row input{width:100%;height:40px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg);font:inherit;font-size:13px;color:var(--ink)}
.price-row input:focus{outline:none;border-color:var(--primary)}
.price-row span{color:var(--muted)}
.store .sb-apply{width:100%;margin-top:14px}

/* -- Pagination -- */
.pager{display:flex;flex-wrap:wrap;gap:6px;margin-top:26px}
.pager a,.pager .pg-gap{min-width:44px;height:44px;display:grid;place-items:center;padding:0 6px;border:1px solid var(--line);border-radius:10px;font-size:13.5px;font-weight:600}
.pager a:hover{border-color:var(--primary)}
.pager a[data-active="true"]{background:var(--primary);border-color:var(--primary);color:var(--primary-ink)}
.pager .pg-gap{border-color:transparent;color:var(--muted)}

/* -- Tablet (768) -- */
@media (min-width:768px){
	.shop-in{gap:26px}
}

/* -- Desktop (1024) — статичний сайдбар, 2 колонки -- */
@media (min-width:1024px){
	.shop-in{grid-template-columns:264px 1fr;gap:36px;align-items:start}
	.filters-toggle{display:none}
	.sb-overlay{display:none}
	/* Власна прокрутка тут не потрібна: `overflow-y:auto` успадковується від мобільної шторки
	   (там вона обов'язкова — то fixed-панель на весь екран), а разом із max-height давала
	   смугу всередині картки фільтра. На десктопі сайдбар росте по вмісту й прокручується
	   разом зі сторінкою. */
	.sidebar{position:sticky;top:84px;left:auto;bottom:auto;width:auto;max-height:none;overflow:visible;z-index:1;border:1px solid var(--line);border-radius:var(--radius);transform:none;padding:6px 20px}
	.sb-head{display:none}
	.store .sb-apply[data-store-filters-close]{display:none}
}
