/* ============================================
   Company Website - Professional Business Style
   Manufacturing Industry - Blue/Gray Color Scheme
   ============================================ */

:root {
  --primary: #1a3a5f;
  --primary-light: #2c5282;
  --primary-dark: #0f2847;
  --accent: #fa6b42;
  --accent-light: #ff8a65;
  --bg-light: #f7f8fa;
  --bg-gray: #eef1f5;
  --text-dark: #1a1a2e;
  --text-body: #4a5568;
  --text-light: #718096;
  --border: #e2e8f0;
  --white: #ffffff;
  --success: #28a745;
  --danger: #dc3545;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

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

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

.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.bg-light { background: var(--bg-light); }
.bg-gray { background: var(--bg-gray); }

.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 {
  font-size: 32px;
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-title .subtitle {
  font-size: 15px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.section-title .divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ============================================
   HEADER & NAV
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid var(--primary);
}
.header-top {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  padding: 6px 0;
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-top span { margin-right: 24px; }
.header-top i { color: var(--accent); margin-right: 6px; }

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
.logo-text { line-height: 1.2; }
.logo-text .name {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-dark);
}
.logo-text .slogan {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 1px;
}
.logo-img {
  max-height: 52px;
  width: auto;
  display: block;
}
.logo-img-light {
  background: var(--white);
  padding: 6px 10px;
  border-radius: var(--radius);
}

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  padding: 8px 18px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius);
}
.nav a:hover, .nav a.active {
  color: var(--primary);
  background: var(--bg-gray);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--primary-dark);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 520px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(0deg, rgba(0,0,0,0.4), transparent 40%),
    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='0.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");
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.2));
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 620px; }
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--accent-light); }
.hero .lead {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 32px;
  opacity: 0.9;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================
   BANNER SLIDER (首页流动横幅)
   ============================================ */
.banner-slider {
  position: relative;
  width: 100%;
  height: clamp(200px, 16vw, 300px);
  overflow: hidden;
  background: var(--primary-dark);
}
.banner-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity 0.9s ease, transform 0.9s ease, visibility 0.9s;
}
.banner-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  z-index: 1;
}
.banner-slide a {
  display: block;
  width: 100%;
  height: 100%;
}
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Arrows */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 58, 95, 0.45);
  color: var(--white);
  font-size: 20px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
}
.banner-slider:hover .banner-arrow { opacity: 1; }
.banner-arrow:hover { background: var(--accent); }
.banner-prev { left: 0; border-radius: 0 6px 6px 0; }
.banner-next { right: 0; border-radius: 6px 0 0 6px; }
/* Dots */
.banner-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
}
.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}
.banner-dot.active {
  background: var(--accent);
  width: 26px;
  border-radius: 5px;
}
.banner-dot:hover { background: var(--white); }
.banner-dot.active:hover { background: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
}
.btn-lg { padding: 14px 40px; font-size: 16px; }

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  background: var(--white);
  padding: 40px 0;
  margin-top: -40px;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  margin-left: 24px;
  margin-right: 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-item h3 {
  font-size: 36px;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 4px;
}
.stat-item p {
  font-size: 14px;
  color: var(--text-light);
}

/* ============================================
   CARDS & GRIDS
   ============================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }

.card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* Service card */
.service-card {
  padding: 36px 28px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  transition: var(--transition);
}
.service-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.service-card .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--white);
}
.service-card h3 {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-weight: 700;
}
.service-card p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
}

/* Product card */
.product-card .product-img {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--bg-gray), var(--bg-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--primary-light);
  position: relative;
  overflow: hidden;
}
.product-card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-card .product-img:hover img { transform: scale(1.05); }
.product-card .product-img .cat-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
}
.product-card .product-body { padding: 20px; }
.product-card .product-body h3 {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-weight: 600;
}
.product-card .product-body p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .product-body .btn-more {
  margin-top: 14px;
  display: inline-block;
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 600;
}

