/* =============================================
   杭州悦屋建筑装饰 - 官网全局样式 (v2.0 重制版)
   色调：中国红 / 深蓝 / 米白 品牌色系
   响应式：手机 <640px | 平板 640-1024px | 桌面 >1024px
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* 品牌色 - 保留升级 */
  --primary: #CC2936;
  --primary-light: #E85D6C;
  --primary-dark: #991B1B;
  --primary-rgb: 204, 41, 54;
  
  /* 辅助色 - 新增 */
  --accent: #1E4A76;
  --accent-light: #2B6B9E;
  --accent-dark: #162240;
  
  --bronze: #8B4513;
  --bronze-light: #A0522D;
  
  /* 背景色系 */
  --bg: #FFFFFF;
  --bg-alt: #F5F0EB;
  --bg-alt2: #EDE8E0;
  --bg-dark: #162240;
  --bg-card: #FAF8F5;
  
  /* 文字色系 */
  --text: #1A1A2E;
  --text-muted: #5A5A72;
  --text-light: #8A8AA3;
  
  /* 边框 */
  --border: #D6DCE5;
  --border-light: #E8E3DC;
  
  /* 白色 */
  --white: #ffffff;
  
  /* 圆角 */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* 阴影 */
  --shadow-sm: 0 1px 4px rgba(26, 30, 46, 0.04);
  --shadow: 0 2px 16px rgba(26, 30, 46, 0.06);
  --shadow-hover: 0 8px 32px rgba(26, 30, 46, 0.10);
  --shadow-lg: 0 12px 48px rgba(26, 30, 46, 0.12);
  
  /* 过渡 */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* 头部高度 */
  --header-h: 68px;
}

/* ---- 全站图片保护：禁止拖拽/右键下载 ---- */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}
/* 允许链接和点击区域接收点击 */
a, button, .clickable, .gallery-item, .scene-entry-card, .nav-area, .dot, .back-btn, .menu-toggle {
  pointer-events: auto;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }

img { max-width: 100%; display: block; }

/* =============================================
   容器
   ============================================= */

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   导航栏 - 升级版
   ============================================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.header .container {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 2px;
  line-height: 1.3;
  text-transform: uppercase;
}

/* 导航链接 */
.nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.06);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:active {
  background: rgba(var(--primary-rgb), 0.10);
}

/* 导航电话 */
.nav-contact {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-contact strong {
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
}

.nav-contact strong a {
  transition: var(--transition);
}

.nav-contact strong a:hover {
  color: var(--primary-dark);
}

/* 汉堡菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background 0.2s;
}

.menu-toggle:hover {
  background: rgba(var(--primary-rgb), 0.06);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   按钮系统 - 升级版
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition-bounce);
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-outline-light {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.7);
}

.btn-outline-light:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 14px 40px;
  font-size: 15px;
}

.btn-sm {
  padding: 7px 18px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
  text-align: center;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* =============================================
   通用区块 - 升级版
   ============================================= */

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* =============================================
   页脚 - 升级版
   ============================================= */

.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.8fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .logo-icon {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.footer-brand .logo-name,
.footer-brand .logo-sub {
  color: rgba(255,255,255,0.9);
}

.footer-slogan {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin: 16px 0 8px;
  font-style: italic;
  letter-spacing: 0.5px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.4);
}

.footer-links h5,
.footer-products h5,
.footer-contact h5 {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.footer-links a,
.footer-products a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-links a:hover,
.footer-products a:hover {
  color: var(--primary-light);
  padding-left: 4px;
}

.footer-contact p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
  line-height: 1.6;
}

.footer-contact p span {
  color: rgba(255,255,255,0.35);
  font-size: 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 8px;
}

/* =============================================
   页面横幅 (内页) - 升级版
   ============================================= */

.page-banner {
  margin-top: var(--header-h);
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--accent) 50%, var(--accent-light) 100%);
  padding: 72px 0 48px;
  text-align: center;
  position: relative;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.banner-content {
  position: relative;
  z-index: 2;
}

.banner-content h1 {
  font-size: 40px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.banner-content p {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
}

.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

.breadcrumb a {
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--primary-light);
}

/* 产品独立页头 */
.page-hero {
  margin-top: var(--header-h);
  padding: 80px 0;
  text-align: center;
  color: white;
  position: relative;
}

.page-hero h1 {
  font-size: 38px;
  margin-bottom: 12px;
  font-weight: 700;
}

.page-hero p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* =============================================
   浮动联系栏
   ============================================= */

.float-contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  z-index: 999;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  transition: var(--transition);
}

.float-contact-bar.hidden {
  transform: translateY(100%);
}

.float-bar-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.float-bar-phone a {
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
}

.float-bar-text {
  color: var(--text-muted);
  font-size: 13px;
}

.float-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.float-bar-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.float-bar-sub {
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}

@media (min-width: 768px) {
  .float-contact-bar {
    display: none;
  }
}

/* =============================================
   响应式 - 平板 640-1024px
   ============================================= */

