/* ==========================================================================
   KODE GARMENT — style order page (blanks-style.php)
   One style from the Blanks Catalogue: photo and specs, a colour × size grid
   with stock on hand, decoration and placement, and a sticky order bar that
   hands the whole order to the quote form. Rendered by assets/js/blanks-order.js.
   Loads after site.css and blanks.css.
   ========================================================================== */

/* ---------- shared ---------- */

.oc { padding-block: 28px 0; }
.oc .kg-btn .kg-ico { width: 16px; height: 16px; }

.oc-crumb { font-family: var(--kg-font-mono); font-size: 12.5px; color: var(--kg-muted); }
.oc-crumb a { color: inherit; text-decoration: none; }
.oc-crumb a:hover { color: var(--kg-accent-ink); }
.oc-crumb span { margin-inline: 8px; }

.oc-eyebrow { margin: 0; font-family: var(--kg-font-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--kg-muted); }
.oc-brand { margin: 0; overflow: hidden; font-family: var(--kg-font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--kg-accent-ink); white-space: nowrap; text-overflow: ellipsis; }
.oc-label { font-family: var(--kg-font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--kg-muted); }
.oc-meta { margin: 4px 0 0; font-family: var(--kg-font-mono); font-size: 12.5px; color: var(--kg-muted); }
.oc-title { margin: 10px 0 0; font-family: var(--kg-font-display); font-weight: 800; font-variation-settings: 'wdth' 90, 'wght' 800; font-size: clamp(30px, 3vw, 44px); line-height: 1; letter-spacing: -.03em; }
.oc-sub { max-width: 66ch; margin-top: 10px; font-size: 16px; line-height: 1.55; color: var(--kg-muted); }
.oc-textbtn { padding: 2px 0; border: 0; background: none; font-family: var(--kg-font-mono); font-size: 12.5px; color: var(--kg-accent-ink); cursor: pointer; }
.oc-textbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

.oc-media { position: relative; display: block; flex: none; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--kg-line); }
.oc-media img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }

.oc-medal { display: grid; flex: none; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--kg-line); }
.oc-medal img { max-width: 72%; max-height: 42%; filter: brightness(0); }
.oc-medal.is-knockout img { width: 108%; max-width: none; max-height: none; filter: invert(1) grayscale(1) contrast(1.8); mix-blend-mode: multiply; }
.oc-medal__word { padding: 0 4px; font-family: var(--kg-font-display); font-weight: 800; font-size: 6.5px; line-height: 1; text-align: center; text-transform: uppercase; }

.oc-dot { display: inline-block; flex: none; width: 12px; height: 12px; border: 1px solid rgba(18,18,20,.22); border-radius: 50%; }
.oc-swatch { width: 26px; height: 26px; padding: 0; border: 1px solid rgba(18,18,20,.2); border-radius: 50%; box-shadow: inset 0 0 0 2px #fff; cursor: pointer; }
.oc-swatch.has-qty { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--kg-accent); }
.oc-swatch[aria-pressed="true"] { outline: 2px solid var(--kg-ink); outline-offset: 3px; }