/* News card */
.news-card { padding: 0; }
.news-card .news-body { padding: 24px; }
.news-card .news-date {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}
.news-card h3 {
  font-size: 17px;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.5;
}
.news-card p {
  font-size: 14px;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   ABOUT / FEATURE SECTIONS
   ============================================ */
.feature-box {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}
.feature-box .icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
}
.feature-box h4 {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.feature-box p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 36px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-item .year {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.timeline-item h4 {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.timeline-item p {
  font-size: 14px;
  color: var(--text-light);
}

/* Values */
.value-card {
  text-align: center;
  padding: 32px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  transition: var(--transition);
}
.value-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.value-card .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}
.value-card h4 {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.value-card p {
  font-size: 14px;
  color: var(--text-light);
}

/* ============================================
   PRODUCT DETAIL
   ============================================ */
.breadcrumb {
  background: var(--bg-gray);
  padding: 14px 0;
  font-size: 13px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb span { color: var(--primary); }

.product-detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.product-detail-img {
  height: 400px;
  background: linear-gradient(135deg, var(--bg-gray), var(--bg-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: var(--primary-light);
}
.product-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.pd-gallery { width: 100%; height: 100%; }
.pd-main-image {
  width: 100%;
  height: 78%;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-light);
}
.pd-main-image img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  height: 18%;
}
.pd-thumb {
  flex: 0 0 72px;
  height: 100%;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--bg-light);
}
.pd-thumb.active { border-color: var(--primary); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info h1 {
  font-size: 28px;
  color: var(--text-dark);
  margin-bottom: 16px;
}
.product-detail-info .specs-box {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  white-space: pre-line;
  font-size: 14px;
  line-height: 2;
}
.product-detail-info .features-list span {
  display: inline-block;
  padding: 4px 14px;
  margin: 0 8px 8px 0;
  background: var(--bg-gray);
  border-radius: 4px;
  font-size: 13px;
  color: var(--primary);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
}
.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.contact-info-item .icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.contact-info-item h4 {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.contact-info-item p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
}

/* Form */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-group label .req { color: var(--danger); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: var(--transition);
  font-family: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(44,82,130,0.1);
}
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
}
.form-success {
  background: #f0fff4;
  border: 1px solid #c6f6d5;
  color: var(--success);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ---------- 来厂参观地图 ---------- */
.visit-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.visit-card-header {
  padding: 34px 30px 16px;
  text-align: center;
}
.visit-icon {
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 10px;
}
.visit-card-header h3 {
  font-size: 20px;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.visit-card-header p {
  color: var(--text-light);
  font-size: 14px;
}
.visit-map {
  width: 100%;
  height: 360px;
  background: #f0f2f5;
  position: relative;
}
.map-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-align: center;
  padding: 20px;
}
.map-fallback i {
  font-size: 42px;
  margin-bottom: 10px;
  color: var(--border);
}
.visit-card-footer {
  padding: 22px 30px 30px;
  text-align: center;
}
.visit-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--text-body);
}
.visit-info span {
  display: inline-block;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  text-align: center;
  padding: 70px 0;
}
.cta-section h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 12px;
}
.cta-section p {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 28px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 18px;
  font-weight: 600;
}
.footer p { font-size: 14px; line-height: 1.8; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer ul li a:hover { color: var(--accent); }
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 12px;
}
.footer-contact li i { color: var(--accent); margin-top: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ============================================
   PAGE HEADER (inner pages)
   ============================================ */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.page-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-header p {
  font-size: 15px;
  opacity: 0.8;
}

/* ============================================
   CATEGORY FILTER
   ============================================ */
.filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-bar a {
  padding: 8px 22px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-body);
  background: var(--white);
  transition: var(--transition);
}
.filter-bar a:hover, .filter-bar a.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ============================================
   PAGINATION / EMPTY
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty-state .icon {
  font-size: 60px;
  margin-bottom: 16px;
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-body { background: var(--bg-light); }
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 230px;
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  flex-shrink: 0;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 100;
}
.admin-sidebar .brand {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar .brand h3 {
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
}
.admin-sidebar .brand p {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}
.admin-nav { padding: 16px 0; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: var(--transition);
}
.admin-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}
.admin-nav a.active {
  background: var(--primary-light);
  color: var(--white);
  border-left: 3px solid var(--accent);
}
.admin-nav a i { width: 20px; text-align: center; }

.admin-main {
  flex: 1;
  margin-left: 230px;
  padding: 0;
}
.admin-topbar {
  background: var(--white);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.admin-topbar h1 {
  font-size: 20px;
  color: var(--text-dark);
  font-weight: 600;
}
.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.admin-content { padding: 0 28px 28px; }

/* Admin cards */
.admin-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}
.admin-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-card-header h3 {
  font-size: 16px;
  color: var(--text-dark);
  font-weight: 600;
}
.admin-card-body { padding: 24px; }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--white);
}
.stat-card .stat-info h3 {
  font-size: 28px;
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.2;
}
.stat-card .stat-info p {
  font-size: 13px;
  color: var(--text-light);
}

