/* ============================================================
   dHConcept Homepage Design Update 2026-03-31 (v3)
   Homepage styles scoped to #dh-homepage
   Global styles (info bar, nav) kept unscoped
   v3: mockup consistency – hero bg, h1 size, trust accent, section headers
   ============================================================ */

/* ── GLOBAL: Info Bar (all pages) ── */
.dh-information-bar { background: #FF8674 !important; position: relative; }
.dh-information-bar p { padding-right: 44px !important; }
.dh-infobar-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; font-size: 22px;
  cursor: pointer; line-height: 1; padding: 2px 6px; opacity: .85;
}
.dh-infobar-close:hover { opacity: 1; }

/* ── GLOBAL: Nav new items (desktop, all pages) ── */
.dh-nav-new-item > a {
  font-size: 15px !important; font-weight: 500; color: #333 !important;
  padding: 0 14px !important; transition: color .2s !important; white-space: nowrap;
  background: transparent !important;
}
.dh-nav-new-item > a:hover,
.dh-nav-new-item > a:focus {
  color: #FF8674 !important;
  background: transparent !important;
}
/* 壓制 dh-navbar 全部 nav item 的 hover 底線，保留顏色變化 */
.dh-navbar .uk-navbar-left > ul > li > a::after,
.dh-navbar .uk-navbar-right > ul > li > a::after {
  content: none !important;
  display: none !important;
}
.dh-navbar .uk-navbar-left > ul > li > a:hover::after,
.dh-navbar .uk-navbar-right > ul > li > a:hover::after,
.dh-navbar .uk-navbar-left > ul > li > a.uk-open::after,
.dh-navbar .uk-navbar-right > ul > li > a.uk-open::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  opacity: 0 !important;
}
/* 恢復 hover 顏色變化效果 */
.dh-navbar .uk-navbar-left > ul > li > a:hover,
.dh-navbar .uk-navbar-right > ul > li > a:hover {
  color: #FF8674 !important;
  background: transparent !important;
}

/* ══════════════════════════════════════════════════════════
   HOMEPAGE ONLY — scoped to #dh-homepage
   ══════════════════════════════════════════════════════════ */

/* Hero Layout */
#dh-homepage #dh-homepage-brand-section {
  background: linear-gradient(155deg, #fff8f6 0%, #fff 60%, #fdf5f0 100%);
  overflow: visible !important;
  height: auto !important;
}
#dh-homepage .dh-hero-layout,
#dh-homepage .dh-hero-left,
#dh-homepage .dh-hero-tagline {
  overflow: visible !important;
  height: auto !important;
}
#dh-homepage .dh-hero-layout {
  display: flex; align-items: center; gap: 44px;
  max-width: 1200px; margin: 0 auto; padding: 64px 24px 56px;
}
#dh-homepage .dh-hero-left { flex: 1 1 auto; }
#dh-homepage .dh-hero-right { flex: 0 0 300px; display: flex; flex-direction: column; gap: 14px; }
/* ≤900px: narrower side-by-side, matches mockup tablet */
@media (max-width: 900px) {
  #dh-homepage .dh-hero-layout { gap: 24px; padding: 56px 20px 44px; align-items: center; }
  #dh-homepage .dh-hero-right { flex: 0 0 240px; }
}
/* ── Mobile: hero 補出通知欄+header 的遮擋空間 ── */
@media (max-width: 768px) {
  #dh-homepage #dh-homepage-brand-section { padding-top: 20px !important; }
}
/* ── Mobile ≤680px: stack, cards horizontal (matches mockup mobile) ── */
@media (max-width: 680px) {
  #dh-homepage .dh-hero-layout { flex-direction: column; padding: 44px 16px 36px !important; gap: 20px !important; }
  #dh-homepage .dh-hero-right {
    flex: 1 1 auto !important; flex-direction: row !important;
    width: 100% !important; gap: 10px !important;
  }
  #dh-homepage .dh-hero-card { flex: 1 1 0 !important; }
}

#dh-homepage .dh-hero-tagline h1 {
  font-size: clamp(30px, 5.8vw, 52px) !important; line-height: 1.2 !important;
  color: #1d1d1d !important; letter-spacing: 2px !important;
  font-weight: 700 !important; margin-top: 0 !important; margin-bottom: 20px !important;
}
@media (max-width: 640px) {
  #dh-homepage .dh-hero-tagline h1 {
    font-size: clamp(22px, 6.5vw, 30px) !important;
    letter-spacing: 1px !important; margin-bottom: 16px !important;
  }
}
#dh-homepage .dh-hero-ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 640px) {
  #dh-homepage .dh-hero-ctas { margin-top: 20px !important; gap: 10px !important; }
  #dh-homepage .dh-hero-btn-primary,
  #dh-homepage .dh-hero-btn-ghost {
    flex: 1 1 auto !important; justify-content: center !important;
    text-align: center !important; padding: 12px 16px !important; font-size: 14px !important;
  }
}
#dh-homepage .dh-hero-btn-primary {
  display: inline-flex; align-items: center; background: #FF8674; color: #fff !important;
  font-size: 15px; font-weight: 700; padding: 13px 32px; border-radius: 50px;
  text-decoration: none !important; transition: all .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 4px 18px rgba(255,134,116,.35);
}
#dh-homepage .dh-hero-btn-primary:hover { background: #e5705f; transform: translateY(-2px); box-shadow: 0 8px 26px rgba(255,134,116,.45); }
#dh-homepage .dh-hero-btn-ghost {
  display: inline-flex; align-items: center; background: transparent;
  color: #1d1d1d !important; font-size: 15px; font-weight: 500;
  padding: 13px 24px; border-radius: 50px; border: 1.5px solid rgba(0,0,0,.14);
  text-decoration: none !important; transition: all .25s;
}
#dh-homepage .dh-hero-btn-ghost:hover { background: transparent !important; border-color: #FF8674 !important; color: #FF8674 !important; transform: translateY(-2px); }

