/* ==========================================================================
   DINK DISTRICT — Court Theme · Collection page styles
   (extends theme.css; solid-header rules live in product.css)
   ========================================================================== */

:root { --toolbar-top: 0px; }

/* ---------- collection banner ---------- */
.cbanner {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 28px; background: var(--ink); color: #fff;
  min-height: 300px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: stretch;
}
.cbanner__img { position: absolute; inset: 0 0 0 30%; z-index: -2; }
.cbanner__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform: scale(1.04); animation: kb 14s ease-out forwards; }
@keyframes kb { to { transform: scale(1); } }
.cbanner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink) 38%, rgba(10, 31, 28, .75) 52%, rgba(10, 31, 28, 0) 85%); }
.cbanner__body { padding: clamp(26px, 3.6vw, 52px); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.cbanner .eyebrow { color: var(--lime); }
.cbanner h1 { font-size: clamp(44px, 6vw, 84px); }
.cbanner p { color: rgba(255, 255, 255, .78); max-width: 52ch; font-size: 15.5px; text-wrap: pretty; }
.quick-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.qpill { height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font: 700 13px var(--f-body); color: #fff; transition: all .25s var(--ease); display: inline-flex; align-items: center; gap: 7px; }
.qpill:hover { border-color: #fff; background: rgba(255, 255, 255, .18); }
.qpill.is-on { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.cbanner__badges { position: absolute; right: 22px; bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cbanner__badges span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font: 700 12px var(--f-body); }
.cbanner__badges .i { width: 15px; height: 15px; color: var(--lime); stroke-width: 2.2; }

/* ---------- toolbar ---------- */
.ctoolbar-wrap { position: sticky; top: var(--toolbar-top); z-index: 40; margin-top: 22px; transition: top .45s var(--ease); }
.ctoolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 999px; background: rgba(244, 242, 234, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: 0 10px 30px -22px rgba(10, 31, 28, .5); }
.ctoolbar__l, .ctoolbar__r { display: flex; align-items: center; gap: 10px; }
.fbtn { display: none; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 12.5px var(--f-display); font-stretch: 108%; letter-spacing: .06em; text-transform: uppercase; }
.fbtn .i { width: 18px; height: 18px; }
.fbtn b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 11px; padding: 0 4px; }
.fbtn b:empty { display: none; }
.hide-filters { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font: 700 12.5px var(--f-display); font-stretch: 108%; letter-spacing: .06em; text-transform: uppercase; transition: border-color .25s; }
.hide-filters:hover { border-color: var(--ink); }
.hide-filters .i { width: 18px; height: 18px; }
.count { font-size: 14px; font-weight: 600; color: var(--muted); }
.count b { color: var(--ink); font-weight: 800; }
.sort { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.sort span { color: var(--muted); }
.sort select, .fselect { appearance: none; -webkit-appearance: none; height: 42px; padding: 0 40px 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230a1f1c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center; font: 700 13.5px var(--f-body); cursor: pointer; transition: border-color .25s; }
.sort select:hover { border-color: var(--ink); }
.density { display: inline-flex; padding: 3px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); }
.density button { width: 38px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); transition: all .25s; }
.density button .i { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.density button.is-on { background: var(--ink); color: var(--lime); }

/* active chips */
.active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 0; padding-top: 16px; }
.active:empty { display: none; }
.achip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 14px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 12.5px var(--f-body); animation: cardIn .3s var(--ease); }
.achip button { width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; transition: background .2s; }
.achip button:hover { background: var(--lime); color: var(--ink); }
.achip .i { width: 12px; height: 12px; stroke-width: 2.8; }
.clear-all { font: 700 12.5px var(--f-body); text-decoration: underline; text-underline-offset: 3px; color: var(--ink); padding: 0 6px; }

/* ---------- layout ---------- */
.clayout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px; align-items: start; padding-block: 22px clamp(48px, 6vw, 80px); }
.clayout.no-filters { grid-template-columns: minmax(0, 1fr); }
.clayout.no-filters .filters { display: none; }

