/*
Theme Name: HILDA
Theme URI: https://hilda-pro.ru
Author: HILDA
Description: Классическая тема интернет-магазина лазерных нивелиров HILDA для WordPress + WooCommerce. Меню настраивается в «Внешний вид → Меню». Локальный редизайн: графит, белый и жёлтый. Manrope + Roboto Condensed.
Version: 4.0.0-local
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hilda
WC requires at least: 8.0
WC tested up to: 11.0
*/

:root {
	--h-accent: #0ea94a;
	--h-accent-hover: #0c9440;
	--h-accent-soft: #e7f6ec;
	--h-ink: #161a13;
	--h-muted: #8a948a;
	--h-line: #e4e7e1;
	--h-surface: #f3f4f1;
	--h-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
	--h-body: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
	--h-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--h-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--h-ink);
	background: #fff;
}
img { max-width: 100%; height: auto; }
a { color: var(--h-accent); text-decoration: none; }
a:hover { color: var(--h-ink); }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--h-head);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.01em;
	color: var(--h-ink);
	margin: 0 0 0.5em;
}

.container { max-width: 1240px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* ---------- Buttons ---------- */
.btn, .hilda-hero .btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--h-head);
	font-weight: 600;
	font-size: 16px;
	padding: 14px 26px;
	border-radius: 12px;
	border: none;
	cursor: pointer;
	background: var(--h-accent);
	color: #fff;
	transition: filter .15s ease, transform .15s ease, border-color .15s ease;
}
.btn:hover { filter: brightness(1.06); color: #fff; transform: translateY(-1px); }
.btn-outline {
	background: transparent;
	color: var(--h-ink);
	border: 1px solid rgba(20,30,20,.2);
}
.btn-outline:hover { border-color: var(--h-accent); color: var(--h-ink); filter: none; }

/* ---------- Header ---------- */
.site-header {
	background: #fff;
	border-bottom: 1px solid var(--h-line);
	position: sticky;
	top: 0;
	z-index: 50;
}
.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 14px 0;
}
.site-brand {
	font-family: var(--h-head);
	font-weight: 700;
	font-size: 20px;
	color: var(--h-ink);
	letter-spacing: .01em;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.site-brand:hover { color: var(--h-ink); }
.site-brand img { max-height: 36px; width: auto; }
.brand-mark {
	position: relative;
	width: 30px; height: 30px;
	border-radius: 8px;
	background: var(--h-ink);
	flex: none;
}
.brand-mark::before, .brand-mark::after {
	content: ""; position: absolute; background: var(--h-accent);
}
.brand-mark::before { left: 7px; right: 7px; top: 14px; height: 2px; }
.brand-mark::after { top: 7px; bottom: 7px; left: 14px; width: 2px; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; align-items: center; }
.main-nav li { position: relative; }
.main-nav a {
	font-family: var(--h-head);
	font-weight: 500;
	font-size: 15px;
	color: var(--h-ink);
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--h-accent); }
.main-nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%; left: 0;
	background: #fff;
	border: 1px solid var(--h-line);
	border-radius: 12px;
	padding: 8px;
	min-width: 200px;
	flex-direction: column;
	gap: 2px;
	box-shadow: 0 12px 30px rgba(20,30,20,.1);
}
.main-nav li:hover > .sub-menu { display: flex; }
.main-nav .sub-menu a { padding: 8px 12px; border-radius: 8px; display: block; }
.main-nav .sub-menu a:hover { background: var(--h-surface); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions a { color: var(--h-ink); display: inline-flex; align-items: center; }
.header-actions a:hover { color: var(--h-accent); }

/* Телефон (ПК) */
.header-phone { gap: 8px; font-family: var(--h-head); font-weight: 600; font-size: 15px; white-space: nowrap; }
.header-phone svg { color: var(--h-accent); }
/* Иконки звонка и Макс (моб.) */
.header-icon { display: none !important; }
.header-icon--max { color: var(--h-accent); }
@media (max-width: 860px) {
	.header-phone { display: none !important; }
	.header-icon { display: inline-flex !important; }
}
.header-cart { position: relative; }
.header-cart__count {
	position: absolute;
	top: -8px; right: -10px;
	min-width: 18px; height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--h-accent);
	color: #fff;
	font-family: var(--h-head);
	font-weight: 600;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
}

/* mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--h-ink); }
@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; margin-left: auto; }
	.main-nav { margin-left: 0; display: none; flex-basis: 100%; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0; }
	.main-nav .sub-menu { position: static; border: none; box-shadow: none; padding: 4px 0 4px 14px; display: flex; }
	.site-header__inner { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hilda-hero { background: var(--h-surface); }
.hilda-hero__inner { max-width: 820px; margin: 0 auto; text-align: center; padding: 72px 20px; }
.hilda-hero__eyebrow {
	font-family: var(--h-mono);
	font-size: 13px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--h-accent);
	margin: 0 0 20px;
}
.hilda-hero h1 { font-size: clamp(34px, 6vw, 64px); line-height: 1.04; margin: 0 0 20px; }
.hilda-hero__sub { font-size: clamp(16px, 2.4vw, 20px); color: var(--h-muted); margin: 0 auto 30px; max-width: 620px; }
.hilda-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section__title { font-size: clamp(26px, 4vw, 38px); margin: 0 0 26px; }

/* values */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .values-grid { grid-template-columns: 1fr; } }
.value-card { border: 1px solid var(--h-line); border-radius: 16px; padding: 24px; background: #fff; }
.value-card h3 { font-size: 18px; margin: 0 0 8px; }
.value-card p { margin: 0; color: var(--h-muted); font-size: 14.5px; line-height: 1.55; }

/* cta */
.cta-band {
	background: var(--h-ink);
	color: #fff;
	border-radius: 22px;
	padding: clamp(36px, 6vw, 64px) 24px;
	text-align: center;
	margin: 20px 0 48px;
}
.cta-band h2 { color: #fff; font-size: clamp(26px, 4vw, 38px); margin: 0 0 14px; }
.cta-band p { color: #c3ccbf; margin: 0 auto 24px; max-width: 460px; }

/* ---------- Content pages ---------- */
.page-content { padding: 40px 0 64px; }
.page-content h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 20px; }
.page-content h2 { font-size: clamp(22px, 3vw, 28px); margin: 32px 0 14px; }
.page-content p, .page-content li { color: #3c433a; }
.page-content .entry-content { max-width: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--h-surface); border-top: 1px solid var(--h-line); padding: 48px 0; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: 16px; margin: 0 0 14px; }
.site-footer p { color: var(--h-muted); margin: 12px 0 0; font-size: 14.5px; }
.footer-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-menu a { color: var(--h-muted); font-size: 14px; }
.footer-menu a:hover { color: var(--h-accent); }
.footer-bottom { text-align: center; color: var(--h-muted); font-size: 13px; margin-top: 36px; }

/* ---------- Home: hero 2-col ---------- */
.home-hero { padding: 54px 0 20px; }
.home-hero__grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.home-hero__col { flex: 1 1 420px; min-width: 300px; }
.eyebrow-pill {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 7px 13px; border-radius: 100px;
	background: var(--h-accent-soft); color: var(--h-accent);
	font-family: var(--h-mono); font-size: 12.5px; letter-spacing: .02em;
	margin-bottom: 22px;
}
.eyebrow-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--h-accent); }
.home-hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.02; letter-spacing: -.02em; margin: 0 0 20px; }
.home-hero h1 .accent { color: var(--h-accent); }
.home-hero__sub { font-size: clamp(16px, 2.2vw, 19px); line-height: 1.55; color: var(--h-muted); max-width: 520px; margin: 0 0 30px; }
.home-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.home-hero__stats { display: flex; flex-wrap: wrap; gap: 28px; }
.stat-num { font-family: var(--h-head); font-weight: 700; font-size: 26px; color: var(--h-ink); }
.stat-label { font-size: 13px; color: var(--h-muted); }

.laser-frame {
	position: relative; aspect-ratio: 5/4; border-radius: 20px; overflow: hidden;
	background: var(--h-surface); border: 1px solid var(--h-line);
	background-image: repeating-linear-gradient(135deg, rgba(20,30,20,.05) 0 1px, transparent 1px 13px);
}
.laser-frame .beam-h { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--h-accent); box-shadow: 0 0 22px 2px var(--h-accent); }
.laser-frame .beam-v1 { position: absolute; top: 0; bottom: 0; left: 44%; width: 2px; background: var(--h-accent); box-shadow: 0 0 18px 1px var(--h-accent); opacity: .5; }
.laser-frame .beam-v2 { position: absolute; top: 0; bottom: 0; left: 64%; width: 2px; background: var(--h-accent); box-shadow: 0 0 18px 1px var(--h-accent); opacity: .3; }
.laser-frame .tag { position: absolute; left: 16px; font-family: var(--h-mono); font-size: 11px; letter-spacing: .04em; color: var(--h-muted); text-transform: uppercase; }
.laser-frame .tag--top { top: 14px; }
.laser-frame .tag--bottom { bottom: 14px; }
.laser-frame--photo { background: #fff; background-image: none; }
.laser-frame--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Home: features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature-card { padding: 26px; border-radius: 16px; background: #fff; border: 1px solid var(--h-line); }
.feature-card__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--h-accent-soft); margin-bottom: 16px; color: var(--h-accent); }
.feature-card h3 { font-size: 18px; margin: 0 0 8px; }
.feature-card p { font-size: 14.5px; line-height: 1.55; color: var(--h-muted); margin: 0; }

