/* Collection and product templates. Product loops also use the shared card styles. */
.catalog-page, .detail-page, .shoe-dialog, .mobile-buy {
  --shop-ink: var(--ink);
  --shop-paper: var(--paper);
  --shop-line: var(--stone);
  --shop-muted: var(--muted);
  --shop-red: var(--red);

  color: var(--shop-ink);
}
.catalog-page, .detail-page {padding-block: 20px clamp(55px, 7vw, 112px);}
.shop-breadcrumb {display:flex; align-items:center; flex-wrap:wrap; gap:10px; font-size:.77rem; color:var(--shop-muted); line-height:1.4; min-height:44px;}
.shop-breadcrumb a {color:inherit; text-decoration:none; display:inline-flex; align-items:center; min-height:44px;}
.shop-breadcrumb a:hover, .shop-textlink:hover {color:var(--shop-red);}
.catalog-heading {display:flex; justify-content:space-between; align-items:flex-end; gap:20px; padding-block:clamp(20px,3.8vw,66px) clamp(24px,3.7vw,56px);}
.catalog-heading h1, .product-title h1, .collection-empty h1, .collection-empty h2, .recommendation-heading h2, .shoe-dialog-top h2 {
  margin:0; font-family:var(--sans); font-weight:700; letter-spacing:-.045em; line-height:1.03;
}
.catalog-heading h1 {font-size:clamp(2.4rem,4.4vw,4.2rem);}
.catalog-heading p {color:var(--shop-muted); margin:14px 0 0; font-size:clamp(.95rem,1.3vw,1.12rem);}
.shop-textlink {color:inherit; font-family:inherit; font-size:.86rem; text-underline-offset:5px; text-decoration:underline; background:transparent; border:0; padding:0; cursor:pointer; display:inline-flex; align-items:center; gap:6px; min-height:44px;}
.desktop-shop-filters {border-block:1px solid var(--shop-line); padding-block:19px 16px;}
.filter-size-field, .detail-field {border:0; min-inline-size:0; padding:0; margin:0;}
.filter-size-field legend,.detail-field legend,.size-heading h2 {padding:0; font-family:inherit; letter-spacing:0; font-size:.94rem; font-weight:600; line-height:1.5;}
.filter-size-field legend small,.detail-field legend span,.size-heading h2 span {font-family:inherit; font-size:.78rem; margin-left:7px; color:var(--shop-muted); font-weight:400;}
.filter-sizes, .colour-choices, .detail-sizes {display:flex; gap:6px; flex-wrap:wrap;}
.filter-sizes {margin-top:10px;}
.filter-size,.colour-choices button,.detail-sizes button,.filter-trigger,.active-filters button,.mobile-thumbnails button,.shoe-icon-button {
  font:inherit; color:var(--shop-ink); border:1px solid var(--shop-line); background:transparent; cursor:pointer; border-radius:2px;
}
.filter-size {font-size:.86rem; min-width:46px; min-height:44px; padding:5px 12px; font-variant-numeric:tabular-nums;}
.filter-size[aria-pressed="true"], .detail-sizes button[aria-pressed="true"] {color:#fff; background:var(--shop-ink); border-color:var(--shop-ink);}
.filter-size.extra-sizes {font-size:.8rem; text-decoration:underline; text-underline-offset:3px; border-color:transparent;}
.filter-dropdowns {display:flex; align-items:center; gap:clamp(15px,2vw,36px); margin-top:20px;}
.filter-dropdowns label {display:inline-flex; align-items:center; gap:8px; font-size:.82rem; color:var(--shop-muted);}
.filter-dropdowns select {appearance:auto; max-width:190px; font:inherit; color:var(--shop-ink); font-weight:500; border:0; background:transparent; border-bottom:1px solid var(--shop-line); border-radius:0; min-height:44px; padding:0 8px 0 0;}
.filter-dropdowns input {width:17px;height:17px;accent-color:var(--shop-ink);}
.filter-dropdowns .sale-check {min-height:44px;color:var(--shop-ink);}
.sort-select {margin-left:auto;}
.active-filters {display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; padding-block:12px; min-height:65px;}
.result-count {margin-right:auto; font-size:.86rem; color:var(--shop-muted);}
.active-filters button {display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:4px 12px; font-size:.78rem;}
.active-filters svg {width:13px;}
.collection-grid, .recommendation-grid {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(24px,3.7vw,56px) clamp(12px,1.65vw,28px);}
.collection-empty {grid-column:1/-1; padding:clamp(40px,6vw,86px) 12px; text-align:center;}
.collection-empty :is(h1,h2) {font-size:clamp(2rem,4vw,4rem);}
.collection-empty p {margin:15px 0 24px; color:var(--shop-muted);}
.empty-actions {display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px;}
.collection-more {text-align:center; margin-top:44px;}
.collection-more p {font-size:.83rem; color:var(--shop-muted); margin-bottom:14px;}
.no-script-intro {margin-bottom:24px;}
.no-script-grid img {width:100%; height:auto; aspect-ratio:1; mix-blend-mode:multiply;}
.no-script-grid a {display:block;background:var(--tile);}
.no-script-grid :is(strong,span) {display:block;padding-inline:10px;}
.filter-trigger {width:100%; display:flex; align-items:center; justify-content:center; gap:10px; min-height:46px;}
.shoe-dialog {padding:clamp(18px,3vw,36px); border:1px solid var(--shop-line); background:var(--shop-paper); color:var(--shop-ink); max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; overscroll-behavior:contain;}
.shoe-dialog::backdrop {background:rgba(23,21,17,.5);}
.shoe-dialog-top {display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:24px;}
.shoe-dialog-top h2 {font-size:clamp(1.9rem,3.2vw,3rem);}
.shoe-icon-button {display:inline-grid; place-items:center; width:44px; height:44px; padding:0; flex-shrink:0;}
.shoe-icon-button:disabled {opacity:.45;cursor:default;}
.filter-dialog {position:fixed; inset:0 0 0 auto; margin:0; width:min(430px,100%); max-width:100%; height:100dvh;max-height:none;}
.filter-dialog .filter-dropdowns {display:grid; align-items:start; gap:13px; border-top:1px solid var(--shop-line); padding-top:16px;}
.filter-dialog .filter-dropdowns label {width:100%; justify-content:space-between;}
.filter-dialog .filter-dropdowns select {font-size:16px; width:60%;}
.filter-dialog .filter-dropdowns .sale-check {justify-content:flex-start;}
.filter-apply {width:100%; margin-top:28px;}
.product-layout {display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); align-items:start; gap:clamp(34px,5vw,92px); margin-top:17px;}
.detail-gallery {min-width:0;}
.gallery-track {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px;}
.gallery-frame {appearance:none; display:block; position:relative; width:100%; aspect-ratio:1; overflow:hidden; background:var(--tile); border:0; padding:0; cursor:zoom-in; min-width:0;}
.gallery-frame img,.zoom-stage img,.mobile-thumbnails img {width:100%; height:100%; object-fit:contain; mix-blend-mode:multiply; display:block;}
.gallery-frame.lead-frame {grid-column:1/-1;}
.gallery-frame:focus-visible {outline-offset:-4px;}
.zoom-hint {position:absolute; bottom:12px; right:12px; background:rgba(250,249,244,.92); display:grid; place-items:center; width:36px; height:36px; border-radius:50%; color:var(--shop-ink);}
.mobile-thumbnails {display:none;}
.buy-box {position:sticky; top:min(calc(var(--header-h,80px) + 5px),calc(100dvh - var(--panel-height,200vh) - 16px)); min-width:0; padding:4px 0 0;}
.product-title {display:flex; align-items:center; justify-content:space-between; gap:20px;}
.product-title h1 {font-size:clamp(2.4rem,3.8vw,3.8rem); overflow-wrap:anywhere;}
.detail-wish {border-radius:50%; background:transparent;}
.detail-wish svg {width:21px;height:21px;}
.detail-wish[aria-pressed="true"] {color:var(--shop-red);}
.detail-wish[aria-pressed="true"] svg {fill:currentColor;}
.detail-price {display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-top:13px;}
.detail-price strong {font-size:1.22rem;font-weight:500;}
.detail-price s,.detail-price small {color:var(--shop-muted);}
.detail-price small {font-size:.68rem; letter-spacing:.06em;}
.detail-price > span {font-size:.74rem; color:var(--shop-red); border:1px solid var(--stone); padding:3px 6px;}
.product-pitch {font-size:clamp(1rem,1.3vw,1.12rem); line-height:1.6; margin:17px 0 22px; padding-bottom:22px; border-bottom:1px solid var(--shop-line); color:var(--muted);max-width:none;}
.detail-field {margin:0 0 20px;}
.colour-choices {margin-top:12px;}
.colour-choices button {display:inline-flex; align-items:center; gap:7px; font-size:.79rem; min-height:44px; padding:6px 12px;}
.colour-choices button[aria-pressed="true"] {border-color:var(--shop-ink); box-shadow:inset 0 0 0 1px var(--shop-ink);}
.shoe-swatch {width:13px;height:13px; border:1px solid #0003; border-radius:50%; display:inline-block; background:var(--swatch);}
.size-heading {display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:4px;}
.size-heading h2 {margin:0;}
.size-heading .shop-textlink {font-size:.78rem;}
.detail-sizes {display:grid; grid-template-columns:repeat(auto-fill,minmax(64px,1fr));}
.detail-sizes button {position:relative; display:flex; flex-direction:column; justify-content:center; align-items:center; min-height:50px; padding:5px 3px; line-height:1.3;}
.detail-sizes strong {font-size:.80rem; font-weight:550;}
.detail-sizes small {font-size:.65rem; opacity:.85;}
.detail-sizes .is-my-size {border-color:var(--shop-red);}
.detail-sizes .is-my-size::after {content:''; width:5px; height:5px; background:var(--shop-red); border-radius:50%; position:absolute; top:4px; right:4px;}
.detail-sizes .is-my-size[aria-pressed="true"]::after {background:#fff;}
.fit-line,.size-match-note,.product-status,.sold-message {font-size:.84rem; line-height:1.45; margin:6px 0 12px;}
.size-match-note,.product-status,.sold-message {color:var(--shop-red);}
.product-status:empty {display:none;}
.pdp-buy {width:100%;min-height:50px;justify-content:center;}
.detail-promises {display:flex; flex-wrap:wrap; gap:5px 14px; margin:16px 0 22px; color:var(--shop-muted);font-size:.74rem;line-height:1.5;}
.detail-promises span+span::before {content:'·';margin-right:12px;}
.shoe-accordion {border-top:1px solid var(--shop-line);}
.shoe-accordion:last-child {border-bottom:1px solid var(--shop-line);}
.shoe-accordion summary {list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; min-height:52px; font-size:.95rem;}
.shoe-accordion summary::-webkit-details-marker {display:none;}
.shoe-accordion summary span {width:14px; height:14px; position:relative;}
.shoe-accordion summary span::before,.shoe-accordion summary span::after {content:''; position:absolute; top:6px; left:0; width:13px;height:1px;background:currentColor;}
.shoe-accordion summary span::after {transform:rotate(90deg);}
.shoe-accordion[open] summary span::after {transform:rotate(0);}
.shoe-accordion > div {padding:0 4px 15px 0; color:var(--shop-muted); font-size:.9rem; line-height:1.65;}
.shoe-accordion p {margin:0 0 8px;}
.shoe-accordion a {color:inherit; text-underline-offset:3px;}
.shoe-accordion .shop-textlink {margin:0;}
.style-fit-table {border-collapse:collapse; width:100%; margin:14px 0; font-size:.8rem; font-variant-numeric:tabular-nums;}
.style-fit-table caption {text-align:left; color:var(--shop-ink); font-weight:550; padding-bottom:5px;}
.style-fit-table :is(th,td) {text-align:left; padding:5px 8px 5px 0; border-bottom:1px solid var(--shop-line);}
.product-recs {margin-top:clamp(56px,7vw,105px);}
.recommendation-heading {display:flex; justify-content:space-between; align-items:center; gap:15px; margin-bottom:24px;}
.recommendation-heading h2 {font-size:clamp(2.35rem,4vw,4.8rem);}
.recommendation-heading a {white-space:nowrap;}
.zoom-dialog {width:min(760px,calc(100vw - 20px)); padding:18px;}
.zoom-dialog .shoe-dialog-top {margin-bottom:10px;}
.zoom-dialog h2 {font-size:1.65rem;}
.zoom-stage {height:min(67dvh,680px); background:var(--tile); overflow:auto;}
.zoom-controls {display:flex;align-items:center;justify-content:center;gap:22px;margin-top:12px;}
.zoom-controls span {font-variant-numeric:tabular-nums; font-size:.83rem;}
.notify-dialog {width:400px;}
.notify-dialog p {line-height:1.55; margin-bottom:20px;}
.mobile-buy {display:none;}
@media (min-width:800px) and (max-width:1099px) {
  .collection-grid,.recommendation-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:799px) {
  .catalog-page,.detail-page {padding-top:8px;}
  .catalog-heading {align-items:flex-start; flex-wrap:wrap; padding-block:18px 24px; column-gap:16px; row-gap:0;}
  .catalog-heading > .shop-textlink {align-self:flex-end;}
  .collection-grid,.recommendation-grid {grid-template-columns:repeat(2,minmax(0,1fr)); gap:26px 10px;}
  .active-filters {min-height:54px;}
  .product-layout {display:block; margin-top:7px;}
  .gallery-track {display:flex; gap:2px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none;}
  .gallery-track::-webkit-scrollbar {display:none;}
  .gallery-frame {flex:0 0 100%; scroll-snap-align:start; max-height:64vh;}
  .mobile-thumbnails {display:flex; overflow:auto; gap:6px; margin-top:8px; scrollbar-width:thin;}
  .mobile-thumbnails button {padding:2px; min-width:44px; width:clamp(44px,9.2vw,60px); aspect-ratio:1; height:auto; flex:none; background:var(--tile);}
  .mobile-thumbnails button[aria-pressed="true"] {border-color:var(--shop-ink);}
  .buy-box {position:static; margin-top:26px;}
  .product-title h1 {font-size:clamp(2.3rem,7vw,3.2rem);}
  .detail-field {margin-bottom:17px;}
  .mobile-buy:not([hidden]) {position:fixed; z-index:8; inset:auto 0 0; display:flex; align-items:center; gap:12px; padding:10px max(14px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-bottom)); background:var(--shop-paper); border-top:1px solid var(--shop-line);}
  .mobile-buy > div {flex:1; min-width:0;}
  .mobile-buy strong,.mobile-buy small {display:block;}
  .mobile-buy strong {font-family:var(--sans);font-size:1.35rem;font-weight:400;}
  .mobile-buy small {font-size:.73rem; color:var(--shop-muted);}
  .mobile-buy .pdp-buy {width:auto; min-width:45%; min-height:44px;}
  .recommendation-heading h2 {font-size:clamp(1.9rem,7.1vw,3.7rem);}
}
@media (prefers-reduced-motion:no-preference) {
  .filter-size,.detail-sizes button,.colour-choices button,.gallery-frame img,.shoe-icon-button {transition:transform 130ms cubic-bezier(.22,1,.36,1),opacity 130ms ease-out;}
  .detail-sizes button:active,.colour-choices button:active,.filter-size:active,.shoe-icon-button:active {transform:scale(.96);}
  .shoe-dialog[open],.mobile-buy:not([hidden]) {animation:shoe-appear 240ms cubic-bezier(.22,1,.36,1) both;}
  .filter-dialog[open] {animation:shoe-slide 260ms cubic-bezier(.22,1,.36,1) both;}
  .shoe-dialog[open]::backdrop {animation:shoe-fade 200ms ease-out both;}
  @keyframes shoe-slide {from {opacity:0;transform:translateX(28px);}to {opacity:1;transform:none;}}
  @keyframes shoe-appear {from {opacity:0;transform:translateY(12px);}to {opacity:1;transform:none;}}
  @keyframes shoe-fade {from {opacity:0;}to {opacity:1;}}
}
@media (hover:hover) {
  .filter-size:hover,.colour-choices button:hover,.detail-sizes button:hover,.shoe-icon-button:hover {border-color:var(--shop-ink);}
}

@media (max-width:799px) { body:has(.mobile-buy:not([hidden])) { padding-bottom: 72px; } }