#dh-homepage .dh-hero-card {
  position: relative; border-radius: 14px; overflow: hidden;
  flex: 1; display: block; text-decoration: none !important; background: #eee;
}
#dh-homepage .dh-hero-card img { width: 100%; height: 154px; object-fit: cover; display: block; transition: transform .5s ease; }
@media (max-width: 900px) { #dh-homepage .dh-hero-card img { height: 128px; } }
@media (max-width: 680px)  { #dh-homepage .dh-hero-card img { height: 115px !important; } }
#dh-homepage .dh-hero-card:hover img { transform: scale(1.05); }
/* Eyebrow line */
#dh-homepage .dh-hero-eyebrow {
  color: #FF8674 !important; font-size: 11px !important; font-weight: 600 !important;
  letter-spacing: 4px !important; text-transform: uppercase; margin-bottom: 6px !important;
  margin-top: 0 !important;
}
/* h1 sub-lines (block, smaller, lighter) — each span renders on its own line */
#dh-homepage .dh-hero-tagline h1 .dh-hero-sub {
  font-size: clamp(18px, 3.3vw, 30px) !important;
  font-weight: 400 !important; color: #5a5a5a !important;
  display: block !important; margin-top: 8px !important; letter-spacing: 1px !important;
}
/* Description paragraphs */
#dh-homepage .dh-hero-desc {
  font-size: 15px !important; color: #666 !important;
  line-height: 1.7 !important; margin: 0 0 6px !important;
}
#dh-homepage .dh-hero-card-label {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.58));
  color: #fff; font-size: 14px; font-weight: 600; line-height: 1.4;
}
/* Card sub-text */
#dh-homepage .dh-hero-card-sub {
  display: block; font-size: 12px !important; font-weight: 400 !important;
  opacity: .85; margin-top: 2px;
}

/* Trust Bar */
#dh-homepage .dh-trust-bar {
  background: #1d1d1d; color: #fff; padding: 26px 0;
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
#dh-homepage .dh-trust-item { text-align: center; font-size: 11px !important; color: rgba(255,255,255,.5) !important; line-height: 1.4; letter-spacing: .3px; }
#dh-homepage .dh-trust-num { font-size: 24px !important; font-weight: 700 !important; color: #FF8674 !important; display: block; margin-bottom: 3px; letter-spacing: .5px; }
@media (max-width: 680px) {
  /* 5 items at ≤680px: allow 2-row wrap */
  #dh-homepage .dh-trust-bar { gap: 24px 32px !important; padding: 22px 16px !important; }
}
@media (max-width: 480px) {
  #dh-homepage .dh-trust-bar { gap: 16px 24px !important; padding: 18px 12px !important; }
  #dh-homepage .dh-trust-num { font-size: 20px !important; }
  #dh-homepage .dh-trust-item { font-size: 10px !important; }
}

/* Banner Horizontal Scroll */
#dh-homepage #dh-banner-grid {
  flex-wrap: nowrap !important; overflow-x: auto !important;
  scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab;
}
#dh-homepage #dh-banner-grid::-webkit-scrollbar { display: none; }
#dh-homepage #dh-banner-grid:active { cursor: grabbing; }
#dh-homepage #dh-banner-grid .dh-banner-item {
  flex: 0 0 clamp(260px, 38vw, 520px) !important;
  scroll-snap-align: start; border-radius: 12px; overflow: hidden;
}
@media (max-width: 640px) {
  #dh-homepage #dh-banner-grid .dh-banner-item { flex: 0 0 72vw !important; }
}

/* Tab cards (改造方式) Scroll */
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section {
  display: flex !important; overflow-x: auto !important;
  scroll-snap-type: x mandatory; flex-wrap: nowrap !important;
  gap: 16px !important; scrollbar-width: none; padding: 0 4px 8px !important;
}
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section::-webkit-scrollbar { display: none; }
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list {
  flex: 0 0 calc(33.333% - 11px) !important; width: auto !important;
  scroll-snap-align: start; min-width: 260px; padding: 0 0 16px !important;
  background: #fff !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list:hover h2 {
  color: #FF8674 !important;
}
/* 圖片容器：移除 inline height 限制，讓圖片比例自然 */
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list label {
  height: 200px !important;
  display: block !important;
  overflow: hidden !important;
}
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list .check-div {
  height: 200px !important;
  background-size: cover !important;
  background-position: center !important;
  position: relative !important;
}
/* 移除 a 標籤的間距 */
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list > a {
  display: block !important;
}
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list > a .uk-grid {
  margin: 0 !important;
}
/* Overlay 文字：小字標籤 + 換行 + 主題大字 */
.card-overlay-label {
  display: block !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  opacity: 0.85;
  margin-bottom: 2px !important;
  line-height: 1.2 !important;
}
.card-overlay-title {
  display: block !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}
@media (max-width: 768px) {
  #dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list {
    flex: 0 0 calc(80% - 8px) !important;
  }
}

/* Explore More Scroll */
#dh-homepage #dh-section-explore .carousel-section-case {
  display: flex !important; overflow-x: auto !important;
  scroll-snap-type: x mandatory; flex-wrap: nowrap !important;
  gap: 18px !important; scrollbar-width: none; padding: 0 4px 8px !important; cursor: grab;
}
#dh-homepage #dh-section-explore .carousel-section-case::-webkit-scrollbar { display: none; }
#dh-homepage #dh-section-explore .carousel-section-case:active { cursor: grabbing; }
#dh-homepage #dh-section-explore .carousel-section-case > .style-list {
  flex: 0 0 calc(27% - 12px) !important; width: auto !important;
  scroll-snap-align: start; min-width: 260px;
}
@media (max-width: 1024px) and (min-width: 769px) {
  #dh-homepage #dh-section-explore .carousel-section-case > .style-list { flex: 0 0 calc(44% - 12px) !important; }
}
@media (max-width: 768px) {
  #dh-homepage #dh-section-explore .carousel-section-case > .style-list { flex: 0 0 calc(80% - 8px) !important; }
}

/* Media Spotlight Scroll */
#dh-homepage #dh-section-media .carousel-section-case {
  display: flex !important; overflow-x: auto !important;
  scroll-snap-type: x mandatory; flex-wrap: nowrap !important;
  gap: 12px !important; scrollbar-width: none; padding: 0 4px 12px !important; cursor: grab;
}
#dh-homepage #dh-section-media .carousel-section-case::-webkit-scrollbar { display: none; }
#dh-homepage #dh-section-media .carousel-section-case:active { cursor: grabbing; }
#dh-homepage #dh-section-media .carousel-section-case > .style-list {
  flex: 0 0 260px !important; width: auto !important; scroll-snap-align: start;
  background: #fff !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  padding-bottom: 16px !important;
}
#dh-homepage #dh-section-media .carousel-section-case > .style-list:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14) !important;
}
/* 移除圖片 wrapper 的 border-radius，由外層卡片 overflow:hidden 控制 */
#dh-homepage #dh-section-media .carousel-section-case > .style-list > div:first-child {
  border-radius: 0 !important;
}
/* 文字區域 padding */
#dh-homepage #dh-section-media .carousel-section-case > .style-list .card-text-title,
#dh-homepage #dh-section-media .carousel-section-case > .style-list .card-text-des {
  padding: 0 14px !important;
}
#dh-homepage #dh-section-media .carousel-section-case > .style-list .dhshoptab {
  padding-left: 14px !important;
  padding-right: 14px !important;
}
@media (max-width: 640px) {
  #dh-homepage #dh-section-media .carousel-section-case > .style-list { flex: 0 0 68vw !important; }
}

