/* ═══════════════════════════
   德曼尼全屋定制家具工厂
   极简轻奢 / 现代商务
   ═══════════════════════════ */

:root {
  --brand-black: #1C1C1C;
  --brand-white: #F7F6F2;
  --brand-forest: #2D5A4B;
  --brand-body: #4A4A4A;
  --brand-muted: #E5E2DC;
  --brand-muted-dark: #C4BFB6;
}

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC","Microsoft YaHei","Noto Sans SC",sans-serif;
  background: var(--brand-white);
  color: var(--brand-body);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand-forest); color: white; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--brand-muted); }
::-webkit-scrollbar-thumb { background: var(--brand-forest); border-radius: 3px; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-up { animation: fade-up 0.6s ease-out forwards; }
.animate-fade-in { animation: fade-in 0.8s ease-out forwards; }

/* Fixed header */
#site-header {
  background: rgba(247,246,242,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  transition: background 0.3s, box-shadow 0.3s;
}
#site-header.scrolled {
  background: rgba(247,246,242,0.98);
  box-shadow: 0 1px 12px rgba(0,0,0,0.08);
}

/* Mobile menu panel/overlay: main.js toggles .open, tailwind keeps them hidden by default.
   z-index must exceed #site-header(999) / .back-to-top(998) / .floating-btn(1000). */
@media (max-width: 1023.98px) {
  #menu-overlay.open { display: block; z-index: 1001; }
  #menu-panel.open { transform: translateX(0); z-index: 1002; }
}

/* Lightbox */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-overlay img { max-width: 90vw; max-height: 90vh; object-fit: contain; }
.lightbox-close, .lightbox-nav {
  position: absolute; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: white; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 20px; transition: background 0.2s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-counter { position: absolute; top: 16px; left: 16px; color: rgba(255,255,255,0.6); font-size: 14px; }

/* Floating button */
.floating-btn {
  position: fixed; bottom: 32px; right: 32px; z-index: 1000;
  background: var(--brand-forest); color: white; border: none;
  border-radius: 50px; padding: 14px 24px; font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 20px rgba(45,90,75,0.35);
  display: flex; align-items: center; gap: 8px;
  transition: all 0.3s; text-decoration: none; letter-spacing: 0.5px;
}
.floating-btn:hover { background: var(--brand-black); transform: translateY(-2px); box-shadow: 0 6px 28px rgba(45,90,75,0.45); }
.floating-btn:active { transform: scale(0.97); }
.floating-btn svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 640px) {
  .floating-btn { bottom: 20px; right: 20px; padding: 12px 18px; font-size: 13px; }
}

/* Back to top */
.back-to-top {
  position: fixed; bottom: 100px; right: 32px; z-index: 998;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-forest); color: white; border: none; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; opacity: 0; transform: translateY(12px); pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--brand-black); }
.back-to-top svg { width: 18px; height: 18px; fill: white; }
@media (max-width: 640px) { .back-to-top { bottom: 80px; right: 20px; width: 40px; height: 40px; } }

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(74,74,74,0.6);
  padding: 16px 0; border-bottom: 1px solid var(--brand-muted);
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-forest); }
.breadcrumb .current { color: var(--brand-forest); }

/* 筛选按钮（产品中心 / 实景案例 / 价格与方案） */
.filter-btn {
  padding: 8px 20px; font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--brand-muted-dark); background: transparent;
  color: rgba(74,74,74,0.85); border-radius: 2px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover { background: rgba(229,226,220,0.6); color: var(--brand-black); }
.filter-btn.active {
  background: var(--brand-forest); border-color: var(--brand-forest); color: #fff;
}

/* 滚动进入视口的淡入（JS 不可用时元素默认可见） */
.reveal-on-scroll { animation: fade-up 0.6s ease-out both; }

/* 实景照片待补拍占位框 */
.photo-pending {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: rgba(229,226,220,0.45);
  border: 1px dashed var(--brand-muted-dark);
  color: rgba(74,74,74,0.6); font-size: 12px; letter-spacing: 0.08em;
}
