/*
Theme Name: XinXin Semiconductor
Theme URI: https://www.xinxinsemipipe.com/
Author: WorkBuddy
Description: Responsive, SEO-ready WordPress theme for XinXin Semiconductor Materials (Jiangsu) Co., Ltd. All content is managed in wp-admin: Site Settings, Products, Content Blocks, Pages, Menus and per-post SEO.
Version: 1.3.3
License: GPLv2 or later
Text Domain: xinxin
Requires PHP: 7.4
Requires at least: 5.9
*/

/* ============================================================ Design tokens */
:root {
	--primary: #0a2e5c;
	--primary-dark: #061d3a;
	--primary-light: #144782;
	--accent: #e67e22;
	--accent-light: #f39c12;
	--light-bg: #f0f6fc;
	--gray-bg: #e9f0f7;
	--text-dark: #1a2a3a;
	--text-muted: #3d5a73;
	--border-light: #d0dfec;
	--white: #fff;
	--success: #27ae60;
	--shadow-sm: 0 8px 20px rgba(10, 46, 92, .05);
	--shadow-md: 0 16px 32px -12px rgba(10, 46, 92, .16);
	--radius: 20px;
	--radius-sm: 12px;
	--container: 1280px;
	--header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--white);
	color: var(--text-dark);
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 700; color: var(--primary); }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.25rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.screen-reader-text, .xx-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; left: 12px; z-index: 999; background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 860px; }
.center { text-align: center; }
.section { padding: 84px 0; }
.section-soft { background: var(--light-bg); }
.section-intro { padding: 78px 0 70px; }
.prose { font-size: 1.02rem; color: var(--text-muted); }
.prose p { margin-bottom: 1.1em; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.lead { font-size: 1.13rem; color: var(--primary); font-weight: 600; }
.xx-icon { width: 24px; height: 24px; flex: none; display: inline-block; vertical-align: middle; }

/* ============================================================ Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	padding: 13px 32px; border-radius: 40px; border: 2px solid var(--accent);
	background: var(--accent); color: #fff; font-weight: 600; font-size: .98rem;
	cursor: pointer; transition: background .25s, color .25s, transform .25s, box-shadow .25s, border-color .25s;
	min-height: 48px; text-align: center;
}
.btn:hover { background: transparent; color: var(--accent); transform: translateY(-2px); }
.btn:active { transform: none; }
.btn .xx-icon { width: 18px; height: 18px; }
.btn-sm { padding: 9px 22px; font-size: .9rem; min-height: 42px; }
.btn-lg { padding: 15px 36px; font-size: 1.02rem; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-light { background: #fff; color: var(--primary); border-color: #fff; }
.btn-light:hover { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.btn-ghost:hover { background: #fff; color: var(--primary); border-color: #fff; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); }
.text-link .xx-icon { width: 18px; height: 18px; transition: transform .2s; }
.text-link:hover .xx-icon { transform: translateX(4px); }
.center-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 40px; }

/* ============================================================ Header */
.site-header {
	position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.97);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--border-light);
	box-shadow: 0 2px 12px rgba(10,46,92,.06);
	transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(10,46,92,.13); }
