/* ============================================================
   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;
}
.dh-nav-new-item > a:hover { color: #FF8674 !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%);
}
#dh-homepage .dh-hero-layout {
  display: flex; align-items: center; gap: 32px;
  max-width: 1600px; margin: 0 auto; padding: 64px 24px 56px;
}
#dh-homepage .dh-hero-left { flex: 1 1 auto; }
#dh-homepage .dh-hero-right { flex: 0 0 400px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 960px) {
  #dh-homepage .dh-hero-layout { flex-direction: column; gap: 24px; padding: 40px 20px 32px; }
  #dh-homepage .dh-hero-right { flex: 1 1 auto; flex-direction: row; width: 100%; }
}
@media (max-width: 640px) {
  #dh-homepage .dh-hero-layout { padding: 32px 16px 24px; }
  #dh-homepage .dh-hero-right { flex-direction: column; }
}

#dh-homepage .dh-hero-tagline h1 {
  font-size: clamp(26px, 4.2vw, 46px) !important; line-height: 1.3 !important;
  color: #1d1d1d !important; letter-spacing: 2px !important;
  font-weight: 700 !important; margin: 0;
}
@media (max-width: 640px) {
  #dh-homepage .dh-hero-tagline h1 { font-size: clamp(22px, 6vw, 32px) !important; }
}
#dh-homepage .dh-hero-ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
#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 28px; border-radius: 50px;
  text-decoration: none !important; transition: background .2s, transform .15s;
  box-shadow: 0 4px 12px rgba(255,134,116,.35);
}
#dh-homepage .dh-hero-btn-primary:hover { background: #e5705f; transform: translateY(-1px); }
#dh-homepage .dh-hero-btn-ghost {
  display: inline-flex; align-items: center; background: transparent;
  color: #1d1d1d !important; font-size: 15px; font-weight: 600;
  padding: 11px 24px; border-radius: 50px; border: 2px solid #1d1d1d;
  text-decoration: none !important; transition: all .2s;
}
#dh-homepage .dh-hero-btn-ghost:hover { background: #1d1d1d; color: #fff !important; }

#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: 185px; object-fit: cover; display: block; transition: transform .5s ease; }
@media (max-width: 960px) { #dh-homepage .dh-hero-card img { height: 160px; } }
#dh-homepage .dh-hero-card:hover img { transform: scale(1.05); }
#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;
}

/* Trust Bar */
#dh-homepage .dh-trust-bar {
  background: #1d1d1d; color: #fff; padding: 20px 24px;
  display: flex; justify-content: center; gap: 48px; 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; }

/* 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 !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(30% - 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: 16px !important; scrollbar-width: none; padding: 0 4px 8px !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;
}
@media (max-width: 640px) {
  #dh-homepage #dh-section-media .carousel-section-case > .style-list { flex: 0 0 68vw !important; }
}

/* Masonry conceptList */
#dh-homepage #conceptList {
  columns: 4 !important; column-gap: 16px !important;
  display: block !important; position: static !important; height: auto !important;
}
#dh-homepage #conceptList > li {
  break-inside: avoid !important; margin-bottom: 16px !important;
  width: 100% !important; max-width: 100% !important; float: none !important;
  position: relative !important; left: auto !important; top: auto !important;
  transform: none !important; padding-left: 0 !important;
}
@media (max-width: 960px) { #dh-homepage #conceptList { columns: 3 !important; } }
@media (max-width: 640px) {
  #dh-homepage #conceptList { columns: 2 !important; column-gap: 10px !important; }
  #dh-homepage #conceptList > li { margin-bottom: 10px !important; }
}

/* ── Section headers: accent left-bar (matches mockup .mk-hdr style) ── */
/* Targets h2 with margin-top:40px inline style (= section-level titles) */
#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(18px, 2.4vw, 26px) !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;
}

/* ── 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) — 圖片放大，不截斷 */
.case-carousel { overflow: visible; padding: 8px 0 20px; }
.case-carousel__track {
  display: flex !important; overflow-x: auto !important;
  scroll-snap-type: x mandatory; gap: 18px;
  scrollbar-width: none; cursor: grab;
}
.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;
}
.case-carousel__item img {
  width: 100% !important; height: 300px; object-fit: cover;
  border-radius: 14px 14px 0 0; display: block;
}
.case-carousel__caption {
  display: block; 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);
}
@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; }
