/* finesse · register=brand · A=olive+ivory · B=700/400 · C=editorial-band
 * D=CSS-only transitions · E=linen-paper · SOUL=6 SPECTACLE=3 DENSITY=4
 * ==========================================================================
   family: category detail pages — owner: agent G2
   pages: modular-sofas · accent-armchairs · coffee-tables
          upholstered-beds · designer-dining · luxury-mattresses

   Loaded after main.css and ui-v8.css. Every rule below is anchored on the
   page body class (body.nv-<slug>), so nothing here can leak into another
   family. Root wrappers on these pages are .nv-modsofa / .nv-armchair /
   .nv-ct / .nv-ub / .nv-dd / .nv-lm — the body class is the safe hook
   because it survives wrapper changes.

   Repairs, in order:
   1. header nav contrast (main.css paints .site-nav__link #fff site-wide
      while the v8 shell stays opaque ivory -> white on cream)
   2. hero intro link contrast (links inside the hero paragraph render at ink
      #1A1F19 over the dark hero photograph)
   3. hero clearance under the fixed header on small screens
   4. product-card chrome (legacy .card border/padding/lift vs the image-led
      card language used everywhere else)
   5. meta-line contrast + 44px tap target
   6. .std media collapse on mobile (flex-basis 100% inside a column flex
      parent zeroes the box when the image has not decoded)
   7. marquee placeholder tone + reduced-motion stop
   ========================================================================== */

/* ---------------------------------------------------------------- 1 · chrome */
/* site-header.js writes `style="color:#fff !important"` straight onto every
   .site-nav__link, and an inline !important cannot be beaten by any stylesheet
   rule. The paint property is a separate, non-inline declaration, so the nav
   can still be re-toned here. Root fix belongs to site-header.js (drop the
   inline colour write, or set --nv-hdr-text instead) — reported to the Lead.
   Header shell stays opaque ivory on these pages, so ink is the right tone. */
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) #nv-hdr .site-nav__link {
  color: #1B221A !important;
  -webkit-text-fill-color: #1B221A;
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) #nv-hdr .site-nav__link:hover,
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) #nv-hdr .site-nav__link:focus {
  color: #1B221A !important;
  -webkit-text-fill-color: #1B221A;
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) #nv-hdr .site-nav__caret {
  border-color: #1B221A !important;
  opacity: .8;
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) #nv-hdr .site-menu-toggle {
  border-color: rgba(27, 34, 26, .18) !important;
  background: rgba(27, 34, 26, .04) !important;
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) #nv-hdr .site-menu-toggle span:not(.screen-reader-text) {
  background-color: #1B221A !important;
}

/* ------------------------------------------------------------- 2 · hero copy */
/* `body .entry-content a` sets ink on every anchor, which also hits the inline
   links inside the hero intro paragraph: ink on a dark photograph. Re-state
   them in the hero's own light tone and keep them visibly interactive. */
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) .hero__inner p a,
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) .hero__inner p a:hover,
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) .hero__inner p a:focus,
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) .hero__inner .sub a {
  color: #F4F2E9 !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(244, 242, 233, .5);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s ease;
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) .hero__inner p a:hover {
  text-decoration-color: #F4F2E9;
}

/* breadcrumbs ride on the same photograph — solid light beats 70% alpha */
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) :is(.hero__crumb, .hero__breadcrumb) {
  color: #F4F2E9;
  text-shadow: 0 1px 2px rgba(20, 26, 19, .55);
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) :is(.hero__crumb, .hero__breadcrumb) a {
  color: #F4F2E9;
  opacity: .82;
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) :is(.hero__crumb, .hero__breadcrumb) a:hover {
  opacity: 1;
}

/* --------------------------------------------------------- 3 · hero clearance */
/* .nv-modsofa / .nv-armchair heroes centre their content with flex, so on a
   phone the breadcrumb lands at y=89 while the fixed header is 93 tall and
   swallows it. Push the inner block below the chrome. */
@media (max-width: 1024px) {
  html body:is(.nv-modular-sofas, .nv-accent-armchairs) .hero__inner {
    padding-top: calc(var(--nv-header-h-mobile, 64px) + 56px);
  }
}

/* ------------------------------------------------------------ 4 · card chrome */
/* main.css `.card` (line ~872) is a legacy panel: 1px border, surface fill,
   radius, -8px hover lift. On these pages the product card is image-led and
   the border only showed up as a 1px gutter around every photograph. */
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining) .card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  will-change: auto;
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining) .card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

/* --------------------------------------------------- 5 · meta text + tap area */
/* .card__type ships #999 / #888 on white (2.8-3.5:1). Olive-tinted grey at
   #5F6A5D clears AA for 11-12px uppercase. */
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining) .card__type {
  color: #5F6A5D;
}

/* "View details" is a 21px-tall inline link; give it a 44px hit area without
   moving the underline. */
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining) :is(.card__view, .card__link) {
  position: relative;
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining) :is(.card__view, .card__link)::after {
  content: "";
  position: absolute;
  inset: -12px -10px;
}

/* ------------------------------------------------------------- 6 · std media */
/* At <=768 .std becomes column-reverse and `flex: 100%` (from the 1024 block)
   resolves as a percentage flex-basis on the vertical axis; with an
   undecoded image the box collapses to 0px and the section loses its photo. */
@media (max-width: 1024px) {
  html body:is(.nv-modular-sofas, .nv-accent-armchairs) .std__media {
    flex: 0 0 auto;
    align-self: stretch;
  }
}

@media (max-width: 768px) {
  html body:is(.nv-modular-sofas, .nv-accent-armchairs) .std__media {
    flex: 0 0 auto;
    width: 100%;
    height: clamp(240px, 66vw, 340px);
  }

  html body:is(.nv-modular-sofas, .nv-accent-armchairs) .std__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* --------------------------------------------------------------- 7 · marquee */
/* Tiles that have not decoded yet used to read as white holes in the band.
   Give the frame a warm placeholder and stop the loop for reduced motion. */
html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) :is(.marquee__item, .marquee__track img) {
  background-color: #E9E5DA;
}

html body:is(.nv-modular-sofas, .nv-accent-armchairs) .marquee__item {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) .marquee__track {
    animation: none !important;
    transform: none !important;
  }

  html body:is(.nv-modular-sofas, .nv-accent-armchairs, .nv-coffee-tables, .nv-upholstered-beds, .nv-designer-dining, .nv-luxury-mattresses) :is(.card:hover .card__imgbox img, .marquee__item:hover img) {
    transform: none !important;
  }
}
