/* Gerland Header — элементы шапки gerland.by
 * Селекторы начинаются с «html body», чтобы стили темы (Woodmart) не перебивали шапку. */
:root {
	--glh-accent: #ffc400;        /* фирменный жёлтый */
	--glh-accent-dark: #e6ad00;
	--glh-ink: #111;
	--glh-dark: #1a1a1a;
	--glh-line: rgba(255, 196, 0, .55);
	--glh-radius: 6px;
}

html body .glh-ico { display: inline-block; flex: none; vertical-align: middle; }

/* Сброс стилей кнопок и полей, которые навязывает тема (капс, разрядка, мин. высота, тени) */
html body .glh-header button,
html body .glh-header input,
html body .glh-mheader button,
html body .glh-mheader input,
html body .glh-drawer button,
html body .glh-modal button,
html body .glh-modal input,
html body .glh-fab button {
	text-transform: none;
	letter-spacing: normal;
	min-height: 0;
	min-width: 0;
	margin: 0;
	box-shadow: none;
	text-shadow: none;
	vertical-align: middle;
}

/* ---------- 1. Email ---------- */
html body .glh-email-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.2; }
html body .glh-email-label { opacity: .75; white-space: nowrap; }
html body .glh-email-box { position: relative; display: inline-flex; }
html body .glh-email {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	padding: 4px 10px;
	border: 1px solid var(--glh-line);
	border-radius: var(--glh-radius);
	font-weight: 600;
	color: var(--glh-accent);
	white-space: nowrap;
	transition: border-color .2s, background-color .2s;
}
html body .glh-email:hover { border-color: var(--glh-accent); background: rgba(255, 196, 0, .08); }
html body .glh-email:focus-visible { outline: 2px solid var(--glh-accent); outline-offset: 2px; }

html body .glh-toast {
	position: absolute;
	top: calc(100% + 6px);
	left: 50%;
	z-index: 1000;
	padding: 5px 10px;
	border-radius: var(--glh-radius);
	background: var(--glh-accent);
	color: var(--glh-ink);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, -4px);
	transition: opacity .2s, transform .2s;
}
html body .glh-toast::before {
	content: "";
	position: absolute;
	bottom: 100%;
	left: 50%;
	margin-left: -5px;
	border: 5px solid transparent;
	border-bottom-color: var(--glh-accent);
}
html body .glh-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Телефоны ---------- */
html body .glh-phones { display: inline-flex; flex-direction: column; gap: 2px; line-height: 1.25; }
html body .glh-phone { display: inline-flex; gap: 8px; align-items: baseline; color: inherit !important; text-decoration: none !important; white-space: nowrap; }
html body .glh-phone:hover .glh-num { color: var(--glh-accent); }
html body .glh-op { min-width: 30px; font-size: 11px; opacity: .65; }
html body .glh-num { font-weight: 700; font-size: 14px; transition: color .2s; }

/* ---------- 2. Заказать звонок ---------- */
html body .glh-cb-btn {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 38px;
	padding: 0 16px;
	border: 2px solid var(--glh-accent);
	border-radius: var(--glh-radius);
	color: var(--glh-accent);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	transition: background-color .2s, color .2s;
}
html body .glh-cb-btn:hover { background: var(--glh-accent); color: var(--glh-ink); }
html body .glh-cb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html body .glh-cb-compact { width: 38px; padding: 0; justify-content: center; }
html body .glh-cb-compact .glh-cb-text { display: none; }

/* ---------- 3. Корзина ---------- */
html body .glh-cart {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 16px;
	border-radius: var(--glh-radius);
	background: var(--glh-accent);
	color: var(--glh-ink) !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
	box-shadow: 0 2px 10px var(--glh-glow, rgba(255, 196, 0, .25));
	transition: background-color .2s, transform .15s;
}
html body .glh-cart:hover { background: var(--glh-accent-dark); transform: translateY(-1px); }
html body .glh-cart-ico { position: relative; display: inline-flex; }
html body .glh-cart-sum .amount,
html body .glh-cart-sum bdi { color: inherit !important; }
html body .glh-cart-cta {
	margin-left: 4px;
	padding-left: 10px;
	border-left: 1px solid rgba(0, 0, 0, .2);
	font-size: 12px;
}
html body .glh-cart.has-items { animation: glh-pulse 2.4s ease-in-out 2; }
@keyframes glh-pulse {
	0%,
100% { box-shadow: 0 2px 10px var(--glh-glow, rgba(255, 196, 0, .25)); }
	50% { box-shadow: 0 0 0 6px var(--glh-glow, rgba(255, 196, 0, .25)); }
}