.header-inner { display: flex; align-items: center; gap: 22px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { width: auto; max-width: 210px; height: 54px; object-fit: contain; }
.header-nav-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.primary-nav { width: 100%; }
.xx-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.xx-menu-item { position: relative; }
.xx-menu-link { display: inline-flex; align-items: center; gap: 5px; padding: 10px 13px; font-size: .93rem; font-weight: 600; color: var(--primary); border-radius: 8px; transition: color .2s, background .2s; white-space: nowrap; }
.xx-menu-link:hover, .xx-menu-item.current-menu-item > .xx-menu-link, .xx-menu-item.current-menu-ancestor > .xx-menu-link { color: var(--accent); background: var(--light-bg); }
.xx-menu-item.menu-item-has-children > .xx-menu-link::after { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.xx-menu .sub-menu {
	list-style: none; position: absolute; top: 100%; left: 0; min-width: 245px; margin: 0; padding: 8px;
	background: #fff; border: 1px solid var(--border-light); border-radius: 14px; box-shadow: var(--shadow-md);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s; z-index: 120;
}
.xx-menu-item:hover > .sub-menu, .xx-menu-item:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.xx-menu .sub-menu .xx-menu-link { display: block; padding: 9px 12px; font-size: .9rem; white-space: normal; }
.header-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.lang-link { font-size: .9rem; font-weight: 600; color: var(--text-muted); padding: 6px 4px; }
.lang-link:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-left: auto; cursor: pointer; }
.nav-toggle-bars { display: block; width: 26px; height: 20px; position: relative; }
.nav-toggle-bars i { position: absolute; left: 0; width: 100%; height: 2px; background: var(--primary); border-radius: 2px; transition: .25s; }
.nav-toggle-bars i:nth-child(1) { top: 2px; }
.nav-toggle-bars i:nth-child(2) { top: 9px; }
.nav-toggle-bars i:nth-child(3) { top: 16px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { top: 9px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { top: 9px; transform: rotate(-45deg); }
.mobile-only { display: none; }

/* ============================================================ Hero */
.hero, .page-hero { background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero { min-height: min(660px, 78vh); display: flex; align-items: center; color: #fff; }
.hero-inner { padding: 90px 24px; max-width: 900px; }
.hero-kicker { display: inline-block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #ffd6a8; margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(2.15rem, 4.6vw, 3.55rem); max-width: 16ch; margin-bottom: 18px; text-shadow: 0 2px 18px rgba(0,0,0,.2); }
.hero-sub { font-size: clamp(1rem, 1.5vw, 1.18rem); max-width: 720px; opacity: .94; line-height: 1.75; margin-bottom: 34px; }
.hero-actions, .cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.page-hero { min-height: 340px; display: flex; align-items: center; color: #fff; }
.page-hero-inner { padding: 56px 24px; }
.page-hero h1 { color: #fff; margin-bottom: 10px; font-size: clamp(1.9rem, 3.6vw, 3rem); }
.page-hero p { font-size: 1.05rem; opacity: .92; max-width: 760px; margin-bottom: 22px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: .87rem; color: rgba(255,255,255,.82); }
.breadcrumbs li + li::before { content: '/'; margin-right: 8px; opacity: .6; }
.breadcrumbs a:hover { color: var(--accent-light); }
.breadcrumbs [aria-current="page"] { color: #fff; }

/* ============================================================ Stats */
.stats-strip { background: var(--primary); color: #fff; padding: 30px 0; }
.stats-strip-dark { background: var(--primary-dark); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat-item { text-align: center; padding: 10px 8px; border-right: 1px solid rgba(255,255,255,.15); }
.stat-item:last-child { border-right: 0; }
.stat-item .xx-icon { color: var(--accent-light); width: 26px; height: 26px; margin-bottom: 4px; }
.stat-item strong { display: block; font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.15; color: #fff; }
.stat-item span { display: block; font-size: .82rem; opacity: .82; margin-top: 4px; }

/* ============================================================ Section heads & cards */
.section-head { text-align: center; margin-bottom: 48px; }
.section-kicker { display: block; font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.section-head h2 { position: relative; display: inline-block; padding-bottom: 14px; margin-bottom: 0; }
.section-head h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 58px; height: 3px; border-radius: 2px; background: var(--accent); }
.section-head p { color: var(--text-muted); max-width: 700px; margin: 16px auto 0; font-size: 1.02rem; }
.card-grid { display: grid; gap: 26px; }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; padding: 32px 26px; border-radius: var(--radius); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s, border-color .3s; }
.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.section-soft .card { background: #fff; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: .93rem; margin: 0; }
.card-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--light-bg); color: var(--accent); margin-bottom: 20px; }
.card-icon .xx-icon { width: 28px; height: 28px; }
.card:hover .card-icon { background: rgba(230,126,34,.12); }
.check-list { list-style: none; margin: 18px 0 0; padding: 0; }
.check-list li { display: flex; gap: 9px; align-items: flex-start; font-size: .88rem; color: var(--text-muted); padding: 5px 0; }
.check-list .xx-icon { width: 17px; height: 17px; color: var(--success); margin-top: 4px; }

/* Profile */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.profile-media { position: relative; }
.profile-media > img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); aspect-ratio: 4/3; object-fit: cover; }
.profile-badge { position: absolute; right: -18px; bottom: -22px; background: var(--primary); color: #fff; padding: 18px 24px; border-radius: 16px; box-shadow: var(--shadow-md); max-width: 230px; }
.profile-badge strong { display: block; font-size: 1.6rem; color: var(--accent-light); line-height: 1.2; }
.profile-badge span { font-size: .82rem; opacity: .9; }
.profile-copy .section-kicker { margin-bottom: 8px; }
.profile-copy .lead { margin-bottom: 12px; }
.profile-copy p { color: var(--text-muted); }
.profile-copy .text-link { margin-top: 12px; }

/* Products */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product-card { display: block; background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s, border-color .3s; }
.product-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow-md); color: inherit; }
.product-thumb { position: relative; overflow: hidden; background: var(--light-bg); aspect-ratio: 4/3; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .product-thumb img { transform: scale(1.07); }
.product-zoom { position: absolute; right: 14px; bottom: 14px; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--accent); display: grid; place-items: center; opacity: 0; transform: translateY(8px); transition: .3s; }
.product-zoom .xx-icon { width: 18px; height: 18px; }
.product-card:hover .product-zoom { opacity: 1; transform: none; }
.product-meta { padding: 20px 22px 24px; }
.product-meta h2, .product-meta h3 { font-size: 1.06rem; margin-bottom: 6px; }
.product-meta p { color: var(--text-muted); font-size: .87rem; margin: 0; min-height: 2.6em; }
.card-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: .87rem; font-weight: 600; color: var(--accent); }
.card-link .xx-icon { width: 16px; height: 16px; }
.filter-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filter-pill { padding: 9px 18px; border: 1px solid var(--border-light); border-radius: 30px; font-size: .9rem; font-weight: 600; color: var(--primary); background: #fff; transition: .2s; }
.filter-pill span { color: var(--text-muted); font-weight: 400; }
.filter-pill:hover, .filter-pill.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-pill.is-active span { color: rgba(255,255,255,.75); }

/* Certifications */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cert-card { display: flex; gap: 16px; align-items: flex-start; padding: 24px; background: var(--light-bg); border: 1px solid var(--border-light); border-radius: var(--radius); transition: .3s; }
.cert-card:hover { transform: translateY(-4px); background: #fff; border-color: var(--accent); box-shadow: var(--shadow-md); }
.cert-card .card-icon { width: 48px; height: 48px; margin: 0; flex: none; }
.cert-card h3 { font-size: 1rem; margin-bottom: 4px; }
.cert-card p { font-size: .87rem; color: var(--text-muted); margin: 0; }

/* CTA */
.cta-band { background: linear-gradient(115deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; padding: 74px 0; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { max-width: 650px; margin: 0 auto 28px; opacity: .9; }
.cta-band .cta-actions { justify-content: center; }

/* ============================================================ About / Facility */
.facility-card { display: flex; gap: 18px; align-items: flex-start; }
.facility-card .card-icon { margin: 0; flex: none; }

/* ============================================================ Quality */
.device-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.device-card { position: relative; background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 14px 18px 22px; box-shadow: var(--shadow-sm); transition: .3s; }
.device-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.device-photo { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--light-bg); display: grid; place-items: center; margin-bottom: 14px; }
.device-photo img { width: 100%; height: 100%; object-fit: cover; }
.device-photo-empty .xx-icon { width: 54px; height: 54px; color: var(--accent); opacity: .5; }
.device-badge { position: absolute; top: 22px; left: 22px; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.device-card h3 { font-size: .98rem; margin-bottom: 6px; }
.device-card p { font-size: .85rem; color: var(--text-muted); margin: 0; }
.process-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.process-step { display: grid; grid-template-columns: 58px 52px 1fr; gap: 14px; align-items: start; background: #fff; border: 1px solid var(--border-light); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); }
.process-number { font-size: 1.5rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.process-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--light-bg); color: var(--primary); display: grid; place-items: center; }
.process-step h3 { font-size: 1.02rem; margin-bottom: 5px; }
.process-step p { font-size: .87rem; color: var(--text-muted); margin: 0; }
/* Quality page: two certificate scans at 50% each, four accreditations in one row. */
.cert-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.cert-icon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.cert-photo-card { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
/* Portrait certificate scans must show in full: no fixed ratio, no cropping. */
.cert-photo-card > img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; display: block; background: #fff; }
.cert-icon { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--light-bg); }
.cert-icon .xx-icon { width: 62px; height: 62px; color: var(--accent); }
.cert-photo-card > div:last-child { padding: 18px 20px 22px; }
.cert-photo-card h3 { font-size: 1rem; margin-bottom: 5px; }
.cert-photo-card p { font-size: .86rem; color: var(--text-muted); margin: 0; }

/* ============================================================ Workshop gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gallery-item { position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: var(--light-bg); box-shadow: var(--shadow-sm); }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .45s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; color: #fff; font-size: .85rem; font-weight: 600; background: linear-gradient(transparent, rgba(6,29,58,.86)); display: flex; align-items: center; gap: 9px; }
.gallery-item figcaption span { color: var(--accent-light); }

/* ============================================================ Product detail */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: start; }
.product-main-image { border: 1px solid var(--border-light); border-radius: var(--radius); overflow: hidden; background: var(--light-bg); }
.product-main-image img { width: 100%; aspect-ratio: 4/3; object-fit: contain; }
.product-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.product-gallery figure { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-light); }
.product-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.product-info h2 { margin-bottom: 14px; }
.product-info .prose { margin: 18px 0 24px; }
.product-quick-facts { display: grid; gap: 0; border: 1px solid var(--border-light); border-radius: 16px; overflow: hidden; margin-bottom: 26px; }
.product-quick-facts > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 12px 16px; font-size: .9rem; border-bottom: 1px solid var(--border-light); }
.product-quick-facts > div:last-child { border-bottom: 0; }
.product-quick-facts > div:nth-child(odd) { background: var(--light-bg); }
.product-quick-facts span { color: var(--text-muted); }
.product-quick-facts strong { font-weight: 600; color: var(--primary); }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.spec-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--border-light); background: #fff; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.spec-table tr:not(:last-child) { border-bottom: 1px solid var(--border-light); }
.spec-table tr:nth-child(even) { background: var(--light-bg); }
.spec-table th, .spec-table td { padding: 13px 18px; text-align: left; vertical-align: top; }
.spec-table th { width: 34%; color: var(--primary); font-weight: 600; }
.spec-table td { color: var(--text-muted); }
.product-grid-compact { grid-template-columns: repeat(4, 1fr); }

/* ============================================================ Contact */
.contact-cards-section { padding-bottom: 0; }
.contact-card { text-align: center; }
.contact-card .card-icon { margin: 0 auto 16px; }
.contact-card p { font-size: .9rem; margin-bottom: 3px; }
.contact-card a:hover { color: var(--accent); }
.form-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 46px; align-items: start; }
.form-intro h2 { margin-bottom: 16px; }
.form-aside { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border-light); }
.form-aside p { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-muted); margin-bottom: 12px; }
.form-aside .xx-icon { width: 19px; height: 19px; color: var(--accent); margin-top: 2px; }
.form-panel { background: #fff; padding: 36px; border-radius: 24px; border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.xx-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.xx-field { margin-bottom: 18px; }
.xx-field label { display: block; font-weight: 600; font-size: .88rem; color: var(--primary); margin-bottom: 6px; }
.xx-field label span { color: #dc3545; }
.xx-field input, .xx-field select, .xx-field textarea {
	width: 100%; padding: 12px 15px; border: 1px solid var(--border-light); border-radius: var(--radius-sm);
	font-size: .96rem; background: #fff; color: var(--text-dark); transition: border-color .2s, box-shadow .2s;
	min-height: 48px;
}
.xx-field textarea { min-height: 130px; resize: vertical; }
.xx-field input:focus, .xx-field select:focus, .xx-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(230,126,34,.13); }
.xx-field input.is-invalid, .xx-field textarea.is-invalid { border-color: #dc3545; }
.xx-form-note { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; color: var(--text-muted); background: var(--light-bg); padding: 11px 14px; border-radius: 10px; }
.xx-form-note .xx-icon { width: 17px; height: 17px; color: var(--primary); margin-top: 3px; }
.xx-submit { width: 100%; margin-top: 4px; }
.xx-submit[disabled] { opacity: .65; cursor: wait; }
.xx-result { margin-top: 22px; padding: 22px; border: 1px solid #b7e4c7; background: #eafaf1; color: #1a6e3a; border-radius: 16px; }
.xx-result-head { display: flex; align-items: center; gap: 10px; }
.xx-result-head .xx-icon { color: var(--success); width: 24px; height: 24px; }
.xx-result-head h3 { margin: 0; font-size: 1.1rem; color: #1a6e3a; }
.xx-result p { font-size: .9rem; margin: 10px 0 0; }
.xx-result.is-error { border-color: #f1b0b7; background: #fdf0f0; color: #a11f2a; }
.xx-result.is-error .xx-result-head h3 { color: #a11f2a; }
.xx-result-foot { opacity: .8; font-size: .82rem !important; }
.xx-long-warning { display: none; }
.xx-long-warning:not([hidden]) { display: block; }
.xx-fallback { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.xx-fallback .btn { padding: 8px 16px; font-size: .85rem; min-height: 40px; border-radius: 30px; }
.xx-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================ On-page product quote form */
.xx-quote-hint { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: .84rem; color: var(--text-muted); }
.xx-quote-hint .xx-icon { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
.xx-quote-dialog { width: min(720px, calc(100% - 32px)); max-width: 720px; max-height: min(90vh, 920px); padding: 0; border: 0; border-radius: 22px; background: #fff; color: var(--text-dark); box-shadow: 0 30px 80px rgba(6, 29, 58, .38); overflow: hidden; }
.xx-quote-dialog::backdrop { background: rgba(6, 29, 58, .6); }
.xx-quote-dialog[open] { display: block; animation: xx-dialog-in .22s ease-out; }
@keyframes xx-dialog-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
body.xx-dialog-open { overflow: hidden; }
.xx-quote-shell { max-height: min(90vh, 920px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.xx-quote-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; padding: 26px 32px 20px; background: var(--light-bg); border-bottom: 1px solid var(--border-light); }
.xx-quote-head h2 { font-size: 1.5rem; margin: 6px 0 8px; color: var(--primary); }
.xx-quote-head p { font-size: .9rem; color: var(--text-muted); margin: 0; max-width: 520px; }
.xx-quote-close { flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid var(--border-light); background: #fff; color: var(--primary); border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: .2s; }
.xx-quote-close:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.xx-quote-close .xx-icon { width: 18px; height: 18px; }
.xx-quote-body { padding: 26px 32px 32px; }
.xx-quote-product { display: flex; gap: 18px; align-items: center; padding: 14px; margin-bottom: 22px; background: var(--light-bg); border: 1px solid var(--border-light); border-radius: 14px; }
.xx-quote-product-img { width: 110px; height: 88px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; background: #fff; }
.xx-quote-product-info h3 { margin: 3px 0 5px; font-size: 1.05rem; color: var(--primary); }
.xx-quote-product-info p { margin: 0 0 6px; font-size: .8rem; color: var(--text-muted); line-height: 1.5; }
.xx-quote-product-info a { font-size: .8rem; color: var(--accent); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.xx-quote-product-info a:hover { text-decoration: underline; }
.xx-quote-product-info .xx-icon { width: 13px; height: 13px; }
.xx-quote-eyebrow { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.xx-noscript { padding: 14px 18px; background: var(--light-bg); text-align: center; font-size: .9rem; }

/* ============================================================ Search / 404 / pagination */
.error-page { padding: 100px 0; }
.error-code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; color: var(--border-light); line-height: 1; display: block; }
.search-results { list-style: none; padding: 0; }
.search-results li { padding: 20px 0; border-bottom: 1px solid var(--border-light); }
.search-results h2 { font-size: 1.2rem; }
.search-results p { color: var(--text-muted); margin: 0; }
.pagination { display: flex; justify-content: center; margin-top: 40px; }
.pagination ul { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; }
.pagination a, .pagination span { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-light); font-size: .9rem; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================ Footer */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.78); padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 42px; padding-bottom: 54px; }
/* No logo in the footer - the first column starts with the company blurb. */
.footer-about p { font-size: .88rem; margin: 0 0 18px; max-width: 340px; }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social a { font-size: .82rem; padding: 6px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 20px; }
.footer-social a:hover { border-color: var(--accent); color: var(--accent-light); }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: .88rem; }
.footer-links a:hover { color: var(--accent-light); }
/* wp_nav_menu adds the header menu classes to footer items too; reset them so
   Quick Links inherits the footer's light text instead of the dark nav blue. */
.site-footer .footer-links .xx-menu-item { border-bottom: 0; }
.site-footer .footer-links .xx-menu-link { display: inline; padding: 0; font-size: .88rem; font-weight: 400; color: inherit; background: none; border-radius: 0; white-space: normal; }
.site-footer .footer-links .xx-menu-link::after { display: none; }
.site-footer .footer-links .xx-menu-link:hover,
.site-footer .footer-links .xx-menu-item.current-menu-item > .xx-menu-link { color: var(--accent-light); background: none; }
.footer-address p { display: flex; gap: 10px; align-items: flex-start; font-size: .87rem; margin-bottom: 12px; font-style: normal; }
.footer-address .xx-icon { width: 17px; height: 17px; color: var(--accent-light); margin-top: 4px; }
.footer-address a:hover { color: var(--accent-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .8rem; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; }
.footer-bottom a:hover { color: var(--accent-light); }
.back-to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px); transition: .25s; z-index: 90; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top .xx-icon { transform: rotate(-90deg); width: 20px; height: 20px; }

/* ============================================================ Motion */
.fade-up { opacity: 0; transform: translateY(24px); }
.fade-up.is-in { opacity: 1; transform: none; transition: opacity .65s ease, transform .65s ease; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
	.fade-up { opacity: 1; transform: none; }
}

/* ============================================================ Responsive */
@media (max-width: 1180px) {
	.xx-menu-link { padding: 10px 9px; font-size: .87rem; }
	.brand img { max-width: 175px; height: 48px; }
	.header-actions .lang-link { display: none; }
	.device-grid { grid-template-columns: repeat(4, 1fr); }
	.product-grid-compact { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
	:root { --header-h: 72px; }
	.card-grid-4 { grid-template-columns: repeat(2, 1fr); }
	.card-grid-3 { grid-template-columns: repeat(2, 1fr); }
	.product-grid, .cert-grid, .cert-photo-grid { grid-template-columns: repeat(2, 1fr); }
	.cert-icon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gallery-grid { grid-template-columns: repeat(3, 1fr); }
	.device-grid { grid-template-columns: repeat(3, 1fr); }
	.stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
	.stat-item:nth-child(3) { border-right: 0; }
	.profile-grid, .product-detail-grid { grid-template-columns: 1fr; gap: 36px; }
	.profile-badge { right: 12px; bottom: -18px; }
	.form-layout { grid-template-columns: 1fr; gap: 28px; }
	.footer-grid { grid-template-columns: repeat(2, 1fr); gap: 34px; }
	.process-list { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.desktop-only { display: none !important; }
	.header-actions { display: none; }
	.header-nav-wrap {
		position: fixed; top: var(--header-h); left: 0; right: 0;
		background: #fff; border-bottom: 1px solid var(--border-light);
		box-shadow: 0 18px 30px rgba(10,46,92,.14);
		flex-direction: column; align-items: stretch; justify-content: flex-start;
		max-height: calc(100vh - var(--header-h)); overflow-y: auto;
		padding: 12px 20px 24px; display: none;
	}
	.header-nav-wrap.is-open { display: flex; animation: navIn .22s ease; }
	@keyframes navIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
	.xx-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.xx-menu-item { border-bottom: 1px solid var(--border-light); }
	.xx-menu-link { display: flex; justify-content: space-between; width: 100%; padding: 14px 6px; font-size: 1rem; }
	.xx-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 8px 14px; min-width: 0; background: transparent; display: none; }
	.xx-menu-item.menu-item-has-children.is-open > .sub-menu { display: block; }
	.xx-menu-item.menu-item-has-children > .xx-menu-link::after { transform: rotate(45deg); }
	.mobile-only { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
	.mobile-only .lang-link { align-self: flex-start; }
	.mobile-only .btn { width: 100%; }
	.section { padding: 62px 0; }
	.section-intro { padding: 56px 0 46px; }
	.section-head { margin-bottom: 34px; }
}

@media (max-width: 640px) {
	.container { padding: 0 18px; }
	body { font-size: 15px; }
	.hero { min-height: 540px; }
	.hero-inner { padding: 64px 18px; }
	.hero h1 { max-width: 100%; }
	.hero-actions .btn, .cta-actions .btn { width: 100%; }
	.page-hero { min-height: 280px; }
	.page-hero-inner { padding: 42px 18px; }
	.stats-grid { grid-template-columns: repeat(2, 1fr); }
	.stat-item:nth-child(2), .stat-item:nth-child(4) { border-right: 0; }
	.stat-item:nth-child(3) { border-right: 1px solid rgba(255,255,255,.15); }
	.card-grid-2, .card-grid-3, .card-grid-4, .product-grid, .cert-grid, .device-grid, .gallery-grid, .process-list { grid-template-columns: 1fr; }
	/* Keep the two certificate scans side by side at 50% even on phones. */
	.cert-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.cert-icon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
	.cert-photo-card > div:last-child { padding: 12px 12px 16px; }
	.cert-photo-card h3 { font-size: .9rem; }
	.cert-photo-card p { font-size: .78rem; }
	.product-grid-compact { grid-template-columns: repeat(2, 1fr); }
	.card { padding: 26px 22px; }
	.card:hover { transform: none; }
	.product-card:hover { transform: none; }
	.profile-badge { position: static; max-width: none; margin-top: 14px; }
	.form-panel { padding: 24px 18px; }
	.xx-form-row { grid-template-columns: 1fr; gap: 0; }
	.xx-fallback { flex-direction: column; }
	.xx-fallback .btn { width: 100%; }
	.product-gallery { grid-template-columns: repeat(2, 1fr); }
	.product-quick-facts > div { grid-template-columns: 1fr; gap: 2px; }
	.spec-table th, .spec-table td { padding: 11px 12px; display: block; width: 100%; }
	.spec-table th { padding-bottom: 2px; }
	.footer-grid { grid-template-columns: 1fr; gap: 28px; }
	.site-footer { padding-top: 52px; }
	.cta-band { padding: 56px 0; }
	.back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
	.filter-nav { gap: 7px; }
	.filter-pill { padding: 7px 13px; font-size: .83rem; }
	.xx-quote-dialog { width: 100%; max-width: 100%; max-height: 100vh; max-height: 100dvh; height: 100vh; height: 100dvh; border-radius: 0; margin: 0; }
	.xx-quote-shell { max-height: 100vh; max-height: 100dvh; height: 100vh; height: 100dvh; }
	.xx-quote-head { padding: 20px 18px 16px; gap: 12px; }
	.xx-quote-head h2 { font-size: 1.25rem; }
	.xx-quote-body { padding: 20px 18px 30px; }
	.xx-quote-product { gap: 12px; padding: 12px; }
	.xx-quote-product-img { width: 76px; height: 66px; }
	.xx-quote-product-info p { font-size: .76rem; }
}

@media (max-width: 380px) {
	.product-grid-compact { grid-template-columns: 1fr; }
	.brand img { max-width: 150px; height: 42px; }
}
