/* =============================================================
   INNO-UX-R2 — brand page finishing layer (claude-brand-finish)
   Scope: .ux-brand-page only. Additive. Legacy markup untouched.
   Palette lock: #202229 #60636b #A78B56 #8B7145 #D8DADE
   Type lock: InnoKanit, Arial (inherited — never re-declared here)
   ============================================================= */

.ux-brand-page{
  --ux-ink:#202229;
  --ux-muted:#60636b;
  --ux-gold:#A78B56;
  --ux-gold-deep:#8B7145;
  --ux-rule:#D8DADE;
  --ux-well:#FAFAFB;
  --ux-gap:clamp(48px,6vw,96px);
}

/* ---------- 1. HERO ---------------------------------------- */
.ux-brand-page .ux-brand-hero{
  align-items:center;
  column-gap:clamp(24px,4vw,64px);
  padding-block:clamp(24px,4vw,56px) clamp(32px,5vw,72px);
  border-bottom:1px solid var(--ux-rule);
}
.ux-brand-page .ux-brand-copy{max-width:56ch;}
.ux-brand-page .ux-brand-copy h1{
  margin:.25em 0 0;
  font-size:clamp(32px,4.2vw,56px);
  line-height:1.12;
  letter-spacing:.01em;
  color:var(--ux-ink);
}
/* CI accent: single gold keyline. No brand hue is invented. */
.ux-brand-page .ux-brand-copy h1::after{
  content:"";
  display:block;
  width:56px;height:3px;
  margin-top:.55em;
  border-radius:2px;
  background:linear-gradient(90deg,var(--ux-gold),var(--ux-gold-deep));
}
/* NEW authored slot — Codex injects <p class="ux-brand-lede"> */
.ux-brand-page .ux-brand-lede{
  margin:1.05em 0 0;
  max-width:46ch;
  font-size:clamp(16px,1.25vw,18.5px);
  line-height:1.72;
  color:var(--ux-muted);
  text-wrap:pretty;
}
.ux-brand-page .p3-actions{margin-top:clamp(20px,2.4vw,32px);}
/* hero art: contain only — banner lockups must never be cropped */
.ux-brand-page .ux-brand-art{
  width:100%;height:auto;
  max-height:440px;
  object-fit:contain;
  object-position:center;
}
/* ibex, biobase, dirui have no .ux-brand-art — give copy full measure */
.ux-brand-page[data-brand="ibex"] .ux-brand-copy,
.ux-brand-page[data-brand="biobase"] .ux-brand-copy,
.ux-brand-page[data-brand="dirui"] .ux-brand-copy{max-width:72ch;}
.ux-brand-page[data-brand="ibex"] .ux-brand-lede,
.ux-brand-page[data-brand="biobase"] .ux-brand-lede,
.ux-brand-page[data-brand="dirui"] .ux-brand-lede{max-width:64ch;}

/* ---------- 2. BODY RHYTHM + OVERFLOW CONTAINMENT ---------- */
.ux-brand-page .ux-brand-body{
  padding-block:clamp(32px,4vw,64px) 0;
  /* Do not hide overflow: individual arrow/container geometry is tested and corrected. */
}
.ux-brand-page .ux-brand-body > *{margin-block:0;}
.ux-brand-page .ux-brand-body > * + *{margin-block-start:var(--ux-gap);}
/* scale down, never crop: max-width + height:auto preserves aspect ratio */
.ux-brand-page .ux-brand-body img,
.ux-brand-page .ux-brand-body figure,
.ux-brand-page .ux-brand-body .gspb_image{
  max-width:100%;
  height:auto;
}
/* legacy infographic scans sometimes carry object-fit:cover; contain un-crops */
.ux-brand-page .ux-brand-body .gspb_image img{object-fit:contain;}

/* ---------- 3. DUPLICATED BRAND-NAME HEADING --------------- */
/* Demoted to an eyebrow, never removed — content is preserved.
   Requires hook: Codex adds .ux-brand-dup to the first body H2
   whose text equals the H1 (collaju, clabiane, desembre, hairbeam,
   aesku, biobase, dirui, nadmed all have one). */
.ux-brand-page .ux-brand-body .ux-brand-dup{
  margin:0 0 .5em;
  font-size:clamp(13px,1.1vw,15px);
  font-weight:600;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--ux-gold-deep);
}

/* ---------- 4. PRODUCT CATALOGUE --------------------------- */
/* Covers BOTH Woo block generations found on staging.
   No query, no product set, no markup is changed. */
.ux-brand-page .ux-brand-catalogue-head{
  margin:0 0 clamp(16px,2vw,28px);
  padding-bottom:12px;
  border-bottom:1px solid var(--ux-rule);
  font-size:clamp(20px,2vw,26px);
  font-weight:600;
  color:var(--ux-ink);
}
.ux-brand-page .wc-block-product-template,
.ux-brand-page .wc-block-grid__products{
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(232px,1fr));
  gap:clamp(16px,1.8vw,28px);
  margin:0;padding:0;
  list-style:none;
}
.ux-brand-page .wc-block-product-template::before,
.ux-brand-page .wc-block-grid__products::before{content:none;}

