/* SiAna .com — scale pass (t40u): smaller imagery relative to text and a calmer Inter type scale.
   Loaded last (after features.css). Kiln skin only; ?kiln=off never loads this file. */

/* ---------- 1 · Type scale (single Inter scale, toned down) ---------- */
:root, html body.kiln {
  --k-step-2: clamp(1.125rem, 1.07rem + .25vw, 1.3125rem);  /* 18–21  h3 */
  --k-step-3: clamp(1.375rem, 1.2rem + .55vw, 1.75rem);     /* 22–28  h2 / section */
  --k-step-4: clamp(1.5rem, 1.3rem + .8vw, 2rem);           /* 24–32  page titles */
  --k-step-5: clamp(1.875rem, 1.6rem + 1.2vw, 2.75rem);     /* 30–44  display (home hero) */
  --k-step-ptitle: clamp(1.375rem, 1.15rem + .65vw, 1.75rem); /* 22–28  product title */
}
html body.kiln .siana-shop h1.shop-head, html body.kiln .siana-news h1 { font-size: var(--k-step-4) !important; letter-spacing: -0.03em !important; line-height: 1.08 !important; }
html body.kiln .kiln-how-copy h2 { font-size: var(--k-step-3) !important; letter-spacing: -0.025em !important; }
html body.kiln .kiln-sec-head h2, html body.kiln .related > h2, html body.kiln .up-sells > h2 { font-size: var(--k-step-3) !important; }
html body.kiln div.product .product_title { font-size: var(--k-step-ptitle) !important; letter-spacing: -0.026em !important; line-height: 1.12 !important; }
html body.kiln .kiln-qv-title { font-size: clamp(20px, 1.2rem + .4vw, 24px) !important; }
html body.kiln .kiln-search-form input[type="search"] { font-size: clamp(18px, 1rem + .5vw, 22px) !important; }

/* ---------- 2 · Home hero: copy and media share the row; media capped ---------- */
@media (min-width: 900px) {
  .kiln-hero-inner { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr) !important; }
  .kiln-hero-media { height: clamp(340px, 30vw, 440px) !important; max-width: 600px; justify-self: end; width: 100%; }
}
html body.kiln .kiln-hero--grid .kiln-hero-copy { max-width: 560px; }
html body.kiln .kiln-hero--grid .kiln-hero-copy h1 { margin-bottom: 20px !important; }
html body.kiln .kiln-hero--grid .kiln-deck { font-size: 16.5px !important; margin-bottom: 28px !important; }

/* ---------- 3 · Product tiles: square crops, 4 across the catalogue at desktop ---------- */
html body.kiln ul.products li.product .kiln-tile { aspect-ratio: 1 / 1 !important; }
html body.kiln.kiln-pol ul.products li.product .kiln-tile-alt, html body.kiln ul.products li.product .kiln-tile-alt { aspect-ratio: 1 / 1 !important; }
html body.kiln ul.products li.product .kiln-tile img { object-fit: contain !important; }
@media (min-width: 1100px) {
  html body.kiln .woocommerce.columns-3 > ul.products.columns-3 { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 36px 20px !important; }
  html body.kiln .woocommerce.columns-3 > ul.products.columns-3 li.product { width: auto !important; margin: 0 !important; float: none !important; }
}
/* related carousel: five narrower cards per view instead of four */
@media (min-width: 1100px) {
  html body.kiln .related.products ul.products.kiln-car { grid-auto-columns: calc((100% - 4 * 20px) / 5) !important; gap: 20px !important; }
}
/* how-it-works 2×2 image pair: capped */
html body.kiln .kiln-media--pair { max-width: 460px; width: 100%; justify-self: center; align-self: center; }

/* ---------- 4 · Product page: gallery ≈42% (max 500px), info column gets the room ---------- */
@media (min-width: 900px) {
  html body.kiln div.product .woocommerce-product-gallery { width: min(42%, 500px) !important; }
  html body.kiln div.product .summary { width: calc(100% - min(42%, 500px) - 64px) !important; max-width: 620px; padding-top: 8px !important; }
}
@media (max-width: 899px) {
  html body.kiln div.product .woocommerce-product-gallery { width: min(74%, 290px) !important; margin: 0 auto 4px !important; }
}