/* ── 篩選欄隱藏（含 UIkit sticky clone） ── */
.dh-filter-concept-bar,
#dh-homepage .dh-concept > .uk-margin-medium { display: none !important; }

/* ── ConceptList Pinterest 風格卡片 ── */
/* 實際 HTML：li.uk-inline-clip > a > div.dh-graphic > img + div(title) */

/* 1. 圖片：長型比例 */
#dh-homepage #conceptList .dh-graphic img {
  width: 100% !important;
  height: auto !important;
  min-height: 200px !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 16px 16px 0 0 !important;
}

/* 2. 卡片外框：圓角、陰影（掛在 .dh-graphic 上） */
#dh-homepage #conceptList .dh-graphic {
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #fff !important;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  height: auto !important;
}
#dh-homepage #conceptList li:hover .dh-graphic {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

/* 3. 標題文字：黑色覆蓋橘色 */
/* 橘色來源：a { color: #FF8674 } 繼承到 dh-graphic div */
#dh-homepage #conceptList a,
#dh-homepage #conceptList a div,
#dh-homepage #conceptList .dh-graphic div {
  color: #1d1d1d !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  padding: 10px 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  background: #fff !important;
}

/* 4. uk-card 系列（UIkit masonry 可能加的 class，雙保險） */
#dh-homepage #conceptList .uk-card,
#dh-homepage #conceptList .uk-card-default {
  box-shadow: 0 1px 6px rgba(0,0,0,0.1) !important;
  border-radius: 16px !important;
  background: #fff !important;
}
#dh-homepage #conceptList .uk-card-body {
  padding: 10px 12px 14px !important;
  background: #fff !important;
  border-radius: 0 0 16px 16px !important;
}

/* 5. 手機版更緊湊 */
@media (max-width: 768px) {
  #dh-homepage #conceptList .dh-graphic img { min-height: 160px !important; }
}

/* ── Section headers: accent left-bar (matches mockup .mk-hdr style) ── */
/* 同時匹配 margin-top:40px（無空格）和 margin-top: 40px（有空格）兩種 inline style 格式 */
#dh-homepage h2[style*="margin-top:40px"],
#dh-homepage h2[style*="margin-top: 40px"],
#dh-homepage #dh-waterfall-title {
  margin-left: 0 !important;
  padding-left: 16px !important;
  border-left: 4px solid #FF8674 !important;
  font-size: clamp(20px, 2.8vw, 28px) !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  line-height: 1.3 !important;
  color: #1d1d1d !important;
  margin-top: 56px !important;
  margin-bottom: 24px !important;
}
/* ── Mobile: 縮減 section h2 margin-top ── */
@media (max-width: 768px) {
  #dh-homepage h2[style*="margin-top:40px"],
  #dh-homepage h2[style*="margin-top: 40px"],
  #dh-homepage #dh-waterfall-title {
    margin-top: 36px !important;
    margin-bottom: 16px !important;
  }
  /* tab buttons 在小螢幕並排 */
  #dh-homepage .dhindextablinks {
    padding: 9px 14px !important;
    font-size: 14px !important;
  }
  /* explore/media CTA 避免 float 影響 */
  #dh-homepage .dhshoptab {
    float: none !important;
    display: inline-block !important;
  }
}

/* ── Section 背景色塊（交替 warm/white，對應 mockup） ── */
/* Banner 區：白色（預設）*/
#dh-homepage #dhshop_category {
  background: #fdf5f0 !important;
  padding: 48px 0 80px !important;
}
#dh-homepage #dh-section-single {
  background: #fff !important;
  padding: 48px 0 !important;
}
#dh-homepage #dh-section-explore {
  background: #fdf5f0 !important;
  padding: 48px 0 !important;
}
#dh-homepage #dh-section-media {
  background: #fff !important;
  padding: 48px 0 !important;
}
#dh-homepage .dh-concept {
  background: #fdf5f0 !important;
  padding: 48px 0 !important;
  margin-top: 0 !important;
}
@media (max-width: 768px) {
  #dh-homepage #dhshop_category,
  #dh-homepage #dh-section-single,
  #dh-homepage #dh-section-explore,
  #dh-homepage #dh-section-media,
  #dh-homepage .dh-concept {
    padding: 32px 0 !important;
  }
}

/* Section 4: Tab 按鈕列左對齊（mockup：左對齊，正式版 inline justify-content:center 覆蓋） */
#dh-homepage #dhshop_category .dhindextab {
  justify-content: flex-start !important;
  padding: 0 20px !important;
}

/* Section 4: Tab section sub-header "大面積改造最有感" style override */
#dh-homepage #dhshop_category .dhindextabcontent > h2 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #666 !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 16px !important;
  border-left: none !important;
  padding-left: 4px !important;
}
/* Section 4: Tab buttons */
#dh-homepage .dhindextablinks {
  font-size: 15px !important;
  border-radius: 50px !important;
  padding: 11px 18px !important;
}
/* Section 4: Card h2 inside style-list (e.g. "歐巴地板® 地面打造超方便") */
#dh-homepage #dhshop_category .style-list h2 {
  font-size: 16px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 12px 14px 0 !important;
  line-height: 1.4 !important;
  color: #1d1d1d !important;
  transition: color 0.3s ease !important;
}
/* Section 5: Icon titles and sub-titles */
#dh-homepage .dh-dhshop-icon-title {
  font-size: 13px !important;
  font-weight: 600 !important;
}
#dh-homepage .dh-dhshop-icon-sub-title {
  font-size: 11px !important;
  color: #999 !important;
}
/* Section 6: Explore card content */
#dh-homepage #dh-section-explore .card-text-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #1d1d1d !important;
  margin-bottom: 7px !important;
}
#dh-homepage #dh-section-explore .card-text-des {
  font-size: 13px !important;
  color: #666 !important;
  line-height: 1.6 !important;
}
#dh-homepage #dh-section-explore .dhshoptab {
  padding: 8px 17px !important;
  font-size: 13px !important;
  border-radius: 50px !important;
  float: none !important;
  display: inline-block !important;
  margin: 10px 0 0 !important;
}
/* Section 7: Media card content */
#dh-homepage #dh-section-media .card-text-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1d1d1d !important;
  margin-top: 10px !important;
  margin-bottom: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#dh-homepage #dh-section-media .card-text-des {
  font-size: 12px !important;
  color: #666 !important;
  line-height: 1.5 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 1 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