.oc-qty { width: 100%; height: 38px; padding: 0; border: 1px solid var(--kg-line); border-radius: 9px; background: #fff; font: 600 14px var(--kg-font-mono); color: var(--kg-ink); text-align: center; -moz-appearance: textfield; transition: border-color .15s ease, background-color .15s ease; }
.oc-qty::-webkit-outer-spin-button, .oc-qty::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.oc-qty:hover { border-color: var(--kg-ink-soft); }
.oc-qty:focus { border-color: transparent; outline: 2px solid var(--kg-accent); outline-offset: -1px; }
.oc-qty.is-set { border-color: color-mix(in srgb, var(--kg-accent) 45%, transparent); background: var(--kg-accent-wash); }
.oc-qty.is-over { border-color: color-mix(in srgb, var(--kg-stop) 45%, transparent); background: color-mix(in srgb, var(--kg-stop) 8%, #fff); color: var(--kg-stop); }
.oc-stock { font-family: var(--kg-font-mono); font-size: 11.5px; color: var(--kg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.oc-stock.is-low { color: var(--kg-warn); }
.oc-stock.is-out { color: var(--kg-stop); }
.c-sum { font-family: var(--kg-font-mono); font-size: 13.5px; font-weight: 700; color: var(--kg-ink); font-variant-numeric: tabular-nums; }
.c-sum.is-zero { font-weight: 400; color: #C4C4C9; }
.is-warn { color: var(--kg-warn); }

.oc-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--kg-line); border-radius: 999px; background: #fff; font: 500 14px var(--kg-font-body); color: var(--kg-ink-soft); cursor: pointer; white-space: nowrap; }
.oc-chip:hover { border-color: var(--kg-ink); color: var(--kg-ink); }
.oc-chip[aria-pressed="true"] { border-color: #111113; background: #111113; color: #fff; }
.oc-chip small { font-family: var(--kg-font-mono); font-size: 11.5px; opacity: .6; }

/* ---------- B · style order page ---------- */

.oc--b { padding-bottom: 0; }
.ob-grid { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 22px; }
.ob-gallery { position: sticky; top: calc(var(--hd) + var(--tick) + 18px); }
.ob-hero { width: 100%; aspect-ratio: 1 / 1; border-radius: 26px; }
.ob-hero img { inset: 7%; width: 86%; height: 86%; }
.ob-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; }
.ob-spec { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--kg-line); border-radius: 16px; background: #fff; }
.ob-spec dd { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.ob-brandcard { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 14px 16px; border: 1px solid var(--kg-line); border-radius: 16px; background: #fff; color: var(--kg-ink); text-decoration: none; transition: border-color .15s ease; }
.ob-brandcard:hover { border-color: var(--kg-ink); }
.ob-brandcard .oc-medal { width: 88px; height: 88px; }
.ob-brandcard b { display: block; font-size: 15px; }
.ob-brandcard small { font-family: var(--kg-font-mono); font-size: 12px; color: var(--kg-muted); }
.ob-brandcard > .kg-ico { margin-left: auto; color: var(--kg-muted); }

.ob-buy { min-width: 0; }
.ob-brandline { display: flex; align-items: center; gap: 12px; }
.ob-brandline .oc-medal { width: 88px; height: 88px; }
.ob-brandline .oc-medal__word, .ob-brandcard .oc-medal__word { padding: 0 8px; font-size: 11px; }
.ob-style { padding: 3px 9px; border: 1px solid var(--kg-line); border-radius: 999px; font-family: var(--kg-font-mono); font-size: 12px; color: var(--kg-ink-soft); }
.ob-name { margin: 16px 0 0; font-family: var(--kg-font-display); font-weight: 800; font-variation-settings: 'wdth' 90, 'wght' 800; font-size: clamp(38px, 4.4vw, 72px); line-height: .92; letter-spacing: -.025em; text-transform: uppercase; }
.ob-lede { margin-top: 12px; font-size: 16.5px; color: var(--kg-ink-soft); }
/* the colour list the server writes for crawlers, before the order script replaces it */
.ob-colourlist { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; list-style: none; }
.ob-colourlist li { display: flex; align-items: center; gap: 6px; }
.ob-stockbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 20px; padding: 12px 16px; border-radius: 14px; background: var(--kg-panel); font-family: var(--kg-font-mono); font-size: 13px; color: var(--kg-ink-soft); }
.ob-stockbar b { font-weight: 600; color: var(--kg-ink); }
.oc-live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; vertical-align: 1px; background: var(--kg-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kg-ok) 20%, transparent); }

.oc-step { display: flex; align-items: center; gap: 12px; margin: 36px 0 0; font-family: var(--kg-font-display); font-weight: 800; font-variation-settings: 'wdth' 90, 'wght' 800; font-size: 20px; letter-spacing: -.01em; }
.oc-step span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #111113; font: 600 12.5px var(--kg-font-mono); color: #fff; }
.oc-hint { margin: 6px 0 0 40px; font-size: 14px; color: var(--kg-muted); }

.ob-matrixwrap { margin-top: 14px; overflow: hidden; border: 1px solid var(--kg-line); border-radius: 18px; background: #fff; }
.ob-matrix { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-family: var(--kg-font-mono); font-size: 12.5px; }
.ob-matrix col.c-colour { width: 150px; }
.ob-matrix col.c-total { width: 62px; }
.ob-matrix th, .ob-matrix td { padding: 6px 3px; border-bottom: 1px solid var(--kg-line-soft); text-align: center; vertical-align: middle; }
.ob-matrix thead th { height: 40px; background: var(--kg-panel); font-weight: 600; color: var(--kg-ink); }
.ob-matrix thead th:first-child, .ob-matrix tfoot th { padding-left: 14px; font-weight: 500; letter-spacing: .08em; text-align: left; text-transform: uppercase; color: var(--kg-muted); font-size: 11px; }
.ob-matrix tbody th { padding-left: 12px; font: 500 13.5px var(--kg-font-body); color: var(--kg-ink); text-align: left; transition: box-shadow .15s ease; }
.ob-matrix tbody tr:hover > * { background: #F7F7F8; }
.ob-matrix tbody tr.has-qty th { box-shadow: inset 3px 0 0 var(--kg-accent); }
.ob-matrix td .oc-qty { height: 34px; max-width: 58px; border-radius: 8px; }
.ob-matrix td .oc-stock { display: block; margin-top: 3px; font-size: 10.5px; }
.ob-matrix tfoot th, .ob-matrix tfoot td { height: 42px; border-bottom: 0; background: var(--kg-panel); }
.ob-matrix tfoot td { font-weight: 700; color: var(--kg-ink); font-variant-numeric: tabular-nums; }
.ob-colour { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ob-colour > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.ob-deco { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.ob-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--kg-line); border-radius: 16px; background: #fff; font: 600 14.5px var(--kg-font-body); color: var(--kg-ink); text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.ob-opt .kg-ico { width: 26px; height: 26px; color: var(--kg-ink-soft); }
.ob-opt small { font-size: 12.5px; font-weight: 400; color: var(--kg-muted); }
.ob-opt:hover { border-color: var(--kg-ink-soft); }
.ob-opt[aria-pressed="true"] { border-color: #111113; box-shadow: inset 0 0 0 1px #111113; }
.ob-opt:disabled { opacity: .4; cursor: not-allowed; }
.ob-place { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ob-place[hidden] { display: none; }
.ob-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 16px; border: 1.5px dashed var(--kg-line); border-radius: 16px; background: var(--kg-panel); }
.ob-drop > .kg-ico { width: 26px; height: 26px; color: var(--kg-ink-soft); }
.ob-drop b { display: block; font-size: 14.5px; }
.ob-drop small { font-size: 13px; color: var(--kg-muted); }
.ob-drop .kg-btn { margin-left: auto; background: #fff; }


.oc-orderbar { position: sticky; bottom: 0; z-index: 30; margin-top: 48px; border-top: 1px solid var(--kg-line); background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.oc-orderbar__in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; padding-block: 14px; }
.oc-orderbar__units { display: flex; align-items: baseline; gap: 8px; margin: 0; font-family: var(--kg-font-mono); font-size: 13px; color: var(--kg-muted); }
.oc-orderbar__units b { font-family: var(--kg-font-display); font-weight: 800; font-variation-settings: 'wdth' 90, 'wght' 800; font-size: 32px; line-height: 1; letter-spacing: -.03em; color: var(--kg-ink); font-variant-numeric: tabular-nums; }
.oc-orderbar__meta { margin: 0; font-family: var(--kg-font-mono); font-size: 13px; color: var(--kg-ink-soft); }
.oc-orderbar__actions { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 1100px) {
  .ob-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ob-gallery { position: static; max-width: 520px; }
}
@media (max-width: 699px) {
  .ob-matrixwrap { overflow-x: auto; }
  .ob-matrix { min-width: 640px; }
  .ob-deco { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- a style id the catalogue doesn't have ---------- */
.ob-missing { max-width: 640px; padding: 40px 0 80px; }
.ob-missing__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ob-grid:has(.ob-missing) { grid-template-columns: minmax(0, 1fr); }
.oc-orderbar__actions .kg-ico { width: 16px; height: 16px; }
.oc-orderbar__meta .is-warn { color: var(--kg-warn); font-weight: 600; }
@media (max-width: 599px) {
  .oc-orderbar__in { gap: 8px 16px; padding-block: 12px; }
  .oc-orderbar__units b { font-size: 26px; }
  .oc-orderbar__actions { width: 100%; margin-left: 0; }
  .oc-orderbar__actions .kg-btn { flex: 1; }
  .ob-specs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ob-brandline .oc-medal, .ob-brandcard .oc-medal { width: 64px; height: 64px; }
}