/* Admin table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-gray);
  font-size: 13px;
  color: var(--text-dark);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.admin-table tr:hover td { background: var(--bg-light); }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.badge-new { background: #fef3c7; color: #92400e; }
.badge-read { background: #dbeafe; color: #1e40af; }
.badge-replied { background: #d1fae5; color: #065f46; }

/* Admin form */
.admin-form .form-group { margin-bottom: 18px; }
.admin-form label {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-weight: 500;
}
.admin-form .form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
}
.admin-form .form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(44,82,130,0.1);
}
.admin-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Login page */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-box h2 {
  text-align: center;
  font-size: 24px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.login-box .sub {
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 28px;
}
.login-box .btn {
  width: 100%;
  justify-content: center;
}
.login-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
}

/* Action buttons */
.action-btns { display: flex; gap: 6px; }
.btn-sm {
  padding: 5px 14px;
  font-size: 13px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}
.btn-edit { background: var(--bg-gray); color: var(--primary); }
.btn-edit:hover { background: var(--primary); color: var(--white); }
.btn-danger { background: #fff5f5; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--white); }

/* Image upload */
.upload-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.upload-box:hover { border-color: var(--primary-light); }
.upload-box .icon { font-size: 36px; color: var(--text-light); margin-bottom: 8px; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail-header { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 10px; box-shadow: var(--shadow); }
  .nav.show { display: flex; }
  .nav-toggle { display: block; }
  .header-top { display: none; }
  .hero h1 { font-size: 28px; }
  .hero { min-height: 400px; }
  .banner-slider { height: 190px; }
  .banner-arrow { width: 32px; height: 44px; font-size: 16px; opacity: 1; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .form-row, .admin-form .form-row { grid-template-columns: 1fr; }
  .admin-sidebar { width: 60px; }
  .admin-sidebar .brand h3, .admin-sidebar .brand p { display: none; }
  .admin-nav a span { display: none; }
  .admin-main { margin-left: 60px; }
  .section { padding: 50px 0; }
  .section-title h2 { font-size: 24px; }
}

/* ============================================
   Product Video Modal
   ============================================ */
.video-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.video-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.video-modal {
  width: 50vw;
  height: 50vh;
  min-width: 360px;
  min-height: 260px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.92);
  transition: all 0.3s ease;
}
.video-modal.show {
  transform: scale(1);
}

.video-modal.maximized {
  width: 100vw !important;
  height: 100vh !important;
  min-width: 100vw;
  min-height: 100vh;
  border-radius: 0;
}

.video-modal.minimized {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 360px !important;
  height: 240px !important;
  min-width: 360px;
  min-height: 240px;
  border-radius: 8px;
  transform: scale(1);
}

.video-modal-header {
  background: var(--primary);
  color: var(--white);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.video-modal-title {
  font-size: 15px;
  font-weight: 600;
}
.video-modal-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.video-modal-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.video-modal-btn:hover {
  background: rgba(255,255,255,0.25);
}
.video-modal-close:hover {
  background: var(--danger);
}

.video-modal-body {
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-modal-body {
  position: relative;
}
.video-modal-body video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* 视频中央水印（淡淡显示，不影响观看） */
.video-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: 10px;
  color: rgba(255, 255, 255, 0.30);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  z-index: 2;
}
.vc-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.vc-btn:hover { background: rgba(255,255,255,0.2); }
.vc-time {
  color: #fff;
  font-size: 12px;
  min-width: 92px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.vc-progress {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  cursor: pointer;
}
.vc-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
}
.vc-progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
}

@media (max-width: 768px) {
  .video-modal {
    width: 94vw;
    height: 40vh;
    min-width: auto;
    min-height: 220px;
  }
  .video-modal.minimized {
    width: 220px !important;
    height: 150px !important;
    min-width: 220px;
    min-height: 150px;
    bottom: 12px;
    right: 12px;
  }
}

/* Admin upload component */
.upload-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.upload-row .upload-input {
  flex: 1;
}
.upload-row .btn {
  white-space: nowrap;
}
.uploaded-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.uploaded-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px 4px 4px;
  font-size: 13px;
}
.uploaded-item img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--white);
}
.uploaded-name {
  color: var(--text-body);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uploaded-name.video-name::before {
  content: "🎬";
  margin-right: 4px;
}
.uploaded-remove {
  width: 20px;
  height: 20px;
  border: none;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.uploaded-remove:hover {
  background: #c0392b;
}
.upload-status {
  margin-top: 6px;
  font-size: 13px;
  min-height: 18px;
}
.btn-secondary {
  background: var(--bg-gray);
  color: var(--text-dark);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
}