#dh-homepage #dh-section-media .dhshoptab {
  padding: 7px 13px !important;
  font-size: 12px !important;
  border-radius: 50px !important;
  float: none !important;
  display: inline-block !important;
  margin: 10px 0 0 !important;
}

/* ── Icons section scroll (#dh-section-single) ── */
#dh-homepage #dh-section-single .carousel-section-icon {
  display: flex !important; overflow-x: auto !important;
  scroll-snap-type: x mandatory; flex-wrap: nowrap !important;
  scrollbar-width: none; padding: 10px 0 16px !important;
  gap: 0 !important;
}
#dh-homepage #dh-section-single .carousel-section-icon::-webkit-scrollbar { display: none; }
#dh-homepage #dh-section-single .carousel-section-icon .item.style-list {
  flex: 0 0 auto !important; width: auto !important; scroll-snap-align: start;
}

/* ── Fix font-size:18px inflation in section wrappers ── */
#dh-homepage #dh-section-single,
#dh-homepage #dh-section-explore .mainboard,
#dh-homepage #dh-section-media {
  font-size: 15px !important;
}

/* ── Banner section: breathing room ── */
#dh-homepage .dh-padding-h-15:has(#dh-banner-grid) {
  margin-top: 48px !important;
  margin-bottom: 48px !important;
}

/* ══════════════════════════════════════════════════════════
   ITEM/7 歐巴地板銷售頁 FIXES
   ══════════════════════════════════════════════════════════ */

/* 修正 1: 計算機浮動按鈕全站隱藏 */
#oppa-calc-btn,
.calc-modal-overlay,
.right_nav > .questionanswer.unbox_btn {
  display: none !important;
}

/* 問題 1: 移除右側購買 sidebar 的 sticky 行為 */
.dh-item-group-info-sticky,
.dh-item-group-info-sticky.uk-sticky-fixed,
.dh-item-group-info-sticky.uk-active {
  position: static !important;
  top: auto !important;
  width: auto !important;
  transform: none !important;
  margin-top: 0 !important;
  margin-bottom: 24px !important;
}

/* 問題 3 / 修正 2&3: 特色 icon 區 — 桌機 2×3 grid，手機左右滑動 */
#dhshopItem .col-lg-12.mt-4:has(> .col-xs-4) {
  display: flex !important;
  flex-wrap: wrap !important;          /* 桌機：自動換行 → 2 排 × 3 欄 */
  overflow-x: visible !important;
  gap: 12px !important;
  padding: 8px 4px 12px !important;
}
#dhshopItem .col-xs-4 {
  flex: 0 0 calc(33.333% - 8px) !important;
  width: auto !important;
  max-width: none !important;
  float: none !important;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  /* 手機版改回橫向滑動 */
  #dhshopItem .col-lg-12.mt-4:has(> .col-xs-4) {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  #dhshopItem .col-lg-12.mt-4:has(> .col-xs-4)::-webkit-scrollbar { display: none; }
  #dhshopItem .col-xs-4 {
    flex: 0 0 calc(80% - 8px) !important;
    scroll-snap-align: start;
  }
}

/* 問題 2 / 修正 4a: 改造案例輪播 (.case-carousel) — figcaption 完整顯示在圖片下方 */

/* 解除所有父容器的 overflow 限制，確保 caption 不被截斷 */
.obafloor-case-scope,
.obafloor-case-scope > div,
.carousel-section.carousel-section-case,
.carousel-section.carousel-section-case > .style-list {
  overflow: visible !important;
  height: auto !important;
}

.case-carousel {
  overflow: visible !important;
  padding: 8px 0 24px;
}

/* overflow-x:auto 會強制 overflow-y:auto；用 padding-bottom 為 caption 留空間 */
.case-carousel__track {
  display: flex !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
  gap: 18px;
  scrollbar-width: none;
  cursor: grab;
  padding-bottom: 56px; /* caption 高度空間，避免被 overflow-y:auto 截斷 */
  margin-bottom: -40px; /* 收回多餘的底部空間 */
  align-items: flex-start;
}
.case-carousel__track:active { cursor: grabbing; }
.case-carousel__track::-webkit-scrollbar { display: none; }

.case-carousel__item {
  flex: 0 0 clamp(280px, 38vw, 500px);
  scroll-snap-align: start;
  margin: 0;
  overflow: visible !important;
}

/* 圖片 */
.case-carousel__item img {
  width: 100% !important;
  height: 300px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  display: block;
}

/* figcaption：圖片下方完整顯示 */
.case-carousel__caption {
  display: block !important;
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1d;
  padding: 10px 8px 6px;
  text-align: center;
  line-height: 1.4;
  background: #fff;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  overflow: visible !important;
  position: relative;
}

@media (max-width: 768px) {
  .case-carousel__item { flex: 0 0 78vw; }
  .case-carousel__item img { height: 240px; }
}

