/* =====================================================================
   Balance — общие стили (токены дизайна + переиспользуемые компоненты)
   Подключается на всех страницах. Постраничные стили лежат отдельно.
   ===================================================================== */

:root {
	/* Зелёная палитра */
	--green:        #4FA82E;
	--green-hover:  #3F8C24;
	--green-dark:   #2D5F1B;
	--green-darker: #1A3A0F;
	--green-deep:   #1A2B14; /* подвал */
	--green-bg:     #EAF5E2;
	/* Золото */
	--gold:         #F4C430;
	--gold-hover:   #DBA31E;
	--gold-hover-2: #E5B52B;
	--gold-2:       #C79309;
	--gold-text:    #8A6406;
	--gold-bg:      #FFF9E6;
	/* Красный (скидки) */
	--red:          #E63946;
	--red-hover:    #C02D39;
	--red-deep:     #8B1A22;
	--red-bg:       #FEF0EB;
	/* Нейтральные */
	--text:         #1A1A1A;
	--muted:        #6B6B6B;
	--muted-2:      #999999;
	--border:       #E6E6E6;
	--border-light: #F0F0F0;
	--bg-gray:      #F8F8F8;
	--white:        #FFFFFF;
	--footer-text:  #C8D4BE;

	--container:    1280px;
	--radius:       4px;
	--radius-lg:    8px;
	--radius-xl:    12px;

	--shadow-card:  0 2px 12px rgba(244, 196, 48, 0.20);
	--shadow-menu:  0 8px 32px rgba(0, 0, 0, 0.12);
}

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

html { font-size: 16px; }

body {
	margin: 0;
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--text);
	background: var(--white);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; cursor: pointer; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

.bal-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ---------- Раскладка ---------- */
.bal-container {
	max-width: var(--container);
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

.bal-main { display: block; }

/* Общий отступ контента «обычных» страниц (page.php: корзина, оформление, кабинет, инфо). */
.bal-page-tpl__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 28px;
}

.bal-page-tpl__article { padding: 32px 0; }

.bal-section { padding-top: 36px; padding-bottom: 36px; }

/* Заголовок секции с цветной полосой слева */
.bal-section-title {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.01em;
	padding-left: 16px;
	position: relative;
}
.bal-section-title::before {
	content: "";
	position: absolute;
	left: 0; top: 4px; bottom: 4px;
	width: 4px;
	border-radius: 9999px;
	background: var(--green);
}
.bal-section-title--red::before { background: var(--red); }

.bal-muted { color: var(--muted); }

