/* Template 13: botanical editorial layout, isolated from palette generation. */
body.demo13{--max:1200px;--font:"Source Serif 4",Georgia,serif;font-family:var(--font)}
body.demo13 h1,body.demo13 h2{font-family:Merriweather,Georgia,serif}
.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.demo13:is(.is-home,.is-about) .container{width:calc(100% - 64px);max-width:1200px;margin-inline:auto}
body.demo13:is(.is-home,.is-about) .section{padding:80px 0}
body.demo13:is(.is-home,.is-about) h2{font-size:clamp(26px,2.6vw,36px);line-height:1.3;margin:0 0 20px;text-wrap:balance}
body.demo13:is(.is-home,.is-about) h3{font-size:19px;line-height:1.4}
body.demo13:is(.is-home,.is-about) p{line-height:1.75}
body.demo13 .d2-kicker{font-family:Arial,sans-serif;font-size:11px;letter-spacing:.17em;color:var(--theme-primary);margin:0 0 18px}
.d13-text-link{display:inline-block;color:var(--theme-primary);font-weight:700;padding:8px 0;border-bottom:1px solid var(--theme-primary-mid)}
body.demo13.is-home .d13-head{display:flex;align-items:center;min-height:clamp(620px,82svh,820px);padding:64px 0;background-position:center;background-size:cover;color:#fff}
body.demo13.is-home .d13-head h1{max-width:19ch;font-size:clamp(38px,4.5vw,62px);line-height:1.15;letter-spacing:-.025em;margin:0 0 24px;color:#fff}
body.demo13.is-home .d13-head h1 em{color:var(--theme-primary-mid);font-style:normal}
body.demo13.is-home .d13-head .d2-kicker{color:var(--theme-primary-mid)}
body.demo13.is-home .d13-head .d13-lede{color:#eef4ee;max-width:560px;font-size:18px;margin:0 0 30px}
.d13-actions{display:flex;flex-wrap:wrap;gap:14px}
.d13-story{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:64px}
.d13-story figure{margin:0}.d13-story img{display:block;width:100%;height:380px;object-fit:cover;object-position:center 35%}
.d13-story p,.d13-profile p,.d13-values p,.d13-working p{color:var(--theme-muted)}
body.demo13 .d13-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
body.demo13 .d13-facts article{padding:24px;background:var(--theme-surface);border-top:1px solid var(--theme-primary-mid);min-width:0}
body.demo13 .d13-facts article>span{font-size:12px;color:var(--theme-primary);font-family:Arial,sans-serif}
body.demo13 .d13-facts h3{margin:12px 0 8px}.d13-facts p{margin:0;color:var(--theme-muted);font-size:15px}
body.demo13.is-home .d13-facts{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:48px;gap:20px}
body.demo13.is-home .d13-facts article{padding:24px 0 0}
.d13-section-heading{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:30px}.d13-section-heading h2{margin-bottom:0!important}
body.demo13.is-home .d2-prod-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.d13-section-heading+.d2-prod-grid .d2-prod{border-radius:2px}.d13-section-heading+.d2-prod-grid .d2-prod-img{height:250px}
.d13-progress-line{padding:80px 0;background:var(--theme-surface);color:var(--theme-text)}
.d13-progress-line header{display:flex;justify-content:space-between;gap:40px;align-items:center;margin-bottom:40px}.d13-progress-line header span{font:11px Arial,sans-serif;letter-spacing:.16em;color:var(--theme-primary)}
.d13-progress-line header h2{max-width:640px;margin:0!important}
.d13-progress-line ol{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;padding:0;margin:0 0 40px;gap:28px}
.d13-progress-line li{border-top:1px solid var(--theme-primary-mid);padding-top:24px}.d13-progress-line li>b{font-size:26px;font-weight:400;color:var(--theme-primary)}.d13-progress-line li h3{margin:16px 0 8px}.d13-progress-line li p{color:var(--theme-muted);font-size:15px;margin:0}
.d13-progress-line figure{position:relative;height:300px;margin:0;overflow:hidden}.d13-progress-line figure img{width:100%;height:100%;object-fit:cover;object-position:center 42%}.d13-progress-line figure a{position:absolute;right:24px;bottom:24px;padding:14px 22px;background:var(--theme-surface);color:var(--theme-text)}
.d13-company-heading{padding:28px 0 44px;background:var(--theme-surface-soft);border-bottom:1px solid var(--theme-line)}
.d13-breadcrumb{font:12px Arial,sans-serif;color:var(--theme-muted);margin:0 0 40px}
.d13-company-title{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:64px}.d13-company-title h1{font-size:clamp(30px,3.6vw,46px);line-height:1.2;margin:0}.d13-company-title>p{max-width:520px;margin:0;color:var(--theme-muted)}
.d13-profile{display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:64px}.d13-profile figure{position:relative;margin:0}.d13-profile img{display:block;width:100%;height:430px;object-fit:cover;object-position:center 35%}.d13-profile figcaption{position:absolute;left:0;bottom:0;padding:16px 24px;background:var(--theme-primary-dark);color:white;font-size:14px}.d13-profile .btn{margin-top:16px}
.d13-values{display:grid;grid-template-columns:.75fr 1.25fr;gap:64px;align-items:start}
.d13-working{display:grid;grid-template-columns:1fr 1fr;gap:80px;align-items:start}.d13-working-intro img{width:100%;height:280px;object-fit:cover;margin-top:22px}
body.demo13.is-about .d13-line ol{border:0;list-style:none;margin:0;padding:0}
body.demo13.is-about .d13-line li{padding:0 0 24px 62px;margin-bottom:24px;border-bottom:1px solid var(--theme-line);min-height:76px}
body.demo13.is-about .d13-line li:last-child{margin-bottom:0;padding-bottom:0;border-bottom:0}
body.demo13.is-about .d13-line b{left:0;top:0;width:38px;height:38px;display:grid;place-items:center;font-size:13px;border-radius:50%;background:var(--theme-primary-light);color:var(--theme-primary-dark)}
body.demo13.is-about .d13-line h3{margin:0 0 8px}.d13-line p{margin:0;font-size:15px}
@media(max-width:980px){body.demo13.is-home .d13-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.d13-story,.d13-profile,.d13-working,.d13-company-title{gap:32px}.d13-values{grid-template-columns:1fr;gap:30px}.d13-progress-line ol{grid-template-columns:repeat(2,minmax(0,1fr))}body.demo13.is-home .d2-prod-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){body.demo13:is(.is-home,.is-about) .container{width:calc(100% - 40px)}body.demo13:is(.is-home,.is-about) .section,.d13-progress-line{padding:48px 0}body.demo13.is-home .d13-head{min-height:620px;background-position:60% center}.d13-story,.d13-profile,.d13-working,.d13-company-title{grid-template-columns:1fr;gap:28px}.d13-story img,.d13-profile img{height:340px}.d13-section-heading,.d13-progress-line header{display:block}.d13-section-heading>a{margin-top:14px}.d13-progress-line header span{display:block;margin-bottom:16px}body.demo13 .d13-facts,body.demo13.is-home .d13-facts,body.demo13.is-home .d2-prod-grid{grid-template-columns:1fr}.d13-progress-line ol{gap:24px 20px}.d13-progress-line figure{height:240px}.d13-progress-line figure a{left:16px;right:auto;bottom:16px}.d13-breadcrumb{margin-bottom:28px}.d13-working-intro img{height:240px}}

/* Homepage cover: moving image beneath a stable reading layer. */
body.demo13.is-home .d13-head{position:relative;isolation:isolate;overflow:hidden;background:#102017}
body.demo13.is-home .d13-head>.d13-hero-media{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;transform-origin:65% 50%;animation:d13-cover-drift 12s ease-in-out infinite alternate;pointer-events:none}
body.demo13.is-home .d13-head:before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#102017e8 0%,#10201799 48%,#10201720 100%);pointer-events:none}
body.demo13.is-home .d13-head .container>*{animation:d13-cover-enter .9s ease-out both}
body.demo13.is-home .d13-head h1{animation-delay:.15s}
body.demo13.is-home .d13-head .d13-lede{animation-delay:.3s}
body.demo13.is-home .d13-head .d13-actions{animation-delay:.45s}
@keyframes d13-cover-drift{from{transform:scale(1.04) translateX(-1%)}to{transform:scale(1.13) translateX(1%)}}
@keyframes d13-cover-enter{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:640px){body.demo13.is-home .d13-head>.d13-hero-media{object-position:60% center}}
@media(prefers-reduced-motion:reduce){body.demo13.is-home .d13-head>.d13-hero-media,body.demo13.is-home .d13-head .container>*{animation:none;transform:none;opacity:1}}

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