/* 修正 4b: 案例分類區 (.case-section, .case-acc, .case-scroll) */
.case-section { padding: 40px 20px 48px; max-width: 1600px; margin: 0 auto; }
.case-title {
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; color: #1d1d1d;
  margin-bottom: 6px; padding-left: 16px; border-left: 4px solid #FF8674;
}
.case-subtitle { font-size: 14px; color: #888; margin-bottom: 20px; padding-left: 20px; }
/* Tab 系統 (CSS radio hack) */
.case-radio { display: none !important; }
.case-tab {
  display: inline-block; padding: 7px 18px; border-radius: 50px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  background: #eaeaea; color: #555; margin: 0 4px 12px;
  transition: background .2s, color .2s; user-select: none;
}
.case-tab:hover { background: #ddd; }
/* 全部 panel 預設隱藏 */
.case-panel { display: none; }
/* 選中的 radio 對應顯示 panel */
#cat-kids:checked   ~ .case-panels .case-panel--kids   { display: block; }
#cat-pets:checked   ~ .case-panels .case-panel--pets   { display: block; }
#cat-rent:checked   ~ .case-panels .case-panel--rent   { display: block; }
#cat-diy:checked    ~ .case-panels .case-panel--diy    { display: block; }
#cat-family:checked ~ .case-panels .case-panel--family { display: block; }
/* 選中的 tab 樣式 */
#cat-kids:checked   ~ label[for="cat-kids"],
#cat-pets:checked   ~ label[for="cat-pets"],
#cat-rent:checked   ~ label[for="cat-rent"],
#cat-diy:checked    ~ label[for="cat-diy"],
#cat-family:checked ~ label[for="cat-family"] {
  background: #FF8674 !important; color: #fff !important;
}
/* 橫向滑動圖片 */
.case-scroll {
  display: flex !important; overflow-x: auto !important;
  scroll-snap-type: x mandatory; gap: 12px;
  scrollbar-width: none; cursor: grab; padding: 8px 0 12px;
}
.case-scroll:active { cursor: grabbing; }
.case-scroll::-webkit-scrollbar { display: none; }
.case-scroll img {
  flex: 0 0 300px !important; width: 300px !important;
  height: 220px !important; object-fit: cover !important;
  border-radius: 12px !important; display: block !important;
  max-width: none !important; scroll-snap-align: start;
}
@media (max-width: 768px) {
  .case-scroll img { flex: 0 0 72vw !important; width: 72vw !important; height: 180px !important; }
}

/* 修正 5: 全站字型統一 */
body, h1, h2, h3, h4, h5, h6, p, a, span, div, li, td, th,
input, button, textarea, select {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif !important;
}
/* 銷售頁字級 */
#dhshopItem h2 { font-size: var(--fs-section, 24px) !important; }
#dhshopItem p  { font-size: var(--fs-body, 15px) !important; line-height: 1.6 !important; }

/* ══════════════════════════════════════════════════════════
   v4 FINAL POLISH — Apple.com aesthetic level
   Typography system · Spacing rhythm · Micro-details
   All scoped to #dh-homepage
   ══════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
#dh-homepage {
  --dh-brand:       #FF8674;
  --dh-text:        #1d1d1d;
  --dh-text-sub:    #666;
  --dh-text-caption:#999;
  --dh-bg-warm:     #fdf5f0;
  --dh-radius:      16px;
  --dh-shadow:      0 1px 8px rgba(0,0,0,0.08);
  --dh-shadow-hover:0 8px 24px rgba(0,0,0,0.13);
  --dh-ease:        all 0.3s cubic-bezier(.4,0,.2,1);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC",
    "Microsoft JhengHei", "PingFang TC", sans-serif !important;
}

/* ── Font family: homepage explicit override ── */
#dh-homepage h1, #dh-homepage h2, #dh-homepage h3, #dh-homepage h4,
#dh-homepage p,  #dh-homepage button, #dh-homepage a,
#dh-homepage span, #dh-homepage div, #dh-homepage li {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC",
    "Microsoft JhengHei", "PingFang TC", sans-serif !important;
}

/* ── Global font stack: Noto Sans TC higher priority ── */
body, h1, h2, h3, h4, h5, h6, p, a, span, div, li, td, th,
input, button, textarea, select {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC",
    "Microsoft JhengHei", "PingFang TC", "Segoe UI", Arial, sans-serif !important;
}

/* ── Section padding rhythm: 64/48/36 ── */
#dh-homepage #dhshop_category  { padding-top: 64px !important; padding-bottom: 88px !important; }
#dh-homepage #dh-section-single  { padding-top: 64px !important; padding-bottom: 64px !important; }
#dh-homepage #dh-section-explore { padding-top: 64px !important; padding-bottom: 64px !important; }
#dh-homepage #dh-section-media   { padding-top: 64px !important; padding-bottom: 64px !important; }
#dh-homepage .dh-concept         { padding-top: 64px !important; padding-bottom: 64px !important; }

@media (max-width: 1024px) {
  #dh-homepage #dhshop_category  { padding-top: 48px !important; padding-bottom: 64px !important; }
  #dh-homepage #dh-section-single,
  #dh-homepage #dh-section-explore,
  #dh-homepage #dh-section-media,
  #dh-homepage .dh-concept        { padding-top: 48px !important; padding-bottom: 48px !important; }
}

@media (max-width: 768px) {
  #dh-homepage #dhshop_category  { padding-top: 36px !important; padding-bottom: 52px !important; }
  #dh-homepage #dh-section-single,
  #dh-homepage #dh-section-explore,
  #dh-homepage #dh-section-media,
  #dh-homepage .dh-concept        { padding-top: 36px !important; padding-bottom: 36px !important; }
}

/* ── Content wrapper: horizontal padding 40px / 16px ── */
#dh-homepage .dh-content-wrapper,
#dh-homepage #dh-section-single .dh-padding-h-15,
#dh-homepage #dh-section-explore .mainboard {
  padding-left: 40px !important;
  padding-right: 40px !important;
  box-sizing: border-box !important;
}
@media (max-width: 768px) {
  #dh-homepage .dh-content-wrapper,
  #dh-homepage #dh-section-single .dh-padding-h-15,
  #dh-homepage #dh-section-explore .mainboard {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ── Section headers: tighter, more premium typography ── */
#dh-homepage h2[style*="margin-top:40px"],
#dh-homepage h2[style*="margin-top: 40px"],
#dh-homepage #dh-waterfall-title {
  letter-spacing: -0.5px !important;
  line-height: 1.2 !important;
  font-size: clamp(22px, 2.6vw, 30px) !important;
}
#dh-homepage #dh-waterfall-title {
  font-size: clamp(24px, 3vw, 32px) !important;
}
@media (max-width: 768px) {
  #dh-homepage h2[style*="margin-top:40px"],
  #dh-homepage h2[style*="margin-top: 40px"],
  #dh-homepage #dh-waterfall-title {
    font-size: clamp(20px, 5.5vw, 24px) !important;
    letter-spacing: -0.3px !important;
  }
}

/* ── Waterfall sub-title ── */
#dh-homepage #dh-waterfall-sub {
  font-size: 14px !important;
  color: #999 !important;
  letter-spacing: 0 !important;
  line-height: 1.6 !important;
  margin-bottom: 28px !important;
}

