/* =================================================================
   CUT CATALOGUE — the mayura/cut-catalogue block (MAYURAWEB-227)
   Markup: inc/cut-catalogue.php. Enqueued only on a page carrying the
   block (mayura_cut_catalogue_assets()), after mayura-main.

   ROWS, NOT CARDS. 38 entries, 6 photographed until the November shoot:
   each cut is a hairline-separated spec row (title, then a key/value
   ledger), and a photograph — when there is one — is a fixed square in
   a second column on the RIGHT. A cut without one gets no slot and no
   empty box; its text runs the full width. The title is always the
   first thing in the text column, so a photo never moves a title down
   (the MAYURAWEB-181 failure, which was a picture ABOVE the title).

   WHY EVERY SELECTOR IS `.cutcat .x`. On a default-template page the
   block sits inside page.php's `.tpl-prose`, whose inline <style> prints
   AFTER this sheet and styles bare `ul`, `li`, `img`, `h3` at (0,1,1):
   disc bullets, a left margin, a 68ch cap, an image border and margin.
   (0,2,0) beats them on specificity instead of racing them on order.
   The tag-independent type (font, size, case) is set on the CLASSES, so
   the block's headingLevel setting cannot restyle anything.

   Tokens only, zero raw hex. Responsive at 1440 / 1024 / 768 / 375.
   ================================================================= */

.cutcat{
  /* The photograph's square box. Mirrored by MAYURA_CUTCAT_THUMB(_SM) /
     MAYURA_CUTCAT_BREAK in inc/cut-catalogue.php, which write `sizes`
     from it. Change both. */
  --cutcat-thumb:128px;
}

/* ---- Family index (jump links) ---- */
.cutcat .cutcat__index ul{
  display:flex;flex-wrap:wrap;gap:8px;
  list-style:none;margin:0;padding:0;max-width:none;
}
.cutcat .cutcat__index li{margin:0;padding:0}
.cutcat .cutcat__index a{text-decoration:none;color:var(--text)}
.cutcat .cutcat__index a:hover{color:var(--gold)}
/* Never one pill alone on a row. The five families need 702px in one row
   at .badge's 16px padding and the ul is 699px at 768, so "Trimmings &
   Offal" wrapped alone from 899 down (measured 7 Oct 2026). 14px brings the
   row to 683px, which holds from 768 up. Below 768 five pills cannot share
   a row, so they go to a six-track grid as equal cells: 3 + 2, and 2 + 2 +
   a full-width fifth once three cells no longer hold "Loin Products" (from
   ~485px; 520 leaves room for font drift). Gated on exactly five items so
   a sixth family falls back to plain wrapping rather than a wrong pattern. */
@media (max-width:899.98px){
  .cutcat .cutcat__index a{padding-left:14px;padding-right:14px}
}
@media (max-width:767.98px){
  .cutcat .cutcat__index ul:has(> li:nth-child(5):last-child){
    display:grid;grid-template-columns:repeat(6,minmax(0,1fr));
  }
  .cutcat .cutcat__index ul:has(> li:nth-child(5):last-child) > li{grid-column:span 2}
  .cutcat .cutcat__index ul:has(> li:nth-child(5):last-child) > li:nth-child(n+4){grid-column:span 3}
  .cutcat .cutcat__index ul:has(> li:nth-child(5):last-child) a{display:block;text-align:center}
}
@media (max-width:519.98px){
  .cutcat .cutcat__index ul:has(> li:nth-child(5):last-child) > li{grid-column:span 3}
  .cutcat .cutcat__index ul:has(> li:nth-child(5):last-child) > li:last-child{grid-column:1 / -1}
  /* At 320 a 136px cell left "Loin Products" 104px and it broke onto two
     lines; the text is centred in the cell, so the padding is only a floor. */
  .cutcat .cutcat__index ul:has(> li:nth-child(5):last-child) a{padding-left:8px;padding-right:8px}
}

/* ---- Family ---- */
.cutcat .cutcat__family{margin-top:var(--s6)}
.cutcat .cutcat__family-title{
  display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;
  gap:var(--s1) var(--s3);
  margin:0;padding-bottom:var(--s2);border-bottom:1px solid var(--gold);
  font-family:var(--cinzel);font-weight:500;color:var(--text);
  font-size:clamp(20px,1.8vw,26px);line-height:1.25;
  letter-spacing:.05em;text-transform:uppercase;
}
.cutcat .cutcat__count{
  font-family:var(--mulish);font-size:10px;font-weight:600;
  letter-spacing:.3em;text-transform:uppercase;color:var(--mute);
  font-variant-numeric:tabular-nums;white-space:nowrap;
}