/* ---------- Home: category tiles ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: clamp(26px, 4vw, 34px); }
.section-head .link-more { color: var(--h-accent); font-weight: 600; font-size: 15px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cat-tile { display: flex; flex-direction: column; border: 1px solid var(--h-line); border-radius: 18px; overflow: hidden; background: #fff; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.cat-tile:hover { border-color: var(--h-accent); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(20,30,20,.07); }
.cat-tile__img { position: relative; aspect-ratio: 16/10; background: var(--h-surface); background-image: repeating-linear-gradient(135deg, rgba(20,30,20,.05) 0 1px, transparent 1px 12px); overflow: hidden; }
.cat-tile__img img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile__img .beam-h { position: absolute; left: 0; right: 0; top: 54%; height: 2px; background: var(--h-accent); box-shadow: 0 0 14px var(--h-accent); opacity: .85; }
.cat-tile__img .beam-v { position: absolute; top: 0; bottom: 0; left: 48%; width: 2px; background: var(--h-accent); box-shadow: 0 0 14px var(--h-accent); opacity: .5; }
.cat-tile__body { padding: 20px 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cat-tile__body h3 { font-size: 19px; margin: 0 0 5px; }
.cat-tile__body p { font-size: 13.5px; color: var(--h-muted); margin: 0; }
.cat-tile__count { font-family: var(--h-mono); font-size: 12px; color: var(--h-accent); white-space: nowrap; }

/* ---------- Home: trust band ---------- */
.trust-band { background: var(--h-surface); border-top: 1px solid var(--h-line); border-bottom: 1px solid var(--h-line); }
.trust-band__inner { padding: 54px 0; }
.trust-band h2 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 8px; }
.trust-band__sub { font-size: 16px; color: var(--h-muted); margin: 0 0 26px; }
.trust-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.trust-stat { padding: 20px; border-radius: 14px; background: #fff; border: 1px solid var(--h-line); }
.trust-stat__num { font-family: var(--h-head); font-weight: 700; font-size: 24px; color: var(--h-accent); }
.trust-stat__label { font-size: 14px; color: var(--h-muted); margin-top: 3px; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* ---------- Маркетплейсы ---------- */
.mp-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin: 0 0 28px; }
.mp-row__title { font-size: 14px; color: var(--h-muted); }
.mp-row__items { display: flex; flex-wrap: wrap; gap: 14px; }
.mp-badge { display: flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 12px; transition: transform .15s ease; }
.mp-row .mp-badge img { width: 180px; height: auto; border-radius: 12px; display: block; }
@media (max-width: 480px) { .mp-row .mp-badge img { width: 140px; } }
.mp-product { margin: 18px 0 4px; }
.mp-product__title { font-size: 13px; color: var(--h-muted); margin-bottom: 10px; }
.mp-product__items { display: flex; flex-wrap: wrap; gap: 14px; }
.mp-product .mp-badge { width: auto; height: auto; padding: 0; border: 0; background: none; border-radius: 12px; }
.mp-product .mp-badge img { max-width: none; max-height: none; width: 180px; height: auto; border-radius: 12px; }
.mp-product a.mp-badge:hover { border: 0; transform: translateY(-2px); }
@media (max-width: 480px) { .mp-product .mp-badge img { width: 140px; } }
a.mp-badge:hover { transform: translateY(-2px); }
.mp-badge img { object-fit: contain; display: block; }
.review-card { padding: 22px; border-radius: 16px; background: #fff; border: 1px solid var(--h-line); }
.review-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.review-card__avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--h-accent-soft); color: var(--h-accent); font-family: var(--h-head); font-weight: 700; }
.review-card__name { font-weight: 600; font-size: 15px; }
.review-card__stars { font-size: 12px; color: var(--h-accent); }
.review-card p { font-size: 14px; line-height: 1.6; color: var(--h-muted); margin: 0; }

/* ---------- Home: callback band ---------- */
.callback-band { border-radius: 22px; overflow: hidden; border: 1px solid var(--h-line); background: #fff; display: flex; flex-wrap: wrap; margin-bottom: 20px; }
.callback-band__left { flex: 1 1 340px; padding: clamp(28px, 4vw, 46px); position: relative; background-image: repeating-linear-gradient(135deg, rgba(20,30,20,.04) 0 1px, transparent 1px 16px); }
.callback-band__left .beam { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--h-accent); box-shadow: 0 0 20px var(--h-accent); opacity: .55; }
.callback-band__left h2 { position: relative; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.1; margin: 0 0 14px; }
.callback-band__left p { position: relative; font-size: 16px; line-height: 1.55; color: var(--h-muted); margin: 0; max-width: 380px; }
.callback-band__right { flex: 1 1 320px; padding: clamp(28px, 4vw, 46px); background: var(--h-surface); display: flex; flex-direction: column; gap: 12px; }
.callback-band__right input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--h-line); background: #fff; font: inherit; font-size: 15px; outline: none; }
.callback-band__right input:focus { border-color: var(--h-accent); }
.callback-band__right .note { font-size: 12px; color: var(--h-muted); text-align: center; }