/* ── Explore section: white card styling ── */
#dh-homepage #dh-section-explore .carousel-section-case > .style-list {
  background: #fff !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08) !important;
  transition: all 0.3s cubic-bezier(.4,0,.2,1) !important;
  padding-bottom: 20px !important;
}
#dh-homepage #dh-section-explore .carousel-section-case > .style-list:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.13) !important;
}
/* explore card image */
#dh-homepage #dh-section-explore .carousel-section-case > .style-list > div:first-child {
  overflow: hidden !important;
  border-radius: 0 !important;
}
#dh-homepage #dh-section-explore .carousel-section-case > .style-list > div:first-child img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.5s ease !important;
}
#dh-homepage #dh-section-explore .carousel-section-case > .style-list:hover img {
  transform: scale(1.04) !important;
}
/* explore card text */
#dh-homepage #dh-section-explore .card-text-title {
  padding: 12px 14px 0 !important;
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}
#dh-homepage #dh-section-explore .card-text-des {
  padding: 0 14px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  line-height: 1.6 !important;
}
#dh-homepage #dh-section-explore .dhshoptab {
  margin-left: 14px !important;
}

/* ── Unify all card radius to 16px, shadow to token ── */
#dh-homepage #dh-section-media .carousel-section-case > .style-list {
  border-radius: 16px !important;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08) !important;
  transition: all 0.3s cubic-bezier(.4,0,.2,1) !important;
}
#dh-homepage #dh-section-media .carousel-section-case > .style-list:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.13) !important;
}
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list {
  box-shadow: 0 1px 8px rgba(0,0,0,0.08) !important;
  transition: all 0.3s cubic-bezier(.4,0,.2,1) !important;
}
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.13) !important;
}
#dh-homepage #conceptList .dh-graphic {
  border-radius: 16px !important;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08) !important;
  transition: all 0.3s cubic-bezier(.4,0,.2,1) !important;
}
#dh-homepage #conceptList li:hover .dh-graphic {
  box-shadow: 0 8px 24px rgba(0,0,0,0.13) !important;
}

/* ── Tab buttons: unified active + hover ── */
#dh-homepage .dhindextablinks {
  background: #f5f5f5 !important;
  border: 1.5px solid transparent !important;
  color: #555 !important;
  font-weight: 600 !important;
  transition: all 0.25s ease !important;
  letter-spacing: 0 !important;
}
#dh-homepage .dhindextablinks.active {
  background: #FF8674 !important;
  color: #fff !important;
  border-color: #FF8674 !important;
  box-shadow: 0 4px 14px rgba(255,134,116,.3) !important;
}
#dh-homepage .dhindextablinks:not(.active):hover {
  border-color: #FF8674 !important;
  color: #FF8674 !important;
  background: #fff !important;
}

/* ── dhshoptab CTA button: brand color + hover ── */
#dh-homepage .dhshoptab {
  background: #FF8674 !important;
  color: #fff !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  transition: all 0.25s ease !important;
  cursor: pointer !important;
  border: none !important;
}
#dh-homepage .dhshoptab a {
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}
#dh-homepage .dhshoptab:hover {
  background: #e5705f !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(255,134,116,.35) !important;
}

/* ── Section icon carousel: tight spacing ── */
#dh-homepage .dh-dhshop-icon-title {
  letter-spacing: 0 !important;
  line-height: 1.4 !important;
  margin-top: 8px !important;
}
#dh-homepage .dh-dhshop-icon-sub-title {
  letter-spacing: 0 !important;
  line-height: 1.4 !important;
}

/* ── Banner section: align with content wrapper ── */
#dh-homepage .dh-padding-h-15:has(#dh-banner-grid) {
  padding-left: 40px !important;
  padding-right: 40px !important;
}
@media (max-width: 768px) {
  #dh-homepage .dh-padding-h-15:has(#dh-banner-grid) {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ── Tab section: carousel padding align ── */
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section {
  padding-left: 20px !important;
  padding-right: 20px !important;
}
#dh-homepage #dhshop_category .dhindextab {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* ── Explore + media carousels: horizontal padding ── */
#dh-homepage #dh-section-explore .carousel-section-case,
#dh-homepage #dh-section-media .carousel-section-case {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* ── Image hover scale on media cards ── */
#dh-homepage #dh-section-media .carousel-section-case > .style-list > div:first-child {
  overflow: hidden !important;
}
#dh-homepage #dh-section-media .carousel-section-case > .style-list > div:first-child img {
  transition: transform 0.5s ease !important;
  width: 100% !important;
  display: block !important;
}
#dh-homepage #dh-section-media .carousel-section-case > .style-list:hover img {
  transform: scale(1.04) !important;
}

/* ── Tab card image hover scale ── */
#dh-homepage #dhshop_category .dhindextabcontent .check-div {
  transition: transform 0.5s ease !important;
  overflow: hidden !important;
}
#dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list:hover .check-div {
  transform: scale(1.03) !important;
}

/* ── Responsive: 1024px (iPad) ── */
@media (max-width: 1024px) and (min-width: 769px) {
  #dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list {
    flex: 0 0 calc(48% - 8px) !important;
  }
  #dh-homepage #dh-section-media .carousel-section-case > .style-list {
    flex: 0 0 220px !important;
  }
  #dh-homepage .dh-content-wrapper,
  #dh-homepage #dh-section-single .dh-padding-h-15,
  #dh-homepage #dh-section-explore .mainboard {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

/* ── Responsive: 375px (mobile) ── */
@media (max-width: 480px) {
  #dh-homepage h2[style*="margin-top:40px"],
  #dh-homepage h2[style*="margin-top: 40px"],
  #dh-homepage #dh-waterfall-title {
    font-size: 20px !important;
    margin-bottom: 14px !important;
  }
  #dh-homepage .dhindextab {
    gap: 8px !important;
  }
  #dh-homepage .dhindextablinks {
    font-size: 13px !important;
    padding: 8px 12px !important;
  }
  #dh-homepage #dh-section-explore .carousel-section-case > .style-list,
  #dh-homepage #dhshop_category .dhindextabcontent > .carousel-section > .style-list {
    flex: 0 0 78vw !important;
  }
}