/* ---------- 5 · Quick view: narrower dialog, smaller image column ---------- */
@media (min-width: 781px) {
  .kiln-qv { width: min(820px, calc(100vw - 48px)) !important; }
  .kiln-qv-body { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) !important; min-height: 380px !important; }
}
@media (max-width: 780px) {
  .kiln-qv-media { aspect-ratio: auto !important; background: transparent !important; display: flex; justify-content: center; padding: 12px 16px 0; border-bottom: 0 !important; }
  .kiln-qv-media img { position: static !important; width: min(46vw, 190px) !important; height: auto !important; aspect-ratio: 1 / 1; object-fit: cover !important; mix-blend-mode: normal !important; border-radius: var(--k-r); outline: 1px solid var(--k-line); outline-offset: -1px; }
}

/* ---------- 6 · Drawer suggestions: slimmer column, shorter images ---------- */
@media (min-width: 900px) {
  .kiln-drawer:has(.kiln-sugg) { width: min(740px, 100vw) !important; }
  .kiln-drawer-body:has(.kiln-sugg) { grid-template-columns: 196px minmax(0, 1fr) !important; }
  .kiln-drawer-body:has(.kiln-sugg) .kiln-sugg-img { aspect-ratio: 1 / 1 !important; }
}

/* ---------- 7 · Mobile: hero and product images capped so text shows above the fold ---------- */
@media (max-width: 899px) {
  .kiln-hero-media { order: -1; height: auto !important; max-width: none; justify-self: stretch; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-template-rows: auto !important; gap: 8px !important; }
  html body.kiln .kiln-hero .kiln-hm--lg { grid-row: auto !important; }
  html body.kiln .kiln-hero .kiln-hm { display: flex !important; flex-direction: column; }
  html body.kiln .kiln-hero .kiln-hm img { position: static !important; inset: auto !important; height: auto !important; aspect-ratio: 1 / 1 !important; flex: 0 0 auto; }
  html body.kiln .kiln-hero .kiln-hm-cap { position: static !important; background: var(--k-paper) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-top: 1px solid var(--k-line); padding: 7px 8px !important; flex: 1 1 auto; align-items: flex-start; }
  html body.kiln .kiln-hero .kiln-hm-name { white-space: normal !important; font-size: 11.5px !important; line-height: 1.3 !important; }
  .kiln-hero-inner { gap: 22px !important; padding-top: 14px !important; }
  html body.kiln .kiln-hero--grid .kiln-hero-copy h1 { font-size: clamp(28px, 7.7vw, 30px) !important; line-height: 1.06 !important; margin-bottom: 14px !important; }
  html body.kiln .kiln-hero--grid .kiln-deck { font-size: 15px !important; margin-bottom: 22px !important; }
  html body.kiln div.product .product_title { font-size: 22px !important; }
  html body.kiln .siana-shop h1.shop-head, html body.kiln .siana-news h1, html body.kiln h1 { font-size: clamp(26px, 7vw, 28px) !important; }
  html body.kiln .kiln-hero--grid .kiln-hero-copy h1 { font-size: clamp(28px, 7.7vw, 30px) !important; }
}

/* mobile section headings follow the same scale (older layers set 26px) */
@media (max-width: 899px) {
  html body.kiln .related.products .kiln-car-head > h2, html body.kiln .cross-sells > h2 { font-size: var(--k-step-3) !important; }
  html body.kiln .siana-news details.month > summary { font-size: 20px !important; }
}