/* ---------- filters ---------- */
.filters { position: sticky; top: calc(var(--toolbar-top) + 82px); max-height: calc(100vh - var(--toolbar-top) - 100px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: rgba(10, 31, 28, .25) transparent; transition: top .45s var(--ease); }
.filters__head { display: none; }
.filters__foot { display: none; }
.fgroup { border-bottom: 1px solid var(--line); }
.fgroup:first-of-type { border-top: 1px solid var(--line); }
.fgroup summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font: 750 15px var(--f-display); font-stretch: 108%; letter-spacing: -.01em; }
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary .i { width: 16px; height: 16px; transition: transform .35s var(--ease); stroke-width: 2.2; }
.fgroup[open] summary .i { transform: rotate(180deg); }
.fgroup summary em { font: 800 11px var(--f-body); font-style: normal; background: var(--lime); color: var(--ink); padding: 2px 8px; border-radius: 999px; margin-left: 8px; }
.fgroup summary em:empty { display: none; }
.fbody { padding: 0 0 20px; display: grid; gap: 4px; animation: cardIn .35s var(--ease); }
.fopt { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 7px 0; cursor: pointer; font-size: 14px; font-weight: 600; transition: opacity .2s; }
.fopt input { position: absolute; opacity: 0; pointer-events: none; }
.fopt .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid rgba(10, 31, 28, .35); display: grid; place-items: center; color: transparent; transition: all .2s; background: var(--paper); }
.fopt .box .i { width: 13px; height: 13px; stroke-width: 3.2; }
.fopt input:checked + .box { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.fopt input:focus-visible + .box { outline: 2px solid var(--blue); outline-offset: 2px; }
.fopt small { color: var(--muted); font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fopt.is-zero { opacity: .38; }
.fopt:hover .box { border-color: var(--ink); }
.ftoggle { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; font-weight: 700; cursor: pointer; }
.ftoggle input { position: absolute; opacity: 0; pointer-events: none; }
.ftoggle .sw { width: 42px; height: 24px; border-radius: 999px; background: rgba(10, 31, 28, .2); position: relative; transition: background .25s; flex: none; }
.ftoggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.ftoggle input:checked + .sw { background: var(--ink); }
.ftoggle input:checked + .sw::after { transform: translateX(18px); background: var(--lime); }
.ftoggle input:focus-visible + .sw { outline: 2px solid var(--blue); outline-offset: 2px; }
.fpills { display: flex; gap: 8px; flex-wrap: wrap; }
.fpill { display: inline-flex; flex-direction: column; align-items: center; min-width: 74px; padding: 9px 14px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--paper); font: 800 14px var(--f-display); font-stretch: 108%; transition: all .25s var(--ease); }
.fpill small { font: 600 11px var(--f-body); color: var(--muted); }
.fpill:hover { border-color: var(--ink); }
.fpill.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fpill.is-on small { color: var(--lime); }
.fpill.is-zero { opacity: .38; }
.fswatches { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.fsw { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); transition: transform .25s var(--ease); }
.fsw::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; transition: border-color .2s; }
.fsw:hover { transform: scale(1.1); }
.fsw.is-on::after { border-color: var(--ink); }
.fsw.is-zero { opacity: .35; }
.fsw span { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); font: 600 10.5px var(--f-body); color: var(--muted); opacity: 0; transition: opacity .2s; white-space: nowrap; pointer-events: none; }
.fsw:hover span { opacity: 1; }

/* price slider */
.price-vals { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.price-vals div { flex: 1; padding: 10px 14px; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.price-vals div small { display: block; font: 600 10.5px var(--f-body); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.range { position: relative; height: 30px; margin: 0 8px 4px; }
.range__track { position: absolute; left: 0; right: 0; top: 12px; height: 6px; border-radius: 6px; background: var(--cream-2); }
.range__fill { position: absolute; top: 0; bottom: 0; background: var(--ink); border-radius: 6px; }
.range input { position: absolute; left: -8px; width: calc(100% + 16px); top: 0; height: 30px; margin: 0; pointer-events: none; -webkit-appearance: none; appearance: none; background: none; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); border: 3px solid var(--ink); cursor: grab; box-shadow: 0 2px 6px rgba(10, 31, 28, .3); }
.range input::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 3px solid var(--ink); cursor: grab; }
.range input:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }
.range input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--blue); outline-offset: 2px; }

.help-card { margin-top: 22px; padding: 22px; border-radius: var(--r-l); background: var(--lime); display: grid; gap: 10px; }
.help-card b { font: 800 19px/1.1 var(--f-display); font-stretch: 112%; letter-spacing: -.02em; }
.help-card p { font-size: 13.5px; color: rgba(10, 31, 28, .75); }

