/* ==========================================================================
   SWA SHOP (2026-09-19) — layout ported from the Cymru Shreds shop
   (shop / product / bag pages), restyled with the SWA design system tokens
   in site.css (Inter + Bebas, red #C42020, gunmetal, soft shadows).
   Loaded ONLY by /shop/, /shop/<slug>/, /shop/cart/ and /shop/order-confirmed/.
   Bump ?v= on the <link> in shop.html, build-shop-pages.js and the two
   shop/ pages whenever this file changes (CSS is cached immutable for a year).
   ========================================================================== */

/* ---- header cart button (injected by shared-cart.js) ---- */
.hdr-cart{position:relative;display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;border-radius:50%;color:var(--white);flex-shrink:0;
  transition:background .2s,transform .15s}
.hdr-cart:hover{background:rgba(255,255,255,.08);transform:translateY(-1px)}
.hdr-cart svg{width:24px;height:24px}
.hdr-cart .cart-badge{position:absolute;top:2px;right:0;min-width:18px;height:18px;padding:0 5px;
  border-radius:999px;background:var(--red-bright);color:#fff;font-size:.68rem;font-weight:800;
  line-height:18px;text-align:center;box-shadow:0 0 0 2px var(--dark)}
.hdr-cart .cart-badge[hidden]{display:none}
@media(max-width:768px){.hdr-right{align-items:center}.hdr-cart{width:40px;height:40px}}
/* Shop pages carry two extra header items (bag + My Account); below 1900px that
   pushes Book Now off-screen, so the visualiser pill steps aside here only. */
@media(max-width:1900px){.hdr-cart~.hdr-btns .hdr-vis{display:none!important}}

/* ---- page shell ---- */
.shop-page{background:var(--bg);color:var(--ink)}
.shop-page .container{max-width:var(--container-wide)}
.page-header{padding:clamp(40px,6vw,72px) 0 clamp(28px,4vw,44px);border-bottom:1px solid var(--border-light)}
.page-header .label{margin-bottom:10px}
.page-header h1{font-family:var(--font-display);font-weight:400;font-size:clamp(2.6rem,6vw,4.4rem);
  letter-spacing:.02em;line-height:.98;color:var(--ink);margin-bottom:12px}
.page-header .lede{font-size:1.075rem;line-height:1.7;color:var(--ink-muted);max-width:560px}
.page-header .h-page{font-family:var(--font-display);font-weight:400;font-size:clamp(2.4rem,5vw,3.6rem);letter-spacing:.02em;line-height:1;color:var(--ink)}

/* ---- shop listing ---- */
.shop-layout{display:grid;gap:clamp(24px,4vw,48px);grid-template-columns:1fr;padding:clamp(24px,4vw,40px) 0 clamp(56px,8vw,96px)}
@media(min-width:1024px){.shop-layout{grid-template-columns:230px 1fr}}
.filters-card{background:var(--white);border-radius:var(--radius-lg);padding:22px;box-shadow:var(--shadow-md);
  position:sticky;top:calc(var(--header-h) + 16px);align-self:start}
