/* ============================================================
   XYH Braiding — theme.css
   Design: deep-blue industrial tech, premium & minimal
   ============================================================ */

:root {
	--navy-900: #081226;
	--navy-800: #0c1e3f;
	--navy-700: #12294e;
	--blue-600: #1464c8;
	--blue-500: #1e6fe0;
	--blue-400: #2f88ff;
	--cyan-400: #38b6f0;
	--light-100: #f4f7fb;
	--light-200: #e8eef6;
	--text-900: #0c1e3f;
	--text-600: #45566e;
	--text-400: #8295ab;
	--white: #ffffff;
	--wa: #25d366;
	--radius: 6px;
	--shadow: 0 6px 24px rgba(12, 30, 63, 0.10);
	--shadow-lg: 0 12px 40px rgba(12, 30, 63, 0.16);
	--container: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	color: var(--text-600);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--blue-500); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--blue-400); }
h1, h2, h3, h4 { color: var(--text-900); font-weight: 700; line-height: 1.3; margin: 0 0 .6em; }

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

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { clip: auto; width: auto; height: auto; background: var(--blue-500); color: #fff; padding: 8px 14px; z-index: 1000; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-block;
	padding: 12px 26px;
	border-radius: var(--radius);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all .2s ease;
}
.btn-primary { background: var(--blue-500); color: #fff; }
.btn-primary:hover { background: var(--blue-600); color: #fff; }
.btn-light { background: #fff; color: var(--navy-800); }
.btn-light:hover { background: var(--light-100); color: var(--navy-800); }
.btn-outline { background: transparent; color: var(--blue-500); border-color: var(--blue-500); }
.btn-outline:hover { background: var(--blue-500); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #1eb857; color: #fff; }
.btn-lg { padding: 14px 34px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ---------- Header ---------- */
.topbar { background: var(--navy-800); color: #c9d6ea; font-size: 13.5px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 12px; }
.topbar-contacts { display: flex; gap: 22px; }
.topbar-item a { color: #c9d6ea; }
.topbar-item a:hover { color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.lang-switcher { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.lang-switcher li { display: inline-flex; align-items: center; }
.lang-switcher a { color: #c9d6ea; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; font-size: 13px; }
.lang-switcher a:hover, .lang-switcher li.current-lang a { color: #fff; background: rgba(255,255,255,.14); }
.lang-switcher img { width: 18px; height: auto; border-radius: 2px; }

.nav-wrap { background: #fff; position: sticky; top: 0; z-index: 90; box-shadow: 0 1px 0 rgba(12,30,63,.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand img { display: block; }
.main-nav { display: flex; align-items: center; gap: 10px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav-list li { position: relative; }
.nav-list > li > a { display: block; padding: 10px 14px; color: var(--text-900); font-weight: 600; font-size: 15.5px; border-radius: 4px; }
.nav-list > li > a:hover { color: var(--blue-500); }
.nav-list > li.current-menu-item > a, .nav-list > li.current-menu-ancestor > a { color: var(--blue-500); }
.nav-list .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 230px; padding: 8px 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); list-style: none; margin: 0; z-index: 100; }
.nav-list li:hover > .sub-menu, .nav-list li:focus-within > .sub-menu { display: block; }
.nav-list .sub-menu a { display: block; padding: 9px 18px; color: var(--text-600); font-size: 14.5px; }
.nav-list .sub-menu a:hover { color: var(--blue-500); background: var(--light-100); }
.nav-cta { margin-left: 6px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy-800); margin: 5px 0; border-radius: 2px; transition: transform .2s ease; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 560px; overflow: hidden; background: var(--navy-800); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; background-size: cover; background-position: center; display: flex; align-items: center; }
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,18,38,.82) 0%, rgba(8,18,38,.55) 45%, rgba(8,18,38,.15) 100%); }
.hero-inner { position: relative; z-index: 2; padding: 80px 20px; max-width: var(--container); width: 100%; }
.hero-title { color: #fff; font-size: clamp(30px, 4.2vw, 52px); max-width: 640px; margin-bottom: 18px; }
.hero-sub { color: #dbe6f5; font-size: clamp(15px, 1.6vw, 19px); max-width: 560px; margin-bottom: 30px; }
.hero-nav { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.hero-dot { width: 12px; height: 12px; border-radius: 50%; border: 0; background: rgba(255,255,255,.4); cursor: pointer; }
.hero-dot.is-active { background: #fff; transform: scale(1.2); }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-white { background: #fff; }
.section-light { background: var(--light-100); }
.section-heading { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.section-title { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.section-sub { color: var(--text-400); font-size: 15.5px; margin: 0; }
.section-more { text-align: center; margin-top: 36px; }

/* ---------- Stats ---------- */
.stats-band { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); padding: 52px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.stat-item { text-align: center; color: #fff; padding: 8px; }
.stat-icon { color: var(--blue-400); margin-bottom: 8px; }
.stat-num { font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; color: #fff; }
.stat-label { color: #9db4d8; font-size: 14.5px; margin-top: 4px; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.why-item { background: #fff; border: 1px solid var(--light-200); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); }
.why-item h3 { font-size: 19px; }
.why-item p { margin: 0; font-size: 14.5px; }

/* ---------- Category cards ---------- */
.cats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cat-card:hover img { transform: scale(1.05); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8,18,38,.78)); }
.cat-name { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; color: #fff; font-weight: 700; font-size: 17px; padding: 14px 16px 16px; }

/* ---------- Product grid & cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--light-200); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-img { aspect-ratio: 1/1; background: var(--light-100); display: flex; align-items: center; justify-content: center; padding: 14px; }
.product-card-img img { max-height: 100%; object-fit: contain; }
.product-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-card-cat { color: var(--blue-500); font-size: 12.5px; font-weight: 600; }
.product-card-title { font-size: 15.5px; margin: 0; line-height: 1.4; }
.product-card-model { color: var(--text-400); font-size: 13px; }

/* ---------- Case & news cards ---------- */
.case-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.case-card { display: block; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--light-200); transition: transform .25s ease, box-shadow .25s ease; }
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case-card-img { aspect-ratio: 16/10; overflow: hidden; }
.case-card-img img { width: 100%; height: 100%; object-fit: cover; }
.case-card-body { padding: 16px 18px; }
.case-card-title { font-size: 17px; margin-bottom: 6px; }
.case-card-excerpt { font-size: 14px; margin: 0; color: var(--text-400); }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { display: block; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--light-200); transition: transform .25s ease, box-shadow .25s ease; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--light-100); }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 16px 18px; }
.news-card-date { color: var(--blue-500); font-size: 13px; font-weight: 600; }
.news-card-title { font-size: 16.5px; margin: 6px 0; }
.news-card-excerpt { font-size: 14px; color: var(--text-400); margin: 0; }

/* ---------- About strip ---------- */
.about-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.about-strip-text h2 { font-size: clamp(24px, 3vw, 34px); }
.about-strip-text p { font-size: 15.5px; margin-bottom: 24px; }
.about-strip-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.about-strip-imgs img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius); }

/* ---------- Page banner ---------- */
.page-banner { background: linear-gradient(120deg, var(--navy-800), var(--navy-700)); color: #fff; padding: 52px 0 40px; }
.page-banner h1 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 8px; }
.page-banner-compact { padding: 36px 0 28px; }
.breadcrumbs { color: #9db4d8; font-size: 13.5px; }
.breadcrumbs a { color: #cfe0f5; }
.breadcrumbs a:hover { color: #fff; }

/* ---------- Chips ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.chip { display: inline-block; padding: 8px 16px; border: 1px solid var(--light-200); border-radius: 20px; color: var(--text-600); font-size: 14px; background: #fff; }
.chip:hover { border-color: var(--blue-500); color: var(--blue-500); }
.term-desc { color: var(--text-400); margin-bottom: 22px; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.product-gallery .gallery-main { border: 1px solid var(--light-200); border-radius: var(--radius); padding: 20px; background: var(--light-100); }
.gallery-main img { width: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb { border: 2px solid var(--light-200); border-radius: 4px; padding: 0; background: #fff; cursor: pointer; overflow: hidden; width: 84px; height: 84px; }
.gallery-thumb.is-active { border-color: var(--blue-500); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-cat-label { color: var(--blue-500); font-weight: 700; font-size: 14px; }
.product-model { font-size: 16px; color: var(--text-600); margin-bottom: 10px; }
.product-desc { font-size: 15px; }
.inquiry-note { color: var(--text-400); font-size: 14px; }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.spec-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { padding: 12px 18px; border-bottom: 1px solid var(--light-200); text-align: left; font-size: 14.5px; }
.spec-table th { background: var(--navy-800); color: #fff; width: 32%; font-weight: 600; }
.spec-table tr:nth-child(even) td { background: var(--light-100); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* ---------- Inquiry form ---------- */
.inquiry-wrap { max-width: 900px; margin: 0 auto; }
.inquiry-form { background: #fff; border: 1px solid var(--light-200); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; color: var(--text-900); font-size: 14.5px; margin-bottom: 6px; }
.form-field label em { color: #e5484d; font-style: normal; }
.form-field input, .form-field textarea {
	width: 100%; padding: 11px 14px; border: 1px solid #cdd8e6; border-radius: 4px;
	font-size: 15px; font-family: inherit; color: var(--text-900); background: #fff; transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(30,111,224,.15); }
.form-notice { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 600; }
.form-success { background: #e6f7ee; color: #18794e; border: 1px solid #b3e6c9; }
.form-error { background: #fdecec; color: #c0343a; border: 1px solid #f5c6c8; }

/* ---------- Contact page ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; }
.contact-list { list-style: none; margin: 0 0 20px; padding: 0; }
.contact-list li { margin-bottom: 12px; font-size: 15.5px; }
.contact-list strong { color: var(--text-900); }

/* ---------- Case gallery ---------- */
.case-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.case-gallery img { width: 100%; border-radius: var(--radius); object-fit: cover; aspect-ratio: 4/3; }

/* ---------- Post ---------- */
.post-meta { color: var(--text-400); font-size: 14px; margin-bottom: 20px; }
.entry-content { color: var(--text-600); font-size: 15.5px; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius); }
.entry-single { max-width: 860px; }
.post-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--light-200); }
.post-nav span { font-size: 14px; }

/* ---------- Pagination ---------- */
.pagination { margin-top: 36px; text-align: center; }
.pagination ul { list-style: none; display: inline-flex; gap: 6px; margin: 0; padding: 0; }
.pagination li { display: inline; }
.pagination .page-numbers { display: inline-block; min-width: 38px; padding: 8px 12px; border: 1px solid var(--light-200); border-radius: 4px; color: var(--text-600); background: #fff; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }

/* ---------- Footer ---------- */
.footer-cta { background: linear-gradient(120deg, var(--blue-600), var(--blue-400)); color: #fff; padding: 46px 0; }
.footer-cta h2 { color: #fff; font-size: clamp(22px, 2.8vw, 30px); margin: 0 0 6px; }
.footer-cta p { color: #dbe9fb; margin: 0; }
.footer-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.site-footer { background: var(--navy-900); color: #a9bddc; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; padding: 56px 20px 40px; }
.footer-col h3 { color: #fff; font-size: 16.5px; margin-bottom: 16px; }
.footer-logo { margin-bottom: 14px; }
.footer-about p { font-size: 14px; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin-bottom: 9px; }
.footer-menu a { color: #a9bddc; font-size: 14.5px; }
.footer-menu a:hover { color: #fff; }
.footer-contact { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.footer-contact li { margin-bottom: 9px; }
.footer-contact a { color: #a9bddc; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; font-size: 13.5px; }
.footer-legal { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.footer-legal a { color: #a9bddc; font-size: 13.5px; }
.footer-legal a:hover { color: #fff; }

/* ---------- Floating WhatsApp ---------- */
.wa-float { position: fixed; right: 22px; bottom: 24px; z-index: 80; width: 54px; height: 54px; border-radius: 50%; background: var(--wa); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(37,211,102,.4); transition: transform .2s ease; }
.wa-float:hover { transform: scale(1.08); }

/* ---------- Cookie bar ---------- */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; background: var(--navy-900); color: #dbe6f5; padding: 14px 20px; display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 14px; box-shadow: 0 -4px 20px rgba(0,0,0,.3); }
.cookie-bar p { margin: 0; max-width: 760px; }
.cookie-bar a { color: var(--cyan-400); }
.cookie-bar[hidden] { display: none !important; }

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding: 70px 0; }
.error-404 h1 { font-size: 90px; color: var(--blue-400); margin: 0; line-height: 1; }
.error-404 h2 { font-size: 26px; }
.error-404 p { margin-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.product-grid, .cats-grid { grid-template-columns: repeat(3, 1fr); }
	.case-grid { grid-template-columns: repeat(3, 1fr); }
	.footer-cols { grid-template-columns: 1fr 1fr; }
	.product-detail, .contact-layout, .about-strip { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 10px 0 18px; box-shadow: var(--shadow-lg); border-top: 1px solid var(--light-200); }
	.main-nav.is-open { display: flex; }
	.nav-list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-list > li > a { padding: 12px 24px; }
	.nav-list .sub-menu { position: static; display: none; box-shadow: none; padding: 0 0 0 24px; min-width: 0; }
	.nav-list li.open > .sub-menu { display: block; }
	.nav-cta { padding: 10px 24px 0; }
	.stats-grid { grid-template-columns: repeat(2, 1fr); }
	.product-grid, .cats-grid { grid-template-columns: repeat(2, 1fr); }
	.case-grid { grid-template-columns: repeat(2, 1fr); }
	.news-grid { grid-template-columns: 1fr 1fr; }
	.why-grid { grid-template-columns: 1fr; }
	.hero { min-height: 440px; }
	.topbar-email { display: none; }
	.footer-cta-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
	.section { padding: 46px 0; }
	.product-grid, .cats-grid, .case-grid, .news-grid { grid-template-columns: 1fr; }
	.stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
	.form-row { grid-template-columns: 1fr; }
	.hero { min-height: 380px; }
	.hero-inner { padding: 50px 20px; }
	.footer-cols { grid-template-columns: 1fr; }
	.about-strip-imgs { grid-template-columns: repeat(3, 1fr); }
	.case-gallery { grid-template-columns: 1fr 1fr; }
	.inquiry-form { padding: 20px; }
	.topbar-contacts { font-size: 12.5px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hero-slide { transition: none; }
	* { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
