/*
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; }

/* Restore rich-text list and table presentation inside category SEO copy. */
.category-copy ul {
  margin: 1em 0;
  padding-left: 2em;
  list-style: disc;
}
.category-copy ol {
  margin: 1em 0;
  padding-left: 2em;
  list-style: decimal;
}
.category-copy li { margin-bottom: .5em; }
.category-copy table {
  width: 100%;
  margin: 1.5em 0;
  border-collapse: collapse;
}
.category-copy th,
.category-copy td {
  padding: 10px 12px;
  border: 1px solid #ddd;
  text-align: left;
}
.category-copy th { font-weight: 600; }

/* Homepage hero */
.hero { position: relative; height: 100vh; min-height: 520px; overflow: hidden; background: #000; }
body.admin-bar .hero { height: calc(100vh - 32px); }
.hero video,
.hero-video-embed,
.hero-video-fallback { position: relative; z-index: 1; width: 100%; height: 100%; display: block; object-fit: cover; border: 0; }
.hero-video-embed { position: absolute; top: 50%; left: 50%; width: max(100%, 177.78vh); height: max(100%, 56.25vw); pointer-events: none; transform: translate(-50%, -50%); }
.hero-video-fallback { 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(24px, 3vw, 46px); line-height: 1.18; 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: 16px; line-height: 1.8; }
.intro strong { color: var(--ink); }
.intro-social-placeholder { display: flex; gap: 12px; margin-top: 18px; }
.intro-social-placeholder a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: #fff; transition: transform .15s ease, box-shadow .15s ease; }
.intro-social-placeholder a:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, .15); }
.intro-social-placeholder img { width: 38px; height: 38px; object-fit: contain; }
.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, .intro-video iframe { width: 100%; height: 340px; display: block; object-fit: cover; border: 0; }
.intro-video:hover img { transform: scale(1.035); filter: brightness(.82); }
.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; transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease; }
.intro-video:hover .yt-playbtn, .yt-playbtn:focus-visible { transform: translate(-50%, -50%) scale(1.14); border-color: #1c4d8c; background: #1c4d8c; box-shadow: 0 0 0 8px rgba(28, 77, 140, .22), 0 8px 22px rgba(0, 0, 0, .35); outline: none; }

/* 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) {
  .main-products-section { display: none; }
  .hero { height: 100vh; min-height: 420px; }
  body.admin-bar .hero { height: calc(100vh - 32px); }
  .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(24px, 7vw, 36px); }
  .news-scroll, .products-grid { grid-template-columns: 1fr; }
  .section { padding: 32px 0; }
  .intro p { font-size: 16px; }
  .wrap { padding-right: 14px; padding-left: 14px; }
  .sec-title { align-items: flex-start; gap: 12px; }
  .sec-title h2, .sec-title h3 { font-size: 20px; }
  .intro-video, .intro-video img, .intro-video video, .intro-video iframe { min-height: 250px; height: 250px; }
}

/* 产品详情页视频控制 */
.prose video,
.prose iframe {
  max-width: 100% !important;
  height: auto !important;
  max-height: 500px;
}

/* 如果是古腾堡编辑器上传的视频 */
.wp-block-video video {
  max-width: 100% !important;
  height: auto !important;
  max-height: 500px;
}

/* 响应式控制 */
@media (max-width: 768px) {
  .prose video,
  .prose iframe {
    max-height: 350px;
  }
}

/* Final list-style overrides for category SEO content and its table of contents. */
.category-copy ol {
  list-style-type: decimal !important;
  list-style-position: outside !important;
  margin: 1em 0 !important;
  padding-left: 2em !important;
}

.category-copy ol > li {
  display: list-item !important;
  list-style-type: decimal !important;
}

.category-toc ol {
  list-style-type: decimal !important;
  list-style-position: outside !important;
  margin: 0 !important;
  padding-left: 28px !important;
}

.category-toc ol > li {
  display: list-item !important;
  list-style-type: decimal !important;
}
