/* 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.demo02{--font:Inter,"Segoe UI",Arial,sans-serif}
.d2-hero .d2-stats{width:100%}

/* Home banner: a slow horizontal image drift between carousel changes. */
body.demo02.is-home .d2-hero-slide.is-active img,
body.demo02.is-home .d2-hero-slide.d2-active img{
  width:106%;max-width:none;animation:d02-banner-drift 10s ease-in-out infinite alternate
}
@keyframes d02-banner-drift{
  from{transform:translate3d(-5%,0,0)}
  to{transform:translate3d(0,0,0)}
}
@media(prefers-reduced-motion:reduce){
  body.demo02.is-home .d2-hero-slide img{width:100%;animation:none}
}

/* About: connect the proof points to the introduction instead of a full-width strip. */
body.demo02.is-about .d2-page-intro{
  padding-bottom:86px;
  background:linear-gradient(180deg,#fff 68%,#fff8fb)
}
body.demo02.is-about .d2-stats{
  position:relative;z-index:2;
  width:min(1200px,calc(100% - 40px));margin:-64px auto 0;
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  counter-reset:about-stat;
  background:#fff;color:#172033;
  border:1px solid #e7e9ee;border-radius:18px;
  box-shadow:0 18px 50px #17203312;
  overflow:hidden
}
body.demo02.is-about .d2-stats div{
  min-width:0;padding:25px 28px 27px;text-align:left;
  border-right:1px solid #e7e9ee
}
body.demo02.is-about .d2-stats div:last-child{border-right:0}
body.demo02.is-about .d2-stats div:before{
  counter-increment:about-stat;content:"0" counter(about-stat);
  display:block;margin-bottom:12px;
  color:var(--theme-primary);font-size:12px;font-weight:800;letter-spacing:.14em
}
body.demo02.is-about .d2-stats strong{
  display:block;font-size:clamp(20px,2vw,27px);line-height:1.15;
  color:#172033;overflow-wrap:anywhere
}
body.demo02.is-about .d2-stats span{
  display:block;margin-top:6px;font-size:13px;line-height:1.45;
  color:#667085
}
body.demo02.is-about .d2-stats+.section{padding-top:55px}
.js body.demo02.is-about .d2-stats+.section{opacity:1;transform:none}
@media(max-width:900px){
  body.demo02.is-about .d2-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.demo02.is-about .d2-stats div:nth-child(2){border-right:0}
  body.demo02.is-about .d2-stats div:nth-child(-n+2){border-bottom:1px solid #e7e9ee}
}
@media(max-width:600px){
  body.demo02.is-about .d2-page-intro{padding-bottom:52px}
  body.demo02.is-about .d2-stats{width:calc(100% - 32px);margin-top:-28px;border-radius:15px}
  body.demo02.is-about .d2-stats div{padding:18px 16px 20px}
  body.demo02.is-about .d2-stats div:before{margin-bottom:9px;font-size:11px}
  body.demo02.is-about .d2-stats strong{font-size:clamp(16px,5vw,19px)}
  body.demo02.is-about .d2-stats span{font-size:12px;margin-top:5px}
  body.demo02.is-about .d2-stats+.section{padding-top:48px}
}

/* Additional home-page buyer support content. */
body.demo02.is-home .home-support{background:var(--theme-surface-soft)}
body.demo02.is-home .home-support-head{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:56px;align-items:end;margin-bottom:34px}
body.demo02.is-home .home-support-head h2{margin:8px 0 0;font-size:clamp(30px,3.5vw,48px);line-height:1.08}
body.demo02.is-home .home-support-head>p{margin:0;color:var(--theme-muted);font-size:17px;line-height:1.65}
body.demo02.is-home .home-support-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
body.demo02.is-home .home-support-grid article{padding:28px;border:1px solid var(--theme-line);background:var(--theme-surface)}
body.demo02.is-home .home-support-grid span{display:block;color:var(--theme-primary);font-weight:800;letter-spacing:.08em}
body.demo02.is-home .home-support-grid h3{margin:20px 0 10px;font-size:21px}
body.demo02.is-home .home-support-grid p{margin:0;color:var(--theme-muted);line-height:1.6}
body.demo02.is-home .home-support-foot{display:flex;justify-content:space-between;align-items:center;gap:30px;margin-top:14px;padding:24px 28px;background:var(--theme-dark);color:#fff}
body.demo02.is-home .home-support-foot strong{font-size:20px}
body.demo02.is-home .home-support-foot p{margin:5px 0 0;color:#cbd5e1}
@media(max-width:800px){body.demo02.is-home .home-support-head{grid-template-columns:1fr;gap:12px}body.demo02.is-home .home-support-grid{grid-template-columns:1fr}body.demo02.is-home .home-support-foot{align-items:flex-start;flex-direction:column}}
/* Global heading guard: keep page titles from overwhelming layouts. */
body[class*="demo"] h1{font-size:clamp(30px,3.2vw,48px)!important;line-height:1.08!important;letter-spacing:-.025em;overflow-wrap:break-word;text-wrap:balance}
@media(max-width:600px){body[class*="demo"] h1{font-size:clamp(28px,9vw,38px)!important}}

/* === 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 === */