.ux-brand-page li.wc-block-product,
.ux-brand-page li.wc-block-grid__product{
  display:flex;
  flex-direction:column;
  width:auto !important;      /* kills measured 300px / 434px mixed widths */
  max-width:none !important;
  margin:0;
  padding:14px 14px 18px;
  background:#fff;
  border:1px solid var(--ux-rule);
  border-radius:10px;
  text-align:left;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.ux-brand-page li.wc-block-product:hover,
.ux-brand-page li.wc-block-grid__product:hover{
  border-color:var(--ux-gold);
  box-shadow:0 6px 22px rgba(32,34,41,.09);
  transform:translateY(-2px);
}
.ux-brand-page li.wc-block-product:focus-within,
.ux-brand-page li.wc-block-grid__product:focus-within{
  border-color:var(--ux-gold-deep);
  box-shadow:0 0 0 3px rgba(167,139,86,.28);
}

/* image well — contain, neutral ground, product shots never cropped */
.ux-brand-page li.wc-block-product .wc-block-components-product-image,
.ux-brand-page li.wc-block-grid__product .wc-block-grid__product-image{
  margin:0 0 12px;
  background:var(--ux-well);
  border-radius:8px;
  overflow:hidden;
}
.ux-brand-page li.wc-block-product .wc-block-components-product-image a,
.ux-brand-page li.wc-block-grid__product .wc-block-grid__product-image a{display:block;}
.ux-brand-page li.wc-block-product .wc-block-components-product-image img,
.ux-brand-page li.wc-block-grid__product .wc-block-grid__product-image img{
  width:100% !important;
  height:auto !important;
  aspect-ratio:1/1;
  padding:10px;
  object-fit:contain !important;
  /* Original product colours retained; no blend-mode alteration. */
}

/* title — kill the raw blue underlined default seen in screenshot 049 */
.ux-brand-page li.wc-block-product .wp-block-post-title,
.ux-brand-page li.wc-block-grid__product .wc-block-grid__product-title{
  margin:0 0 8px;
  font-size:15px;
  line-height:1.45;
  font-weight:600;
  color:var(--ux-ink);
}
.ux-brand-page li.wc-block-product .wp-block-post-title a,
.ux-brand-page li.wc-block-grid__product .wc-block-grid__product-title a{
  color:inherit;
  text-decoration:none;
}
.ux-brand-page li.wc-block-product .wp-block-post-title a:hover,
.ux-brand-page li.wc-block-grid__product .wc-block-grid__product-title a:hover{
  color:var(--ux-gold-deep);
  text-decoration:underline;
  text-underline-offset:3px;
}
.ux-brand-page li.wc-block-product a:focus-visible,
.ux-brand-page li.wc-block-grid__product a:focus-visible{
  outline:2px solid var(--ux-gold-deep);
  outline-offset:2px;
  border-radius:4px;
}

/* price (pione, hairbeam) pinned to card bottom */
.ux-brand-page li.wc-block-product .wc-block-components-product-price,
.ux-brand-page li.wc-block-grid__product .wc-block-grid__product-price{
  margin-top:auto;
  padding-top:8px;
  font-size:14.5px;
  font-weight:600;
  color:var(--ux-gold-deep);
}

/* 'Read more' (biobase) -> quiet gold outline pill */
.ux-brand-page li.wc-block-product .wp-block-button__link,
.ux-brand-page li.wc-block-grid__product .wp-block-button__link,
.ux-brand-page li.wc-block-grid__product .add_to_cart_button{
  align-self:flex-start;
  margin-top:12px;
  padding:8px 16px;
  font-size:13.5px;
  font-weight:600;
  letter-spacing:.02em;
  color:var(--ux-gold-deep);
  background:transparent;
  border:1px solid var(--ux-gold);
  border-radius:999px;
  text-decoration:none;
}
.ux-brand-page li.wc-block-product .wp-block-button__link:hover,
.ux-brand-page li.wc-block-grid__product .wp-block-button__link:hover,
.ux-brand-page li.wc-block-grid__product .add_to_cart_button:hover{
  background:var(--ux-gold);
  color:#fff;
}

/* ---------- 5. P198 in-page subnav ------------------------- */
/* p198 is the only brand with #p198 #benefits #before-after
   #product-id #exclusive #contact anchors under a sticky header */
.ux-brand-page[data-brand="p198"]{scroll-padding-top:96px;}

/* ---------- 6. MOBILE -------------------------------------- */
@media (max-width:700px){
  .ux-brand-page{--ux-gap:clamp(32px,8vw,56px);}
  .ux-brand-page .ux-brand-hero{padding-block:16px 28px;}
  .ux-brand-page .ux-brand-copy,
  .ux-brand-page .ux-brand-lede{max-width:none;}
  .ux-brand-page .ux-brand-art{max-height:240px;}
  .ux-brand-page .wc-block-product-template,
  .ux-brand-page .wc-block-grid__products{
    grid-template-columns:repeat(2,1fr);
    gap:12px;
  }
  .ux-brand-page li.wc-block-product,
  .ux-brand-page li.wc-block-grid__product{padding:10px 10px 14px;}
  .ux-brand-page li.wc-block-product .wp-block-post-title,
  .ux-brand-page li.wc-block-grid__product .wc-block-grid__product-title{font-size:13.5px;}
}

/* ---------- 7. MOTION / PRINT SAFETY ----------------------- */
@media (prefers-reduced-motion:reduce){
  .ux-brand-page li.wc-block-product,
  .ux-brand-page li.wc-block-grid__product{transition:none;}
  .ux-brand-page li.wc-block-product:hover,
  .ux-brand-page li.wc-block-grid__product:hover{transform:none;}
}