/* ---- Cut row ---- */
.cutcat .cutcat__list{list-style:none;margin:0;padding:0;max-width:none}
.cutcat .cutcat__cut{
  display:grid;grid-template-columns:minmax(0,1fr);
  gap:var(--s3);align-items:start;
  margin:0;padding:var(--s3) 0;border-bottom:1px solid var(--rule);
}
.cutcat .cutcat__cut--photo{grid-template-columns:minmax(0,1fr) var(--cutcat-thumb)}
.cutcat .cutcat__name{
  margin:0 0 var(--s2);
  font-family:var(--cinzel);font-weight:500;color:var(--text);
  font-size:clamp(18px,1.5vw,21px);line-height:1.25;
  letter-spacing:.02em;text-transform:none;overflow-wrap:anywhere;
}
/* Second trade name under the cut name ("Chuck Tail Flap" under
   "Zabuton", MAYURAWEB-252): secondary to the name, never a second title.
   Roboto, the body/caption face (MASTER), in the muted 14.5px of
   .dist-card__place; Mulish is reserved for labels and data keys. The name's
   bottom margin moves onto this line when it is present. */
.cutcat .cutcat__name:has(+ .cutcat__aka){margin-bottom:2px}
.cutcat .cutcat__aka{
  margin:0 0 var(--s2);max-width:none;
  font-family:var(--roboto);font-weight:300;font-size:14.5px;line-height:1.5;
  color:var(--mute);
}

/* Key/value ledger: `.k` key (base.css, muted — a repeated data key, not
   an editorial label, so it stays muted) left, value right. */
.cutcat .cutcat__specs{display:grid;gap:10px;margin:0}
.cutcat .cutcat__row{
  display:grid;grid-template-columns:8.5rem minmax(0,1fr);
  gap:var(--s2);align-items:baseline;
}
.cutcat .cutcat__row .k{margin:0}
.cutcat .cutcat__row dd{margin:0;min-width:0}
/* Cinzel first, Roboto second: Cinzel has no ≈ (U+2248), which
   mayura_format prints before every weight — same stack as .ledger__val. */
.cutcat .cutcat__format{
  font-family:"Cinzel",var(--roboto);font-weight:500;color:var(--gold);
  font-variant-numeric:tabular-nums lining-nums;font-size:15px;line-height:1.4;
}
.cutcat .cutcat__use{color:var(--text);font-weight:300;font-size:14.5px;line-height:1.6}

/* Label series — composes .badge / .badge--gold, compacted. Not a link,
   so .badge's hover border is neutralised: no false affordance. */
.cutcat .cutcat__labels{
  display:flex;flex-wrap:wrap;gap:6px;
  list-style:none;margin:0;padding:0;max-width:none;
}
.cutcat .cutcat__label{margin:0;padding:5px 10px;font-size:10px;letter-spacing:.14em;line-height:1.2}
.cutcat .cutcat__label:hover{border-color:var(--rule)}

/* Photograph: a square, cropped by object-fit:cover (never stretched).
   Portrait and landscape sources both fill it; `sizes` is written per
   image from its aspect (mayura_cutcat_sizes()). */
.cutcat .cutcat__photo{
  width:var(--cutcat-thumb);aspect-ratio:1/1;overflow:hidden;
  border:1px solid var(--rule);background:var(--ink-2);
}
.cutcat .cutcat__photo img{
  display:block;width:100%;height:100%;object-fit:cover;
  margin:0;border:0;filter:saturate(1) contrast(1.02);
}

/* ---- Trimmings & offal: the secondary closing group, outside the 33 ---- */
.cutcat .cutcat__family--secondary .cutcat__family-title{
  font-size:clamp(16px,1.3vw,19px);border-bottom-color:var(--rule);
}
.cutcat .cutcat__lines{
  list-style:none;margin:var(--s3) 0 0;padding:0;max-width:none;
  column-width:14rem;column-gap:var(--s4);
}
.cutcat .cutcat__lines li{
  margin:0 0 var(--s1);padding:0;break-inside:avoid;
  font-weight:300;font-size:14.5px;line-height:1.6;color:var(--text);
}
.cutcat .cutcat__line-format{color:var(--mute)}

/* ---- Phone ---- */
@media (max-width:600px){
  .cutcat{--cutcat-thumb:88px}
  .cutcat .cutcat__cut{gap:var(--s2)}
  /* Key above value: a 8.5rem key column leaves a photographed row's value
     ~80px wide at 375. */
  .cutcat .cutcat__row{grid-template-columns:minmax(0,1fr);gap:4px}
  .cutcat .cutcat__family{margin-top:var(--s5)}
}