/* ---------- Кнопки ---------- */
.bal-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	padding: 12px 16px;
	border-radius: var(--radius);
	border: 1px solid transparent;
	transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
	white-space: nowrap;
}
.bal-btn--primary { background: var(--green); color: #fff; }
.bal-btn--primary:hover { background: var(--gold); color: var(--gold-text); }
.bal-btn--green-solid { background: var(--green); color: #fff; }
.bal-btn--green-solid:hover { background: var(--green-hover); }
.bal-btn--gold { background: var(--gold); color: var(--gold-text); }
.bal-btn--gold:hover { background: var(--gold-hover); }
.bal-btn--red { background: var(--red); color: #fff; }
.bal-btn--red:hover { background: var(--red-hover); }
.bal-btn--light { background: #fff; color: var(--green-dark); }
.bal-btn--light:hover { background: var(--gold); color: var(--gold-text); }
.bal-btn--outline { background: #fff; color: var(--text); border-color: var(--border); }
.bal-btn--outline:hover { border-color: var(--green); color: var(--green); }
.bal-btn--ghost { background: transparent; color: var(--muted); border-color: var(--border); font-weight: 600; }
.bal-btn--ghost:hover { border-color: var(--green); color: var(--green); }
.bal-btn--block { width: 100%; }
.bal-btn--lg { height: 56px; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; }
.bal-btn[disabled] { background: var(--footer-text); color: #fff; cursor: not-allowed; }
.bal-btn--uppercase { text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Бейджи ---------- */
.bal-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 4px 8px;
	border-radius: var(--radius);
	line-height: 1.2;
}
.bal-badge--hit  { background: var(--gold); color: var(--gold-text); }
.bal-badge--sale { background: var(--red); color: #fff; }
.bal-badge--new  { background: var(--green); color: #fff; }

/* Пилюли (теги в карточке товара) */
.bal-pill {
	display: inline-block;
	background: var(--green-bg);
	color: var(--green);
	font-size: 12px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 9999px;
}

/* ---------- Формы ---------- */
.bal-field { display: block; }
.bal-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 8px;
}
.bal-input,
.bal-textarea,
.bal-select {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 12px 16px;
	font-size: 14px;
	font-family: inherit;
	color: var(--text);
	background: #fff;
	outline: none;
	transition: border-color .15s;
}
.bal-input:focus,
.bal-textarea:focus,
.bal-select:focus { border-color: var(--green); }
.bal-input::placeholder,
.bal-textarea::placeholder { color: var(--muted-2); }
.bal-textarea { resize: none; }
.bal-select { cursor: pointer; }

input[type="checkbox"],
input[type="radio"] { accent-color: var(--green); }

/* Степпер количества */
.bal-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	height: 36px;
}
.bal-qty__btn {
	width: 28px;
	height: 100%;
	border: 0;
	background: #fff;
	color: var(--muted);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color .15s;
}
.bal-qty__btn:hover { background: var(--bg-gray); }
.bal-qty__input {
	width: 36px;
	height: 100%;
	border: 0;
	border-left: 1px solid var(--border);
	border-right: 1px solid var(--border);
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	outline: none;
}
.bal-qty--lg { height: 56px; }
.bal-qty--lg .bal-qty__btn { width: 44px; }
.bal-qty--lg .bal-qty__input { width: 48px; }

/* =====================================================================
   Верхняя панель
   ===================================================================== */
.bal-topbar {
	background: var(--green-dark);
	color: #fff;
	font-size: 12px;
	height: 36px;
}
.bal-topbar .bal-container {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.bal-topbar__left { display: flex; gap: 24px; opacity: .9; }
.bal-topbar__right { display: flex; align-items: center; gap: 24px; }
.bal-topbar a { opacity: .9; }
.bal-topbar a:hover { opacity: 1; }
.bal-topbar__phone { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.bal-topbar__b2b { font-weight: 600; color: var(--gold); }
.bal-topbar__user { display: inline-flex; align-items: center; gap: 8px; }
.bal-lang { display: flex; gap: 4px; }
.bal-lang span {
	padding: 2px 6px;
	border-radius: var(--radius);
	cursor: pointer;
}
.bal-lang span.is-active { background: rgba(255,255,255,.9); color: var(--green-dark); font-weight: 600; }
.bal-lang span:not(.is-active):hover { background: rgba(255,255,255,.1); }

/* =====================================================================
   Шапка
   ===================================================================== */
.bal-header {
	border-bottom: 1px solid var(--border);
	padding: 16px 0;
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
}
.bal-header__inner {
	display: flex;
	align-items: center;
	gap: 20px;
}

/* Логотип */
.bal-logo { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bal-logo__leaf { color: var(--green); }
.bal-logo__text { display: flex; flex-direction: column; line-height: 1; }
.bal-logo__title { font-weight: 800; font-size: 22px; color: var(--green-dark); letter-spacing: -0.02em; }
.bal-logo__sub { font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .03em; margin-top: 2px; }
.bal-logo--footer .bal-logo__leaf { color: var(--gold); }
.bal-logo--footer .bal-logo__title { color: #fff; }
.bal-logo--footer .bal-logo__sub { color: rgba(255,255,255,.6); }

/* Кнопка «Каталог» + мегаменю */
.bal-catalog { position: relative; flex-shrink: 0; }
.bal-catalog__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	border-radius: var(--radius);
	font-weight: 700;
	font-size: 14px;
	background: var(--green);
	color: #fff;
	border: 1px solid var(--green);
	transition: background-color .15s, color .15s;
}
.bal-catalog__btn:hover { background: #fff; color: var(--green-dark); }
.bal-catalog.is-open .bal-catalog__btn { background: var(--green-hover); color: #fff; }
.bal-catalog__chev { transition: transform .2s; }
.bal-catalog.is-open .bal-catalog__chev { transform: rotate(180deg); }

.bal-mega {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 8px;
	width: 680px;
	max-width: calc(100vw - 48px);
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-menu);
	z-index: 50;
	display: none;
	overflow: hidden;
}
.bal-catalog.is-open .bal-mega { display: flex; }
.bal-mega__list {
	width: 220px;
	flex-shrink: 0;
	background: var(--bg-gray);
	border-right: 1px solid var(--border);
	padding: 8px 0;
}
.bal-mega__cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	border-left: 2px solid transparent;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.bal-mega__cat:hover { background: rgba(255,255,255,.6); }
.bal-mega__cat.is-active { background: #fff; color: var(--green); border-left-color: var(--green); }
.bal-mega__cat .bal-icon { opacity: .5; }
.bal-mega__panels { flex: 1; padding: 20px; }
.bal-mega__panel { display: none; }
.bal-mega__panel.is-active { display: block; }
.bal-mega__title {
	font-size: 12px;
	font-weight: 700;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .06em;
	margin-bottom: 12px;
}
.bal-mega__subs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px 16px;
	margin-bottom: 20px;
}
.bal-mega__subs a {
	font-size: 13px;
	color: var(--text);
	padding: 2px 0;
	transition: color .15s;
}
.bal-mega__subs a:hover { color: var(--green); }
.bal-mega__promo {
	background: linear-gradient(to right, var(--green), var(--green-hover));
	border-radius: var(--radius-lg);
	padding: 16px;
	color: #fff;
}
.bal-mega__promo-eyebrow { font-size: 11px; font-weight: 600; opacity: .8; margin-bottom: 4px; }
.bal-mega__promo-title { font-weight: 700; font-size: 15px; line-height: 1.2; margin-bottom: 8px; }
.bal-mega__promo-note { font-size: 11px; opacity: .8; }

/* Поиск */
.bal-search { position: relative; flex: 1; max-width: 460px; }
.bal-search__box {
	display: flex;
	height: 44px;
	border: 1.5px solid var(--green);
	border-radius: var(--radius);
	overflow: hidden;
	transition: box-shadow .15s;
}
.bal-search__box:focus-within { box-shadow: 0 0 0 3px rgba(79,168,46,.15); }
.bal-search__input {
	flex: 1;
	border: 0;
	padding: 0 16px;
	font-size: 14px;
	outline: none;
}
.bal-search__input::placeholder { color: var(--muted-2); }
.bal-search__btn {
	border: 0;
	background: var(--green);
	color: #fff;
	padding: 0 20px;
	transition: background-color .15s, color .15s;
}
.bal-search__btn:hover { background: var(--gold); color: var(--gold-text); }

/* Действия шапки */
.bal-header__actions { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-shrink: 0; }
.bal-action {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-size: 11px;
	padding: 4px 10px;
	border-radius: var(--radius);
	color: var(--text);
	transition: background-color .15s;
}
.bal-action:hover { background: var(--bg-gray); }
.bal-action .bal-icon { color: var(--green-dark); }
.bal-action__count {
	position: absolute;
	top: 0; right: 6px;
	width: 18px; height: 18px;
	border-radius: 9999px;
	font-size: 10px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}
.bal-action__count--fav { background: var(--red); color: #fff; }
.bal-action__count--cart { background: var(--gold); color: var(--gold-text); }

/* Бургер мобильного меню */
.bal-burger { display: none; border: 1px solid var(--border); background: #fff; border-radius: var(--radius); width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--green-dark); }

/* =====================================================================
   Хлебные крошки
   ===================================================================== */
.bal-breadcrumbs-bar {
	background: var(--bg-gray);
	border-bottom: 1px solid var(--border);
	padding: 12px 0;
}
.bal-breadcrumbs {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--muted);
	flex-wrap: wrap;
}
.bal-breadcrumbs a:hover { color: var(--green); }
.bal-breadcrumbs__sep { color: var(--muted); }
.bal-breadcrumbs__current { color: var(--text); font-weight: 600; }

/* =====================================================================
   Карточка товара (используется в каталоге, на главной, в избранном)
   ===================================================================== */
.bal-product-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 12px;
	display: flex;
	flex-direction: column;
	transition: border-color .2s, box-shadow .2s;
	height: 100%;
}
.bal-product-card:hover { border-color: var(--gold); box-shadow: var(--shadow-card); }
.bal-product-card__thumb {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: var(--radius);
	margin-bottom: 12px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.bal-product-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bal-product-card__badge { position: absolute; top: 8px; left: 8px; z-index: 2; }
.bal-product-card__fav {
	position: absolute;
	top: 8px; right: 8px;
	z-index: 2;
	width: 28px; height: 28px;
	border-radius: 9999px;
	background: #fff;
	border: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text);
	transition: border-color .15s, color .15s;
}
.bal-product-card__fav.is-active .bal-icon {
	stroke: var(--green);
  	fill: var(--green);
}
.bal-product-card__fav:hover { border-color: var(--red); color: var(--red); }
.bal-product-card__title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	margin-bottom: 8px;
	min-height: 36px;
	transition: color .15s;
}
.bal-product-card__title:hover { color: var(--green); }
.bal-product-card__variations { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.bal-variation {
	font-size: 11px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: #fff;
	color: var(--muted);
	transition: border-color .15s, background-color .15s, color .15s;
}
.bal-variation:hover { border-color: var(--gold); }
.bal-variation.is-active { background: var(--green); color: #fff; border-color: var(--green); }
.bal-product-card__price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.bal-price { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.bal-price--old { font-size: 13px; color: var(--muted-2); text-decoration: line-through; text-decoration-color: var(--red); }
.bal-product-card__actions { display: flex; gap: 6px; margin-top: auto; }
.bal-product-card__buy { flex: 1; height: 36px; font-size: 12px; }

/* Плейсхолдер изображения — градиентный круг (как в макете) */
.bal-thumb-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.bal-thumb-ph__dot { width: 66%; height: 66%; border-radius: 9999px; opacity: .3; }
.bal-thumb-ph--0 { background: linear-gradient(135deg, #FFF9E6 0%, #FDE68A 100%); }
.bal-thumb-ph--0 .bal-thumb-ph__dot { background: radial-gradient(circle, #F4C430 0%, #C79309 100%); }
.bal-thumb-ph--1 { background: linear-gradient(135deg, #EAF5E2 0%, #BBF7D0 100%); }
.bal-thumb-ph--1 .bal-thumb-ph__dot { background: radial-gradient(circle, #4FA82E 0%, #2D5F1B 100%); }
.bal-thumb-ph--2 { background: linear-gradient(135deg, #FEF0EB 0%, #FECACA 100%); }
.bal-thumb-ph--2 .bal-thumb-ph__dot { background: radial-gradient(circle, #E63946 0%, #8B1A22 100%); }

/* =====================================================================
   Подвал
   ===================================================================== */
.bal-footer {
	background: var(--green-deep);
	color: var(--footer-text);
	padding: 48px 0 24px;
	font-size: 14px;
	margin-top: 24px;
}
.bal-footer__cols {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
	gap: 36px;
	margin-bottom: 32px;
}
.bal-footer__about { font-size: 12px; line-height: 1.6; opacity: .75; margin: 14px 0 16px; max-width: 300px; }
.bal-footer__pay { display: flex; gap: 8px; flex-wrap: wrap; }
.bal-footer__pay span { background: rgba(255,255,255,.1); padding: 4px 8px; border-radius: var(--radius); font-size: 10px; font-weight: 600; }
.bal-footer__col-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.bal-footer__col li { font-size: 13px; opacity: .8; padding: 4px 0; }
.bal-footer__col li:hover { opacity: 1; color: #fff; }
.bal-footer__contacts b { color: #fff; font-size: 16px; display: block; margin-bottom: 6px; }
.bal-footer__contacts div { opacity: .85; }
.bal-footer__socials { display: flex; gap: 8px; margin-top: 14px; }
.bal-footer__socials a {
	width: 36px; height: 36px;
	border: 1px solid rgba(255,255,255,.15);
	border-radius: var(--radius);
	display: flex; align-items: center; justify-content: center;
	transition: background-color .15s, border-color .15s, color .15s;
}
.bal-footer__socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--gold-text); }
.bal-footer__bottom {
	border-top: 1px solid rgba(255,255,255,.1);
	padding-top: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	opacity: .75;
}

/* =====================================================================
   Модалка авторизации
   ===================================================================== */
.bal-modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 16px;
}
.bal-modal.is-open { display: flex; }
.bal-modal__dialog {
	background: #fff;
	border-radius: var(--radius-lg);
	max-width: 28rem;
	width: 100%;
	padding: 32px;
	position: relative;
}
.bal-modal__close {
	position: absolute;
	top: 16px; right: 16px;
	border: 0; background: transparent;
	color: var(--muted);
}
.bal-modal__close:hover { color: var(--text); }
.bal-modal__logo { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.bal-tabs-switch { display: flex; gap: 8px; margin-bottom: 24px; background: var(--bg-gray); padding: 4px; border-radius: var(--radius); }
.bal-tabs-switch__btn {
	flex: 1;
	padding: 8px;
	border: 0;
	background: transparent;
	border-radius: var(--radius);
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
	transition: background-color .15s, color .15s, box-shadow .15s;
}
.bal-tabs-switch__btn.is-active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.bal-modal__form { display: none; flex-direction: column; gap: 16px; }
.bal-modal__form.is-active { display: flex; }
.bal-modal__form-link { text-align: center; }
.bal-modal__form-link a { font-size: 14px; color: var(--green); }
.bal-modal__form-link a:hover { color: var(--green-hover); }
.bal-modal__consent { font-size: 12px; color: var(--muted); text-align: center; }
.bal-modal__consent a { color: var(--green); }

/* Скрытие при отсутствии JS можно убрать; модалка по умолчанию display:none */

/* =====================================================================
   Мобильное меню (выезжающая панель)
   ===================================================================== */
.bal-mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: none;
}
.bal-mobile-menu.is-open { display: block; }
.bal-mobile-menu__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.bal-mobile-menu__panel {
	position: absolute;
	top: 0; left: 0; bottom: 0;
	width: 300px;
	max-width: 85vw;
	background: #fff;
	padding: 20px;
	overflow-y: auto;
}
.bal-mobile-menu__panel a { display: block; padding: 10px 0; font-weight: 600; border-bottom: 1px solid var(--border-light); }

/* =====================================================================
   Адаптив
   ===================================================================== */
@media (max-width: 1024px) {
	.bal-footer__cols { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 860px) {
	.bal-header__inner { flex-wrap: wrap; gap: 12px; }
	.bal-catalog, .bal-search { order: 3; }
	.bal-search { flex-basis: 100%; max-width: none; }
	.bal-burger { display: flex; }
	.bal-catalog { display: none; }
}
@media (max-width: 640px) {
	.bal-topbar__left { display: none; }
	.bal-footer__cols { grid-template-columns: 1fr; }
	.bal-footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
	.bal-container { padding-left: 16px; padding-right: 16px; }
}

/* ---------- WooCommerce: убираем clearfix-псевдоэлементы на списках товаров ---------- */
.woocommerce .products ul::before,
.woocommerce .products ul::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none; display: none; }