/* ── Concept (waterfall) section: content padding ── */
#dh-homepage .dh-concept .dh-content-wrapper {
  padding-left: 40px !important;
  padding-right: 40px !important;
}
@media (max-width: 768px) {
  #dh-homepage .dh-concept .dh-content-wrapper {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ── Hero card image scale on hover ── */
#dh-homepage .dh-hero-card:hover img {
  transform: scale(1.06) !important;
}

/* ── /item/7 guard: these token vars don't leak out of #dh-homepage ── */

/* ══════════════════════════════════════════════════════════
   v4.1 — Background alternation final fix
   Consolidated section bg + padding, overrides all previous
   ══════════════════════════════════════════════════════════ */

/* ── 白色背景區塊 ── */
#dh-homepage #dh-section-single {
  background: #fff !important;
  padding: 64px 0 !important;
}
#dh-homepage #dh-section-media {
  background: #fff !important;
  padding: 64px 0 !important;
}

/* ── 淡橘色背景區塊 ── */
#dh-homepage #dhshop_category {
  background: #fdf5f0 !important;
  padding: 64px 0 96px !important; /* 96px bottom = 充足的橘色空間 */
}
#dh-homepage #dh-section-explore {
  background: #fdf5f0 !important;
  padding: 64px 0 !important;
}
#dh-homepage .dh-concept {
  background: #fdf5f0 !important;
  padding: 64px 0 !important;
  margin-top: 0 !important;
}

/* ── 平板 1024px ── */
@media (max-width: 1024px) and (min-width: 769px) {
  #dh-homepage #dhshop_category  { padding: 48px 0 72px !important; }
  #dh-homepage #dh-section-single,
  #dh-homepage #dh-section-explore,
  #dh-homepage #dh-section-media,
  #dh-homepage .dh-concept        { padding: 48px 0 !important; }
}

/* ── 手機 768px ── */
@media (max-width: 768px) {
  #dh-homepage #dhshop_category  { padding: 36px 0 56px !important; }
  #dh-homepage #dh-section-single,
  #dh-homepage #dh-section-explore,
  #dh-homepage #dh-section-media,
  #dh-homepage .dh-concept        { padding: 36px 0 !important; }
}

/* ══════════════════════════════════════════════════════════
   v4.2 — STRICT MOCKUP COLOR MATCH
   Tokens: --bg-warm:#fdf9f7 / --bg-section:#f9f5f3 / --section-py:64px
   Source: https://dhconcept.com/mockup-homepage.html
   ══════════════════════════════════════════════════════════ */

/* ── 白色區塊 ── */
#dh-homepage #dh-section-single { background: #fff !important; padding: 64px 0 !important; }
#dh-homepage #dh-section-media  { background: #fff !important; padding: 64px 0 !important; }

/* ── 淡暖白 #fdf9f7 (mockup --bg-warm) — 改造方式 ── */
#dh-homepage #dhshop_category {
  background: #fdf9f7 !important;
  padding: 64px 0 80px !important;
}

/* ── 淡暖米 #f9f5f3 (mockup --bg-section) — 探索更多 + 瀑布流 ── */
#dh-homepage #dh-section-explore { background: #f9f5f3 !important; padding: 64px 0 !important; }
#dh-homepage .dh-concept         { background: #f9f5f3 !important; padding: 64px 0 !important; margin-top: 0 !important; }

/* ── Banner section: 白色 + 與 mockup 對齊 padding 56px ── */
/* Banner 在 #dhshop_category 內，無法完全分離，但上方加留白視覺分隔 */
#dh-homepage #dh-banner-grid-wrapper,
#dh-homepage .dh-padding-h-15:has(#dh-banner-grid) {
  background: #fff !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Mobile ≤768px: section-py 44px (完全對齊 mockup) ── */
@media (max-width: 768px) {
  #dh-homepage #dhshop_category  { padding: 44px 0 56px !important; }
  #dh-homepage #dh-section-single,
  #dh-homepage #dh-section-explore,
  #dh-homepage #dh-section-media,
  #dh-homepage .dh-concept        { padding: 44px 0 !important; }
}

/* ── Tablet 769–1024px ── */
@media (max-width: 1024px) and (min-width: 769px) {
  #dh-homepage #dhshop_category  { padding: 56px 0 72px !important; }
  #dh-homepage #dh-section-single,
  #dh-homepage #dh-section-explore,
  #dh-homepage #dh-section-media,
  #dh-homepage .dh-concept        { padding: 56px 0 !important; }
}

/* ══════════════════════════════════════════════════════════
   v4.3 — STRUCTURAL GAP FIX
   Root causes identified by HTML inspection:
   1. #dhshop_category has .uk-margin-top → white margin-top gap
   2. #dh-section-media has inline margin:40px auto → white top gap  
   3. .dh-concept has .uk-margin-large-top → needs margin-top:0
   4. Background colors need slight strengthening to be visible
   ══════════════════════════════════════════════════════════ */

/* ── Fix 1: Remove UIkit margin gaps that break background continuity ── */
#dh-homepage #dhshop_category {
  margin: 0 !important;
  background: #fdf9f7 !important;
  padding: 64px 0 64px !important;
}
#dh-homepage #dh-section-media {
  margin: 0 !important;   /* overrides inline margin:40px auto */
  max-width: none !important;
  background: #fff !important;
  padding: 64px 0 !important;
}
/* Media section inner wrapper keeps max-width */
#dh-homepage #dh-section-media .dh-padding-h-15 {
  max-width: 1600px !important;
  margin: 0 auto !important;
}
#dh-homepage .dh-concept {
  margin: 0 !important;
  background: #f9f5f3 !important;
  padding: 64px 0 !important;
}

/* ── Fix 2: Section padding — exact mockup values ── */
/* mockup: mk-banner-sec = 56px 0 56px, mk-sec = 64px 0 */
#dh-homepage #dh-section-single {
  margin: 0 !important;
  background: #fff !important;
  padding: 64px 0 !important;
}
#dh-homepage #dh-section-explore {
  margin: 0 !important;
  background: #f9f5f3 !important;
  padding: 64px 0 !important;
}

/* ── Fix 3: Mobile override (mockup --section-py: 44px at ≤768px) ── */
@media (max-width: 768px) {
  #dh-homepage #dhshop_category  { padding: 44px 0 !important; margin: 0 !important; }
  #dh-homepage #dh-section-single,
  #dh-homepage #dh-section-explore,
  #dh-homepage #dh-section-media { padding: 44px 0 !important; margin: 0 !important; }
  #dh-homepage .dh-concept       { padding: 44px 0 !important; margin: 0 !important; }
}