.filters-heading{font-family:var(--font-display);font-size:.95rem;letter-spacing:.24em;color:var(--red);margin-bottom:10px}
.filters-heading+.filters-heading,.filter-list+.filters-heading{margin-top:22px}
/* department tree (Printful-style: department, then type within it) */
.dept-tree{display:flex;flex-direction:column;gap:2px}
.dept-tree .dept-link{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-radius:var(--radius-sm);font-size:.95rem;font-weight:600;color:var(--ink-muted);transition:background .15s,color .15s}
.dept-tree .dept-link:hover{background:var(--bg-alt);color:var(--ink)}
.dept-tree .dept-link.active{background:var(--ink);color:#fff}
.dept-tree .chev{width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin-right:4px;opacity:.6;transition:transform .2s}
.dept-tree .dept.open .chev{transform:rotate(45deg)}
.dept-tree .sub{display:none;flex-direction:column;gap:2px;padding:4px 0 6px 14px}
.dept-tree .dept.open .sub{display:flex}
.dept-tree .sub a{padding:8px 12px;border-radius:var(--radius-sm);font-size:.9rem;font-weight:500;color:var(--ink-muted)}
.dept-tree .sub a:hover{background:var(--bg-alt);color:var(--ink)}
.dept-tree .sub a.active{background:var(--ink);color:#fff;font-weight:700}
.dept-tree .sub2{display:none;flex-direction:column;gap:2px;padding:2px 0 4px 14px}
.dept-tree .sub2.open{display:flex}
.dept-tree .sub2 a{font-size:.85rem}
.dept-tree .sub a[hidden]{display:none}
@media(max-width:1023px){
  .filters-card{position:static;padding:12px 14px;box-shadow:var(--shadow-sm)}
  .filters-heading{display:none}
  .dept-tree{flex-direction:row;flex-wrap:wrap;gap:8px;align-items:center}
  .dept-tree .dept{display:contents}
  .dept-tree .dept-link{padding:9px 16px;border-radius:999px;font-size:.875rem;background:var(--bg-alt);flex-shrink:0}
  .dept-tree .chev{display:none}
  .dept-tree .sub{flex-basis:100%;flex-direction:row;flex-wrap:wrap;gap:6px;padding:6px 0 0;border-top:1px solid var(--border-light);margin-top:4px}
  .dept-tree .sub a{padding:7px 14px;border-radius:999px;font-size:.82rem;background:var(--white);box-shadow:var(--shadow-sm)}
}
.results-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px;padding-bottom:14px;border-bottom:1px solid var(--border-light)}
.results-count{font-size:.875rem;color:var(--ink-soft);font-weight:600}
.results-note{font-size:.8rem;color:var(--ink-soft)}
.product-grid{display:grid;gap:20px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));min-height:300px}
@media(max-width:560px){.product-grid{grid-template-columns:repeat(2,1fr);gap:12px}}
.product-card{display:block;background:var(--white);border-radius:var(--radius-lg);overflow:hidden;
  box-shadow:var(--shadow-md);transition:box-shadow .25s,transform .25s}
