/* KAWEN — shop and object pages.
 *
 * The old objects page led with a paragraph explaining that nothing was for
 * sale, then a four-cell technical readout, then a three-step essay about
 * what would turn the page into a shop. The customer had to read to find out
 * they could not buy anything.
 *
 * Now: objects first, at full size. The status is a chip. The readout is four
 * values with four labels. The essay is gone — what it described is visible
 * in the values themselves.
 */

/* ------------------------------------------------------------- readout -- */
.readout{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1px;background:var(--line);border:1px solid var(--line);
  border-radius:var(--r-md);overflow:hidden}
.readout>div{background:var(--bone);padding:16px 18px 18px}
.readout dt{font-family:var(--mono);font-size:11px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);margin-bottom:7px}
.readout dd{font-size:19px;font-weight:600;letter-spacing:-.02em;
  display:flex;align-items:center;gap:8px}
.readout .dot{width:8px;height:8px;border-radius:50%;background:var(--muted);
  flex:none;transition:background .3s}
.readout[data-state="ok"] .dot{background:var(--spray-lime)}
.readout[data-state="down"] .dot{background:var(--spray-orange)}

/* The family list the store returns, styled to match what js/objects.js
   actually emits (.fam / .fam-i / .fam-id / .fam-desc / .fam-spec).
   One compact row per family: index, name, and the three live values. The
   description is suppressed — the object cards above already carry that
   line, and repeating it is the wordiness this pass exists to remove. */
.families{list-style:none;margin-top:22px;display:grid;gap:1px;
  background:var(--line);border:1px solid var(--line);border-radius:var(--r-md);
  overflow:hidden}
.families .fam{background:var(--paper);display:flex;align-items:center;
  gap:8px 18px;padding:14px 18px;font-size:15px;flex-wrap:wrap}
.families .fam-i{font-family:var(--mono);font-size:12px;color:var(--muted);
  min-width:2.2em;flex:none}
.families .fam-id{display:flex;align-items:baseline;gap:9px;min-width:0}
.families .fam-id h3{font-size:16px;font-weight:600;letter-spacing:-.01em}
.families .fam-ar{font-family:var(--kufi);font-size:14px;color:var(--muted)}
.families .fam-desc{display:none}
.families .fam-spec{display:flex;align-items:center;gap:20px;
  margin-inline-start:auto;font-size:13.5px}
.families .fam-spec>div{display:flex;align-items:baseline;gap:7px}
.families .fam-spec dt{font-family:var(--mono);font-size:10.5px;
  letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.families .fam-spec dd{font-weight:600}
.families .fam-spec dd.is-pending{color:var(--muted);font-weight:500}
.families .fam-spec dd.is-live{color:#0E6B41}
.families-state{margin-top:14px;font-size:14px;color:var(--muted)}
@media (max-width:820px){
  .families .fam-spec{margin-inline-start:0;width:100%;gap:16px;
    padding-top:4px;flex-wrap:wrap}
}

/* -------------------------------------------------------- object page --- */
.obj{display:grid;gap:clamp(26px,4vw,60px);
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);align-items:start}

/* Gallery: the finished-state plate is the hero; the technical drawing is a
   second frame you can switch to. The drawing is brand storytelling, so it
   sits behind the object rather than competing with it. */
.gal{position:relative}
.gal-main{position:relative;border-radius:var(--r-lg);overflow:hidden;
  background:var(--ink);aspect-ratio:4/5;
  box-shadow:0 30px 70px -34px rgba(9,10,12,.36)}
.gal-main img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;
  opacity:0;transition:opacity .4s var(--ease)}
.gal-main img.on{opacity:1}
.gal-wash{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:.45;
  mix-blend-mode:screen}
.gal-thumbs{display:flex;gap:10px;margin-top:12px}
.gal-thumb{width:74px;aspect-ratio:4/5;border-radius:var(--r-sm);overflow:hidden;
  background:var(--ink);border:2px solid transparent;cursor:pointer;padding:0;
  transition:border-color .2s}
.gal-thumb[aria-selected="true"]{border-color:var(--ink)}
.gal-thumb img{width:100%;height:100%;object-fit:cover}

.obj-side h1{font-size:clamp(34px,4vw,54px);margin:12px 0 8px}
.obj-side .lede{margin-bottom:22px}

/* Options. Shown as real controls so the object reads as a product, and
   disabled with one honest line rather than hidden — a customer should be
   able to see what will be choosable. */
