/**
 * 3100_081D — Final Owner-Reference Exact Presentation Layer
 * Visual authority: design_reference/081D/*.png + brand_logo_master.png
 * Loaded AFTER 081C. Real data only.
 */
:root {
  --bg-0: #070809;
  --bg-1: #0d0f12;
  --panel: #14171b;
  --panel-raised: #1a1e24;
  --steel: #8b9199;
  --border: rgba(184, 115, 51, 0.32);
  --copper-dark: #8a5a2b;
  --copper: #b87333;
  --copper-bright: #d4924a;
  --text: #f3ece3;
  --muted: rgba(232, 226, 217, 0.7);
  --081d-max: 1360px;
  --081d-gutter: clamp(1rem, 3vw, 2rem);
  --081d-ease: 200ms ease;
}

html:has(body.cw-081d),
body.cw-081d {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  background: var(--bg-0);
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  body.cw-081d * { transition: none !important; animation: none !important; }
}

/* Closed mobile nav must not expand body.scrollWidth */
body.cw-081d .mobile-nav-menu {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: min(300px, 86vw) !important;
  height: 100dvh !important;
  transform: none !important;
}
body.cw-081d .mobile-nav-menu.open {
  display: block !important;
  z-index: 1200 !important;
}

/* ========== LOGO / HEADER ========== */
body.cw-081d #main-header.site-header {
  background: linear-gradient(180deg, #0a0b0d 0%, #111418 100%) !important;
  border-bottom: 1px solid var(--border) !important;
}

body.cw-081d #main-header .cw-081d-header-inner,
body.cw-081d #main-header .cw-081c-header-inner {
  max-width: var(--081d-max) !important;
  margin-inline: auto !important;
  min-height: 100px !important;
  padding: 0.7rem var(--081d-gutter) !important;
  display: flex !important;
  align-items: center !important;
  gap: 1.35rem !important;
  width: 100% !important;
}

body.cw-081d a.cw-081d-brand-plate {
  display: flex !important;
  align-items: center !important;
  gap: 0.85rem !important;
  width: clamp(280px, 24vw, 330px) !important;
  min-width: 280px !important;
  max-width: 330px !important;
  height: 88px !important;
  min-height: 88px !important;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem !important;
  background:
    linear-gradient(145deg, #1c2128 0%, #0e1013 100%) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.4) !important;
  text-decoration: none !important;
  flex: 0 0 auto !important;
  overflow: hidden !important;
}

body.cw-081d .cw-081d-logo {
  height: 76px !important;
  width: auto !important;
  max-width: 120px !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  flex: 0 0 auto !important;
}

body.cw-081d .cw-081d-store-line {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
  min-width: 0 !important;
  justify-content: center !important;
  border-left: 1px solid rgba(184, 115, 51, 0.28);
  padding-left: 0.75rem;
}

body.cw-081d .cw-081d-store-line .name {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
  line-height: 1.1;
}

body.cw-081d .cw-081d-store-line .style {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--copper-bright);
  font-weight: 650;
}

/* Hide legacy brand text stacks when 081d plate is active */
body.cw-081d .cw-081d-brand-plate .cw-g-mono-wrap,
body.cw-081d .cw-081d-brand-plate .cw-081c-brand-mark,
body.cw-081d .cw-081d-brand-plate .cw-081c-brand-copy,
body.cw-081d .cw-081d-brand-plate .logo-text-wrap {
  display: none !important;
}

body.cw-081d #primary-nav {
  display: flex !important;
  flex: 1 1 auto !important;
  justify-content: center !important;
  gap: 0.2rem !important;
}

body.cw-081d #primary-nav a {
  padding: 0.7rem 0.85rem !important;
  font-size: 0.94rem !important;
  color: var(--muted) !important;
  text-decoration: none !important;
  position: relative !important;
}

body.cw-081d #primary-nav a.active,
body.cw-081d #primary-nav a[aria-current="page"],
body.cw-081d #primary-nav a:hover {
  color: var(--text) !important;
}

body.cw-081d #primary-nav a.active::after,
body.cw-081d #primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.85rem; right: 0.85rem; bottom: 0.2rem;
  height: 2px; background: var(--copper); border-radius: 1px;
}

