/* Spartan Peptides: shop archive styles.
   Ported verbatim from the page level <style> block in design/shop.html.
   The global rules these build on (.toolbar, .tabs, .tab, .tools, .field,
   .fam-row, .fam, .result-meta, .grid-shop, .empty-state, .more-wrap) live in
   assets/css/site.css and are not repeated here.
   Loaded by sp_is_shop_template() in inc/enqueue.php, so it also reaches the
   single product template, where only the neutral .field and .page-hero rules
   can apply and both are harmless there. */

/* Shop page only */
/* Toolbar redesign: one control bar, segmented category tabs with a sliding pill */
.shop-sec .toolbar{gap:10px;padding:8px;border-radius:999px;box-shadow:0 18px 40px -28px rgba(10,31,68,.35)}
.seg{position:relative;display:flex;padding:4px;border-radius:999px;background:#F2F4F7}
.seg .tabs{position:relative;z-index:1;gap:2px;flex-wrap:nowrap}
.seg .tab{height:40px;padding:0 18px;display:flex;align-items:center;gap:8px;border:0;color:var(--muted);transition:color .35s var(--ease)}
.seg .tab:hover{color:var(--navy);border-color:transparent}
.seg .tab.on{background:transparent;color:#fff}
.seg .tab small{margin:0;opacity:1;min-width:22px;height:20px;padding:0 6px;border-radius:10px;display:grid;place-items:center;font:500 10.5px/1 var(--display);letter-spacing:0;background:rgba(10,31,68,.08);color:inherit;transition:background .35s}
.seg .tab.on small{background:rgba(255,255,255,.16)}
.seg-pill{position:absolute;top:4px;bottom:4px;left:0;width:0;border-radius:999px;background:var(--navy);box-shadow:0 8px 18px -8px rgba(10,31,68,.6);transition:transform .45s var(--ease),width .45s var(--ease)}
.seg-pill.no-anim{transition:none}
.shop-sec .tools{gap:0;flex:1;justify-content:flex-end;min-width:0}
.shop-sec .field{height:48px;border:0;background:transparent;border-radius:999px;padding:0 18px;transition:background .3s}
.shop-sec .field:hover,.shop-sec .field:focus-within{background:#F2F4F7}
.shop-sec .field+.field{position:relative}
.shop-sec .field+.field::before{content:"";position:absolute;left:-1px;top:14px;bottom:14px;width:1px;background:var(--line)}
.shop-sec .field input{width:220px}
.field i{font-size:13px;color:var(--muted)}
.shop-sec{min-height:70vh}
.page-hero{padding-bottom:36px}
.shop-sec.sec.tight{padding-top:8px}
.field i{font-size:13px;color:var(--muted)}
.field .clear{width:22px;height:22px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:10px;color:var(--muted);opacity:0;pointer-events:none;transition:opacity .3s var(--ease),background .3s}
.field .clear.show{opacity:1;pointer-events:auto}
.field .clear:hover{background:#F0F2F5;color:var(--navy)}
.field:focus-within{border-color:var(--navy)}
.field input::-webkit-search-cancel-button{display:none}
.fam-wrap{position:relative;margin:-10px 0 30px}
.fam-wrap::after{content:"";position:absolute;right:0;top:0;bottom:4px;width:60px;background:linear-gradient(90deg,rgba(255,255,255,0),#fff);pointer-events:none}
.shop-sec .fam-row{margin:0;flex-wrap:nowrap;overflow-x:auto;padding:2px 60px 4px 2px;scrollbar-width:none;align-items:center}
.shop-sec .fam-row::-webkit-scrollbar{display:none}
.fam-label{flex:none;margin-right:6px;font:500 11px/1 var(--display);letter-spacing:.18em;text-transform:uppercase;color:var(--muted)}
.shop-sec .fam{flex:none;white-space:nowrap;display:flex;align-items:center;gap:8px;height:38px;padding:0 8px 0 16px;background:#fff}
.shop-sec .fam:first-of-type{padding-right:16px}
.shop-sec .fam.on{background:var(--navy)}
.fam small{min-width:22px;height:22px;padding:0 6px;border-radius:11px;display:grid;place-items:center;font:500 10.5px/1 var(--display);background:#F2F4F7;color:var(--muted);transition:background .3s,color .3s}
.fam.on small{background:rgba(255,255,255,.16);color:#fff}
.fam-wrap:has(.fam-row:empty){display:none}
.result-meta{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}
.result-meta button{font:inherit;letter-spacing:inherit;text-transform:inherit;color:var(--navy);text-decoration:underline;text-underline-offset:3px}
.grid-shop{transition:opacity .2s var(--ease)}
.grid-shop>*{min-width:0}
.grid-shop .card-size{flex-wrap:wrap}
/* Size chips. The prototype drew them as buttons, so site.css only dresses
   .card-size button. A real product card links each size at the product, so the
   chips are anchors and need the same rules, states included. */
.card-size a{font:500 11px/1 var(--display);letter-spacing:.06em;padding:6px 9px;border-radius:14px;border:1px solid var(--line);color:var(--muted);transition:border-color .3s,color .3s}
.card-size a:hover,.card-size a.on{border-color:var(--navy);color:var(--navy)}
.empty-state .helm-e{width:64px;margin:0 auto 22px;color:#E4E7EC}
.empty-state p{max-width:420px;margin:0 auto 26px}
.more-wrap .btn{min-width:230px}
.more-wrap small{display:block;margin-top:14px;font-size:12.5px;color:var(--muted)}
.more-wrap[hidden]{display:none}
@media (max-width:760px){
  .shop-sec .toolbar{border-radius:24px;padding:8px}
  .seg{width:100%;overflow-x:auto;scrollbar-width:none}
  .seg::-webkit-scrollbar{display:none}
  .seg .tab{padding:0 12px;font-size:11px;letter-spacing:.08em;flex:none}
  .shop-sec .tools{flex-wrap:wrap;gap:6px}
  .shop-sec .field{flex:none;width:100%;height:46px;padding:0 16px;background:#F2F4F7}
  .shop-sec .field input{flex:1;width:auto}
  .shop-sec .field+.field::before{display:none}
  /* the toolbar is static here, so lift it above the family chips and cards; the sort popup (site.js custom dropdown) opens over them, aligned to the pill edges */
  .shop-sec .toolbar{position:relative;top:auto;z-index:25}
  .shop-sec .field .dd-pop{left:-39px;right:-16px;min-width:0}
  .field select{flex:1}
  .fam-label{display:none}
  /* category tabs: scroll edge to edge inside the bar, with a fade hint while more is off to the right */
  .seg{scroll-padding-inline:4px;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 30px),transparent)}
  .seg.at-end{-webkit-mask-image:none;mask-image:none}
  .seg .tabs{flex:none}
  /* family chips: bleed to the screen edges so they scroll cleanly under the thumb */
  .fam-wrap{margin:-14px -20px 22px}
  .shop-sec .fam-row{padding:2px 44px 4px 20px;scroll-padding-inline:20px;gap:8px}
  .fam-wrap::after{width:44px}
  .fam-wrap.at-end::after{opacity:0}
  .shop-sec .fam{height:40px}
  .result-meta{align-items:center;row-gap:0;margin-bottom:18px}
  .result-meta button{padding:12px 0}
  .field .clear{position:relative}
  .field .clear::after{content:"";position:absolute;inset:-10px}
  .grid-shop .card-size{gap:6px}
  .grid-shop .card-size button,.grid-shop .card-size a{position:relative}
  .grid-shop .card-size button::after,.grid-shop .card-size a::after{content:"";position:absolute;inset:-8px -3px}
  /* two-column cards are narrow: price and name sit beside the add button, size chips get the full card width */
  .grid-shop .card-foot{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:start;margin-top:14px}
  .grid-shop .card-foot>div{display:contents}
  .grid-shop .card-name{grid-column:1;grid-row:1;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}
  .grid-shop .card-price{grid-column:1;grid-row:2}
  .grid-shop .card-size{grid-column:1/-1;grid-row:3}
  .grid-shop .add,.grid-shop .card-go{grid-column:2;grid-row:1/3;align-self:center}
  .more-wrap .btn{min-width:0;width:100%;justify-content:center}
}

/* Refine row (purity, availability). Same chips as the family row, set slightly
   apart so the two rows read as two different questions. */
.fam-refine{margin-top:-18px}
.fam-refine .fam-label{color:var(--navy)}
