:root {
  --red: #c62828;
  --red-dark: #8e0000;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #ffffff;
  --light: #f8f9fa;
  --border: #e5e7eb;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: min(1200px, 92%); margin: 0 auto; }

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.logo-img { height: 40px; width: auto; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a.active, .main-nav a:hover { color: var(--red); }
.lang-switch {
  border: 1px solid var(--red);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

/* Hero */
.hero { position: relative; }
.hero-slider { position: relative; height: 560px; overflow: hidden; }
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s;
}
.slide.active { opacity: 1; }
.slide-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  max-width: 700px;
}
.slide-content h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 16px; line-height: 1.2; }
.slide-content p { font-size: 1.2rem; margin: 0 0 28px; opacity: 0.95; }
.hero-simple {
  background: linear-gradient(135deg, #fff0f0 0%, #ffffff 100%);
  padding: 120px 0;
  text-align: center;
}
.hero-simple h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--red-dark); margin: 0 0 16px; }
.hero-simple p { font-size: 1.2rem; color: var(--muted); margin: 0 0 28px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn-large { padding: 14px 32px; font-size: 1.05rem; }

/* Sections */
.section { padding: 72px 0; }
.bg-light { background: var(--light); }
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title h2 { font-size: 1.8rem; margin: 0; color: var(--text); }
.section-title p { margin: 6px 0 0; color: var(--muted); }
.link-more { font-weight: 500; }

/* Grids */
.category-grid, .product-grid, .advantage-grid, .image-grid {
  display: grid;
  gap: 24px;
}
.category-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.advantage-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.image-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Cards */
.category-card, .product-card, .advantage-card, .image-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.category-card:hover, .product-card:hover { transform: translateY(-4px); }
.category-img, .product-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}
.product-img { height: 220px; }
.category-card h3 { padding: 16px; margin: 0; font-size: 1.05rem; text-align: center; color: var(--text); }
.product-info { padding: 16px; }
.product-info h3 { margin: 0 0 8px; font-size: 1rem; color: var(--text); }
.product-price { color: var(--red); font-weight: 700; margin-right: 12px; }
.product-moq { color: var(--muted); font-size: 0.85rem; }

.advantage-card { padding: 28px 22px; text-align: center; }
.adv-icon { font-size: 2rem; margin-bottom: 12px; }
.advantage-card h3 { margin: 0 0 10px; font-size: 1.1rem; }
.advantage-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.image-card img { width: 100%; height: 220px; object-fit: cover; }

/* About preview */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-text h2 { font-size: 1.9rem; margin: 0 0 16px; }
.about-text p { color: var(--muted); margin: 0 0 24px; }
.about-media video, .about-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Page hero */
.page-hero {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 12px; }
.page-hero p { margin: 0; opacity: 0.95; font-size: 1.1rem; }

/* Products toolbar */
.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.category-filter { display: flex; gap: 10px; flex-wrap: wrap; }
.category-filter a {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--light);
  color: var(--text);
  font-size: 0.9rem;
}
.category-filter a.active, .category-filter a:hover { background: var(--red); color: #fff; }
.search-form { display: flex; gap: 8px; }
.search-form input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
}
.search-form button {
  padding: 10px 18px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
}
.empty, .empty-page { color: var(--muted); padding: 60px 0; text-align: center; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; }
.pagination a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--light); color: var(--text);
}
.pagination a.active { background: var(--red); color: #fff; }

/* Product detail */
.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.main-image {
  width: 100%;
  height: 420px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.thumb-list { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.thumb {
  width: 72px; height: 72px;
  background-size: cover; background-position: center;
  border: 2px solid transparent; border-radius: 8px;
  cursor: pointer;
}
.thumb.active { border-color: var(--red); }
.breadcrumb { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.detail-info h1 { font-size: 2rem; margin: 0 0 16px; }
.detail-info .desc { color: var(--muted); margin: 0 0 20px; }
.specs { background: var(--light); padding: 18px; border-radius: var(--radius); margin-bottom: 20px; }
.specs h4 { margin: 0 0 8px; }
.detail-price { font-size: 1.6rem; color: var(--red); font-weight: 700; margin-bottom: 8px; }
.detail-moq { color: var(--muted); margin-bottom: 24px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}
.contact-info-card, .contact-form-card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.contact-info-card h2, .contact-form-card h2 { margin: 0 0 20px; font-size: 1.4rem; }
.contact-info-card ul { list-style: none; padding: 0; margin: 0; }
.contact-info-card li { margin-bottom: 14px; }
form label { display: block; margin-bottom: 16px; font-weight: 500; }
form input, form textarea {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.alert { padding: 14px; border-radius: var(--radius); margin-bottom: 20px; }
.alert-success { background: #d1fae5; color: #065f46; }

/* Factory strength */
.factory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  gap: 16px;
}
.factory-item {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.factory-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.factory-item:hover img { transform: scale(1.05); }
.factory-item-main { grid-column: span 2; grid-row: span 2; }

/* Application gallery (masonry) */
.app-gallery { column-count: 4; column-gap: 16px; }
.app-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.app-item img { width: 100%; display: block; transition: transform 0.3s; }
.app-item:hover img { transform: scale(1.04); }

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.video-card video, .video-card img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); background: #000; height: 240px; object-fit: cover; }
.video-card h4 { margin: 14px 0 0; text-align: center; font-size: 1.05rem; }
.video-embed { position: relative; width: 100%; padding-bottom: 56.25%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.about-page .about-intro { max-width: 820px; margin: 0 auto 40px; text-align: center; }
.about-page .about-intro h2 { font-size: 1.9rem; margin: 0 0 16px; }
.about-page .about-intro p { color: var(--muted); margin: 0; }

/* Contact bar */
.contact-bar {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  color: #fff;
  padding: 40px 0;
}
.contact-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.contact-bar-label { display: block; font-size: 0.9rem; opacity: 0.9; margin-bottom: 6px; }
.contact-bar-mail {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.contact-bar-mail:hover { text-decoration: underline; }
.contact-bar-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
}
.btn-outline-light:hover { background: #fff; color: var(--red); }
.contact-bar .btn-primary { background: #fff; color: var(--red); }
.contact-bar .btn-primary:hover { background: #fee2e2; }

/* Footer */
.site-footer { background: #111827; color: #d1d5db; padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 1.1rem; margin-bottom: 12px; }
.footer-slogan { margin: 0; color: #9ca3af; }
.site-footer h4 { color: #fff; margin: 0 0 16px; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #d1d5db; }
.copyright { text-align: center; padding-top: 30px; margin-top: 30px; border-top: 1px solid #374151; color: #9ca3af; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 900px) {
  .about-grid, .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .factory-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .app-gallery { column-count: 3; }
}
@media (max-width: 700px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
  }
  .main-nav.open { display: flex; }
  .hero-slider { height: 420px; }
  .slide-content { padding: 0 20px; }
  .products-toolbar { flex-direction: column; align-items: stretch; }
  .search-form input { flex: 1; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .factory-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; }
  .factory-item-main { grid-column: span 2; grid-row: span 1; }
  .app-gallery { column-count: 2; }
}