.opts{display:grid;gap:16px;margin-bottom:22px}
.opt>span{display:block;font-family:var(--mono);font-size:11px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--muted);
  margin-bottom:8px}
.swatches{display:flex;flex-wrap:wrap;gap:8px}
.sw{height:38px;min-width:38px;padding-inline:14px;border-radius:999px;
  border:1px solid var(--line);background:var(--paper);font-size:14px;
  font-weight:500;display:inline-flex;align-items:center;gap:8px;
  cursor:not-allowed;opacity:.62}
.sw i{width:14px;height:14px;border-radius:50%;display:block;
  border:1px solid rgba(9,10,12,.12)}

.price-row{display:flex;align-items:baseline;gap:12px;
  padding-block:18px;border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);margin-bottom:20px}
.price-row .val{font-size:26px;font-weight:700;letter-spacing:-.03em}
.price-row .val.none{color:var(--muted);font-size:19px;font-weight:600}

/* Detail rows below the action. Everything technical lives here, under the
   fold, where it belongs — never above the thing the customer came to do. */
.details{margin-top:clamp(30px,4vw,54px);display:grid;gap:1px;
  background:var(--line);border:1px solid var(--line);border-radius:var(--r-md);
  overflow:hidden}
.details div{background:var(--paper);display:flex;gap:16px;padding:14px 18px;
  font-size:15px}
.details dt{font-weight:600;min-width:9em;flex:none}
.details dd{color:var(--muted)}

@media (max-width:1080px){
  .readout{grid-template-columns:repeat(2,minmax(0,1fr))}
  .obj{grid-template-columns:1fr;gap:28px}
  .gal-main{aspect-ratio:1/1}
}
@media (max-width:620px){
  .readout{grid-template-columns:1fr}
  .families li{flex-wrap:wrap;gap:8px 14px}
  .families li .st{margin-inline-start:0;width:100%}
  .details div{flex-direction:column;gap:4px}
  .details dt{min-width:0}
}

/* ----------------------------------------------------------- quick view -- */
.qv{border:0;padding:0;border-radius:var(--r-lg);overflow:hidden;background:var(--paper);
  width:min(920px,calc(100vw - 32px));max-height:calc(100dvh - 32px);
  box-shadow:0 40px 90px -30px rgba(9,10,12,.45);
  display:none;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.qv[open]{display:grid;animation:qv-in .28s var(--ease)}
.qv::backdrop{background:rgba(9,10,12,.42);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
@keyframes qv-in{from{opacity:0;transform:translateY(14px) scale(.985)}}
.qv-close{position:absolute;right:12px;top:12px;z-index:3;width:38px;height:38px;border-radius:50%;
  border:0;background:rgba(255,255,255,.9);display:grid;place-items:center;cursor:pointer;
  transition:transform .2s var(--ease),background .2s}
.qv-close:hover{background:var(--paper)}
.qv-close:active{transform:scale(.94)}
.qv-close svg{width:16px;height:16px;fill:none;stroke:var(--ink);stroke-width:1.8;stroke-linecap:round}
.qv-shot{position:relative;background:var(--ink);aspect-ratio:4/5;min-height:0}
.qv-shot img{width:100%;height:100%;object-fit:cover;display:block}
.qv-wash{position:absolute;inset:0;pointer-events:none;opacity:.5;mix-blend-mode:screen}
.qv-side{padding:clamp(22px,3vw,40px);display:grid;gap:14px;align-content:center;overflow:auto}
.qv-side h2{font-size:clamp(28px,3vw,44px)}
.qv-vals{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:13.5px;color:var(--muted);
  padding-block:12px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.qv-vals b{color:var(--ink);font-weight:600;margin-inline-start:6px}
@media (max-width:760px){
  /* A bottom sheet. The picture takes a fixed share of the screen and the
     text sits directly under it — an over-tall grid row was leaving a dead
     band between the two at 390px. */
  .qv{width:100vw;max-width:100vw;max-height:100dvh;height:auto;margin:auto 0 0;border-radius:var(--r-lg) var(--r-lg) 0 0;
    grid-template-columns:1fr;grid-template-rows:auto auto;overflow-y:auto}
  .qv-shot{aspect-ratio:auto;height:min(44dvh,380px)}
  .qv-side{padding:18px var(--pad) calc(18px + env(safe-area-inset-bottom));align-content:start;gap:12px;overflow:visible}
  .qv-side h2{font-size:26px}
  .qv .cta-row .btn{flex:1 1 100%}
}
@media (prefers-reduced-motion:reduce){.qv[open]{animation:none}}
