/* ============================================================
   东方建材城 · 公共样式
   - 全局变量
   - 基础重置
   - 通用组件（Header, Footer等）
   ============================================================ */

:root {
  --color-dark: #2b2b2b;
  --color-dark-2: #1f1f1f;
  --color-gold: #c9a25a;
  --color-gold-hover: #b58a3f;
  --color-bg: #f6f5f2;
  --color-card: #ffffff;
  --color-text: #333333;
  --color-muted: #6b6b6b;
  --color-border: #e6e3dd;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 10px 24px rgba(0,0,0,.10);
  --shadow-lg: 0 18px 40px rgba(0,0,0,.15);
  --radius: 6px;
  --max-width: 1200px;
  --transition: .3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; }
body {
  font-family: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.icon { width: 16px; height: 16px; fill: currentColor; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--color-dark); color: #fff; box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; order: 1; }
.logo-mark { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-gold); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.logo-mark svg { width: 22px; height: 22px; fill: #fff; display: block; }
.logo-text .brand { font-size: 18px; font-weight: 600; letter-spacing: 2px; }
.logo-text .slogan { font-size: 12px; color: #cfcfcf; letter-spacing: 1px; }

.header-cta { display: flex; align-items: center; gap: 14px; order: 3; }
.btn-phone, .btn-nav { display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; transition: all var(--transition);
  white-space: nowrap; }
.btn-phone { color: var(--color-gold); border: 1px solid var(--color-gold); }
.btn-phone:hover { background: var(--color-gold); color: #fff; }
.btn-nav { background: var(--color-gold); color: #fff; }
.btn-nav:hover { background: var(--color-gold-hover); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* 电话下拉菜单 */
.phone-dropdown { position: relative; display: inline-block; }
.phone-dropdown .btn-phone { cursor: pointer; background: none; font-family: inherit; }
.phone-dropdown .dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 180px; background: #fff; border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  opacity: 0; visibility: hidden;
  transition: all .25s ease; z-index: 100;
  overflow: hidden;
}
.phone-dropdown.active .dropdown-menu,
.phone-dropdown:hover .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.phone-dropdown .dropdown-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 20px; color: var(--color-text);
  font-size: 15px; font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
  background: #fff; text-align: left;
  transition: background var(--transition), color var(--transition);
}
.phone-dropdown .dropdown-menu a:last-child { border-bottom: none; }
.phone-dropdown .dropdown-menu a:hover { background: #faf7f0; color: var(--color-gold); }
.phone-dropdown .dropdown-menu a::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-gold); flex-shrink: 0;
}
/* 下拉小三角 */
.phone-dropdown .dropdown-menu::before {
  content: ''; position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #fff;
}

/* visit-strip 中的电话下拉 */
.visit-strip .phone-dropdown .btn-primary {
  cursor: pointer; background: var(--color-gold); color: #fff;
  border: none; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; transition: all var(--transition);
}
.visit-strip .phone-dropdown .btn-primary:hover { background: var(--color-gold-hover); }
.visit-strip .phone-dropdown .dropdown-menu { top: calc(100% + 6px); left: 0; right: auto; transform: translateY(-4px); min-width: 200px; }
.visit-strip .phone-dropdown.active .dropdown-menu,
.visit-strip .phone-dropdown:hover .dropdown-menu { transform: translateY(0); }
.visit-strip .phone-dropdown .dropdown-menu::before { left: 24px; right: auto; transform: none; }

/* 产品详情 CTA 行中的电话下拉 */
.cta-row .phone-dropdown .btn-primary {
  cursor: pointer; background: var(--color-gold); color: #fff;
  border: none; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 14px 28px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; transition: all var(--transition);
}
.cta-row .phone-dropdown .btn-primary:hover { background: var(--color-gold-hover); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.cta-row .phone-dropdown .dropdown-menu { top: calc(100% + 6px); left: 0; right: auto; transform: translateY(-4px); min-width: 200px; }
.cta-row .phone-dropdown.active .dropdown-menu,
.cta-row .phone-dropdown:hover .dropdown-menu { transform: translateY(0); }
.cta-row .phone-dropdown .dropdown-menu::before { left: 28px; right: auto; transform: none; }

/* 导航菜单 */
.nav-menu { display: flex; gap: 36px; order: 2; }
.nav-menu a { font-size: 15px; color: #eaeaea; padding: 6px 0; position: relative; transition: color var(--transition); }
.nav-menu a::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--color-gold); transition: width var(--transition); }
.nav-menu a:hover { color: var(--color-gold); }
.nav-menu a:hover::after { width: 100%; }

/* 汉堡按钮（桌面默认隐藏） */
.hamburger { display: none; width: 28px; height: 22px; flex-direction: column; justify-content: space-between;
  cursor: pointer; background: none; border: none; padding: 0; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent; order: 4; }
.hamburger span { display: block; height: 3px; background: #fff; border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }

/* Footer */
.site-footer { background: var(--color-dark-2); color: #cfcfcf; padding: 64px 0 24px; }
.site-footer a { color: #a8a8a8; transition: color var(--transition); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 0.9fr; gap: 48px; padding-bottom: 36px; border-bottom: 1px solid #333; }
.footer-col { text-align: left; }
/* h4 标题：白色文字 + 金色短装饰下划线 */
.footer-col h4 {
  color: #fff; font-size: 16px; letter-spacing: 2px; margin-bottom: 22px; font-weight: 600;
  position: relative; padding-bottom: 10px;
}
.footer-col h4::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px;
  background: var(--color-gold);
}
.footer-col p { color: #a8a8a8; font-size: 14px; line-height: 1.9; }
.footer-col a { color: #a8a8a8; }
.footer-col a:hover { color: var(--color-gold); }

/* 品牌列 */
.footer-col .brand-line { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-col .brand-line .logo-mark {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-gold); display: flex; align-items: center; justify-content: center;
}
.footer-col .brand-line .logo-mark svg { width: 22px; height: 22px; fill: #fff; }
.footer-col .brand-line span { color: #fff; font-size: 18px; letter-spacing: 3px; font-weight: 600; }
.footer-col .brand-desc { color: #9a9a9a; font-size: 13px; line-height: 1.9; margin-bottom: 20px; }
.footer-col .phone-label { display: block; color: #888; font-size: 12px; letter-spacing: 2px; margin-bottom: 8px; text-align: left; }
.footer-col .phone-large {
  color: var(--color-gold); font-size: 16px; font-weight: 600; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
}
.footer-col .phone-large a { color: var(--color-gold); transition: color var(--transition); }
.footer-col .phone-large a:hover { color: var(--color-gold-hover); }
.footer-col .phone-large .sep { color: #555; font-weight: 400; }

/* 门店信息：图标金色，增强品牌感 */
.footer-col .info-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.footer-col .info-item .icon { width: 16px; height: 16px; flex: 0 0 16px; fill: var(--color-gold); margin-top: 4px; }
.footer-col .info-item span { color: #b8b8b8; font-size: 14px; line-height: 1.6; }

/* 快速入口：竖排列表，hover 缩进 */
.footer-col .footer-links { list-style: none; padding: 0; margin: 0; }
.footer-col .footer-links li { margin-bottom: 12px; }
.footer-col .footer-links a {
  display: inline-flex; align-items: center; gap: 6px; color: #b8b8b8; font-size: 14px;
  transition: all var(--transition);
}
.footer-col .footer-links a::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%; background: #555; transition: all var(--transition);
}
.footer-col .footer-links a:hover { color: var(--color-gold); transform: translateX(4px); }
.footer-col .footer-links a:hover::before { background: var(--color-gold); width: 14px; border-radius: 2px; }

.footer-bar { text-align: center; padding-top: 22px; font-size: 13px; color: #7a7a7a; }
.footer-bar a { color: #7a7a7a; }
.footer-bar a:hover { color: var(--color-gold); }

/* 精简 Footer（列表页/详情页/404） */
.footer-simple { padding: 28px 0; text-align: center; }
.footer-simple .footer-simple-inner { font-size: 13px; color: #8a8a8a; line-height: 1.8; }
.footer-simple .footer-simple-inner a { color: #8a8a8a; transition: color var(--transition); }
.footer-simple .footer-simple-inner a:hover { color: var(--color-gold); }
.footer-simple .sep { margin: 0 8px; color: #555; }
.footer-simple .beian { color: #8a8a8a; }

@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer { padding: 50px 0 90px; }
}

@media (max-width: 768px) {
  .footer-col { text-align: center; }
  .footer-col h4::after { left: 50%; transform: translateX(-50%); }
  .footer-col .brand-line { justify-content: center; }
  .footer-col .info-item { justify-content: center; }
  .footer-col .footer-links a { justify-content: center; }
  /* 移动端服务热线居中 */
  .footer-col .phone-label { text-align: center; }
  .footer-col .phone-large { justify-content: center; font-size: 16px; }
}

/* 移动端浮动常驻转化条 */
.mobile-cta-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--color-dark); box-shadow: 0 -4px 16px rgba(0,0,0,.2); }
.mobile-cta-bar > * { flex: 1; }
.mobile-cta-bar a, .mobile-cta-bar button { flex: 1; padding: 14px 0; text-align: center; color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: 1px; border: none; cursor: pointer; font-family: inherit; }
.mobile-cta-bar .phone { background: #3a3a3a; }
.mobile-cta-bar .nav { background: var(--color-gold); }
/* 移动端浮动条电话下拉：向上展开 */
.mobile-cta-bar .phone-dropdown { position: static; display: flex; }
.mobile-cta-bar .phone-dropdown .phone { width: 100%; }
.mobile-cta-bar .phone-dropdown .dropdown-menu {
  position: absolute; bottom: 100%; left: 0; right: auto;
  top: auto; transform: translateY(4px);
  min-width: 50%; background: #fff; border-radius: 8px 8px 0 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,.15);
  opacity: 0; visibility: hidden;
  transition: all .25s ease; z-index: 89;
  overflow: hidden;
}
.mobile-cta-bar .phone-dropdown.active .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}

/* 响应式：移动端 */
@media (max-width: 768px) {
  .container { padding: 0 12px; }
  .header-inner { height: 60px; gap: 8px; overflow: visible; }
  .logo { flex-shrink: 0; gap: 8px; }
  .logo-mark { flex: 0 0 32px; width: 32px; height: 32px; }
  .logo-mark svg { width: 18px; height: 18px; }
  .logo-text .brand { font-size: 15px; letter-spacing: .5px; }
  .logo-text .slogan { font-size: 11px; letter-spacing: 0; }
  .header-cta { gap: 6px; margin-left: auto; align-items: center; display: flex; }
  /* 移动端隐藏 header 中的电话和导航按钮，底部浮动条已有相同功能 */
  .header-cta .phone-dropdown, .btn-nav { display: none; }

  /* 移动端导航菜单 */
  .nav-menu { position: fixed; top: 60px; left: 0; right: 0;
    background: var(--color-dark); flex-direction: column; gap: 0;
    transform: translateY(-120%); visibility: hidden;
    transition: transform var(--transition), visibility var(--transition); padding: 12px 0;
    box-shadow: 0 6px 12px rgba(0,0,0,.2); z-index: 99; }
  .nav-menu.open { transform: translateY(0); visibility: visible; }
  .nav-menu a { padding: 14px 24px; border-bottom: 1px solid #383838; }
  .nav-menu a:hover::after { width: 0; }
  /* 汉堡按钮：确保足够点击区域和层级 */
  .hamburger { display: flex; width: 28px; height: 22px; flex-shrink: 0;
    position: relative; z-index: 101; cursor: pointer; order: 4; }
  
  .mobile-cta-bar { display: flex; }
  body { padding-bottom: 54px; }
  /* 移动端精简 footer：增加底部间距避免被浮动条遮挡 */
  .footer-simple { padding: 20px 0 80px; }
  .footer-simple .footer-simple-inner { font-size: 12px; }
  .footer-simple .sep { display: none; }
  .footer-simple .footer-simple-inner span,
  .footer-simple .footer-simple-inner a { display: block; line-height: 2; }
}

@media (max-width: 420px) {
  .container { padding: 0 8px; }
  .logo-mark { flex: 0 0 30px; width: 30px; height: 30px; }
  .logo-mark svg { width: 16px; height: 16px; }
  .logo-text .brand { font-size: 13px; letter-spacing: 0; }
  .logo-text .slogan { display: none; }
  .header-cta { gap: 4px; }
  .hamburger { width: 22px; height: 18px; }
}

/* 面包屑导航 */
.breadcrumb { padding: 18px 0 4px; font-size: 13px; color: var(--color-muted); }
.breadcrumb a { color: var(--color-muted); transition: color var(--transition); padding: 4px 0; display: inline-block; }
.breadcrumb a:hover { color: var(--color-gold); }
.breadcrumb .sep { margin: 0 8px; color: #c8c8c8; }
.breadcrumb .current { color: var(--color-dark); }

/* 移动端面包屑 */
@media (max-width: 768px) {
  .breadcrumb { padding: 12px 0 6px; font-size: 12px; }
  .breadcrumb a { padding: 6px 2px; min-height: 32px; display: inline-flex; align-items: center; }
}

/* 到店引流条 */
.visit-strip { background: linear-gradient(135deg,#2b2b2b 0%,#1f1f1f 100%); color: #fff; padding: 40px 0; }
.visit-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.visit-inner h3 { font-size: 20px; letter-spacing: 1px; margin-bottom: 6px; }
.visit-inner p { color: #cfcfcf; font-size: 14px; }
.visit-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.visit-cta a { padding: 12px 22px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  transition: all var(--transition); display: inline-flex; align-items: center; gap: 6px; }
.visit-cta .btn-primary { background: var(--color-gold); color: #fff; }
.visit-cta .btn-primary:hover { background: var(--color-gold-hover); }
.visit-cta .btn-outline { border: 1px solid #fff; color: #fff; }
.visit-cta .btn-outline:hover { background: #fff; color: var(--color-dark); }