/* ---------- grid ---------- */
.cgrid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 24px 14px; }
.cgrid .card__media { aspect-ratio: 4 / 4.5; }
.card__specs { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: -1px; }
.card[hidden], .card.is-gone { display: none; }
.promo-card { grid-column: span 2; border-radius: var(--r-l); background: var(--lime); color: var(--ink); padding: clamp(22px, 2.6vw, 34px); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; position: relative; overflow: hidden; isolation: isolate; min-height: 360px; }
.promo-card.is-gone { display: none; }
.promo-card::after { content: ""; position: absolute; z-index: -1; right: -90px; bottom: -110px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 60%), rgba(10, 31, 28, .1); -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 9px, #000 10px) 0 0 / 32px 32px; mask: radial-gradient(circle at 50% 50%, transparent 0 9px, #000 10px) 0 0 / 32px 32px; }
.promo-card .eyebrow { color: var(--ink); }
.promo-card h3 { font-size: clamp(30px, 3.4vw, 46px); }
.promo-card p { font-weight: 500; max-width: 38ch; color: rgba(10, 31, 28, .78); }
.promo-card .btn { align-self: flex-start; }
.promo-card--dark { background: var(--ink); color: #fff; }
.promo-card--dark .eyebrow { color: var(--lime); }
.promo-card--dark p { color: rgba(255, 255, 255, .72); }
.cfoot { margin-top: 44px; display: grid; justify-items: center; gap: 14px; }
.cfoot p { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.cfoot p b { color: var(--ink); }
.cprog { width: 240px; height: 5px; border-radius: 5px; background: var(--cream-2); overflow: hidden; }
.cprog i { display: block; height: 100%; width: var(--w, 0); background: var(--ink); border-radius: 5px; transition: width .6s var(--ease); }
.cempty { display: none; text-align: center; padding: 72px 20px; border: 1.5px dashed var(--line); border-radius: var(--r-l); }
.cempty h3 { font: 800 28px var(--f-display); font-stretch: 112%; text-transform: uppercase; letter-spacing: -.02em; margin: 14px 0 6px; }
.cempty p { color: var(--muted); max-width: 40ch; margin: 0 auto 20px; }
.cempty .i { width: 44px; height: 44px; margin: auto; color: var(--ink-3); }

/* ---------- guide + cross-sell ---------- */
.guide { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.guide__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gcard { padding: 24px; border-radius: var(--r-l); background: var(--paper); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; transition: transform .4s var(--ease), box-shadow .4s; }
.gcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); }
.gcard__fig { height: 96px; border-radius: var(--r-m); background: var(--cream); display: grid; place-items: center; overflow: hidden; }
.gcard__fig svg { height: 78%; }
.gcard h3 { font: 800 19px var(--f-display); font-stretch: 112%; letter-spacing: -.02em; }
.gcard ul { display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.gcard li b { color: var(--ink); }
.xsell { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.xsell .tile { min-height: 220px; }

/* ---------- filter drawer (mobile) ---------- */
@media (max-width: 1100px) {
  .clayout { grid-template-columns: minmax(0, 1fr); }
  .fbtn { display: inline-flex; }
  .hide-filters { display: none; }
  .filters {
    position: fixed; z-index: 100; top: 0; bottom: 0; left: 0; width: min(420px, 100%); max-height: none;
    padding: 0; background: var(--cream); display: none; flex-direction: column; overflow: hidden;
    transform: translateX(-105%); transition: transform .55s var(--ease); box-shadow: 30px 0 80px -20px rgba(10, 31, 28, .4);
  }
  .filters.is-mounted { display: flex; }
  .filters.is-on { transform: none; }
  .filters__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
  .filters__head h3 { font: 800 20px var(--f-display); font-stretch: 112%; text-transform: uppercase; letter-spacing: -.01em; }
  .filters__scroll { flex: 1; overflow-y: auto; padding: 0 22px; }
  .filters__foot { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 16px 22px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
  .filters .help-card { display: none; }
  .filters__foot { grid-template-columns: auto minmax(0, 1fr); }
  .filters__foot .btn { padding: 0 18px; font-size: 12.5px; }
  .guide { grid-template-columns: 1fr; }
  .xsell { grid-template-columns: repeat(2, 1fr); }
}
.filters__scroll { display: contents; }
@media (max-width: 1100px) { .filters__scroll { display: block; } }

@media (max-width: 900px) {
  .cbanner { grid-template-columns: 1fr; min-height: 0; }
  .cbanner__img { inset: 0; }
  .cbanner::before { background: linear-gradient(0deg, var(--ink) 40%, rgba(10, 31, 28, .55) 75%, rgba(10, 31, 28, .2)); }
  .cbanner__body { padding-top: 150px; }
  .cbanner__badges { display: none; }
  .promo-card { grid-column: 1 / -1; min-height: 280px; }
  .guide__cards { grid-template-columns: 1fr; }
  .gcard { grid-template-columns: 110px 1fr; grid-template-rows: auto 1fr; column-gap: 18px; }
  .gcard__fig { grid-row: span 2; height: 100%; min-height: 110px; }
}
@media (max-width: 760px) {
  .cgrid { --cols: 2 !important; gap: 20px 10px; }
  .density, .count--lg, .sort span { display: none; }
  .ctoolbar { border-radius: 22px; padding: 8px; }
  .ctoolbar-wrap { margin-top: 16px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .ctoolbar__l { flex: 1; }
  .fbtn { flex: 1; justify-content: center; }
  .sort select { padding-left: 14px; padding-right: 34px; background-position: right 12px center; max-width: 150px; }
  .ctoolbar__l .count { display: none; }
  .cbanner h1 { font-size: clamp(40px, 12vw, 60px); }
  .cgrid .card__title { font-size: 14.5px; }
  .cgrid .card__foot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cgrid .stock-pill { display: none; }
  .xsell { gap: 10px; }
  .xsell .tile { min-height: 190px; }
}