/* ── Fix 4: Tab content inline margin-top:60px — reduce breathing room ── */
#dh-homepage #dhshop_category .dhindextabcontent {
  margin-top: 24px !important;   /* was inline 60px — too large */
}

/* ══════════════════════════════════════════════════════════
   v4.4 — GLOBAL MASONRY CARD STYLES
   Extend card styling (shadow, radius, hover, text color)
   to ALL pages with masonry grids:
   - #conceptList (homepage + /story — story is NOT inside #dh-homepage)
   - #commonConceptList (/concept/* and /story_detail/*)
   ══════════════════════════════════════════════════════════ */

/* ── Shared card wrapper (.dh-graphic) ── */
#conceptList .dh-graphic,
#commonConceptList .dh-graphic {
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #fff !important;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  height: auto !important;
}

/* ── Hover lift ── */
#conceptList li:hover .dh-graphic,
#conceptList .uk-transition-toggle:hover .dh-graphic,
#commonConceptList .uk-transition-toggle:hover .dh-graphic {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

/* ── Image: cover, top corners only ── */
#conceptList .dh-graphic img,
#commonConceptList .dh-graphic img {
  width: 100% !important;
  height: auto !important;
  min-height: 160px !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 16px 16px 0 0 !important;  /* override story.blade inline style */
}

/* ── Title text: black, truncated, card body padding ── */
#conceptList .dh-graphic div,
#conceptList a,
#conceptList a div,
#commonConceptList .dh-graphic .conceptTitle,
#commonConceptList a {
  color: #1d1d1d !important;
  text-decoration: none !important;
}

#conceptList .dh-graphic div,
#commonConceptList .dh-graphic .conceptTitle {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  padding: 10px 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  background: #fff !important;
}

@media (max-width: 640px) {
  #conceptList .dh-graphic img,
  #commonConceptList .dh-graphic img { min-height: 120px !important; }
}

/* ══════════════════════════════════════════════════════════
   v4.5 — /dHShop/* CATEGORY PAGE MASONRY CARDS
   Selector: .dh-concept-list.dh-graphic (both classes together)
   Used on: dHShop_category.blade.php (Vue v-for)
   Structure: div > a > .dh-concept-list.dh-graphic > img + div
   NOT used on: item/concept/favorite pages (they use .dh-graphic alone)
   ══════════════════════════════════════════════════════════ */

/* ── Card wrapper ── */
.dh-concept-list.dh-graphic {
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #fff !important;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  height: auto !important;
  margin-bottom: 0 !important;
}

/* ── Hover lift ── */
a:hover .dh-concept-list.dh-graphic {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

/* ── Image ── */
.dh-concept-list.dh-graphic img {
  width: 100% !important;
  height: auto !important;
  min-height: 160px !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 16px 16px 0 0 !important;
}

/* ── Title div (overrides inline margin-top:3px / margin-left:10px) ── */
.dh-concept-list.dh-graphic > div {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #1d1d1d !important;
  background: #fff !important;
  padding: 10px 12px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}

/* ── Link color ── */
a .dh-concept-list.dh-graphic,
a .dh-concept-list.dh-graphic div {
  color: #1d1d1d !important;
  text-decoration: none !important;
}

/* ── Card row gap: scoped to category grid, avoids global .uk-grid > div ── */
#dhshop_category .home-content > div {
  padding-bottom: 8px !important;
}

@media (max-width: 640px) {
  .dh-concept-list.dh-graphic img { min-height: 120px !important; }
}

/* ══════════════════════════════════════════════════════════
   v4.6 — dHShop CATEGORY PAGE LAYOUT FIXES
   Issue 1: Empty uk-slider (no banner images for some categories)
   creates white space via uk-dotnav:empty + uk-margin class.
   Issue 2: Empty slider items container still renders a box.
   Fix: collapse empty slider elements with CSS :empty selector.
   Safe globally — empty slider nav/items have no content to show.
   ══════════════════════════════════════════════════════════ */

/* ── Hide empty slider dot navigation (uk-margin creates ~20px space) ── */
.uk-dotnav:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Collapse empty slider items list ── */
.uk-slider-items:empty {
  display: none !important;
  min-height: 0 !important;
}

/* ── Remove height from empty slider wrapper when items are empty ── */
.uk-slider-container:has(.uk-slider-items:empty) {
  display: none !important;
}

/* ── Ensure dHShop category filter section is always visible ── */
/* (defensive — our CSS doesn't hide these, but guard against UIkit conflicts) */
#dhshop_category > h2,
#dhshop_category > h3 {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ── Filter label images (check-div): ensure height works with uk-height-small ── */
/* uk-height-small = height:150px; calc(100%-8px) = 142px */
#dhshop_category .uk-height-small {
  height: 150px !important;  /* ensure explicit height so child calc(100%) resolves */
}

/* ══════════════════════════════════════════════════════════
   v4.7 — CLICK FIX + MOBILE MEDIA CARD SIZE
   ══════════════════════════════════════════════════════════ */

/* ── Fix 1: UIkit uk-transition-toggle double-tap on mobile ──
   Root cause: li[tabindex="0"] receives focus on first tap (triggers
   hover CSS), requiring a second tap to fire the <a> click.
   Fix: on touch devices, route pointer events directly to children,
   bypassing the li's focus trap. Desktop hover unaffected. ── */
@media (hover: none) and (pointer: coarse) {
  .uk-transition-toggle[tabindex] {
    pointer-events: none;
    -webkit-tap-highlight-color: transparent;
  }
  .uk-transition-toggle[tabindex] > * {
    pointer-events: auto;
  }
}

/* ── Fix 2: Defensive scrollspy rule (user request) ── */
.uk-scrollspy-inview {
  pointer-events: auto !important;
}

/* ── Fix 3: Mobile media section card — reduce size to show ~1.7 cards ──
   Issue: 68vw card + unconstrained image height = card fills full screen.
   Fix: narrower card + image height cap. ── */
@media (max-width: 640px) {
  #dh-homepage #dh-section-media .carousel-section-case > .style-list {
    flex: 0 0 58vw !important;  /* was 68vw — now shows ~1.7 cards */
  }
  #dh-homepage #dh-section-media .carousel-section-case > .style-list > div:first-child img {
    height: 140px !important;   /* cap image height, prevent portrait images filling screen */
    object-fit: cover !important;
  }
}
