/* The catalogue page (/catalog/, static/catalog.js). Builds on createak.css (tokens --ck-*, .ck-btn, .ck-stock).
   Photo-first cards on sand, the options of a product as a strip of their own photos, filters as plain lists,
   drawers for choosing options and for the wishlist. */
.createak-catalogue .ck-main { background: #fff; }
.ck-cat { max-width: 1320px; margin: 0 auto; padding: 28px 24px 64px; font-family: var(--ck-font); color: var(--ck-ink); }
.ck-cat-head { max-width: 62ch; margin-bottom: 20px; }
.ck-cat-head p { color: var(--ck-muted); line-height: 1.6; margin: 0; }

/* bar: search, sort, filters (phone) */
.ck-cat-bar { display: flex; gap: 12px; align-items: center; position: sticky; top: 0; z-index: 20; background: #fff; padding: 12px 0; }
.ck-cat-search { flex: 1; display: flex; align-items: center; gap: 10px; border: 1px solid var(--ck-line); border-radius: 999px; padding: 0 18px; color: var(--ck-muted); background: #fff; }
.ck-cat-search:focus-within { border-color: var(--ck-gold); color: var(--ck-gold); box-shadow: 0 0 0 3px rgba(184, 142, 47, .15); }
.ck-cat-search input { flex: 1; border: 0 !important; outline: 0; padding: 12px 0 !important; font: 500 16px var(--ck-font); color: var(--ck-ink); background: transparent; box-shadow: none !important; min-width: 0; }
.ck-cat-sort select { border: 1px solid var(--ck-line); border-radius: 999px; padding: 11px 36px 11px 16px; font: 14px var(--ck-font); color: var(--ck-ink); background: #fff; appearance: auto; }
.ck-cat-filters-btn { display: none; border: 1px solid var(--ck-ink); background: #fff; border-radius: 999px; padding: 10px 16px; font: 500 14px var(--ck-font); cursor: pointer; }
.ck-badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--ck-gold); color: #fff; font-size: 12px; margin-left: 4px; }

/* quick filters: the two questions people ask first, and inside or out */
.ck-cat-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.ck-toggle { border: 1px solid var(--ck-line); background: #fff; border-radius: 999px; padding: 8px 16px; font: 500 14px var(--ck-font); color: var(--ck-ink); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.ck-toggle::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ck-green); }
.ck-toggle[data-toggle="showroom"]::before { background: var(--ck-gold); }
.ck-toggle[data-count]:not([data-count=""])::after { content: attr(data-count); color: var(--ck-muted); font-weight: 400; }
.ck-toggle[aria-pressed="true"] { border-color: var(--ck-ink); background: var(--ck-ink); color: #fff; }
.ck-toggle[aria-pressed="true"]::after { color: rgba(255, 255, 255, .7); }
.ck-seg { display: inline-flex; border: 1px solid var(--ck-line); border-radius: 999px; padding: 3px; margin-left: auto; }
.ck-seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font: 500 14px var(--ck-font); color: var(--ck-muted); cursor: pointer; }
.ck-seg button[aria-pressed="true"] { background: var(--ck-sand); color: var(--ck-ink); }
.ck-cat-current { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 0; margin-bottom: 8px; }
.ck-cat-current:empty { display: none; }

.ck-chip { border: 1px solid var(--ck-line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 13px var(--ck-font); color: var(--ck-ink); cursor: pointer; }
.ck-chip.is-on { border-color: var(--ck-gold); background: #fbf6ea; color: var(--ck-gold-dark); }

/* body: rail + results */
.ck-cat-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.ck-cat-rail { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; }
.ck-rail-head, .ck-rail-foot { display: none; }
.ck-facet { padding: 16px 0; border-bottom: 1px solid var(--ck-line); }
.ck-facet:first-of-type { padding-top: 0; }
.ck-facet h2 { font: 600 14px var(--ck-font); margin: 0 0 10px; letter-spacing: 0; text-transform: none; }
.ck-tree ul { list-style: none; margin: 0; padding: 0; }
.ck-tree-item { display: flex; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 5px 0 5px calc(var(--d, 0) * 14px); font: 14px/1.35 var(--ck-font); color: var(--ck-ink); cursor: pointer; }
.ck-tree-item:hover span:first-child { color: var(--ck-gold); }
.ck-tree-item.is-on span:first-child { font-weight: 600; color: var(--ck-gold-dark); }
.ck-tree details { margin: 0; } .ck-tree summary { padding: 4px 0; font-size: 14px; }
.ck-n { color: var(--ck-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ck-price-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ck-facet-list { display: flex; flex-direction: column; gap: 2px; }
.ck-check { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; border: 0; background: none; padding: 5px 0; text-align: left; font: 14px var(--ck-font); color: var(--ck-ink); cursor: pointer; }
.ck-box { width: 16px; height: 16px; border: 1.5px solid #b8b0a4; border-radius: 4px; }
.ck-check.is-on .ck-box { background: var(--ck-gold); border-color: var(--ck-gold); box-shadow: inset 0 0 0 3px #fff; }
.ck-sw { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.ck-check.is-on .ck-sw { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ck-gold); }
.ck-check.is-on span:nth-child(2) { font-weight: 600; }
.ck-showmore { font-size: 13px; margin-top: 6px; align-self: flex-start; }

.ck-cat-stats { color: var(--ck-muted); font-size: 14px; margin: 0 0 14px; }
.ck-cat-hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 46%), 1fr)); gap: 36px 22px; }

/* product card */
.ck-pc { position: relative; display: flex; flex-direction: column; min-width: 0; }
.ck-pc-img { display: block; aspect-ratio: 1; background: var(--ck-sand); border-radius: 6px; overflow: hidden; }
.ck-pc-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ck-pc-tag { position: absolute; left: 10px; top: 10px; background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; }
.ck-pc-heart { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; cursor: pointer; color: var(--ck-ink); }
.ck-pc-heart svg { fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .15s; }
.ck-pc-heart:hover svg { transform: scale(1.1); }
.ck-pc-heart[aria-pressed="true"] { color: var(--ck-gold); }
.ck-pc-heart[aria-pressed="true"] svg { fill: var(--ck-gold); }
/* the options strip: every option's own photo */
.ck-pc-strip { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ck-pc-sw { width: 40px; height: 40px; padding: 0; border: 1px solid var(--ck-line); border-radius: 6px; background: var(--ck-sand); cursor: pointer; overflow: hidden; display: grid; place-items: center; font: 12px var(--ck-font); color: var(--ck-muted); }
.ck-pc-sw img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.ck-pc-sw:hover, .ck-pc-sw.is-on { border-color: var(--ck-gold); box-shadow: 0 0 0 1px var(--ck-gold); }
.ck-pc-more { font-weight: 600; color: var(--ck-ink); background: #fff; }
.ck-pc-name { font: 500 15px/1.35 var(--ck-font); margin: 10px 0 4px; letter-spacing: 0; text-transform: none; }
.ck-pc-name a { color: var(--ck-ink); text-decoration: none; }
.ck-pc-name a:hover { color: var(--ck-gold); }
.ck-pc-name em, .ck-pc-name mark { font-style: normal; background: none; color: var(--ck-gold-dark); }
.ck-pc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; font-size: 14px; }
.ck-pc-price { color: var(--ck-gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.ck-pc-optname { flex-basis: 100%; color: var(--ck-muted); font-size: 13px; }
.ck-pc-opts { font-size: 13px; margin-top: 6px; align-self: flex-start; }
.ck-empty { grid-column: 1 / -1; background: var(--ck-sand); border-radius: 8px; padding: 28px; max-width: 60ch; line-height: 1.6; }
.ck-empty a { color: var(--ck-gold); }
.ck-cat-more[hidden] { display: none; }

/* quick view (the shared drawer, wishlist panel and toast styles are in createak.css) */
.ck-quick-img { aspect-ratio: 4 / 3; background: var(--ck-sand); border-radius: 8px; overflow: hidden; margin: 24px 0 18px; }
.ck-quick-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ck-quick-name { font: 600 22px/1.25 var(--ck-font); margin: 0 0 6px; text-transform: none; letter-spacing: 0; }
.ck-quick-price { font-size: 18px; color: var(--ck-gold); font-weight: 600; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.ck-quick-price .ck-stock { font-size: 14px; }
.ck-opts { border: 0; padding: 0; margin: 0 0 18px; }
.ck-opts legend { font: 600 14px var(--ck-font); margin-bottom: 8px; }
.ck-opt { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--ck-line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.ck-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ck-opt.is-on { border-color: var(--ck-gold); box-shadow: 0 0 0 1px var(--ck-gold); background: #fffdf8; }
.ck-opt:focus-within { outline: 2px solid var(--ck-gold); outline-offset: 2px; }
.ck-opt img, .ck-opt-noimg { width: 56px; height: 56px; object-fit: contain; background: var(--ck-sand); border-radius: 6px; mix-blend-mode: multiply; display: block; }
.ck-opt-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.ck-opt-text span { color: var(--ck-muted); font-size: 13px; }
.ck-opt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ck-gold); }
.ck-opt-side .ck-stock { font-weight: 500; font-size: 12px; }
.ck-includes { background: var(--ck-sand); border-radius: 8px; padding: 14px 16px; margin: 0 0 16px; }
.ck-includes h3 { font: 600 14px var(--ck-font); margin: 0 0 6px; text-transform: none; letter-spacing: 0; }
.ck-includes ul { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.7; }
.ck-q { color: var(--ck-muted); font-variant-numeric: tabular-nums; }
.ck-quick-spec, .ck-quick-desc { font-size: 14px; line-height: 1.6; color: #4a4643; }
.ck-quick-actions { display: flex; gap: 12px; align-items: center; margin: 18px 0 10px; position: sticky; bottom: -28px; background: #fff; padding: 12px 0; }
.ck-quick-actions .ck-btn { flex: 1; text-align: center; padding: 13px 20px; }
.ck-quick-note { font-size: 14px; color: var(--ck-muted); }

/* the menu heart */
.ck-nav-wish .ck-wish-link { position: relative; display: inline-flex; align-items: center; padding-top: 6px; }
.ck-wish-count { position: absolute; top: 0; right: -8px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ck-gold); color: #fff; font: 600 11px/18px var(--ck-font); text-align: center; padding: 0 4px; }

@media (max-width: 900px) {
  .ck-cat { padding: 16px 16px 96px; }
  .ck-cat-body { grid-template-columns: 1fr; }
  .ck-cat-filters-btn { display: inline-block; }
  .ck-cat-sort { display: none; }
  .ck-seg { margin-left: 0; }
  /* filters as a bottom sheet */
  .ck-cat-rail { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; top: auto; max-height: 86vh; background: #fff; border-radius: 16px 16px 0 0;
    padding: 0 20px; transform: translateY(105%); transition: transform .22s ease; box-shadow: 0 -10px 40px rgba(33, 31, 31, .25); }
  .ck-cat-rail.is-open { transform: none; }
  .ck-rail-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; padding: 16px 0; z-index: 1; }
  .ck-rail-close { border: 0; background: none; color: var(--ck-gold); font: 500 15px var(--ck-font); }
  .ck-rail-foot { display: block; position: sticky; bottom: 0; background: #fff; padding: 12px 0 16px; }
  .ck-rail-apply { width: 100%; padding: 14px; }
  .ck-cat-hits { gap: 28px 14px; }
  .ck-pc-sw { width: 34px; height: 34px; }
  .ck-pc-strip .ck-pc-sw:nth-child(n+5):not(.ck-pc-more) { display: none; }
  .ck-drawer-panel { width: 100%; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ck-drawer, .ck-drawer-panel, .ck-cat-rail { transition: none; }
}
.ck-cat-filters-btn, .ck-toggle, .ck-seg button, .ck-chip, .ck-check, .ck-tree-item { color: var(--ck-ink) !important; }
.ck-toggle[aria-pressed="true"] { color: #fff !important; }
.ck-chip.is-on { color: var(--ck-gold-dark) !important; }
.ck-seg button[aria-pressed="false"] { color: var(--ck-muted) !important; }

/* the WordPress theme pads every <button> (13px 15px): controls with a fixed size here center their content instead */
.ck-qty button, .ck-drawer-close, .ck-pc-heart, .ck-pc-sw {
  padding: 0; min-width: 0; line-height: 1; display: grid; place-items: center; box-sizing: border-box;
}
.ck-qty button { font: 500 18px/1 var(--ck-font); color: var(--ck-ink); }
.ck-qty--sm button { font-size: 16px; }
.ck-qty output { line-height: 1; font-size: 15px; }
.ck-drawer-close svg { display: block; }
.ck-drawer h2[tabindex="-1"]:focus { outline: none; }
.ck-pc-img img, .ck-pc-sw img { object-fit: cover; mix-blend-mode: normal; }
