/* Identity layer: loaded after theme.css so palette generation cannot wipe layout. */
body{font-family:var(--font)}
.footer-brand{min-width:0}
.footer-brand p{max-width:38em}
.detail-info .sub{color:var(--theme-muted);margin:0 0 16px}
.catalog-intro .section-title{margin-bottom:28px}

body.demo05{--font:"Nunito Sans",Inter,sans-serif}
.d5-cats a{background:var(--theme-surface)}

body.demo05 .d5-cats-inner{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch}
body.demo05 .d5-cats-inner::-webkit-scrollbar{display:none}
body.demo05 .d5-cats-inner a{flex:none;white-space:nowrap}
body.demo05 .d5-cats-inner .d5-cats-all{margin-left:auto;color:var(--theme-primary);background:transparent;border-color:transparent}

body.demo05.is-home .d2-hero{min-height:clamp(680px,calc(100svh - 178px),900px)}
body.demo05.is-home .d2-hero-copy{min-height:clamp(680px,calc(100svh - 178px),900px);display:flex;flex-direction:column;justify-content:center;padding:80px 0 105px;box-sizing:border-box}
body.demo05.is-home .d2-hero-slide.is-active img,
body.demo05.is-home .d2-hero-slide.d2-active img{animation:d5-hero-rise 7.5s ease-in-out infinite alternate;transform-origin:center center}
body.demo05.is-home .d2-hero-copy>*{animation:d5-copy-enter .75s ease-out both}
body.demo05.is-home .d2-hero-copy>*:nth-child(2){animation-delay:.1s}
body.demo05.is-home .d2-hero-copy>*:nth-child(3){animation-delay:.2s}
body.demo05.is-home .d2-hero-copy>*:nth-child(4){animation-delay:.3s}
body.demo05.is-home .d2-hero-copy>*:nth-child(5){animation-delay:.4s}
@keyframes d5-hero-rise{from{transform:translateY(0) scale(1.04)}to{transform:translateY(-2.5%) scale(1.04)}}
@keyframes d5-copy-enter{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){body.demo05.is-home .d2-hero,body.demo05.is-home .d2-hero-copy{min-height:680px}body.demo05.is-home .d2-hero-copy{padding:85px 0 100px}}
@media(prefers-reduced-motion:reduce){body.demo05.is-home .d2-hero-slide img,body.demo05.is-home .d2-hero-copy>*{animation:none}}