/* ---------- 8 · Purity chip on tiles (t41u): Inter, tabular figures, hairline rectangle ---------- */
html body.kiln ul.products li.product .kiln-purity {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; margin: 0 0 12px; box-sizing: border-box;
  font: 500 11.5px/1 var(--k-font) !important; letter-spacing: 0 !important; font-variant-numeric: lining-nums tabular-nums;
  color: var(--k-moss); border: 1px solid var(--k-line-2); border-radius: var(--k-r-s); background: var(--k-paper); white-space: nowrap;
}
html body.kiln ul.products li.product .kiln-purity--none { visibility: hidden; border-color: transparent; background: none; }
html body.kiln ul.products li.product .kiln-purity + .button, html body.kiln ul.products li.product .kiln-purity ~ .button { margin-top: 0 !important; }
@media (max-width: 899px) { html body.kiln ul.products li.product .kiln-purity { height: 20px; font-size: 11px !important; margin-bottom: 10px; } }

/* ---------- 9 · Catalogue head spacing (t44u): tighter gaps around the shop title ----------
   Scoped to the catalogue page (EN /catalogue/, RO /ro/catalog/; /shop/ and category archives redirect there)
   via :has(.siana-shop), so no other page moves. Desktop ≈28px above / 12px to intro / 24px to filters; mobile ≈60%. */
html body.kiln .wp-site-blocks:has(.siana-shop) > header { margin-bottom: 0 !important; }
html body.kiln .wp-site-blocks > main:has(.siana-shop),
html body.kiln main:has(.siana-shop) > .entry-content { margin-top: 0 !important; }
html body.kiln main:has(.siana-shop) > .wp-block-group:empty { display: none !important; }
html body.kiln .siana-shop { padding-top: 28px !important; padding-bottom: 0 !important; }
html body.kiln .siana-shop h1.shop-head { margin: 0 0 12px !important; }
html body.kiln .siana-shop .intro { margin: 0 !important; }
html body.kiln .siana-shop:empty, html body.kiln .siana-shop > p:empty { display: none !important; }
html body.kiln .siana-shop + .woocommerce { margin-top: 24px !important; }
@media (max-width: 899px) {
  html body.kiln .siana-shop { padding-top: 18px !important; }
  html body.kiln .siana-shop h1.shop-head { margin-bottom: 8px !important; }
  html body.kiln .siana-shop + .woocommerce { margin-top: 16px !important; }
}

/* ---------- t61u · Toast never covers the open cart drawer (or its suggestions column) ---------- */
@media (min-width: 600px) {
  body.kiln-locked .kiln-toast { right: auto !important; left: 24px !important; max-width: calc(100vw - min(440px, 100vw) - 48px) !important; }
}
@media (min-width: 900px) {
  body.kiln-locked:has(.kiln-drawer .kiln-sugg) .kiln-toast { max-width: calc(100vw - min(740px, 100vw) - 48px) !important; }
}
/* Too little room beside the drawer: the drawer is the confirmation; the toast stays in the live region for screen readers. */
@media (min-width: 600px) and (max-width: 759px) { body.kiln-locked .kiln-toast { opacity: 0 !important; } }
@media (min-width: 900px) and (max-width: 1039px) { body.kiln-locked:has(.kiln-drawer .kiln-sugg) .kiln-toast { opacity: 0 !important; } }
html body.kiln .kiln-ship--checkout { margin: 0 0 18px; }

/* ---------- t61u · Modern Web Guidance ---------- */
/* visually-stable-font-fallbacks: if Inter is still loading (or blocked) the fallback is scaled to Inter's x-height, so text doesn't jump on swap */
html body.kiln { font-size-adjust: from-font; }
/* defer-rendering-heavy-content: skip layout/paint for blocks that always start below the fold; `auto` remembers the real size once rendered */
html body.kiln .kiln-how, html body.kiln .kiln-strip, html body.kiln footer.site-footer { content-visibility: auto; }
html body.kiln .kiln-how { contain-intrinsic-size: auto none auto 860px; }
html body.kiln .kiln-strip { contain-intrinsic-size: auto none auto 220px; }
html body.kiln footer.site-footer { contain-intrinsic-size: auto none auto 640px; }
