/* Category tiles on the shop start page. */
.ssb-shop-categories { margin:0 0 2.5rem; }
.ssb-shop-categories h2 { font-size:1.4rem; letter-spacing:-.025em; margin-bottom:1rem; }
.ssb-shop-categories ul { display:grid; grid-template-columns:repeat(auto-fill,minmax(11.5rem,1fr)); gap:1rem; list-style:none; margin:0; padding:0; }
.ssb-shop-categories a { display:flex; flex-direction:column; height:100%; border:1px solid #e8e1ed; border-radius:.85rem; overflow:hidden; background:#fff; color:#30213f; text-decoration:none; }
.ssb-shop-categories a:hover { border-color:#cdb9dd; }
.ssb-shop-categories a:focus-visible { outline:2px solid #60408b; outline-offset:3px; }
.ssb-shop-category-image { position:relative; display:block; aspect-ratio:4/3; overflow:hidden; background:#f7f5f9; }
.ssb-shop-categories a .ssb-shop-category-image img { position:absolute; inset:0; width:100%; height:100%; max-width:none; object-fit:contain; padding:.8rem; margin:0; mix-blend-mode:multiply; }
.ssb-shop-category-name { padding:.8rem .9rem .15rem; font-weight:650; line-height:1.3; }
.ssb-shop-category-count { padding:0 .9rem .9rem; color:#5a5164; font-size:.92rem; }

/* Mobile: filters behind a button, two product columns with compact cards. */
.ssb-filter-toggle { display:none; }
@media(max-width:700px){
  .ssb-filter-toggle { display:flex; justify-content:space-between; align-items:center; width:100%; min-height:48px; padding:.75rem 1rem; border:1px solid #d4c7df; border-radius:.6rem; background:#fff; color:#30213f; font:inherit; font-weight:650; cursor:pointer; }
  .ssb-filter-toggle::after { content:"+"; font-size:1.3rem; line-height:1; color:#60408b; }
  .ssb-filter-toggle[aria-expanded="true"]::after { content:"−"; }
  .ssb-filter-toggle:focus-visible { outline:2px solid #60408b; outline-offset:3px; }
  .ssb-shop-filters.ssb-filters-collapsed { padding:0; background:none; border:0; margin-bottom:1.5rem; }
  .ssb-shop-filters.ssb-filters-collapsed > :not(.ssb-filter-toggle) { display:none; }
  .ssb-shop-filters:not(.ssb-filters-collapsed) .ssb-filter-toggle { margin-bottom:1rem; }
  .ssb-shop-categories ul { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
  .ssb-shop-category-image { aspect-ratio:16/9; }
  .ssb-shop-category-name { font-size:.95rem; padding:.6rem .7rem .1rem; }
  .ssb-shop-category-count { padding:0 .7rem .7rem; font-size:.88rem; }
  body.ssb-commerce.woocommerce ul.products { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
  body.ssb-commerce.woocommerce ul.products li.product a img { height:8.5rem; padding:.6rem; }
  body.ssb-commerce.woocommerce ul.products li.product .woocommerce-loop-product__title { padding:.75rem .75rem .4rem; font-size:.98rem; }
  body.ssb-commerce.woocommerce ul.products li.product .price,
  body.ssb-commerce.woocommerce ul.products li.product .stock { padding:0 .75rem; }
  body.ssb-commerce.woocommerce ul.products li.product .button { margin:.75rem .75rem 0; padding:.65rem .5rem; font-size:.92rem; }
}

/* Home page: aid categories section. */
.studio-aids .ssb-shop-categories { margin:0; }
.studio-aids-more { margin-top:1.5rem; }
.studio-aids-more .button { min-height:48px; }
.studio-aids .ssb-shop-categories ul { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media(max-width:900px){ .studio-aids .ssb-shop-categories ul { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Webshop: dvokolonski raspored s bočnom trakom kategorija. */
.ssb-shop-layout { display:grid; grid-template-columns:250px minmax(0,1fr); gap:2rem; align-items:start; }
.ssb-shop-sidebar { position:sticky; top:1rem; }
.ssb-cat-nav { border:1px solid #e8e1ed; border-radius:.75rem; background:#fff; padding:.5rem; }
.ssb-cat-nav > summary { display:none; }
.ssb-cat-nav a { text-decoration:none; color:#30213f; }
.ssb-cat-all, .ssb-cat-link { display:flex; justify-content:space-between; gap:.6rem; align-items:center; padding:.4rem .6rem; border-radius:.45rem; line-height:1.3; }
.ssb-cat-all { font-weight:650; margin-bottom:.35rem; }
.ssb-cat-all:hover, .ssb-cat-link:hover { background:#f3eef8; }
.ssb-cat-all.is-current, .ssb-cat-link.is-current { background:#60408b; color:#fff; }
.ssb-cat-all.is-current:hover, .ssb-cat-link.is-current:hover { background:#53377a; }
.ssb-cat-link.is-current .ssb-cat-name { color:#fff; } /* override darker sub-category name on the purple background */
.ssb-cat-all.is-current .ssb-cat-count, .ssb-cat-link.is-current .ssb-cat-count { color:#e9ddf5; }
.ssb-cat-nav a:focus-visible { outline:2px solid #60408b; outline-offset:2px; }
.ssb-cat-list, .ssb-cat-children { list-style:none; margin:0; padding:0; }
.ssb-cat-parent > .ssb-cat-link .ssb-cat-name { font-weight:650; }
.ssb-cat-children { margin:.05rem 0 .4rem .6rem; padding-left:.7rem; border-left:1px solid #ede6f3; }
.ssb-cat-children .ssb-cat-name { font-weight:400; color:#4a4152; }
.ssb-cat-name { min-width:0; }
.ssb-cat-count { flex:none; color:#5a5164; font-size:.85em; font-variant-numeric:tabular-nums; }
@media(min-width:769px){ .ssb-cat-nav > *:not(summary){ display:block !important; } }
@media(max-width:768px){
  .ssb-shop-layout { grid-template-columns:1fr; gap:1rem; }
  .ssb-shop-sidebar { position:static; }
  .ssb-cat-nav > summary { display:flex; justify-content:space-between; align-items:center; min-height:48px; padding:.5rem .75rem; font-weight:650; cursor:pointer; list-style:none; }
  .ssb-cat-nav > summary::-webkit-details-marker { display:none; }
  .ssb-cat-nav > summary::after { content:"+"; color:#60408b; font-size:1.3rem; line-height:1; }
  .ssb-cat-nav[open] > summary::after { content:"−"; }
  .ssb-cat-nav > summary:focus-visible { outline:2px solid #60408b; outline-offset:2px; }
}

/* SHOP-AJAX: stanje učitavanja liste proizvoda (osvježava se samo ovaj okvir). */
#ssb-shop-results { position:relative; scroll-margin-top:80px; }
#ssb-shop-results:focus { outline:none; }
#ssb-shop-results.is-loading { opacity:.5; pointer-events:none; transition:opacity .15s ease; }
#ssb-shop-results.is-loading::after { content:""; position:absolute; left:0; right:0; top:0; height:3px; background:#60408b; animation:ssb-shop-bar 1s linear infinite; }
@keyframes ssb-shop-bar { 0%{transform:scaleX(0);transform-origin:left} 50%{transform:scaleX(1);transform-origin:left} 51%{transform-origin:right} 100%{transform:scaleX(0);transform-origin:right} }
@media (prefers-reduced-motion: reduce) { #ssb-shop-results.is-loading::after { animation:none; } }
