﻿/* Scoped category browser, inspired by the mobile reference. */
.category-browser-title { max-width:1360px; margin:24px auto; padding-inline:24px; font-size:22px; }
.category-browser { display:grid; grid-template-columns:230px minmax(0,1fr); direction:rtl; max-width:1360px; margin:0 auto 40px; min-height:600px; border:1px solid #eee; border-radius:8px; overflow:hidden; }
.category-browser__status { grid-column:1 / -1; align-self:start; margin:24px; text-align:center; color:var(--text-muted); }
.category-browser__rail { background:#f0f0f1; display:flex; flex-direction:column; overflow:auto; }
.category-browser__tab { display:flex; align-items:center; gap:12px; min-height:64px; padding:14px 18px; border-bottom:1px solid #dedee0; background:transparent; color:#424750; text-align:right; cursor:pointer; position:relative; line-height:1.8; }
.category-browser__tab :is(svg, img) { width:22px; height:22px; object-fit:contain; }
.category-browser__tab.is-active { background:#fff; color:var(--color-primary); }
.category-browser__tab.is-active::before { content:''; position:absolute; right:0; top:0; bottom:0; width:3px; background:var(--color-primary); }
.category-browser__panel { min-width:0; padding:8px 24px 24px; background:#fff; }
.category-browser__all { display:flex; align-items:center; justify-content:center; gap:12px; min-height:56px; font-size:13px; color:var(--color-primary); font-weight:700; }
.category-browser__all svg, .category-browser__group svg { width:18px; height:18px; flex-shrink:0; }
.category-browser__group { border-bottom:1px solid #eee; }
.category-browser__group summary { list-style:none; display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:58px; cursor:pointer; font-size:13px; font-weight:700; }
.category-browser__group summary::-webkit-details-marker { display:none; }
.category-browser__group summary svg { transform:rotate(-90deg); transition:transform 160ms ease; }
.category-browser__group[open] summary svg { transform:rotate(90deg); }
.category-browser__links { display:grid; gap:4px; padding-bottom:16px; }
.category-browser__links a { display:flex; justify-content:space-between; align-items:center; padding:12px; border-radius:6px; font-size:12px; background:#fafafa; }
.category-browser__products { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; padding:8px 0 20px; }
.category-browser__products a { display:flex; flex-direction:column; align-items:center; gap:10px; font-size:12px; line-height:2; }
.category-browser__products img { width:96px; height:96px; object-fit:contain; border-radius:50%; background:#f5f6f7; }
.category-browser__tab:focus-visible, .category-browser__group summary:focus-visible { outline:2px solid var(--color-primary); outline-offset:-3px; }
@media(max-width:768px) {
 body.categories-page { padding-top:0; background:#fff; }
 .categories-page #site-header, .categories-page #site-footer { display:none!important; }
 .categories-page #mobile-header { display:block!important; position:fixed; top:0; left:0; right:0; min-height:64px; }
 .categories-page .mobile-address-bar { display:none; }
 .category-browser-title { position:absolute; width:1px; height:1px; padding:0; margin:0; overflow:hidden; clip-path:inset(50%); }
 .category-browser { position:fixed; inset:64px 0 0; margin:0; max-width:none; border:0; border-radius:0; min-height:0; grid-template-columns:90px minmax(0,1fr); }
 .category-browser__rail, .category-browser__panel { overscroll-behavior:contain; padding-bottom:calc(112px + env(safe-area-inset-bottom,0px)); }
 .category-browser__tab { flex:0 0 auto; min-height:66px; flex-direction:column; justify-content:center; gap:4px; padding:10px 6px; font-size:10px; text-align:center; }
 .category-browser__tab :is(svg, img) { width:18px; height:18px; }
 .category-browser__tab.is-active::before { width:2px; }
 .category-browser__panel { overflow:auto; padding-inline:16px; padding-top:0; }
 .category-browser__all { min-height:48px; font-size:11px; }
 .category-browser__group summary { min-height:51px; font-size:12px; }
 .category-browser__products { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .category-browser__products img { width:76px; height:76px; }
}
@media(prefers-reduced-motion:reduce) { .category-browser__group summary svg { transition:none; } }
/* Hide the category rail scrollbar while retaining touch, wheel and keyboard scrolling. */
.category-browser__rail { scrollbar-width:none; -ms-overflow-style:none; }
.category-browser__rail::-webkit-scrollbar { display:none; }
