/* A shop's item pages and an order's bag, drawn the same in every theme:
   the colours come from the theme's own variables (with a fallback where a
   theme names one differently). An item on a list opens its page by its
   name, the whole card being the link. No script is needed for any of it. */
.item, .row, .tile, .kx-card, .fx-piece, .gx-card { position: relative; }
:root { --ln: var(--line, var(--rule, #ddd9d2)); }
.item-open { color: inherit; text-decoration: none; }
.item-open::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.item .add, .row .btn, .item .btn, .tile .add, .kx-card .add, .kx-buy, .fx-buy, .fx-under, .gx-buy, .gx-add { position: relative; z-index: 1; }
.kx-buy, .fx-buy { margin: 0; }

/* An item's page. */
.pdp { display: grid; gap: 1rem; max-width: 56rem; margin: 0 auto; }
.pdp-img { display: block; width: 100%; max-height: 34rem; object-fit: cover; border-radius: var(--r, 12px); background: var(--soft, var(--card, #f1efec)); }
.pdp-main { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.pdp-main h1 { margin: 0; }
.pdp-kicker { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #55524d); }
.pdp-price { margin: 0; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pdp-desc { margin: 0; color: var(--muted, #55524d); }
.pdp-meta, .pdp-note { margin: 0; color: var(--muted, #55524d); font-size: .9rem; }
.pdp-form { display: flex; flex-direction: column; gap: 1rem; margin-top: .5rem; }
.pdp-opt { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: .375rem; }
.pdp-opt legend { padding: 0; margin-bottom: .375rem; font-weight: 700; }
.pdp-choice { display: flex; align-items: center; gap: .625rem; min-height: 48px; padding: .375rem .875rem; border: 1px solid var(--ln); border-radius: var(--r, 10px); background: var(--card, var(--bg, #fff)); cursor: pointer; }
.pdp-choice:has(input:checked) { border-color: var(--brand, currentColor); box-shadow: inset 0 0 0 1px var(--brand, currentColor); }
.pdp-choice input { width: 1.25rem; height: 1.25rem; accent-color: var(--brand, currentColor); flex: none; }
.pdp-qty { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pdp-qty label { font-weight: 700; }
@media (min-width: 48rem) {
  .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
  .pdp:not(:has(.pdp-img)) { grid-template-columns: minmax(0, 32rem); }
}

/* An order's bag: its own step, and a summary on the details step. */
.bag-sum { margin: 0 0 1.25rem; }
.bag-h { margin: 0 0 .5rem; }
.bag-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.bag-line { display: flex; border-top: 1px solid var(--ln); }
.bag-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bag-text .line-name { font-weight: 700; }
.bag-opts, .bag-unit, .bag-hint { color: var(--muted, #55524d); font-size: .875rem; }
.bag-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--ln); }
.bag-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bag-more { margin: 0; }

/* An item's pictures, colours, sizes and notes. */
.pdp-media { min-width: 0; }
.pdp-media:empty { display: none; }
.pdp-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .5rem 0 0; }
.pdp-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r, 8px); }
.sw { display: inline-block; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #bdb8b0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.sw-black{background:#14110f}.sw-white{background:#fff}.sw-grey,.sw-gray{background:#8b8882}.sw-red{background:#c43d1c}
.sw-orange{background:#e8731b}.sw-yellow{background:#f1c232}.sw-green{background:#3f7d4e}.sw-blue{background:#2f5fb3}
.sw-navy{background:#1f2a52}.sw-purple{background:#5b3d86}.sw-pink{background:#e9a6b8}.sw-brown{background:#7a4a2b}
.sw-cream,.sw-ivory{background:#f4ead2}.sw-beige,.sw-tan{background:#d8c3a0}.sw-gold{background:#c9a227}.sw-moss,.sw-olive{background:#5b6b3c}
.sw-teal{background:#1f7a78}.sw-maroon,.sw-burgundy{background:#6e1f2b}.sw-khaki{background:#b9ab7a}
.pdp-opt-colour { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .625rem; }
.pdp-opt-colour legend { width: 100%; }
.pdp-opt-colour .pdp-choice { position: relative; padding: 0; min-height: 0; border: 0; background: none; border-radius: 50%; }
.pdp-opt-colour .pdp-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pdp-opt-colour .pdp-choice .sw { width: 2.25rem; height: 2.25rem; }
.pdp-opt-colour .pdp-choice span:not(.sw) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pdp-opt-colour .pdp-choice:has(input:checked) { box-shadow: 0 0 0 2px var(--bg, #fff), 0 0 0 4px var(--fg, #14110f); }
.pdp-opt-colour .pdp-choice:has(input:focus-visible) { outline: 2px solid var(--brand, currentColor); outline-offset: 4px; }
.pdp-opt-size { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pdp-opt-size legend { width: 100%; }
.pdp-opt-size .pdp-choice { position: relative; justify-content: center; min-width: 3.5rem; min-height: 3rem; padding: 0 .75rem; border-radius: 0; }
.pdp-opt-size .pdp-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pdp-opt-size .pdp-choice:has(input:checked) { background: var(--fg, #14110f); color: var(--bg, #fff); box-shadow: none; }
.pdp-opt-size .pdp-choice:has(input:focus-visible) { outline: 2px solid var(--brand, currentColor); outline-offset: 2px; }
.pdp-more { margin-top: 1rem; border-top: 1px solid var(--ln); }
.pdp-more details { border-bottom: 1px solid var(--ln); }
.pdp-more summary { display: flex; justify-content: space-between; align-items: center; min-height: 48px; font-weight: 700; cursor: pointer; list-style: none; }
.pdp-more summary::-webkit-details-marker { display: none; }
.pdp-more summary::after { content: "+"; font-weight: 400; }
.pdp-more details[open] summary::after { content: "\2212"; }
.pdp-more details p { margin: 0 0 .875rem; color: var(--muted, #55524d); }
.badge-few { background: #fdeccf; color: #7a4a00; }

.bag-thumb { flex: none; object-fit: cover; }
.bag-remove { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.bag-n { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; margin-left: .35rem; padding: 0 .35rem; border-radius: 999px; background: var(--fg, #14110f); color: var(--bg, #fff); font-size: .75rem; }
.sticky-sum { display: flex; flex-direction: column; line-height: 1.15; }
.sticky-sum small { opacity: .8; }
.sticky-sum[hidden], [data-bag-hide][hidden], .bag-n[hidden] { display: none; }

/* An order's deposit and what is left, under the total. */
.bag-split { display: flex; justify-content: space-between; gap: 1rem; margin: 0.25rem 0; font-size: 0.95rem; }
.bag-bal { opacity: 0.75; }
.bag-split[hidden] { display: none; }

/* The shop looks' designs: a big name, chips, one 56px button with the
   sum on it, every target 44px or more. */
.pdp-crumb { display: flex; align-items: center; gap: .375rem; margin: 0 0 .75rem; font-size: .875rem; color: var(--muted, #55524d); }
.pdp-crumb a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.pdp-main { gap: .875rem; }
.pdp-main h1 { font-size: clamp(2.25rem, 5.4vw, 4.25rem); line-height: 1; letter-spacing: -.02em; }
.pdp-kicker { color: var(--brand, var(--muted, #55524d)); }
.pdp-opt-other { flex-direction: row; flex-wrap: wrap; gap: .5rem; }
.pdp-opt-other legend { width: 100%; font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; }
.pdp-opt-other .pdp-choice { position: relative; min-height: 44px; padding: 0 1.25rem; border: 1.5px solid var(--fg, currentColor); border-radius: 999px; background: transparent; font-weight: 700; font-size: .95rem; }
.pdp-opt-other .pdp-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pdp-opt-other .pdp-choice:has(input:checked) { background: var(--fg, #14110f); color: var(--bg, #fff); box-shadow: none; }
.pdp-opt-other .pdp-choice:has(input:focus-visible) { outline: 3px solid var(--brand, currentColor); outline-offset: 3px; }
.pdp-qty label { font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; }
.pdp-cta { display: flex; flex-direction: column; gap: .75rem; }
.pdp-run { margin-left: .4em }
.pdp-go { min-height: 56px; border-radius: 999px; font-size: 1.05rem; }
.pdp-thumbs { list-style: none; padding: 0; grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); }
.pdp-thumb { display: block; border-radius: var(--r, 8px); }
.pdp-thumb[aria-current] img { box-shadow: 0 0 0 2px var(--bg, #fff), 0 0 0 4px var(--fg, #14110f); }
.pdp-img { aspect-ratio: 1; height: auto; }
.step, .bag-remove, .bag-more a, .bag-head a { min-height: 44px; min-width: 44px; }
.bag-remove, .bag-more a, .bag-head a { display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 4px; color: inherit; }
.pdp :focus-visible, .bag :focus-visible, .co :focus-visible, .sf-pill:focus-visible { outline: 3px solid var(--brand, currentColor); outline-offset: 3px; }

/* The bag: lines on the left, a summary box on the right (below, on a phone). */
.bag { max-width: 72rem; display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 4rem); align-items: flex-start; }
.bag-items { flex: 2 1 22rem; min-width: 0; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--ln); }
.bag-line { align-items: flex-start; gap: 1rem; padding: 1.25rem 0; }
.bag-thumb { width: 96px; height: 96px; border-radius: 18px; }
.bag-text { gap: .375rem; }
.bag-top { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.bag-top .line-name { font-size: 1.2rem; }
.bag-act { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.bag-box { flex: 1 1 18rem; min-width: 0; max-width: 32rem; display: flex; flex-direction: column; gap: .75rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--ln); border-radius: 24px; background: var(--card, var(--bg, #fff)); }
.bag-box-h, .bag-hint { margin: 0; }
.bag-box .total, .bag-sum .total { margin: 0; padding-top: .75rem; border-top: 1px solid var(--ln); font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.bag-dep strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

/* Checkout: the details, and beside them what is ordered, with Pay. */
.co { display: flex; flex-direction: column; }
.co .bag-sum { order: 99; display: flex; flex-direction: column; gap: .5rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--ln); border-radius: 24px; background: var(--card, var(--bg, #fff)); }
.bag-row { align-items: center; }
.bag-what { flex: 1; min-width: 0; }
.bag-thumb-s { width: 56px; height: 56px; border-radius: 14px; }
@media (min-width: 60rem) {
  .co { display: grid; grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); column-gap: 4rem; align-items: start; max-width: 72rem; }
  .co > * { grid-column: 1; }
  .co > .bag-sum { grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 1rem; }
}
[data-pay-now][hidden], [data-pay-later][hidden] { display: none; }

/* The bag in a shop header, hidden until there is one. */
.sf-top-r { display: inline-flex; align-items: center; gap: .5rem; }
.sf-pill { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; background: var(--fg, #14110f); color: var(--bg, #fff); font-weight: 700; text-decoration: none; }
.sf-pill[hidden] { display: none; }
.pdp-q { display: inline-flex; align-items: center; border: 1.5px solid var(--fg, currentColor); border-radius: 999px; }
.pdp-q .qty { width: 3rem; border: 0; background: none; text-align: center; }
.is-out span{text-decoration:line-through}.is-out .sw{opacity:.4}img.sw{object-fit:cover}