html body .glh-cart-compact { width: 42px; padding: 0; justify-content: center; }
html body .glh-cart-badge {
	position: absolute;
	top: -8px;
	right: -10px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--glh-ink);
	color: var(--glh-accent);
	font-size: 11px;
	line-height: 18px;
	text-align: center;
}

@media (max-width: 1200px) {
	html body .glh-cart-cta { display: none; }
}

/* ---------- Модальное окно ---------- */
html.glh-lock { overflow: hidden; }
html body .glh-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .65);
}
html body .glh-modal[hidden] { display: none; }
html body .glh-modal-box {
	position: relative;
	width: 100%;
	max-width: 400px;
	padding: 28px 24px 22px;
	border-radius: 10px;
	background: #fff;
	color: var(--glh-ink);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
html body .glh-modal-close {
	all: unset;
	cursor: pointer;
	position: absolute;
	top: 8px;
	right: 12px;
	font-size: 28px;
	line-height: 1;
	color: #888;
}
html body .glh-modal-close:hover { color: var(--glh-ink); }
html body .glh-modal-title { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
html body .glh-modal-sub { margin: 0 0 18px; font-size: 14px; color: #555; }
html body .glh-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
html body .glh-field { display: block; margin-bottom: 12px; }
html body .glh-field span { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
html body .glh-field input {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: var(--glh-radius);
	font-size: 16px; /* без зума на iOS */
	box-sizing: border-box;
}
html body .glh-field input:focus { border-color: var(--glh-accent-dark); outline: none; box-shadow: 0 0 0 3px rgba(255, 196, 0, .3); }
html body .glh-form-error { min-height: 1em; margin: 0 0 8px; color: #c62828; font-size: 13px; }
html body .glh-submit {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: block;
	width: 100%;
	height: 46px;
	border-radius: var(--glh-radius);
	background: var(--glh-accent);
	color: var(--glh-ink);
	font-size: 15px;
	font-weight: 800;
	text-align: center;
	transition: background-color .2s;
}
html body .glh-submit:hover { background: var(--glh-accent-dark); }
html body .glh-submit[disabled] { opacity: .6; cursor: wait; }
html body .glh-policy { margin: 10px 0 0; font-size: 11px; color: #888; text-align: center; }

/* =========================================================
 * Готовая шапка (3 уровня)
 * ======================================================= */
html body .glh-header { position: relative; z-index: 300; color: #fff; font-size: 13px; }
html body .glh-header a { color: inherit; text-decoration: none; }
html body .glh-container { display: flex; align-items: center; gap: 20px; max-width: 1222px; margin: 0 auto; padding: 0 15px; }
html body .glh-header ul { margin: 0; padding: 0; list-style: none; }

/* Верхний уровень */
html body .glh-row-top { background: #0b0b0b; border-bottom: 1px solid #222; }
html body .glh-row-top .glh-container { min-height: 40px; gap: 22px; }
html body .glh-top-menu { display: flex; flex-wrap: wrap; gap: 20px; }
html body .glh-top-menu li { margin: 0; }
html body .glh-top-menu a { font-size: 12px; opacity: .8; transition: opacity .2s, color .2s; }
html body .glh-top-menu a:hover { opacity: 1; color: var(--glh-accent); }
html body .glh-top-right { display: flex; align-items: center; gap: 22px; }
html body .glh-account { font-size: 12px; font-weight: 600; opacity: .85; }
html body .glh-account:hover { color: var(--glh-accent); opacity: 1; }

/* Средний уровень */
html body .glh-row-main { background: #141414; }
html body .glh-row-main .glh-container { min-height: 84px; }
html body .glh-logo { display: flex; flex-direction: column; flex: none; line-height: 1.1; }
html body .glh-logo-name { color: var(--glh-accent); font-size: 26px; font-weight: 900; letter-spacing: .5px; }
html body .glh-logo-tag { margin-top: 3px; font-size: 11px; opacity: .65; }
html body .glh-search { display: flex; flex: 1 1 auto; max-width: 440px; min-width: 200px; height: 42px; }
html body .glh-search input[type="search"] {
	flex: 1;
	height: 42px;
	padding: 0 14px;
	border: 1px solid #333;
	border-right: 0;
	border-radius: var(--glh-radius) 0 0 var(--glh-radius);
	background: #222;
	color: #fff;
	font-size: 14px;
}
html body .glh-search input[type="search"]::placeholder { color: #888; }
html body .glh-search input[type="search"]:focus { border-color: var(--glh-accent); outline: none; }
html body .glh-search button {
	height: 42px;
	padding: 0 18px;
	border: 0;
	border-radius: 0 var(--glh-radius) var(--glh-radius) 0;
	background: var(--glh-accent);
	color: var(--glh-ink);
	font-weight: 800;
	cursor: pointer;
}
html body .glh-search button:hover { background: var(--glh-accent-dark); }
html body .glh-spacer { flex: 1 1 0; min-width: 0; }
html body .glh-slot { display: flex; align-items: center; gap: 10px; }
html body .glh-slot > :first-child { margin-top: 0; }
html body .glh-slot > :last-child { margin-bottom: 0; }
html body .glh-slot-before-header,
html body .glh-slot-after-header { display: block; }
html body .glh-mobile-only { display: none; }

/* Нижний уровень */
html body .glh-row-bottom { background: #1a1a1a; border-top: 1px solid #262626; }
html body .glh-row-bottom .glh-container { min-height: 46px; gap: 22px; }
html body .glh-cat-menu { display: flex; flex-wrap: wrap; gap: 4px 26px; }
html body .glh-cat-menu a { display: block; padding: 12px 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; transition: color .2s; }
html body .glh-cat-menu a:hover,
html body .glh-cat-menu .is-current a,
html body .glh-cat-menu .current-menu-item a { color: var(--glh-accent); }
html body .glh-all-cat {
	flex: none;
	padding: 7px 14px;
	border: 1px solid var(--glh-line);
	border-radius: var(--glh-radius);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--glh-accent) !important;
}
html body .glh-all-cat:hover { background: var(--glh-accent); color: var(--glh-ink) !important; }

/* Узкие десктопы */
@media (max-width: 1200px) {
	html body .glh-header .glh-email-label { display: none; }
	html body .glh-row-main .glh-container { gap: 14px; }
	html body .glh-header .glh-cb-text { display: none; }
	html body .glh-header .glh-cb-btn { width: 38px; padding: 0; justify-content: center; }
}

/* Подмена шапки Woodmart на компьютере, мобильная — тема */
@media (min-width: 1025px) {
	body.glh-on .whb-header,
body.glh-on header.whb-header { display: none !important; }
	html body .glh-fab,
html body .glh-mheader,
html body .glh-drawer { display: none !important; }
}
@media (max-width: 1024px) {
	html body #glh-header { display: none !important; }
	body.glh-mon .whb-header,
body.glh-mon header.whb-header { display: none !important; }
	html body .glh-mheader { display: block; }
	html body .glh-mobile-only { display: block; }
	html body .glh-fab { position: fixed; left: 14px; bottom: 80px; z-index: 9990; }
	html body .glh-fab .glh-cb-btn {
		width: 52px;
		height: 52px;
		border-radius: 50%;
		background: var(--glh-accent);
		color: var(--glh-ink);
		box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
	}
}

/* =========================================================
 * Мобильная шапка
 * ======================================================= */
html body .glh-mheader { display: none; position: relative; z-index: 300; background: var(--glh-m-bg, #141414); color: #fff; font-size: 14px; }
html body .glh-mheader a,
html body .glh-drawer a { color: inherit; text-decoration: none; }
html body .glh-mbar { background: var(--glh-m-bg, #141414); }
html body .glh-mbar.is-fixed { position: fixed; left: 0; right: 0; z-index: 9980; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
html body .glh-mbar-in { display: flex; align-items: center; gap: 8px; min-height: var(--glh-m-h, 56px); padding: 0 10px; }
html body .glh-mheader .glh-logo { min-width: 0; overflow: hidden; }
html body .glh-mheader .glh-logo-name { font-size: var(--glh-m-logo, 20px); white-space: nowrap; }
html body .glh-mheader .glh-logo-tag { display: none; }
html body .glh-mheader .glh-logo img,
html body .glh-drawer .glh-logo img { height: var(--glh-m-logo-h, 32px); width: auto; display: block; }

html body .glh-burger {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	flex: none;
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0 9px;
	-webkit-tap-highlight-color: transparent;
}
html body .glh-burger span { display: block; height: 2px; border-radius: 2px; background: currentColor; }
html body .glh-burger:focus-visible { outline: 2px solid var(--glh-accent); outline-offset: 2px; border-radius: var(--glh-radius); }

html body .glh-mphone {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--glh-radius);
	color: var(--glh-accent) !important;
}
html body .glh-mheader .glh-cb-btn { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; }
html body .glh-mheader .glh-cb-text { display: none; }
html body .glh-mheader .glh-cart-compact { flex: none; width: 40px; height: 40px; animation: none; box-shadow: none; }
html body .glh-mheader .glh-slot { flex: none; }

html body .glh-msearch { padding: 0 10px 10px; }
html body .glh-mheader .glh-search { max-width: none; min-width: 0; width: 100%; height: 40px; }
html body .glh-mheader .glh-search input[type="search"],
html body .glh-mheader .glh-search button { height: 40px; font-size: 16px; } /* 16px — без зума на iOS */

/* Выезжающее меню */
html body .glh-drawer { position: fixed; inset: 0; z-index: 99990; display: flex; }
html body .glh-drawer[hidden] { display: none; }
html body .glh-drawer-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s; }
html body .glh-drawer-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 86%;
	max-width: 360px;
	height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background: var(--glh-m-bg, #141414);
	color: #fff;
	font-size: 14px;
	transform: translateX(-100%);
	transition: transform .25s ease;
}
html body .glh-drawer.is-open .glh-drawer-overlay { opacity: 1; }
html body .glh-drawer.is-open .glh-drawer-panel { transform: none; }
html body .glh-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
html body .glh-drawer .glh-logo-name { font-size: var(--glh-m-logo, 20px); }
html body .glh-drawer .glh-logo-tag { display: block; font-size: 11px; opacity: .6; }
html body .glh-drawer .glh-logo { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
html body .glh-drawer-close { all: unset; cursor: pointer; flex: none; width: 40px; height: 40px; font-size: 30px; line-height: 40px; text-align: center; opacity: .8; }
html body .glh-drawer-close:hover { opacity: 1; }
html body .glh-dsec { padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
html body .glh-dtitle { margin: 0 0 6px; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; opacity: .5; }
html body .glh-drawer ul { margin: 0; padding: 0; list-style: none; }
html body .glh-drawer .glh-cat-menu,
html body .glh-drawer .glh-top-menu { display: block; }
html body .glh-drawer .glh-cat-menu a { display: block; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; }
html body .glh-drawer .glh-cat-menu li:last-child a { border-bottom: 0; }
html body .glh-drawer .glh-cat-menu a:hover,
html body .glh-drawer .glh-cat-menu .is-current a { color: var(--glh-accent); }
html body .glh-drawer .glh-top-menu a { display: block; padding: 9px 0; font-size: 14px; opacity: .85; }
html body .glh-drawer .glh-all-cat { display: block; margin-top: 12px; padding: 11px; font-size: 13px; text-align: center; }
html body .glh-drawer .glh-phones { display: flex; gap: 8px; }
html body .glh-drawer .glh-num { font-size: 17px; }
html body .glh-drawer .glh-cb-btn { display: flex; width: 100%; height: 44px; margin: 14px 0; padding: 0 16px; justify-content: center; }
html body .glh-drawer .glh-cb-text { display: inline; }
html body .glh-drawer .glh-email-wrap { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
html body .glh-drawer .glh-email-label { display: block; width: 100%; }
html body .glh-drawer .glh-account { display: block; padding: 4px 0; font-size: 14px; font-weight: 700; color: var(--glh-accent) !important; }

/* Показ мобильной шапки — в самом конце, чтобы перекрыть базовое display:none */
@media (max-width: 1024px) {
	html body .glh-mheader { display: block; }
}

/* Жёсткая защита кнопок мобильной шапки от стилей темы */
html body .glh-mheader .glh-burger,
html body .glh-drawer .glh-drawer-close {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}
html body .glh-mheader .glh-burger span { background: currentColor !important; }
html body .glh-mheader .glh-cb-btn {
	background: transparent;
	border: 2px solid var(--glh-accent) !important;
	color: var(--glh-accent) !important;
}
html body .glh-mheader .glh-search button { text-transform: none !important; }

/* Иконки мобильной строки: поиск, личный кабинет */
html body .glh-mheader .glh-micon {
	all: unset;
	box-sizing: border-box;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--glh-radius);
	background: transparent !important;
	color: inherit !important;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
html body .glh-mheader .glh-micon:hover,
html body .glh-mheader .glh-micon.is-active { color: var(--glh-accent) !important; }
html body .glh-mheader .glh-micon:focus-visible { outline: 2px solid var(--glh-accent); outline-offset: 2px; }
html body .glh-msearch[hidden] { display: none !important; }
html body .glh-msearch.is-toggle { padding-top: 2px; }
html body .glh-msearch.is-floating {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 9979;
	padding-top: 10px;
	background: var(--glh-m-bg, #141414);
	box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
}