/* ---------- Shop / catalog ---------- */
.shop-wrap { padding: 30px 0 64px; }
.shop-breadcrumb { font-family: var(--h-mono); font-size: 12.5px; color: var(--h-muted); margin-bottom: 12px; }
.shop-breadcrumb a { color: var(--h-muted); }
.shop-breadcrumb a:hover { color: var(--h-accent); }
.shop-title { font-size: clamp(28px, 4vw, 40px); margin: 0 0 6px; }
.shop-count { font-size: 15px; color: var(--h-muted); margin: 0 0 22px; }

.cat-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cat-tag {
	padding: 9px 15px; border-radius: 100px; border: 1px solid var(--h-line);
	background: #fff; color: var(--h-ink);
	font-family: var(--h-head); font-weight: 500; font-size: 14px;
	transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.cat-tag:hover { border-color: var(--h-accent); color: var(--h-ink); }
.cat-tag.is-active { background: var(--h-accent); border-color: var(--h-accent); color: #fff; }

.shop-layout { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
.shop-filters { flex: 1 1 220px; max-width: 260px; min-width: 200px; position: sticky; top: 84px; display: flex; flex-direction: column; gap: 24px; }
.filter-group__title { font-family: var(--h-head); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--h-muted); margin-bottom: 12px; }
.filter-list { display: flex; flex-direction: column; gap: 8px; }
.filter-list a {
	display: block; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--h-line);
	background: #fff; color: var(--h-ink); font-size: 14px;
	transition: border-color .15s ease, color .15s ease;
}
.filter-list a:hover { border-color: var(--h-accent); color: var(--h-ink); }
.filter-list a.is-active { border-color: var(--h-accent); background: var(--h-accent-soft); color: var(--h-accent); }
.filter-reset { align-self: flex-start; background: none; border: none; padding: 0; color: var(--h-accent); font-size: 14px; cursor: pointer; }

.shop-main { flex: 3 1 480px; min-width: 280px; }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.shop-toolbar .woocommerce-result-count { margin: 0; color: var(--h-muted); font-size: 14px; }
.shop-toolbar .woocommerce-ordering { margin: 0; }
.shop-toolbar select {
	padding: 11px 14px; border-radius: 11px; border: 1px solid var(--h-line);
	background: #fff; font: inherit; font-size: 14px; cursor: pointer; color: var(--h-ink);
}
/* товарная сетка внутри правой колонки */
.shop-main ul.products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; }
.shop-empty { padding: 60px 20px; text-align: center; border: 1px dashed var(--h-line); border-radius: 16px; color: var(--h-muted); }
@media (max-width: 760px) { .shop-filters { position: static; max-width: none; flex-basis: 100%; } }

/* ============================================================
   Мобильная адаптация — шапка, hero, секции, подвал
   ============================================================ */
@media (max-width: 860px) {
	.container { padding-left: 16px; padding-right: 16px; }
	.site-header__inner { gap: 12px; padding: 12px 0; }
	.header-actions { order: 3; margin-left: auto; gap: 12px; }
	.nav-toggle { order: 2; margin-left: 4px; }
	.section { padding: 34px 0; }
	.home-hero { padding: 34px 0 8px; }
	.home-hero__grid { gap: 26px; }
	.home-hero__stats { gap: 20px; }
	.stat-num { font-size: 22px; }
}
@media (max-width: 600px) {
	body { font-size: 15px; }
	.container { padding-left: 14px; padding-right: 14px; }
	.home-hero h1 { font-size: clamp(28px, 8vw, 40px); }
	.home-hero__cta .btn { flex: 1 1 100%; justify-content: center; }
	.home-hero__stats { gap: 14px 22px; }
	.home-hero__stats > div { flex: 1 1 40%; }
	.section__title, .section-head h2 { font-size: 24px; }
	.cat-grid, .features-grid, .values-grid, .trust-stats, .reviews-grid { grid-template-columns: 1fr; }
	.callback-band { flex-direction: column; }
	.callback-band__left, .callback-band__right { flex: 1 1 100%; }
	.footer-grid { grid-template-columns: 1fr; gap: 24px; }
	.btn { padding: 13px 22px; font-size: 15px; }
}