@media (max-width: 1024px) and (min-width: 640px) {
  .section { padding: 60px 0; }
  .section-title { font-size: 28px; }
  
  .home-product-grid { grid-template-columns: 1fr 1fr; }
  .series-grid { grid-template-columns: repeat(2, 1fr); }
  
  .advantage-grid { grid-template-columns: repeat(2, 1fr); }
  .culture-grid { grid-template-columns: repeat(2, 1fr); }
  .honor-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .detail-color-grid { grid-template-columns: repeat(3, 1fr); }
  
  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  
  .hero-content {
    padding: 0 24px;
    max-width: 100%;
  }
  
  .hero-visual {
    display: none;
  }
  
  .hero-title {
    font-size: 38px;
  }
  
  .hero {
    min-height: auto;
  }
  
  .process-steps {
    gap: 12px;
  }
  
  .process-step {
    min-width: 160px;
  }
  
  .process-arrow {
    display: none;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .product-series-item {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .byd-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .rel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* 平板导航 - 展开菜单 */
  .menu-toggle {
    display: flex;
  }
  
  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: white;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    gap: 2px;
  }
  
  .nav.open {
    display: flex !important;
  }
  
  .nav-link {
    padding: 12px 16px;
    font-size: 15px;
    border-radius: var(--radius);
  }
  
  .nav-link::after {
    display: none;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background: rgba(var(--primary-rgb), 0.06);
  }
  
  .nav-contact {
    display: none;
  }
}

/* =============================================
   响应式 - 手机 <640px
   ============================================= */

@media (max-width: 639px) {
  .section { padding: 48px 0; }
  .section-header { margin-bottom: 36px; }
  .section-title { font-size: 24px; }
  .section-desc { font-size: 14px; }
  
  .container { padding: 0 16px; }
  
  /* Hero 手机端 */
  .hero {
    min-height: auto;
    padding: 40px 0;
  }
  
  .hero-content {
    padding: 0 16px !important;
    max-width: 100% !important;
    text-align: center !important;
  }
  
  .hero-visual {
    display: none;
  }
  
  .hero-title {
    font-size: 30px;
  }
  
  .hero-desc {
    font-size: 14px;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  .hero-badge,
  .hero-partner-badge {
    justify-content: center;
  }
  
  /* 页面横幅手机端 */
  .page-banner { padding: 56px 0 36px; }
  .banner-content h1 { font-size: 28px; }
  .banner-content p { font-size: 14px; }
  
  /* 页脚手机端 */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer { padding: 40px 0 0; }
  .footer-bottom { flex-direction: column; text-align: center; }
  
  /* 导航手机端 - 下拉式菜单 */
  .menu-toggle {
    display: flex;
    z-index: 1001;
  }
  
  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    z-index: 1001;
  }
  .nav.open {
    display: flex;
    padding: 8px 16px 16px;
  }
  
  .nav-link {
    padding: 12px 16px;
    font-size: 15px;
    border-radius: var(--radius);
  }
  
  .nav-link::after {
    display: none;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background: rgba(var(--primary-rgb), 0.06);
  }
  
  .nav-contact {
    display: none;
  }
  
}
  
/* =============================================
   微信内置浏览器专用修复
   X5 内核 + iOS WKWebView 兼容
   ============================================= */

/* --- 修复1：顶部导航栏被微信工具栏遮挡 --- */
.wechat-browser .header {
  /* 微信浏览器中固定定位可能被工具栏遮挡，增加安全区 */
  padding-top: constant(safe-area-inset-top, 0);
  padding-top: env(safe-area-inset-top, 0);
}

/* --- 修复2：导航菜单改用 visibility/opacity 替代 display 切换 --- */
/* 平板端 */
@media (max-width: 1024px) and (min-width: 640px) {
  .wechat-browser .nav {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    gap: 2px;
    z-index: 1001;
    
    /* visibility/opacity 过渡动画，不依赖 display 切换 */
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: scaleY(0);
    transform-origin: top center;
    transition: opacity 0.25s ease, transform 0.3s ease, max-height 0.3s ease, visibility 0.25s;
    padding: 0 16px !important;
    pointer-events: none;
  }
  .wechat-browser .nav.open {
    visibility: visible;
    opacity: 1;
    max-height: 480px;
    transform: scaleY(1);
    padding: 8px 16px 16px !important;
    pointer-events: auto;
  }
  .wechat-browser .nav-link {
    padding: 12px 16px;
    font-size: 15px;
    border-radius: var(--radius);
  }
  .wechat-browser .nav-link::after {
    display: none;
  }
  .wechat-browser .nav-link:hover,
  .wechat-browser .nav-link.active {
    background: rgba(var(--primary-rgb), 0.06);
  }
}

/* 手机端（<640px） */
@media (max-width: 639px) {
  .wechat-browser .nav {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    z-index: 1001;
    
    /* visibility/opacity 过渡动画，不依赖 display 切换 */
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: scaleY(0);
    transform-origin: top center;
    transition: opacity 0.25s ease, transform 0.3s ease, max-height 0.3s ease, visibility 0.25s;
    padding: 0 16px !important;
    pointer-events: none;
  }
  .wechat-browser .nav.open {
    visibility: visible;
    opacity: 1;
    max-height: 480px;
    transform: scaleY(1);
    padding: 8px 16px 16px !important;
    pointer-events: auto;
  }
  .wechat-browser .nav-link {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: var(--radius);
  }
  .wechat-browser .nav-link::after {
    display: none;
  }
  .wechat-browser .nav-link:hover,
  .wechat-browser .nav-link.active {
    background: rgba(var(--primary-rgb), 0.06);
  }
  .wechat-browser .nav-contact {
    display: none;
  }
}