.product-card:hover{box-shadow:var(--shadow-lg);transform:translateY(-3px)}
.product-card-img{width:100%;aspect-ratio:1;object-fit:cover;background:var(--bg-alt);display:block}
.product-card-img-empty{width:100%;aspect-ratio:1;background:var(--bg-alt);display:flex;align-items:center;justify-content:center;color:var(--border-light)}
.product-card-img-empty svg{width:64px;height:64px}
.product-card-body{padding:18px 20px 20px}
.product-card-cat{font-size:.72rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:6px}
.product-card-name{font-size:1.05rem;font-weight:700;color:var(--ink);margin-bottom:6px;line-height:1.3}
.product-card-price{font-size:1.125rem;font-weight:800;color:var(--ink)}
.product-card-price .from{font-size:.8rem;font-weight:600;color:var(--ink-soft);margin-right:4px}
@media(max-width:560px){.product-card-body{padding:12px 14px 14px}.product-card-name{font-size:.92rem}.product-card-price{font-size:1rem}}
.skeleton{background:linear-gradient(90deg,var(--bg-alt) 25%,#eef2f6 50%,var(--bg-alt) 75%);background-size:200% 100%;animation:shimmer 1.2s infinite;border-radius:var(--radius-sm)}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.empty-state{grid-column:1/-1;text-align:center;padding:72px 24px;color:var(--ink-muted)}
.empty-state svg{width:56px;height:56px;color:var(--border-light);margin:0 auto 16px}
.empty-state h3{color:var(--ink);margin-bottom:8px}

/* ---- product page ---- */
.product-layout{display:grid;gap:clamp(28px,4vw,48px);grid-template-columns:1fr;padding:clamp(20px,3vw,40px) 0 clamp(56px,8vw,96px)}
@media(min-width:1024px){.product-layout{grid-template-columns:1fr 1fr;gap:clamp(40px,5vw,72px)}}
.gallery{position:static}
@media(min-width:1024px){.gallery{position:sticky;top:calc(var(--header-h) + 16px);align-self:start}}
.zoom-wrap{position:relative;overflow:hidden;border-radius:var(--radius-lg);cursor:zoom-in;background:var(--bg-alt);box-shadow:var(--shadow-md)}
.zoom-wrap.zoomed{cursor:zoom-out}
.main-img{width:100%;aspect-ratio:1;object-fit:cover;background:var(--bg-alt);display:block}
.zoom-lens{position:absolute;inset:0;background-repeat:no-repeat;background-size:250%;background-color:var(--bg-alt);pointer-events:none}
.zoom-lens[hidden]{display:none}
.zoom-wrap.zoomed .zoom-lens{background-size:200%}
.main-img-empty{width:100%;aspect-ratio:1;background:var(--bg-alt);border-radius:var(--radius-lg);display:flex;align-items:center;justify-content:center;color:var(--border-light)}
.main-img-empty svg{width:96px;height:96px}
.thumbs{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.thumbs:empty{display:none}
.thumb{width:72px;height:72px;object-fit:cover;border:2px solid transparent;border-radius:var(--radius-sm);cursor:pointer;
  box-shadow:var(--shadow-sm);transition:border-color .15s;background:var(--bg-alt)}
.thumb:hover,.thumb.active{border-color:var(--red)}
.crumb{font-size:.8125rem;color:var(--ink-soft);margin-bottom:14px}
.crumb a{color:var(--ink-soft)}
.crumb a:hover{color:var(--ink)}
.crumb .sep{margin:0 8px;color:var(--border-light)}
.pname{font-family:var(--font-display);font-weight:400;font-size:clamp(2.2rem,4.5vw,3.4rem);line-height:.98;letter-spacing:.02em;color:var(--ink);margin-bottom:10px}
.pprice{font-size:1.75rem;font-weight:800;color:var(--red);margin-bottom:18px;letter-spacing:-.01em}
.pprice .was{font-size:1rem;color:var(--ink-soft);text-decoration:line-through;margin-left:8px;font-weight:600}
.pdesc{color:var(--ink-muted);line-height:1.75;margin-bottom:28px;max-width:56ch}
.opt-group{margin-bottom:22px}
.opt-label{font-size:.75rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:10px}
.opt-label .v{color:var(--ink);margin-left:8px;text-transform:none;letter-spacing:0;font-weight:700}
.swatches{display:flex;gap:10px;flex-wrap:wrap}
.swatch{width:34px;height:34px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1.5px var(--border-light);cursor:pointer;transition:box-shadow .15s;background:#888}
.swatch:hover{box-shadow:0 0 0 1.5px var(--ink-soft)}
.swatch.selected{box-shadow:0 0 0 2.5px var(--red)}
.sizes{display:flex;gap:8px;flex-wrap:wrap}
.size-btn{min-width:52px;min-height:46px;padding:8px 16px;font-family:var(--font-ui);font-weight:700;font-size:.9rem;background:var(--white);color:var(--ink);
  border:1.5px solid var(--border-light);border-radius:var(--radius-sm);cursor:pointer;transition:border-color .15s,color .15s,background .15s}
.size-btn:hover{border-color:var(--ink)}
.model-rows{display:flex;flex-direction:column;gap:6px}
.sizes--models{gap:6px}
.sizes--models .size-btn{min-width:0;min-height:36px;padding:6px 12px;font-size:.82rem;white-space:nowrap}
.size-btn.selected{background:var(--ink);color:#fff;border-color:var(--ink)}
.size-btn:disabled{opacity:.35;cursor:not-allowed}
.size-btn.option-btn{font-weight:600;text-align:left;line-height:1.3;padding:10px 16px}
.size-btn.option-btn b{display:block;font-weight:800}
.size-group-label{font-size:.7rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-soft);margin:14px 0 8px}
.size-guide-link{display:inline-flex;align-items:center;gap:6px;margin-top:12px;background:none;border:0;padding:0;font-family:var(--font-ui);font-size:.8125rem;color:var(--ink-soft);text-decoration:underline;cursor:pointer}
.size-guide-link:hover{color:var(--ink)}
.size-guide-link svg{width:14px;height:14px}
.opt-alert{display:none;margin:0 0 14px;padding:12px 16px;border-radius:var(--radius-sm);background:#FFF1F1;color:#A81A1A;font-size:.9rem;font-weight:600;border:1px solid #FFD0D2}
.opt-alert.show{display:block}
.add-btn{width:100%;min-height:56px;font-size:1.05rem;justify-content:center}
.add-btn svg{width:20px;height:20px}
.meta-list{margin-top:28px;padding-top:22px;border-top:1px solid var(--border-light);display:flex;flex-direction:column;gap:12px}
.meta-row{display:flex;align-items:flex-start;gap:12px;font-size:.9rem;color:var(--ink-muted);line-height:1.5}
.meta-row svg{width:20px;height:20px;color:var(--red);flex-shrink:0;margin-top:1px}
.pd-input{width:100%;font-family:var(--font-ui);font-size:16px;color:var(--ink);background:var(--white);border:1px solid var(--border-light);
  border-radius:var(--radius-sm);padding:13px 16px;margin-bottom:10px;box-shadow:var(--shadow-sm)}
.pd-check{display:flex;align-items:center;gap:8px;font-size:.9rem;color:var(--ink-muted);margin:6px 0 12px;cursor:pointer;font-weight:500}
.pd-check input{accent-color:var(--red)}

/* toast (added to bag) */
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translate(-50%,20px);opacity:0;
  background:var(--ink);color:#fff;padding:14px 20px;border-radius:999px;font-weight:700;font-size:.95rem;box-shadow:var(--shadow-lg);
  transition:transform .3s,opacity .3s;z-index:600;display:inline-flex;align-items:center;gap:12px;white-space:nowrap;pointer-events:none}
.toast.show{transform:translate(-50%,0);opacity:1;pointer-events:auto}
.toast svg{width:18px;height:18px;color:var(--red-bright)}
.toast a{color:var(--red-bright);text-decoration:underline;font-weight:800}
@media(max-width:768px){.toast{bottom:calc(76px + env(safe-area-inset-bottom))}}

/* size guide modal */
.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.55);display:none;align-items:center;justify-content:center;z-index:700;padding:16px}
.modal-backdrop.open{display:flex}
.modal{background:var(--white);border-radius:var(--radius-lg);max-width:700px;width:100%;max-height:85vh;overflow:auto;box-shadow:var(--shadow-lg)}
.modal-head{display:flex;justify-content:space-between;align-items:center;padding:18px 24px;border-bottom:1px solid var(--border-light);position:sticky;top:0;background:var(--white)}
.modal-head h3{font-size:1.125rem;font-weight:800;margin:0;color:var(--ink)}
.modal-close{background:none;border:0;cursor:pointer;padding:4px;color:var(--ink-soft)}
.modal-close:hover{color:var(--ink)}
.modal-body{padding:20px 24px}
.size-table-wrap{overflow-x:auto}
.size-table{width:100%;border-collapse:collapse;font-size:.875rem;color:var(--ink)}
.size-table th,.size-table td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--border-light);white-space:nowrap}
.size-table th{font-weight:800;background:var(--bg-alt);position:sticky;top:0}
.size-table td:first-child{font-weight:700}
.size-table .group-row td{font-weight:800;padding-top:16px;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-soft)}
.size-note{font-size:.8125rem;color:var(--ink-soft);margin-top:14px}