body.cw-081d .cw-header-cta {
  min-height: 2.85rem !important;
  padding: 0.65rem 1.25rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #d09a55 0%, #a8662f 100%) !important;
  color: #1a120c !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ========== HERO ========== */
body.cw-081d .cw-081c-hero,
body.cw-081d .cw-081d-hero {
  min-height: min(90vh, 860px);
}

body.cw-081d .cw-081c-hero-copy,
body.cw-081d .cw-081d-hero-copy {
  max-width: var(--081d-max);
  padding: clamp(4.5rem, 12vh, 8rem) var(--081d-gutter);
}

body.cw-081d .cw-081c-hero-copy h1,
body.cw-081d .cw-081d-hero-copy h1 {
  font-size: clamp(2.75rem, 5.8vw, 4.15rem) !important;
  line-height: 1.04 !important;
  max-width: 13ch;
}

body.cw-081d .cw-copper-kw {
  color: var(--copper-bright) !important;
}

body.cw-081d .cw-081c-hero-veil {
  background:
    linear-gradient(90deg, rgba(5, 6, 8, 0.94) 0%, rgba(5, 6, 8, 0.72) 36%, rgba(5, 6, 8, 0.18) 66%, rgba(5, 6, 8, 0.4) 100%),
    linear-gradient(180deg, rgba(5, 6, 8, 0.2) 0%, transparent 40%, rgba(5, 6, 8, 0.55) 100%) !important;
}

/* Value rail */
body.cw-081d .cw-081c-value-rail-inner {
  border-color: var(--border) !important;
  background: linear-gradient(180deg, #171b21, #101317) !important;
}

/* Cards */
body.cw-081d .cw-product-card {
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  background: var(--panel) !important;
}

body.cw-081d .cw-cover-wrap {
  background: #0b0d10 !important;
}

body.cw-081d .cw-card-price,
body.cw-081d .cw-card-price-quote {
  color: var(--copper-bright) !important;
  font-weight: 800 !important;
}

body.cw-081d .cw-card-cta {
  background: linear-gradient(180deg, #d09a55, #a8662f) !important;
  color: #1a120c !important;
}

/* MTO */
body.cw-081d .cw-081c-mto-panel {
  border-color: var(--border) !important;
  background:
    radial-gradient(ellipse at 12% 20%, rgba(184, 115, 51, 0.24), transparent 46%),
    linear-gradient(120deg, #171b21 0%, #0f1215 55%, #1a1510 100%) !important;
}

/* Listing hero band */
body.cw-081d.cw-listing-page .cw-081d-listing-hero {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

body.cw-081d.cw-listing-page .cw-081d-listing-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 9, 0.92), rgba(7, 8, 9, 0.55)),
    url('assets/opt/hero_loft_showroom_960.jpg') center/cover no-repeat;
}

body.cw-081d.cw-listing-page .cw-081d-listing-hero-copy {
  position: relative;
  z-index: 1;
  max-width: var(--081d-max);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem var(--081d-gutter) 2rem;
}

body.cw-081d.cw-listing-page .cw-081c-listing-shell {
  max-width: var(--081d-max);
  margin: 0 auto;
  padding: 1.5rem var(--081d-gutter) 3rem;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.75rem;
}

body.cw-081d.cw-listing-page .cw-081c-sidebar {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #171b21, #111418);
  padding: 1.15rem 1.05rem;
  position: sticky;
  top: 1rem;
}

body.cw-081d.cw-listing-page .cw-081c-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

body.cw-081d.cw-listing-page .cw-081c-filter-toggle {
  display: none;
}

@media (min-width: 900px) {
  body.cw-081d.cw-listing-page #listing-sidebar-panel[hidden] {
    display: block !important;
  }
}

/* Detail */
body.cw-081d.cw-product-detail .pd-stage {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

body.cw-081d.cw-product-detail .pd-main-img-wrap {
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  background: #0b0d10 !important;
}

body.cw-081d.cw-product-detail .pd-price {
  color: var(--copper-bright) !important;
  font-size: 1.7rem !important;
}

body.cw-081d.cw-product-detail .pd-cta-btn {
  background: linear-gradient(180deg, #d09a55, #a8662f) !important;
  color: #1a120c !important;
  min-height: 3rem !important;
  font-weight: 700 !important;
}

body.cw-081d.cw-product-detail .pd-below-block {
  border: 1px solid rgba(184, 115, 51, 0.18);
  border-radius: 14px;
  background: var(--panel);
  padding: 1.25rem 1.2rem;
}

body.cw-081d.cw-product-detail .pd-desc-contact,
body.cw-081d.cw-product-detail .pd-desc-link {
  opacity: 0.5;
  font-size: 0.88rem;
}

/* Footer logo */
body.cw-081d .cw-081d-foot-logo {
  width: min(220px, 70vw);
  height: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 0.85rem;
}

body.cw-081d .cw-081c-footer-grid {
  max-width: var(--081d-max);
  margin: 0 auto;
  padding-inline: var(--081d-gutter);
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.15fr;
  gap: 2rem;
}

/* Floating dock */
body.cw-081d .contact-widget-container {
  right: max(0.85rem, env(safe-area-inset-right)) !important;
  bottom: max(0.85rem, env(safe-area-inset-bottom)) !important;
}

/* ========== MOBILE ========== */
@media (max-width: 899px) {
  body.cw-081d.cw-listing-page .cw-081c-listing-shell {
    grid-template-columns: 1fr;
  }
  body.cw-081d.cw-listing-page .cw-081c-sidebar { position: static; }
  body.cw-081d.cw-product-detail .pd-stage { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  body.cw-081d.cw-listing-page .cw-081c-filter-toggle {
    display: flex !important;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    min-height: 2.75rem;
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-raised);
    color: var(--text);
    font-weight: 650;
  }
  body.cw-081d.cw-listing-page .cw-081c-catalog-grid,
  body.cw-081d.cw-listing-page #product-grid-main {
    grid-template-columns: 1fr !important;
  }
  body.cw-081d.cw-product-detail .pd-main-img-wrap {
    max-height: 52vh;
  }
  body.cw-081d.cw-product-detail .pd-main-img {
    max-height: 52vh;
    object-fit: contain;
  }
  body.cw-081d.cw-product-detail .pd-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
  }

  body.cw-081d #main-header .cw-081d-header-inner,
  body.cw-081d #main-header .cw-081c-header-inner {
    min-height: 74px !important;
    gap: 0.5rem !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
  }

  body.cw-081d a.cw-081d-brand-plate {
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 5rem) !important;
    height: 62px !important;
    min-height: 62px !important;
    padding: 0.28rem 0.55rem 0.28rem 0.28rem !important;
    gap: 0.55rem !important;
    flex: 1 1 auto !important;
  }

  body.cw-081d .cw-081d-logo {
    height: 52px !important;
    max-width: 82px !important;
  }

  body.cw-081d .cw-081d-store-line .name {
    font-size: 0.78rem;
  }
  body.cw-081d .cw-081d-store-line .style {
    font-size: 0.58rem;
  }

  body.cw-081d #primary-nav,
  body.cw-081d .cw-im-nav-inline,
  body.cw-081d .cw-073-nav-plate,
  body.cw-081d .desktop-nav,
  body.cw-081d .cw-header-cta,
  body.cw-081d .cw-header-actions > a.btn,
  body.cw-081d .cw-header-actions > .btn:not(.mobile-nav-toggle),
  body.cw-081d .header-actions-group > a.btn,
  body.cw-081d .header-actions-group > .btn:not(.mobile-nav-toggle) {
    display: none !important;
  }

  body.cw-081d .header-actions-group,
  body.cw-081d .cw-header-actions {
    max-width: 3rem !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
  }

  body.cw-081d .cw-081c-hero {
    min-height: auto;
  }
  body.cw-081d .cw-081c-hero-media { position: relative; min-height: 44vh; }
  body.cw-081d .cw-081c-hero-copy {
    margin-top: -4rem;
    padding: 0 var(--081d-gutter) 2rem;
  }
  body.cw-081d .cw-081c-hero-copy h1 {
    font-size: clamp(2rem, 9vw, 2.55rem) !important;
    max-width: none;
  }

  body.cw-081d .cw-081c-cat-grid,
  body.cw-081d .cw-081c-product-grid,
  body.cw-081d.cw-listing-page .cw-081c-catalog-grid,
  body.cw-081d .cw-081c-portfolio,
  body.cw-081d .cw-081c-footer-grid,
  body.cw-081d .cw-why-grid {
    grid-template-columns: 1fr !important;
  }

  body.cw-081d .cw-081c-value-rail-inner {
    grid-template-columns: 1fr 1fr !important;
  }

  body.cw-081d.cw-product-detail .contact-widget-container {
    bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 4.75rem)) !important;
  }
}

@media (min-width: 1280px) {
  body.cw-081d.cw-listing-page .cw-081c-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
