/* ============================================
   木小匠实木大板工厂 — 手机优先响应式样式
   Mobile-First Design
   ============================================ */

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #5c3d1e;
  --primary-light: #7a5830;
  --accent: #c8922a;
  --accent-light: #e0aa3e;
  --bg: #faf6f1;
  --white: #ffffff;
  --text: #2c2015;
  --text-light: #6b5a47;
  --border: #e0d0c0;
  --shadow: rgba(92, 61, 30, 0.1);
  --bottom-bar-height: 64px;
}
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 15px;
  padding-bottom: calc(var(--bottom-bar-height) + 12px); /* 给底部栏留空间 */
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== HEADER ===== */
header {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  position: relative;
  flex-wrap: wrap;
}
.logo { font-size: 20px; font-weight: 700; color: var(--primary); letter-spacing: 1px; white-space: nowrap; }
.logo span { color: var(--accent); }
.logo a { color: var(--primary); }

nav ul li a {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
  color: var(--primary);
  text-align: center;
  border-radius: 20px;
  margin: 6px 12px;
  background: rgba(139,90,43,0.08);
  border: 1px solid rgba(139,90,43,0.15);
  transition: all 0.2s ease;
}
nav ul li:last-child a { margin-bottom: 0; }
nav ul li a.active,
nav ul li a:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

/* Header CTA hidden on mobile */
.header-contact { display: none; }

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 40px 0 32px;
  text-align: center;
}
.page-hero h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.page-hero p { font-size: 14px; opacity: 0.85; }

/* ===== BANNER (HOME) ===== */






/* ===== BANNER SLIDESHOW ===== */

.banner-slideshow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}
.banner-slideshow .slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.banner-slideshow .slide.active {
  opacity: 1;
}
.banner-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(62,39,20,0.9), rgba(90,58,31,0.85));
  z-index: 1;
}
.banner .container {
  position: relative;
  z-index: 2;
  padding: 20px 16px;
}

.banner-btns { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 13px 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.2s;
  min-width: 180px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); color: #fff; }
.btn-secondary { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-secondary:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* ===== SECTION ===== */
.section { padding: 36px 0; }
.section-title {
  text-align: center;
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 6px;
  font-weight: 700;
}
.section-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 28px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
  padding-top: 12px;
}
.breadcrumb a { color: var(--primary); }