/* related + reviews (product page) */
.pd-section{padding:clamp(40px,6vw,72px) 0;border-top:1px solid var(--border-light)}
.pd-section--alt{background:var(--bg-alt)}
.pd-section-h{font-family:var(--font-display);font-weight:400;font-size:clamp(1.8rem,3.5vw,2.6rem);letter-spacing:.02em;color:var(--ink);margin-bottom:22px}
.pd-rating{font-family:var(--font-ui);font-size:.9rem;color:#B45309;margin-left:10px;font-weight:700;letter-spacing:0}
.pd-rev{padding:18px 0;border-bottom:1px solid var(--border-light)}
.pd-rev-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;flex-wrap:wrap;gap:8px;color:var(--ink)}
.pd-rev-stars{color:#F59E0B;font-size:.95rem}
.pd-rev p{color:var(--ink-muted);font-size:.92rem}
.pd-rev-empty{color:var(--ink-soft);font-style:italic;padding:8px 0 16px}
.pd-rev-form-wrap{margin-top:20px}
.pd-rev-form-wrap summary{list-style:none;display:inline-flex}
.pd-rev-form-wrap summary::-webkit-details-marker{display:none}
.pd-rev-form{margin-top:16px;max-width:480px}

/* ---- bag (cart) page ---- */
.cart-layout{display:grid;gap:32px;grid-template-columns:1fr;align-items:start;padding:clamp(20px,3vw,40px) 0 clamp(56px,8vw,96px)}
@media(min-width:1024px){.cart-layout{grid-template-columns:1fr 380px;gap:48px}}
.cart-item{display:grid;grid-template-columns:88px 1fr auto;gap:18px;align-items:center;padding:20px 0;border-bottom:1px solid var(--border-light)}
.cart-item-img{width:88px;height:88px;border-radius:var(--radius-sm);object-fit:cover;background:var(--bg-alt);box-shadow:var(--shadow-sm)}
.cart-item-img-empty{width:88px;height:88px;border-radius:var(--radius-sm);background:var(--bg-alt);display:flex;align-items:center;justify-content:center;color:var(--border-light)}
.cart-item-img-empty svg{width:32px;height:32px}
.cart-item-name{font-size:1rem;font-weight:700;color:var(--ink);margin-bottom:2px}
.cart-item-name a:hover{color:var(--red)}
.cart-item-variant{font-size:.875rem;color:var(--ink-soft);margin-bottom:8px}
.cart-item-price{font-size:1.05rem;font-weight:800;color:var(--ink)}
.qty{display:inline-flex;align-items:center;border:1px solid var(--border-light);border-radius:var(--radius-sm);overflow:hidden;margin-top:10px;background:var(--white)}
.qty button{width:36px;height:36px;display:flex;align-items:center;justify-content:center;color:var(--ink-muted);cursor:pointer;background:none;border:0;transition:background .15s,color .15s}
.qty button:hover{background:var(--bg-alt);color:var(--ink)}
.qty button svg{width:14px;height:14px}
.qty .qty-val{min-width:34px;text-align:center;font-weight:700;font-size:.95rem;color:var(--ink)}
.remove-btn{color:var(--ink-soft);padding:8px;cursor:pointer;background:none;border:0;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:color .15s,background .15s}
.remove-btn:hover{color:var(--red);background:#FFF1F1}
.remove-btn svg{width:18px;height:18px}
.summary{background:var(--white);border-radius:var(--radius-lg);padding:24px;box-shadow:var(--shadow-md);position:sticky;top:calc(var(--header-h) + 16px)}
.summary h2{font-family:var(--font-display);font-weight:400;font-size:1.7rem;letter-spacing:.03em;margin-bottom:12px;color:var(--ink)}
.summary-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;font-size:.95rem;color:var(--ink-muted)}
.summary-row+.summary-row{border-top:1px solid var(--border-light)}
.summary-row .hint{display:block;font-size:.75rem;color:var(--ink-soft)}
.summary-total{display:flex;justify-content:space-between;align-items:baseline;padding-top:16px;margin-top:6px;border-top:2px solid var(--ink);font-weight:800;color:var(--ink)}
.summary-total .amt{font-size:1.6rem;color:var(--red)}
.summary .btn{width:100%;justify-content:center;margin-top:18px}
.summary .btn+.btn{margin-top:10px}
.delivery-opts{margin:6px 0 4px;padding:12px 0;border-top:1px solid var(--border-light);border-bottom:1px solid var(--border-light)}
.delivery-opts p{font-size:.8rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:8px}
.delivery-opts label{display:flex;align-items:center;gap:10px;font-size:.9rem;color:var(--ink-muted);font-weight:500;cursor:pointer;padding:5px 0}
.delivery-opts input{accent-color:var(--red)}
.discount-box{padding:14px 0 6px;border-bottom:1px solid var(--border-light);margin-bottom:6px}
.discount-box p{font-size:.8rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:8px}
.discount-box .row{display:flex;gap:8px}
.discount-box input{flex:1;min-width:0;font-family:var(--font-ui);font-size:16px;color:var(--ink);background:var(--white);border:1px solid var(--border-light);border-radius:var(--radius-sm);padding:11px 14px;text-transform:uppercase}
.discount-box .apply{min-height:44px;padding:0 18px;border-radius:var(--radius-sm);border:1.5px solid var(--ink);background:var(--white);color:var(--ink);font-family:var(--font-ui);font-weight:700;font-size:.85rem;cursor:pointer}
.discount-box .apply:hover{background:var(--ink);color:#fff}
.discount-status{margin-top:8px;font-size:.8rem;min-height:1em;font-weight:600}
.empty-cart{text-align:center;padding:clamp(56px,10vw,110px) 24px}
.empty-cart svg{width:64px;height:64px;color:var(--border-light);margin:0 auto 20px}
.empty-cart h2{font-family:var(--font-display);font-weight:400;font-size:2.2rem;letter-spacing:.03em;color:var(--ink);margin-bottom:8px}
.empty-cart p{color:var(--ink-muted);margin-bottom:24px}
.badges{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-top:16px;font-size:.75rem;color:var(--ink-soft);font-weight:600}
.badge-tiny{display:inline-flex;align-items:center;gap:5px}
.badge-tiny svg{width:14px;height:14px}

/* ---- order confirmed ---- */
.confirmed{max-width:640px;margin:0 auto;padding:clamp(48px,8vw,96px) 0 clamp(56px,8vw,96px);text-align:center}
.check-circle{width:84px;height:84px;border-radius:50%;background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center;margin:0 auto 28px;box-shadow:0 8px 20px rgba(196,32,32,.28)}
.check-circle svg{width:42px;height:42px}
.confirmed h1{font-family:var(--font-display);font-weight:400;font-size:clamp(2.6rem,6vw,4rem);letter-spacing:.02em;color:var(--ink);margin-bottom:14px}
.confirmed .lede{font-size:1.075rem;color:var(--ink-muted);line-height:1.7;margin-bottom:24px}
.detail-card{background:var(--white);border-radius:var(--radius-lg);padding:20px 24px;margin:0 0 24px;text-align:left;box-shadow:var(--shadow-md)}
.detail-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;font-size:.95rem;gap:16px}
.detail-row+.detail-row{border-top:1px solid var(--border-light)}
.detail-label{color:var(--ink-soft)}
.detail-value{font-weight:700;color:var(--ink)}
.cta-row{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:28px}

/* gift voucher page (2026-09-21) */
.pd-help{font-size:.82rem;color:var(--ink-muted);margin:6px 0 0;line-height:1.5}
#pdGiftFields .pd-input{margin-top:8px}
