/* ==========================================
   迪模易模塑科技有限公司 — 全局样式
   D-MOLD
========================================== */

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #1a3c5e;
  --color-primary-dark: #0d2137;
  --color-primary-light: #2a6496;
  --color-accent: #d4a853;
  --color-accent-dark: #b8913a;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-text-muted: #999999;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fa;
  --color-bg-dark: #0d2137;
  --color-border: #e8e8e8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  line-height: 1.8;
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ===== Typography ===== */
a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary);
  line-height: 1.4;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: 2px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.logo img {
  height: 42px;
  width: auto;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text .logo-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 1px;
  line-height: 1.3;
}

.logo-text .logo-sub {
  font-size: 10px;
  color: var(--color-text-muted);
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav a {
  font-size: 14px;
  color: var(--color-text-light);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s;
}

.nav a:hover,
.nav a.active {
  color: var(--color-primary);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .nav {
    display: none;
  }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: var(--shadow-lg);
    padding: 20px;
    gap: 16px;
    text-align: center;
  }
  .nav a {
    font-size: 16px;
    padding: 8px 0;
  }
}

/* ===== Page Banner ===== */
.page-banner {
  margin-top: 72px;
  padding: 80px 0 60px;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 40%, var(--color-primary-light) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.page-banner h1 {
  font-size: 36px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 0;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb .container {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-primary);
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb .sep {
  color: var(--color-border);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.footer-info h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.footer-info p {
  font-size: 14px;
  line-height: 2;
}

.footer-links h4,
.footer-contact h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 16px;
  letter-spacing: 1px;
  font-weight: 600;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}

.footer-links ul li a:hover {
  color: var(--color-accent);
}

.footer-contact p {
  font-size: 14px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.5);
}

.footer-contact a {
  color: var(--color-accent);
  transition: color 0.3s;
}

.footer-contact a:hover {
  color: #e6c56a;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s;
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 168, 83, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* ===== Section Padding ===== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

@media (max-width: 768px) {
  .section {
    padding: 50px 0;
  }
  .section-title {
    font-size: 26px;
  }
  .section-subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }
  .page-banner {
    padding: 50px 0 40px;
  }
  .page-banner h1 {
    font-size: 24px;
  }
  .footer {
    padding: 40px 0 24px;
  }
  .faq-question {
    padding: 14px 16px;
    font-size: 14px;
  }
  .faq-answer-content {
    padding: 0 16px 16px;
    font-size: 13px;
  }
  .carousel-slide img {
    height: 160px;
  }
  .carousel-slide .carousel-placeholder {
    height: 160px;
  }
  .breadcrumb {
    padding: 10px 0;
    font-size: 12px;
  }
  .btn {
    padding: 11px 22px;
    font-size: 13px;
  }
  .logo-text .logo-name {
    font-size: 14px;
  }
  .logo-text .logo-sub {
    font-size: 9px;
  }
  .header-inner {
    height: 60px;
  }
}

/* ===== FAQ Section ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: #ccc;
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-primary);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: inherit;
  letter-spacing: 0.3px;
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-question .faq-icon {
  font-size: 20px;
  transition: transform 0.3s;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.faq-item.open .faq-question .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 2000px;
}

.faq-answer-content {
  padding: 0 24px 20px;
  font-size: 14px;
  color: #555;
  line-height: 1.9;
}

/* ===== Carousel ===== */
.product-carousel,
.equipment-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  cursor: pointer;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-slide img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #f0f4f8, #e0e8f0);
}

.carousel-slide .carousel-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #f0f4f8, #e0e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.carousel-placeholder svg {
  width: 56px;
  height: 56px;
  opacity: 0.2;
}

.carousel-slide .slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  color: #fff;
  font-size: 12px;
  text-align: center;
}

/* Carousel Navigation */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-carousel:hover .carousel-prev,
.product-carousel:hover .carousel-next,
.equipment-carousel:hover .carousel-prev,
.equipment-carousel:hover .carousel-next {
  opacity: 1;
}

.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }

.carousel-prev:hover,
.carousel-next:hover {
  background: #fff;
  color: var(--color-accent);
}

/* Carousel Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}

.carousel-dot.active {
  background: #fff;
  width: 20px;
  border-radius: 4px;
}

/* Card badge on carousel */
.carousel-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 1px;
  z-index: 2;
  pointer-events: none;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-counter {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  white-space: nowrap;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: #fff;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close {
    top: 10px;
    right: 14px;
    font-size: 32px;
  }
}

/* ===== Map Link ===== */
.map-link-wrap {
  text-align: center;
  margin-top: 32px;
}

.map-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #1a3c5e, #2a6496);
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s;
  letter-spacing: 0.5px;
}

.map-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,60,94,0.3);
  color: #fff;
}

.map-link-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}