/* ===== FEATURES ===== */
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 32px; }
.feature-card {
  background: var(--white);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow);
}
.feature-icon { font-size: 28px; margin-bottom: 8px; }
.feature-card h3 { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.feature-card p { font-size: 12px; color: var(--text-light); line-height: 1.6; }

/* ===== PRODUCTS GRID (MOBILE: 2 COLS) ===== */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px var(--shadow); }
.product-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--border);
}
.product-card .info { padding: 10px 12px; }
.product-card h3 { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.product-card p { font-size: 12px; color: var(--text-light); line-height: 1.6; margin-bottom: 8px; }
.product-card .price { font-size: 14px; color: var(--accent); font-weight: 700; }
.product-card .more {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  margin-top: 6px;
  padding: 4px 12px;
  border: 1px solid var(--accent);
  border-radius: 4px;
}
.product-card .more:hover { background: var(--accent); color: #fff; }

/* 查看详情按钮样式 */
.product-card .pbtn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(180,130,70,0.08);
  border: 1px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.product-card .pbtn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(180,130,70,0.25);
}

/* ===== PRODUCT DETAIL ===== */
.product-detail-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.product-detail-grid img { width: 100%; border-radius: 8px; background: var(--border); }
.product-detail-info { }
.product-detail-info h1 { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.price-tag { font-size: 20px; color: var(--accent); font-weight: 700; margin-bottom: 12px; display: block; }
.price-note { font-size: 12px; color: var(--text-light); }
.product-detail-info .desc { font-size: 14px; color: var(--text); line-height: 2; margin-bottom: 16px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 13px; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table td { padding: 8px 0; }
.spec-table td:first-child { color: var(--text-light); width: 90px; }
.spec-table td:last-child { color: var(--text); font-weight: 500; }

/* ===== ARTICLE LIST (MOBILE) ===== */
.article-list { display: flex; flex-direction: column; gap: 12px; }
.article-card {
  background: var(--white);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 8px var(--shadow);
}
.article-card h3 { font-size: 15px; font-weight: 600; color: var(--primary); margin-bottom: 6px; line-height: 1.5; }
.article-card p { font-size: 13px; color: var(--text-light); line-height: 1.7; margin-bottom: 10px; }
.article-card .meta { font-size: 12px; color: var(--text-light); margin-bottom: 10px; }
.article-card .more { color: var(--accent); font-size: 13px; font-weight: 500; }
.article-card .more:hover { text-decoration: underline; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.about-grid img { width: 100%; border-radius: 8px; background: var(--border); }
.about-text h2 { font-size: 18px; color: var(--primary); font-weight: 700; margin-bottom: 12px; }
.about-text p { font-size: 14px; color: var(--text); line-height: 2; margin-bottom: 12px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.about-tag {
  padding: 4px 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
}

/* ===== CONTACT FORM ===== */
.contact-form {
  background: var(--white);
  border-radius: 8px;
  padding: 20px 16px;
  box-shadow: 0 2px 12px var(--shadow);
}
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, var(--primary), #3d2410);
  color: rgba(255,255,255,0.85);
  padding: 28px 0 20px;
  margin-top: 32px;
}
.footer-grid { display: flex; flex-direction: column; gap: 20px; padding: 0 16px; }
.footer-brand h3 { font-size: 16px; color: #fff; margin-bottom: 8px; font-weight: 700; }
.footer-brand p { font-size: 13px; line-height: 1.8; opacity: 0.8; }
.footer-col h4 { font-size: 14px; color: #fff; font-weight: 600; margin-bottom: 8px; }
.footer-col ul li { font-size: 13px; margin-bottom: 6px; opacity: 0.8; white-space: nowrap; }
.footer-col ul li a { color: rgba(255,255,255,0.8); }
.footer-col ul li a:hover { color: var(--accent-light); }
.footer-bottom {
  text-align: center;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
  opacity: 0.6;
}

/* ===== BOTTOM FIXED BAR (MOBILE ONLY) ===== */








/* Hide bottom bar on desktop */


/* ============================================
   DESKTOP OVERRIDES (min-width: 769px)
   ============================================ */


/* Desktop styles */











/* ===== 移动端导航 ===== */
nav {
  display: none;
  width: 100%;
  order: 10;
}


.mobile-menu:active {
  background: rgba(139,90,43,0.2);
}

  
  nav ul {
    flex-direction: column;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 8px 0 12px;
    gap: 0;
    box-shadow: 0 4px 12px var(--shadow);
  }
  nav ul li a {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    color: var(--primary);
    text-align: center;
    border-radius: 20px;
    margin: 4px 12px;
    background: rgba(139,90,43,0.08);
    border: 1px solid rgba(139,90,43,0.15);
    transition: all 0.2s ease;
  }
  nav ul li:last-child a { margin-bottom: 0; }
  nav ul li a.active,
  nav ul li a:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
  }
}

/* ===== 桌面端导航 ===== */



.carousel-container { position: relative; height: 200px; }
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease; display: none; }
.carousel-slide.active { opacity: 1; display: block; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; padding: 50px 20px 30px; text-align: center; }
.carousel-caption h2 { font-size: 28px; margin-bottom: 8px; }
.carousel-caption p { font-size: 16px; opacity: 0.9; }
.carousel-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.dot.active { background: #fff; }
.carousel-prev, .carousel-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: #fff; border: none; width: 44px; height: 44px; font-size: 18px; cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 10; }
.carousel-prev { left: 15px; }
.carousel-next { right: 15px; }
.carousel-prev:hover, .carousel-next:hover { background: rgba(0,0,0,0.6); }
 .carousel-caption h2 { font-size: 20px; } .carousel-caption p { font-size: 14px; 
/* ============================================
   FORCE MOBILE LAYOUT - Scrollable nav
   ============================================ */

/* Always show hamburger button */
.mobile-menu {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  order: 2 !important;
  flex-shrink: 0 !important;
}

/* Header: hamburger on right */
.header-inner {
  flex-wrap: wrap !important;
  align-items: center !important;
}

/* Hide desktop nav by default */
nav {
  display: none !important;
  width: 100% !important;
}

/* Scrollable nav when shown */
nav.show {
  display: block !important;
  overflow-y: auto !important;
  max-height: calc(100vh - 160px) !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 20px !important;
}

/* Vertical nav items */
nav ul {
  flex-direction: column !important;
  padding: 5px 10px !important;
  flex-wrap: nowrap !important;
}

nav li {
  padding: 6px 0 !important;
  margin: 2px 0 !important;
  border-bottom: 1px solid rgba(139,90,43,0.1) !important;
  flex-shrink: 0 !important;
}

nav li:last-child {
  border-bottom: none !important;
}

nav ul li a {
  padding: 8px 14px !important;
  font-size: 14px !important;
  margin: 2px 6px !important;
  border-radius: 16px !important;
}

/* Product grid: 2 columns */
.product-grid {
  grid-template-columns: repeat(2, 1fr) !important;
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}


/* ============================================
   FORCE MOBILE ON ALL SCREENS - v2 pages fix
   ============================================ */
@media screen {
  /* Body: force mobile width */
  body {
    max-width: 480px !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
  }
  
  /* Container: limit width */
  .container {
    max-width: 480px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  /* Section: center and limit */
  .section {
    max-width: 480px !important;
    margin: 0 auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  /* Nav: hidden by default, show when .show */
  nav {
    display: none !important;
    width: 100% !important;
  }
  nav.show {
    display: block !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 160px) !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* Hamburger always visible */
  .mobile-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 26px !important;
    cursor: pointer !important;
    color: var(--primary) !important;
    padding: 8px 12px !important;
    background: rgba(139,90,43,0.1) !important;
    border: 2px solid rgba(139,90,43,0.25) !important;
    border-radius: 8px !important;
    text-align: center !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  
  /* Product grid: 2 columns like mobile */
  .product-grid,
  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  /* Footer: single column */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
  
  /* Page hero: compact */
  .page-hero {
    padding: 24px 0 20px !important;
  }
  .page-hero h1 {
    font-size: 20px !important;
  }
}


/* ============================================
   FIX: 产品卡片大小 - 强制两列紧凑布局
   ============================================ */
.products-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  padding: 0 !important;
}

.product-card {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border-radius: 8px !important;
}

.product-card img {
  width: 100% !important;
  height: auto !important;
  max-height: 180px !important;
  object-fit: cover !important;
  display: block !important;
}

/* ============================================
   FOOTER FIX - force 2-column grid on all sizes
   ============================================ */
.footer-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  padding: 0 16px !important;
  flex-wrap: unset !important;
}

footer {
  background: linear-gradient(135deg, #5c3a1e, #3d2410) !important;
  color: rgba(255,255,255,0.85) !important;
  padding: 24px 0 20px !important;
  margin-top: 32px !important;
  max-width: 480px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.footer-brand {
  grid-column: 1 / -1 !important;
  text-align: center !important;
  padding-bottom: 12px !important;
}


.footer-col h4 {
  text-align: left !important;
  font-size: 13px !important;
}

.footer-col ul {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

.footer-col ul li {
  white-space: normal !important;
  text-align: left !important;
}

.footer-bottom {
  grid-column: 1 / -1 !important;
  text-align: center !important;
  padding-top: 12px !important;
  margin-top: 12px !important;
  border-top: 1px solid rgba(255,255,255,0.15) !important;
  font-size: 11px !important;
  opacity: 0.6 !important;
}


/* FOOTER FULL FIX */
footer{background:linear-gradient(135deg,#5c3a1e,#3d2410)!important;padding:24px 0 20px!important;margin-top:32px!important}
.footer-grid{display:grid!important;grid-template-columns:repeat(2,1fr)!important;gap:16px!important;padding:0 16px!important}
.footer-brand{grid-column:1/-1!important;text-align:left!important}
.footer-brand h3{text-align:left!important;font-size:14px!important}
.footer-brand p{text-align:left!important;font-size:12px!important}
.footer-col{text-align:left!important}
.footer-col h4{text-align:left!important;font-size:13px!important}
.footer-col ul{display:flex!important;flex-direction:column!important;align-items:flex-start!important}
.footer-col ul li{white-space:normal!important;text-align:left!important;font-size:12px!important}
.footer-bottom{grid-column:1/-1!important;text-align:center!important;font-size:11px!important;border-top:1px solid rgba(255,255,255,0.15)!important;padding-top:12px!important}

/* Footer brand text horizontal fix */
.footer-brand p,
.footer-brand .brand-desc,
footer .brand-desc,
.footer-grid > div:first-child p {
  white-space: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  max-width: 100% !important;
  display: block !important;
  line-height: 1.6 !important;
}
.footer-brand {
  width: 100% !important;
  max-width: 100% !important;
}

