/*
Theme Name: Chenlu Industry
Theme URI: https://chenluindustry.com
Author: Chenlu Industry Co., Ltd.
Description: Chenlu Industry company website theme.
Version: 1.0.0
*/

:root {
  --brand-red: #c8102e;
  --brand-red-dark: #9c0c22;
  --nav-blue: #1c4d8c;
  --nav-blue-light: #eaf1fa;
  --navy: #12181f;
  --ink: #1c232b;
  --gray: #5c6670;
  --line: #e6e8eb;
  --bg-soft: #f5f6f7;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; font-family: "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(1400px, 100%); margin: 0 auto; padding: 0 16px; }

/* Homepage hero */
.hero { position: relative; height: calc(100vh - 235px); min-height: 520px; overflow: hidden; background: #000; }
.hero video { position: relative; z-index: 1; width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; z-index: 2; background: rgba(0, 0, 0, .38); pointer-events: none; }
.hero h1 { position: absolute; top: 50%; left: 50%; z-index: 3; width: min(92%, 1100px); margin: 0; transform: translate(-50%, -50%); color: #fff; text-align: center; font-size: clamp(30px, 4.2vw, 68px); line-height: 1.15; font-weight: 900; letter-spacing: .5px; text-shadow: 0 3px 12px rgba(0, 0, 0, .75); }

/* Sections and headings */
.section { padding: 46px 0; }
.section.alt { background: var(--bg-soft); }
.section-compact { padding: 30px 0; }
.sec-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.sec-title h2, .sec-title h3 { margin: 0; padding-left: 12px; border-left: 5px solid var(--brand-red); color: var(--navy); font-size: 22px; line-height: 1.3; font-weight: 800; }
.section-compact .sec-title { margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.section-compact .sec-title h2 { padding-left: 10px; border-left-width: 4px; font-size: 20px; }

/* News and videos */
.news-scroll { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; scroll-margin-top: 180px; }
.news-scroll .news-card { display: none; }
.news-scroll .news-card.is-visible { display: block; }
.news-card { overflow: hidden; border-radius: 6px; background: #fff; text-decoration: none; transition: .2s; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0, 0, 0, .09); }
.news-card img { width: 100%; height: 220px; border-radius: 6px; object-fit: cover; }
.news-card .body { padding: 14px 2px; }
.news-card .body p { margin: 0 0 8px; color: var(--ink); font-size: 16px; line-height: 1.4; font-weight: 700; }
.news-card .body time { color: var(--gray); font-size: 13px; }
.grid-pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 34px; flex-wrap: wrap; }
.grid-pagination button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--gray); font-size: 14px; cursor: pointer; }
.grid-pagination button:hover, .grid-pagination button.active { border-color: var(--nav-blue); color: var(--nav-blue); }
.grid-pagination button.active { background: var(--nav-blue); color: #fff; font-weight: 700; }
.grid-pagination button.nav-arrow { border: 0; background: none; color: var(--ink); font-size: 18px; }
.grid-pagination button:disabled { opacity: .3; cursor: default; }

/* Company introduction and customer video */
.intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.intro p { color: var(--gray); font-size: 18px; line-height: 1.85; }
.intro strong { color: var(--ink); }
.intro-video { position: relative; overflow: hidden; min-height: 340px; border-radius: 10px; background: #000; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.intro-video img, .intro-video video { width: 100%; height: 340px; display: block; object-fit: cover; }
.yt-playbtn { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 22px; cursor: pointer; }
.yt-caption { position: absolute; right: 16px; bottom: 18px; left: 16px; color: #fff; font-size: 17px; font-weight: 700; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }

/* Main products */
.products-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: center; }
.product-card img, .product-card-placeholder { width: 100%; height: 130px; object-fit: cover; }
.product-card-placeholder { display: flex; align-items: center; justify-content: center; background: #f0f0f0; color: #999; font-size: 13px; }
.product-card .name { padding: 10px 8px; color: var(--ink); font-size: 13.5px; font-weight: 700; }
.product-card:hover { border-color: var(--nav-blue); }
.product-card:hover .name { color: var(--nav-blue); }
.products-empty { color: var(--gray); }

@media (max-width: 1100px) {
  .hero { height: calc(100vh - 128px); min-height: 420px; }
  .news-scroll { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .intro { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero { height: 58vh; min-height: 360px; }
  .hero h1 { font-size: clamp(28px, 8vw, 42px); }
  .news-scroll, .products-grid { grid-template-columns: 1fr; }
  .section { padding: 32px 0; }
  .intro p { font-size: 16px; }
}