/* About opens with the company story; the home page keeps the visual catalog. */
body.demo05.is-about .d5-cats{display:none}
body.demo05.is-about main{display:flex;flex-direction:column}
body.demo05.is-about main>section:nth-of-type(3){order:1;background:#f7f5f0;padding:100px 0}
body.demo05.is-about main>section:nth-of-type(1){order:2}
body.demo05.is-about main>section:nth-of-type(2){order:3}
body.demo05.is-about main>.d2-cta{order:4}
body.demo05.is-about .d5-intro{grid-template-areas:"copy image";grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:70px;align-items:center}
body.demo05.is-about .d5-intro>div{grid-area:copy}
body.demo05.is-about .d5-intro>img{grid-area:image;height:520px;min-height:0;max-height:100%;object-fit:cover;object-position:65% center;border-radius:2px}
body.demo05.is-about .d5-intro h2{font-size:clamp(36px,4vw,56px);line-height:1.1;max-width:11em;margin:10px 0 24px}
body.demo05.is-about .d5-intro>div>p:not(.d2-kicker){max-width:52ch;line-height:1.7}
body.demo05.is-about .d5-facts{gap:0;margin-top:34px;border-top:1px solid var(--theme-line)}
body.demo05.is-about .d5-facts article{padding:18px 20px 18px 0;border:0;border-bottom:1px solid var(--theme-line);border-radius:0;background:transparent}
body.demo05.is-about .d5-facts article span{color:var(--theme-primary);font-weight:800}

body.demo05.is-about main>section:nth-of-type(1){background:#fff}
body.demo05.is-about main>section:nth-of-type(1) .container{display:grid;grid-template-columns:minmax(240px,.7fr) minmax(0,1.3fr);gap:64px;align-items:start}
body.demo05.is-about main>section:nth-of-type(1) .d2-section-head{position:sticky;top:100px;margin:0}
body.demo05.is-about main>section:nth-of-type(1) h1{font-size:clamp(28px,3vw,42px);line-height:1.16;margin:12px 0 20px}
body.demo05.is-about main>section:nth-of-type(1) .d5-shop{counter-reset:about-feature;gap:12px}
body.demo05.is-about main>section:nth-of-type(1) .d5-shop .d2-cat{counter-increment:about-feature;min-height:190px;padding:22px;border:1px solid var(--theme-line);border-radius:2px;color:var(--theme-dark);background:#faf9f6}
body.demo05.is-about main>section:nth-of-type(1) .d5-shop .d2-cat:before{content:counter(about-feature,decimal-leading-zero);color:var(--theme-primary);font-weight:800;font-size:13px}
body.demo05.is-about main>section:nth-of-type(1) .d5-shop .d2-cat:after,
body.demo05.is-about main>section:nth-of-type(1) .d5-shop .d2-cat-bg{display:none}
body.demo05.is-about main>section:nth-of-type(1) .d5-shop .d2-cat-body{min-height:0;padding:22px 0 0;color:inherit}
body.demo05.is-about main>section:nth-of-type(1) .d5-shop .d2-cat-body p{color:var(--theme-muted)}

body.demo05.is-about .d5-grid{grid-template-columns:1fr;gap:10px}
body.demo05.is-about .d5-grid .d2-prod{display:grid;grid-template-columns:150px minmax(0,1fr);border-radius:2px}
body.demo05.is-about .d5-grid .d2-prod-img{height:150px}
body.demo05.is-about .d5-grid .d2-prod-body{justify-content:center;padding:18px 24px}
@media(max-width:980px){body.demo05.is-about .d5-intro{grid-template-areas:"copy" "image";grid-template-columns:1fr;gap:36px}body.demo05.is-about .d5-intro>img{height:360px}body.demo05.is-about main>section:nth-of-type(1) .container{grid-template-columns:1fr;gap:30px}body.demo05.is-about main>section:nth-of-type(1) .d2-section-head{position:static}}
@media(max-width:600px){body.demo05.is-about main>section:nth-of-type(3){padding:64px 0}body.demo05.is-about .d5-facts{grid-template-columns:1fr}body.demo05.is-about .d5-grid .d2-prod{grid-template-columns:110px minmax(0,1fr)}body.demo05.is-about .d5-grid .d2-prod-img{height:130px}body.demo05.is-about .d5-grid .d2-prod-body{padding:12px}}

/* Demo05 unique lower-home module */
body.demo05.is-home .d5-procurement-lane{padding:0 0 90px;background:var(--theme-primary-light);color:#25160f;overflow:hidden}.d5-lane-strip{display:flex;justify-content:space-around;gap:34px;padding:18px;background:var(--theme-primary);color:#fff;font-weight:800;letter-spacing:.14em;white-space:nowrap}.d5-procurement-lane .container{padding-top:76px}.d5-procurement-lane header{display:grid;grid-template-columns:.7fr 1.3fr;gap:50px;align-items:start}.d5-procurement-lane header p{color:var(--theme-primary);font-weight:800;letter-spacing:.15em}.d5-procurement-lane header h2{margin:0;font-size:clamp(30px,4vw,52px);max-width:800px}.d5-lane-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:54px 0 34px}.d5-lane-cards article{min-height:260px;padding:34px;background:#fff;border:1px solid var(--theme-primary-mid);box-shadow:8px 8px 0 var(--theme-primary-mid)}.d5-lane-cards article:nth-child(2){transform:translateY(24px)}.d5-lane-cards i{font-style:normal;font-size:36px;font-weight:900;color:var(--theme-primary)}.d5-lane-cards h3{margin:48px 0 12px}.d5-lane-cards p{color:#755b4c;line-height:1.65}@media(max-width:800px){.d5-procurement-lane header,.d5-lane-cards{grid-template-columns:1fr}.d5-lane-cards article:nth-child(2){transform:none}}

/* Demo05 compatibility pass */
body.demo05.is-home .d2-hero,body.demo05.is-home .d2-hero-copy{min-height:clamp(620px,78svh,780px)}body.demo05.is-home .d2-hero-copy h1{font-size:clamp(40px,4.6vw,64px)!important;max-width:14ch}body.demo05:not(.is-home) h1{font-size:clamp(32px,4vw,52px)!important;line-height:1.1!important;overflow-wrap:break-word;text-wrap:balance}@media(max-width:600px){body.demo05:not(.is-home) h1{font-size:clamp(28px,9vw,40px)!important}}body.demo05.is-home .d5-procurement-lane{background:var(--theme-primary-light);color:var(--theme-text)}body.demo05.is-home .d5-lane-strip{background:var(--theme-primary)}body.demo05.is-home .d5-lane-cards article{background:var(--theme-surface);border-color:var(--theme-primary-mid);box-shadow:8px 8px 0 var(--theme-primary-mid)}body.demo05.is-home .d5-lane-cards i,body.demo05.is-home .d5-procurement-lane header p{color:var(--theme-primary)}body.demo05.is-home .d5-lane-cards p{color:var(--theme-muted)}

/* === product-media-fix:start === */
/* Product image module repair (2026-11-27, extended 2026-11-30 listing2)
   1) Demo06 homepage "Products in editorial rows": compact left-image / right-text rows.
   2) Stop full-width grey letterboxes on leftover vertical cards
      (height:210px + object-fit:contain + auto-fit).
   3) Category listing pages: [data-dynamic-product-list].product-list and
      any .product-card inside .catalog-layout become compact 200x140 / right-text
      editorial rows. This MUST win over every template (hbmmt, demo02-16, etc.).
      Also covers orphaned cards that sit as siblings after an emptied .product-list.
   Featured home grids ([data-view="featured"] without .d6-list) and about-page
   cards (body.is-about) are left unchanged.
*/

/* ----- Editorial rows (template 6 / .d6-list) ----- */
body:not(.is-about) .d6-list{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:0 !important;
}
body:not(.is-about) .d6-list > .d6-row,
body:not(.is-about) .d6-list > article.d6-row,
body:not(.is-about) .d6-list > .d2-prod,
body:not(.is-about) .d6-list > .product-card{
  display:grid !important;
  grid-template-columns:200px minmax(0,1fr) !important;
  gap:24px !important;
  align-items:center !important;
  padding:22px 0 !important;
  border:0 !important;
  border-top:1px solid var(--theme-line,#e5e7eb) !important;
  border-radius:0 !important;
  background:#fff !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body:not(.is-about) .d6-list > .d6-row > img,
body:not(.is-about) .d6-list > .d6-row > a > img,
body:not(.is-about) .d6-list > .d6-row .d6-row-media,
body:not(.is-about) .d6-list > .d6-row .d6-row-media img,
body:not(.is-about) .d6-list > .d2-prod > .d2-prod-img,
body:not(.is-about) .d6-list > .product-card > .product-card-image{
  width:200px !important;
  max-width:200px !important;
  height:140px !important;
  max-height:140px !important;
  min-height:0 !important;
  aspect-ratio:auto !important;
  object-fit:cover !important;
  object-position:center !important;
  display:block !important;
  background:#f8fafc !important;
  border-radius:4px !important;
  overflow:hidden !important;
}
body:not(.is-about) .d6-list > .d2-prod > .d2-prod-img img,
body:not(.is-about) .d6-list > .product-card > .product-card-image img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center !important;
}
body:not(.is-about) .d6-list > .d2-prod > .d2-prod-body,
body:not(.is-about) .d6-list > .product-card > .card-body{
  padding:0 4px 0 0 !important;
}
body:not(.is-about) .d6-list .product-detail-button{
  width:auto !important;
  background:transparent !important;
  color:var(--theme-primary) !important;
  padding:0 !important;
  justify-content:flex-start !important;
  font-weight:700 !important;
}

@media(max-width:700px){
  body:not(.is-about) .d6-list > .d6-row,
  body:not(.is-about) .d6-list > .d2-prod,
  body:not(.is-about) .d6-list > .product-card{
    grid-template-columns:1fr !important;
    gap:14px !important;
    padding:18px 0 !important;
  }
  body:not(.is-about) .d6-list > .d6-row > img,
  body:not(.is-about) .d6-list > .d6-row > a > img,
  body:not(.is-about) .d6-list > .d6-row .d6-row-media,
  body:not(.is-about) .d6-list > .d6-row .d6-row-media img,
  body:not(.is-about) .d6-list > .d2-prod > .d2-prod-img,
  body:not(.is-about) .d6-list > .product-card > .product-card-image{
    width:100% !important;
    max-width:none !important;
    height:200px !important;
    max-height:none !important;
  }
}

/* ----- Non-listing grids: modest 4/3 wells, no auto-fit stretch ----- */
.d2-prod-grid{
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
}
body:not(.is-listing) .product-list:not([data-dynamic-product-list]):not(.product-list-editorial){
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
}
.d2-prod-grid > .d2-prod > .d2-prod-img,
body:not(.is-listing) .product-list:not([data-dynamic-product-list]) > .product-card > .product-card-image{
  aspect-ratio:4/3;
  height:auto;
  min-height:0;
  overflow:hidden;
  background:#f8fafc;
}
.d2-prod-grid > .d2-prod > .d2-prod-img img,
body:not(.is-listing) .product-list:not([data-dynamic-product-list]) > .product-card > .product-card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

/* ----- Category listing: single-column editorial rows -----
   Selectors do not depend on body.is-listing (some themes emit a bare <body>).
   .catalog-layout .product-card also covers leftover SSR cards that were
   left as siblings after a truncated empty .product-list (Dongjie repair bug).
   !important beats style.css auto-fit / height:210-260px / object-fit:contain
   and later theme.css rules.
*/
html body:not(.is-about) .catalog-layout .product-list,
html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]),
html body:not(.is-about) .product-list.product-list-editorial{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:0 !important;
}

html body:not(.is-about) .catalog-layout .product-list .product-card,
html body:not(.is-about) .catalog-layout .product-card,
html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card,
html body:not(.is-about) .product-list.product-list-editorial .product-card,
html body:not(.is-about) .product-list .product-card.product-row{
  display:grid !important;
  grid-template-columns:200px minmax(0,1fr) !important;
  gap:24px !important;
  align-items:center !important;
  padding:22px 0 !important;
  border:0 !important;
  border-top:1px solid var(--theme-line,#e5e7eb) !important;
  border-radius:0 !important;
  background:#fff !important;
  box-shadow:none !important;
  overflow:hidden !important;
  max-width:none !important;
}

html body:not(.is-about) .catalog-layout .product-list .product-card > .product-card-image,
html body:not(.is-about) .catalog-layout .product-card > .product-card-image,
html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card > .product-card-image,
html body:not(.is-about) .product-list.product-list-editorial .product-card > .product-card-image,
html body:not(.is-about) .product-list .product-card.product-row > .product-card-image{
  display:block !important;
  grid-column:1 !important;
  grid-row:1 !important;
  width:200px !important;
  max-width:200px !important;
  height:140px !important;
  min-height:0 !important;
  max-height:140px !important;
  aspect-ratio:auto !important;
  position:relative !important;
  background:#f8fafc !important;
  border-radius:4px !important;
  overflow:hidden !important;
}

html body:not(.is-about) .catalog-layout .product-list .product-card > .product-card-image img,
html body:not(.is-about) .catalog-layout .product-card > .product-card-image img,
html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card > .product-card-image img,
html body:not(.is-about) .product-list.product-list-editorial .product-card > .product-card-image img,
html body:not(.is-about) .product-list .product-card.product-row > .product-card-image img{
  width:100% !important;
  height:100% !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:center !important;
}

html body:not(.is-about) .catalog-layout .product-list .product-card > .card-body,
html body:not(.is-about) .catalog-layout .product-card > .card-body,
html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card > .card-body,
html body:not(.is-about) .product-list.product-list-editorial .product-card > .card-body,
html body:not(.is-about) .product-list .product-card.product-row > .card-body{
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  grid-column:2 !important;
  grid-row:1 !important;
  min-width:0 !important;
  padding:0 4px 0 0 !important;
}

html body:not(.is-about) .catalog-layout .product-list .product-card .tag,
html body:not(.is-about) .catalog-layout .product-card .tag,
html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card .tag,
html body:not(.is-about) .product-list.product-list-editorial .product-card .tag,
html body:not(.is-about) .product-list .product-card.product-row .tag{
  position:static !important;
  margin-bottom:8px !important;
}

html body:not(.is-about) .catalog-layout .product-list .product-card .product-detail-button,
html body:not(.is-about) .catalog-layout .product-card .product-detail-button,
html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card .product-detail-button,
html body:not(.is-about) .product-list.product-list-editorial .product-card .product-detail-button,
html body:not(.is-about) .product-list .product-card.product-row .product-detail-button{
  width:auto !important;
  align-self:flex-start !important;
  background:transparent !important;
  color:var(--theme-primary) !important;
  padding:0 !important;
  justify-content:flex-start !important;
  font-weight:700 !important;
  box-shadow:none !important;
  border:0 !important;
  min-height:0 !important;
  border-radius:0 !important;
}

html body:not(.is-about) .catalog-layout .product-list .product-card .product-detail-button:hover,
html body:not(.is-about) .catalog-layout .product-card .product-detail-button:hover,
html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card .product-detail-button:hover,
html body:not(.is-about) .product-list.product-list-editorial .product-card .product-detail-button:hover,
html body:not(.is-about) .product-list .product-card.product-row .product-detail-button:hover{
  background:transparent !important;
  color:var(--theme-primary-dark,#1e3a8a) !important;
}

@media(max-width:700px){
  html body:not(.is-about) .catalog-layout .product-list .product-card,
  html body:not(.is-about) .catalog-layout .product-card,
  html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card,
  html body:not(.is-about) .product-list.product-list-editorial .product-card,
  html body:not(.is-about) .product-list .product-card.product-row{
    grid-template-columns:1fr !important;
    gap:14px !important;
    padding:18px 0 !important;
  }
  html body:not(.is-about) .catalog-layout .product-list .product-card > .product-card-image,
  html body:not(.is-about) .catalog-layout .product-card > .product-card-image,
  html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card > .product-card-image,
  html body:not(.is-about) .product-list.product-list-editorial .product-card > .product-card-image,
  html body:not(.is-about) .product-list .product-card.product-row > .product-card-image{
    grid-column:1 !important;
    grid-row:auto !important;
    width:100% !important;
    max-width:none !important;
    height:200px !important;
    max-height:none !important;
  }
  html body:not(.is-about) .catalog-layout .product-list .product-card > .card-body,
  html body:not(.is-about) .catalog-layout .product-card > .card-body,
  html body:not(.is-about) .product-list[data-dynamic-product-list]:not([data-view="featured"]) .product-card > .card-body,
  html body:not(.is-about) .product-list.product-list-editorial .product-card > .card-body,
  html body:not(.is-about) .product-list .product-card.product-row > .card-body{
    grid-column:1 !important;
    grid-row:auto !important;
  }
}
/* === product-media-fix:end === */
