/* HARD — вигляд сайту: правки клієнта 08.10, 09.10 і 12.10, стиль A (Oswald + Onest, квадратні кути; з 09.10 — чорно-білий,
   червоний лише в цінах).
   Джерело: clients/hardbrand.com.ua/site/wp/mu-plugins/hb-layout/layout.css */

/* ---------- Головна ---------- */

/* Переваги внизу — по центру */
.hb-ben div { text-align: center; }

/* Перший блок сторінки стоїть одразу під шапкою */
.hb-h2.hb-h2--first { margin-top: 36px; }

/* Банер зменшений: другий блок, під «Новими колекціями» */
.hb-hero.hb-hero--small { min-height: 300px; margin-top: 70px; }
.hb-hero.hb-hero--small .txt { padding: 36px 64px; }
.hb-hero.hb-hero--small h1 { font-size: 52px; line-height: 1; }
.hb-hero.hb-hero--small p { font-size: 16px; margin: 14px 0 22px; }
.hb-hero.hb-hero--small img { height: 300px; }
.hb-hero.hb-hero--small .hb-btn { padding: 12px 24px; font-size: 14px; }

/* Слайдер «Нові колекції»: картки в один ряд, гортаються стрілками й пальцем */
.hb-slider { position: relative; }
/* overflow-y: hidden — рядок розмірів картки (hb-catalog) до наведення стоїть під карткою й давав би стрічці вертикальну прокрутку */
.hb-slider ul.products { display: flex !important; grid-template-columns: none; gap: 30px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hb-slider ul.products::-webkit-scrollbar { display: none; }
.hb-slider ul.products > li.product { flex: 0 0 calc((100% - 90px) / 4); min-width: 0; scroll-snap-align: start; }
.hb-slider__nav { position: absolute; top: 34%; z-index: 3; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; background: var(--hb-black, #111); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; transition: opacity .2s, background .2s; }
.hb-slider__nav:hover { background: var(--hb-red, #c32929); }
.hb-slider__nav.is-prev { left: -14px; }
.hb-slider__nav.is-next { right: -14px; }
.hb-slider__nav[disabled] { opacity: 0; pointer-events: none; }

/* Банер Limited Edition: фото костюмів, увесь банер веде в категорію */
.hb-hero.hb-hero--le { grid-template-columns: 1fr 1fr 1fr 1fr; min-height: 380px; margin-top: 70px; }
.hb-hero.hb-hero--le .txt { padding: 40px 48px; }
.hb-hero.hb-hero--le h1 { font-size: 54px; line-height: 1; }
.hb-hero.hb-hero--le p { font-size: 16px; margin: 14px 0 24px; }
.hb-hero.hb-hero--le img { height: 380px; object-position: center 18%; }
.hb-hero.hb-hero--le a.hb-hero__pic { display: block; overflow: hidden; }
.hb-hero.hb-hero--le a.hb-hero__pic img { transition: transform .4s; }
.hb-hero.hb-hero--le a.hb-hero__pic:hover img { transform: scale(1.04); }

/* Усі категорії: плитки підкатегорій; з 12.10 — двома блоками (одяг, взуття), у кожного свій підзаголовок */
.hb-cats-group + .hb-cats-group { margin-top: 44px; }
.hb-cats-title { margin: 0 0 16px; font: 500 22px Oswald, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.hb-cats-title a { color: var(--hb-black, #111); text-decoration: none; }
.hb-cats-title a:hover { text-decoration: underline; text-underline-offset: 5px; }
.hb-cats.hb-cats--all { grid-template-columns: repeat(7, 1fr); gap: 14px; }
.hb-cats.hb-cats--all .hb-cat img { height: auto; aspect-ratio: 1 / 1; } /* квадрат — фото категорій зі старого сайту квадратні (20.10) */
.hb-cats.hb-cats--all .hb-cat span { font-size: 13px; letter-spacing: .06em; padding: 7px 10px; }

/* ---------- Меню «Каталог»: підкатегорії в кілька колонок ---------- */
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-item > ul.mega-sub-menu { column-count: 3; column-gap: 32px; }
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-item > ul.mega-sub-menu > li.mega-menu-item { break-inside: avoid; }

/* ---------- Сторінка категорії ----------
   З 09.10 — у mu-плагіні hb-category.php (тека hb-category/): фільтри рядком над товарами, панель фільтра справа,
   дерево категорій у лівій колонці, заголовок категорії без сірої смуги. */

/* ---------- Телефон: два товари в ряд ---------- */
@media (max-width: 689.98px) {
	[data-products] { --grid-columns-gap: 12px; column-gap: 12px; }
	/* :root — щоб перебити «Додатковий CSS» теми, який вантажиться пізніше з тією самою вагою селектора */
	:root .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 13px; line-height: 1.3; }
	:root .woocommerce ul.products li.product .price { font-size: 15px; }
	:root .woocommerce ul.products li.product .price del { font-size: 12px; }
	.hb-badges { top: 8px; gap: 4px; }
	.hb-badges .onsale, .hb-badge { height: 20px; padding: 0 7px; font-size: 11px !important; }
}

/* ---------- Сторінки «Оплата та доставка», «Обмін та повернення», «Контакти» ---------- */

body.page-id-5132 .hero-section .entry-header, body.page-id-9 .hero-section .entry-header, body.page-id-13 .hero-section .entry-header { text-align: center; }
body.page-id-5132 .hero-section .page-title, body.page-id-9 .hero-section .page-title, body.page-id-13 .hero-section .page-title { font-size: 56px; line-height: 1.05; letter-spacing: .02em; }

.hb-page { max-width: 1100px; margin: 0 auto; }
.hb-page__lead { max-width: 640px; margin: 0 auto 44px; text-align: center; color: #666; }
.hb-page h2 { display: table; margin: 52px 0 24px; padding-bottom: 6px; border-bottom: 2px solid var(--hb-black, #111); font-size: 30px; letter-spacing: .03em; }
.hb-page h2.is-center { margin-left: auto; margin-right: auto; border-bottom: 0; }
.hb-page h2:first-child { margin-top: 0; }

.hb-cards { display: grid; gap: 20px; }
.hb-cards--2 { grid-template-columns: repeat(2, 1fr); }
.hb-cards--3 { grid-template-columns: repeat(3, 1fr); }
.hb-cards--4 { grid-template-columns: repeat(4, 1fr); }
.hb-card { padding: 26px 26px 24px; background: #f4f4f4; border: 1px solid #e4e4e4; font-size: 15px; line-height: 1.55; }
.hb-card h3 { margin: 0 0 12px; font: 500 17px/1.3 Oswald, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.hb-card p { margin: 0 0 10px; }
.hb-card p:last-child, .hb-card ul:last-child { margin-bottom: 0; }
.hb-card a { color: var(--hb-black, #111); }
.hb-card--dark { background: #1b1b1b; border-color: #1b1b1b; color: #ddd; text-align: center; }
.hb-card--dark h3 { color: #fff; }
.hb-tag { display: inline-block; margin-left: 8px; padding: 3px 8px; background: var(--hb-black, #111); color: #fff; font: 500 11px Oswald, sans-serif; letter-spacing: .1em; vertical-align: middle; }
.hb-small { font-size: 13px; color: #777; }
.hb-inset { margin-top: 16px; padding: 16px 18px; background: #fff; border-left: 3px solid var(--hb-black, #111); }
.hb-inset ul { margin: 10px 0; padding-left: 18px; }
.hb-inset li { margin-bottom: 6px; }
.hb-inset--wide { margin-top: 44px; box-shadow: 0 1px 6px rgba(0, 0, 0, .08); }
.hb-inset--wide p { margin: 0 0 4px; }

.hb-steps { display: grid; gap: 22px; align-content: start; }
.hb-step { display: grid; grid-template-columns: 30px 1fr; gap: 14px; }
.hb-step__n { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--hb-black, #111); color: #fff; font: 500 14px Oswald, sans-serif; }
.hb-step b { color: var(--hb-black, #111); display: block; margin-bottom: 4px; font: 500 16px Oswald, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.hb-step p { margin: 0; font-size: 15px; }
.hb-steps--row { grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.hb-steps--row .hb-step { grid-template-columns: 1fr; justify-items: center; align-content: start; text-align: center; gap: 12px; }

.hb-page .hb-btn.dark { background: var(--hb-black, #111); color: #fff; padding: 12px 22px; font-size: 14px; margin-top: 14px; }
.hb-page .hb-btn.dark:hover { background: var(--hb-red, #c32929); color: #fff; }
.hb-card .hb-btn.dark { margin-top: 4px; }

.hb-map { margin-top: 28px; }
.hb-map iframe { display: block; width: 100%; height: 420px; border: 0; }

/* Форма «Напишіть нам» (mu-плагін hb-contact.php) */
.hb-form { margin-top: 44px; padding: 30px 30px 28px; background: #fff; border: 1px solid #e4e4e4; box-shadow: 0 1px 8px rgba(0, 0, 0, .06); }
.hb-page .hb-form h2 { display: block; margin: 0 0 20px; padding: 0; border: 0; font-size: 24px; }
.hb-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.hb-form input[type="text"], .hb-form textarea { width: 100%; padding: 12px 14px; border: 1px solid #d5d5d5; border-radius: 0; background: #fff; font: 400 15px Onest, sans-serif; color: var(--hb-black, #111); }
.hb-form input[type="text"]:focus, .hb-form textarea:focus { border-color: var(--hb-black, #111); outline: 0; }
.hb-form textarea { display: block; resize: vertical; }
.hb-form .hb-btn.dark { border: 0; cursor: pointer; margin-top: 18px; }
.hb-form .hb-btn.dark[disabled] { opacity: .5; cursor: default; }
.hb-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hb-form__note { margin: 16px 0 0; font-size: 15px; color: #1a7f37; }
.hb-form__note.is-error { color: var(--hb-red, #c32929); }
@media (max-width: 689.98px) {
	.hb-form { padding: 22px 18px; margin-top: 32px; }
	.hb-form__row { grid-template-columns: 1fr; }
}

/* ---------- Сторінка вибору категорій (/katalog/, Одяг, Взуття) ---------- */
.hb-cat-choice #sidebar { display: none !important; }
body.hb-cat-choice .ct-container[data-sidebar] { display: block; }
@media (min-width: 1000px) {
	.hb-cat-choice [data-products] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.woocommerce ul.products li.product-category .woocommerce-loop-category__title { font: 500 18px Oswald, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.woocommerce ul.products li.product-category .woocommerce-loop-category__title .count { background: none; color: #999; font-weight: 400; }

@media (max-width: 999px) {
	.hb-slider ul.products { gap: 20px; }
	.hb-slider ul.products > li.product { flex-basis: calc((100% - 40px) / 3); }
	.hb-slider__nav.is-prev { left: -6px; }
	.hb-slider__nav.is-next { right: -6px; }
	.hb-hero.hb-hero--le { grid-template-columns: 1fr 1fr 1fr; margin-top: 44px; min-height: 0; }
	.hb-hero.hb-hero--le .txt { grid-column: 1 / -1; padding: 30px 24px; }
	.hb-hero.hb-hero--le h1 { font-size: 40px; }
	.hb-hero.hb-hero--le img { height: 300px; }
	.hb-cats.hb-cats--all { grid-template-columns: repeat(4, 1fr); gap: 10px; }
	.hb-hero.hb-hero--small { margin-top: 44px; }
	.hb-hero.hb-hero--small .txt { padding: 30px 24px; }
	.hb-hero.hb-hero--small h1 { font-size: 38px; }
	.hb-hero.hb-hero--small img { height: 220px; }
	.hb-cards--4 { grid-template-columns: repeat(2, 1fr); }
	body.page-id-5132 .hero-section .page-title, body.page-id-9 .hero-section .page-title, body.page-id-13 .hero-section .page-title { font-size: 38px; }
}
@media (max-width: 689.98px) {
	.hb-slider ul.products { gap: 12px; }
	.hb-slider ul.products > li.product { flex-basis: calc((100% - 12px) / 2); }
	.hb-slider__nav { width: 36px; height: 36px; font-size: 17px; top: 30%; }
	.hb-hero.hb-hero--le img { height: 190px; }
	.hb-cats.hb-cats--all { grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.hb-cats.hb-cats--all .hb-cat span { font-size: 11px; padding: 5px 7px; }
	.hb-hero.hb-hero--small img { height: 170px; }
	.hb-cards--2, .hb-cards--3, .hb-steps--row { grid-template-columns: 1fr; }
	.hb-cards--4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.hb-card { padding: 20px 18px; }
	.hb-page h2 { font-size: 24px; margin: 40px 0 18px; }
	.hb-page__lead { margin-bottom: 32px; }
	.hb-map iframe { height: 320px; }
	body.page-id-5132 .hero-section .page-title, body.page-id-9 .hero-section .page-title, body.page-id-13 .hero-section .page-title { font-size: 30px; }
}

/* ================= Правки клієнта 09.10 (Google-док «Правки та побажання до сайту») ================= */

/* ---------- Чорно-білий вигляд: червоний лишається лише в цінах ----------
   html:root — щоб перебити палітру теми (:root у global.css) і --hb-red із «Додаткового CSS» теми, які вантажаться пізніше.
   --hb-red тепер чорний: усе, що було червоним акцентом (кнопки, підкреслення, наведення), стає чорним саме.
   Ціни беруть окрему змінну --hb-price (тут, у hb-product-page/product-page.css і hb-catalog/catalog.css).
   Жовтий значок «−30%» лишається — його клієнт просив 08.10. */
html:root { --hb-red: #111; --hb-price: #c32929; --theme-palette-color-1: #111; --theme-palette-color-2: #444; }
:root .woocommerce ul.products li.product .price ins { color: var(--hb-price); }
.ct-header [data-row*="top"] .hb-red { color: #fff; }
/* Кнопки на чорних банерах: була червона — тепер біла */
:root .hb-btn.red { background: #fff; color: var(--hb-black, #111); }
:root .hb-btn.red:hover { background: #d9d9d9; color: var(--hb-black, #111); }
/* Наведення, яке було «чорне → червоне»: тепер «чорне → темно-сіре» */
:root .hb-slider__nav:hover, :root .hb-page .hb-btn.dark:hover, :root .hb-quick__size--buy:hover { background: #444; border-color: #444; }
:root .hb-form__note.is-error { font-weight: 600; }
/* Чужі стилі з червоним: хрестик на розмірі, якого немає (Variation Swatches), зірочка обов'язкового поля, мітка «в обраному» */
.woo-variation-swatches .variable-items-wrapper { --wvs-cross: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 100 100'%3E%3Cpath d='M0 0 L100 100 M100 0 L0 100' stroke='%23999' stroke-width='1.5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.woocommerce form .form-row .required, .form-row .required, #review_form .comment-form .required { color: var(--hb-black, #111); }
.wishlist-icon.added::after { background-color: var(--hb-black, #111); }

/* ---------- Меню: активний пункт — підкресленням, без червоного й без заливки ---------- */
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item > a.mega-menu-link { color: var(--hb-black, #111) !important; background: transparent !important; text-decoration: none; text-underline-offset: 9px; text-decoration-thickness: 2px; }
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item > a.mega-menu-link:hover,
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item > a.mega-menu-link:focus-visible,
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item.mega-toggle-on > a.mega-menu-link,
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link,
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item.mega-current-menu-ancestor > a.mega-menu-link,
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item.mega-current-page-ancestor > a.mega-menu-link { text-decoration: underline !important; text-decoration-thickness: 2px !important; }
/* Панель «Каталог»: просторіше, як на макеті клієнта */
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu { padding: 26px 30px 30px !important; }
/* Положення панелі: плагін меню рахує зсув і ширину скриптом, і під zoom 110% помиляється на 10 px. Ставимо стилями:
   панель — на всю ширину блоку контенту шапки, одразу під рядком меню. */
@media (min-width: 1000px) {
	#header [data-device="desktop"] [data-row*="middle"] > .ct-container { position: relative; }
	#header [data-device="desktop"] #mega-menu-wrap-menu_1, #header [data-device="desktop"] #mega-menu-menu_1 { position: static; }
	#header [data-device="desktop"] #mega-menu-menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu { left: 0 !important; width: 100% !important; top: calc(50% + 20px) !important; }
}
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-item > a.mega-menu-link { margin-bottom: 12px !important; font-size: 17px !important; color: var(--hb-black, #111) !important; }
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-item > ul.mega-sub-menu > li.mega-menu-item > a.mega-menu-link { padding: 6px 0 !important; font-size: 15px !important; color: var(--hb-black, #111) !important; }
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu a.mega-menu-link:hover { text-decoration: underline !important; text-underline-offset: 4px; }

/* ---------- Шапка нижча на 10% ---------- */
#header [data-device="desktop"] [data-row*="top"] { --height: 36px; }
#header [data-device="desktop"] [data-row*="middle"] { --height: 90px; }
#header [data-device="mobile"] [data-row*="middle"] { --height: 63px; }

/* ---------- Ширший блок контенту (4 товари в ряд) і масштаб 110% на комп'ютері ----------
   zoom — те саме, що збільшення в браузері. ⚠️ Одиниці vw/vh під zoom не масштабуються: 90vw теми стало б ширшим за
   екран, тому відступ від країв тут у відсотках. Поріг 1200 px — щоб на вузьких екранах не з'явилась горизонтальна прокрутка. */
html:root { --theme-normal-container-max-width: 1440px; }
@media (min-width: 1200px) {
	html { zoom: 1.1; }
	html:root { --theme-container-edge-spacing: 92%; }
}

/* Галерея на сторінці товару під масштабом (правка клієнта 12.10: «на праву сторону заповзає наступне фото»). Слайдер теми
   рахує зсув фото скриптом у пікселях екрана, а під zoom 110% вони на 10% більші за CSS-пікселі — після перемикання фото
   ставало зі зсувом на десяту частину ширини, і збоку було видно сусіднє. Усередині галереї масштаб скасовано: її ширину
   задає колонка, тож розмір фото той самий, лише стрілки й мініатюри на 10% дрібніші. */
@media (min-width: 1200px) {
	.woocommerce-product-gallery { zoom: calc(1 / 1.1); }
}

/* Випадні списки select2 (місто й відділення Нової Пошти на оформленні) під масштабом (правка клієнта 20.10, п. 9 «баги»).
   select2 кладе список у <body> і ставить йому top/left у пікселях екрана, а zoom ще раз множить їх на 1,1 — список
   відкривався на ~80 px нижче поля, поверх «Відділення». Контейнеру списку масштаб скасовано (координати стають
   правильними), самому списку повернуто — шрифт і ширина як у полі. */
@media (min-width: 1200px) {
	body > .select2-container { zoom: calc(1 / 1.1); }
	body > .select2-container > .select2-dropdown { zoom: 1.1; }
}

/* ---------- Логотип у підвалі: чорний знак на темному тлі — інверсія ----------
   У «Додатковому CSS» теми інверсія прив'язана до старого вкладення (.wp-image-5163); тут — до самої картинки з alt="HARD". */
#footer .wp-block-image img[alt="HARD"] { filter: invert(1); }

/* ---------- Сторінка товару: ціна ---------- */
.single-product .entry-summary > .price .sale-price { display: inline-flex; align-items: baseline; gap: 18px; }
.single-product .entry-summary > .price del { margin: 0; }


/* ================= Правки клієнта 12.10 (Google-док, 18 пунктів) ================= */

/* ---------- Вікно повідомлення замість системного alert() (layout.js) ---------- */
.hb-alert { position: fixed; inset: 0; z-index: 100002; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .6); }
.hb-alert[hidden] { display: none; }
.hb-alert__box { width: 100%; max-width: 420px; padding: 30px 28px 26px; background: #fff; border-top: 3px solid var(--hb-black, #111); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); text-align: center; }
.hb-alert__box p { margin: 0 0 22px; color: var(--hb-black, #111); font: 400 16px/1.5 Onest, sans-serif; }
.hb-alert__ok { min-width: 160px; height: 46px; padding: 0 26px; border: 0; border-radius: 0; background: var(--hb-black, #111); color: #fff; font: 500 14px Oswald, sans-serif; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.hb-alert__ok:hover, .hb-alert__ok:focus-visible { background: #444; }

/* ---------- Міні-кошик у шапці: білий, текст чорний (на темному тлі теми назву товару було не прочитати) ---------- */
#header .ct-header-cart .ct-cart-content { --theme-text-color: #111; --theme-link-initial-color: #111; --theme-link-hover-color: #111; --theme-border-color: #e5e5e5; --mini-cart-background-color: #fff; background: #fff !important; color: var(--hb-black, #111); border: 1px solid #e5e5e5; box-shadow: 0 14px 40px rgba(0, 0, 0, .14); }
#header .ct-header-cart .ct-cart-content a, #header .ct-header-cart .ct-cart-content .woocommerce-mini-cart__total, #header .ct-header-cart .ct-cart-content .product-title, #header .ct-header-cart .ct-cart-content .quantity, #header .ct-header-cart .ct-cart-content .amount { color: var(--hb-black, #111) !important; }
#header .ct-header-cart .ct-cart-content .remove svg, #header .ct-header-cart .ct-cart-content .remove { color: #777 !important; fill: currentColor; }
#header .ct-header-cart .ct-cart-content .button { background: var(--hb-black, #111) !important; color: #fff !important; }
#header .ct-header-cart .ct-cart-content .button:hover { background: #444 !important; }

/* ---------- Плитки вибору категорій: назва всередині фото, темною смугою знизу — як на старому сайті ---------- */
.woocommerce ul.products li.product-category { position: relative; }
.woocommerce ul.products li.product-category figure { margin-bottom: 0 !important; }
.woocommerce ul.products li.product-category figure img { aspect-ratio: 1 / 1 !important; } /* тема ставить 3/4 у style; фото категорій квадратні (20.10) */
.woocommerce ul.products li.product-category .woocommerce-loop-category__title { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; background: rgba(17, 17, 17, .78); pointer-events: none; }
.woocommerce ul.products li.product-category .woocommerce-loop-category__title a { display: block; padding: 13px 16px; color: #fff; pointer-events: auto; }

/* ---------- «Контакти»: значок Telegram на кнопці «Написати менеджеру» ---------- */
.hb-btn.hb-btn--tg { display: inline-flex; align-items: center; gap: 9px; }
.hb-btn__icon { flex: none; }

/* ---------- Мобільне меню — як на старому сайті: біла панель, пошук, перехід у розділ зі стрілкою «назад» ---------- */
@media (max-width: 999.98px) {
	#offcanvas { background: #fff !important; }
	#offcanvas .ct-panel-actions { padding: 12px 10px 0 !important; }
	#offcanvas .ct-panel-content-inner { padding: 4px 20px 28px !important; }
	#offcanvas { --theme-text-color: #111; --theme-link-initial-color: #111; --theme-link-hover-color: #111; --theme-icon-color: #111; --theme-icon-hover-color: #111; color: #111; }
	#offcanvas .ct-toggle-close { --theme-icon-color: #111; color: #111; }
	#offcanvas .ct-toggle-close svg { fill: #111; }
	#offcanvas .ct-panel-content[data-device="mobile"] { align-items: flex-start; justify-content: flex-start; }
	#offcanvas .ct-panel-content-inner { width: 100%; align-items: stretch !important; justify-content: flex-start; text-align: left !important; padding-top: 4px; }
	#offcanvas .ct-panel-content-inner > * { margin-left: 0 !important; margin-right: 0 !important; }

	.hb-msearch { position: relative; display: block; margin: 0 0 22px; }
	.hb-msearch input[type="search"] { width: 100%; height: 46px; padding: 0 48px 0 14px; border: 1px solid #d5d5d5; border-radius: 0; background: #fff; color: #111; font: 400 15px Onest, sans-serif; -webkit-appearance: none; appearance: none; }
	.hb-msearch input[type="search"]:focus { border-color: #111; outline: 0; }
	.hb-msearch button, .hb-msearch button:hover, .hb-msearch button:focus { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none !important; color: #111 !important; box-shadow: none; cursor: pointer; }

	#offcanvas .mobile-menu { width: 100%; }
	#offcanvas .mobile-menu ul { width: 100% !important; margin: 0 !important; padding: 0 !important; list-style: none; }
	#offcanvas .mobile-menu li { margin: 0 !important; padding: 0 !important; }
	/* тема малює перед підпунктами крапки й зсуває їх ліворуч — тут підпункти стоять окремим «екраном», від краю */
	#offcanvas .mobile-menu .sub-menu .ct-menu-link::before { content: none !important; }
	#offcanvas .mobile-menu .sub-menu .ct-menu-link { padding-left: 0 !important; margin-left: 0 !important; text-indent: 0 !important; }
	#offcanvas .mobile-menu .ct-menu-link { display: block; padding: 11px 0; color: #111 !important; font: 600 16px/1.3 Oswald, sans-serif !important; letter-spacing: .06em; text-transform: uppercase; text-align: left; text-decoration: none; opacity: 1 !important; }
	#offcanvas .mobile-menu .ct-sub-menu-parent { display: flex; align-items: center; justify-content: space-between; width: 100%; cursor: pointer; }
	#offcanvas .mobile-menu .ct-sub-menu-parent .ct-menu-link { flex: 1; }
	#offcanvas .mobile-menu .ct-toggle-dropdown-mobile { flex: none; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; background: none; color: #111; opacity: 1; }
	#offcanvas .mobile-menu .ct-toggle-dropdown-mobile svg { fill: #111; transform: rotate(-90deg) !important; }
	/* Підпункти показуємо не списком під пунктом, а окремим «екраном»: відкритий пункт стає заголовком зі стрілкою «назад» */
	#offcanvas .mobile-menu .sub-menu { display: none !important; height: auto !important; opacity: 1 !important; padding: 0 !important; }
	#offcanvas .mobile-menu li.is-open > .sub-menu { display: block !important; }
	#offcanvas .mobile-menu ul.has-open > li:not(.is-open) { display: none; }
	#offcanvas .mobile-menu li.is-open > .ct-sub-menu-parent { justify-content: flex-start; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #e2e2e2; }
	#offcanvas .mobile-menu li.is-open > .ct-sub-menu-parent::before { content: ""; flex: none; width: 9px; height: 9px; margin: 0 12px 0 3px; border-left: 1.5px solid #111; border-bottom: 1.5px solid #111; transform: rotate(45deg); }
	#offcanvas .mobile-menu li.is-open > .ct-sub-menu-parent > .ct-toggle-dropdown-mobile { display: none; }
	/* розділ, у який зайшли далі («Каталог», коли відкрито «Одяг»): його заголовок ховаємо — лишається заголовок поточного */
	#offcanvas .mobile-menu li.is-open:has(> .sub-menu.has-open) > .ct-sub-menu-parent { display: none; }
	/* підкатегорії — звичайним письмом, як на старому сайті */
	#offcanvas .mobile-menu .sub-menu .sub-menu .ct-menu-link { padding: 9px 0; font: 400 16px/1.3 Onest, sans-serif !important; letter-spacing: 0; text-transform: none; }

	#offcanvas .ct-header-text, #offcanvas .ct-header-text a { color: #111 !important; }
	#offcanvas .ct-header-text .hb-red { color: #111 !important; }
	#offcanvas .ct-header-text { justify-content: flex-start; margin-top: 26px !important; padding-top: 20px; border-top: 1px solid #e2e2e2; text-align: left; }
	#offcanvas .ct-header-cta, #offcanvas .ct-header-socials { justify-content: flex-start; text-align: left; }
	#offcanvas .ct-header-cta .ct-button { background: #111 !important; color: #fff !important; }
	#offcanvas .ct-header-socials { --theme-icon-color: #111; }
	#offcanvas .ct-header-socials a, #offcanvas .ct-header-socials svg { color: #111 !important; fill: #111 !important; }
}

/* ---------- Мобільне меню під шапкою (клієнт 23.10, п. 7; логіка — layout.js) ---------- */
@media (max-width: 999.98px) {
	body[data-panel^="in"] #header { position: relative; z-index: 1000000; }
	#offcanvas[data-behaviour="modal"] { top: var(--hb-hdr-bottom, 63px) !important; height: auto !important; bottom: 0 !important; }
	#offcanvas .ct-panel-actions { display: none !important; }
	#offcanvas .ct-panel-content-inner { padding-top: 20px !important; }
}

/* ---------- Чорна шапка, білий логотип — на всіх сторінках (клієнт 23.10: п. 8 документа — головна; о 12:17 — «хедер всюди
   білий», тобто всюди) ---------- */
#header [data-row*="middle"] { background: #111 !important; }
#header [data-row*="middle"] .site-logo-container img { filter: invert(1); }
#header [data-row*="middle"] .ct-header-trigger svg rect,
#header [data-row*="middle"] :is(.ct-header-search, .ct-account-item, .ct-cart-item) svg { fill: #fff !important; }
#header [data-row*="middle"] .ct-account-item img { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); border-radius: 50%; }
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item > a.mega-menu-link { color: #fff !important; }
#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item > a.mega-menu-link .mega-indicator::after { color: #fff; }
#header [data-row*="middle"] .ct-dynamic-count-cart { background: #fff !important; color: #111 !important; }
/* Випадаючі вікна шапки — білі з чорним текстом. Кольори тексту НЕ задаються змінними на всьому рядку шапки: 12:17 клієнт
   показав меню кабінету на головній з білим текстом на білому — змінні --theme-link-* успадковувало й воно. */
#header .ct-header-account-dropdown, #header .ct-header-account-dropdown a, #header .ct-header-account-dropdown .ct-menu-link,
#header .ct-header-account-dropdown b, #header .ct-header-account-dropdown span { color: #111 !important; }
#header .ct-header-account-dropdown .ct-menu-link:hover { text-decoration: underline; }

/* Аудит 23.10: на ширині 1000–1099 px (планшет горизонтально, маленький ноутбук) меню шапки не вміщалось і «Контакти»
   переносились другим рядком — тут щільніше. */
@media (min-width: 1000px) and (max-width: 1099.98px) {
	#mega-menu-wrap-menu_1 #mega-menu-menu_1 > li.mega-menu-item > a.mega-menu-link { padding-left: 6px !important; padding-right: 6px !important; font-size: 13px !important; letter-spacing: .04em !important; }
}
/* Аудит 23.10: на телефоні кошик і кнопка меню — 17–18 px під палець; невидима зона натискання ±12 px, значки й проміжок на місці
   (від'ємні відступи з'їдали проміжок між значками). */
@media (max-width: 999.98px) {
	#header [data-device="mobile"] .ct-header-trigger,
	#header [data-device="mobile"] .ct-header-cart > .ct-cart-item { position: relative; }
	#header [data-device="mobile"] .ct-header-trigger::after,
	#header [data-device="mobile"] .ct-header-cart > .ct-cart-item::after { content: ""; position: absolute; inset: -12px; }
}

/* ================= Аудит відображення 23.10: решта сторінок (каталог, товар, кошик, сторінки-тексти, пошук) ================= */

/* Панель «Каталог» перекривала низ логотипу на 4 px (верх панелі — під пунктом меню, а логотип нижчий). Тепер панель
   починається від низу чорної шапки; невидимий місток над нею тримає наведення, поки курсор іде від пункту до панелі. */
@media (min-width: 1000px) {
	#header [data-device="desktop"] #mega-menu-menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu { top: 100% !important; }
	#header [data-device="desktop"] #mega-menu-menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 32px; }
}

/* Плитки підкатегорій на телефоні: «Зимове взуття», «Літнє взуття» лягали у два рядки, і смуга з назвою закривала пів фото. */
@media (max-width: 689.98px) {
	.woocommerce ul.products li.product-category .woocommerce-loop-category__title { font-size: 14px; letter-spacing: .04em; }
	.woocommerce ul.products li.product-category .woocommerce-loop-category__title a { padding: 10px 6px; }
}

/* Назви товарів: тема переносила артикул по дефісу — «Костюм Hard, білий 04-» / «1». Артикул загортає layout.js. */
.hb-nb { white-space: nowrap; }

/* Сторінка товару на телефоні: мініатюри по 4 в ряд (тема ставила 3 — при 4 фото четверте висіло самотнім другим рядком). */
@media (max-width: 479.98px) {
	.woocommerce-product-gallery .flexy-pills li { --thumbs-width: 25%; }
}

/* Кнопка «Переглянути кошик», що з'являється після «Додати в кошик», була блакитно-сірою (стиль теми) — тепер у стилі сайту. */
.single-product .ct-cart-actions a.added_to_cart { background: #fff !important; color: var(--hb-black, #111) !important; border: 1px solid var(--hb-black, #111) !important; }
.single-product .ct-cart-actions a.added_to_cart:hover { background: var(--hb-black, #111) !important; color: #fff !important; }

/* «Про нас», «Політика конфіденційності», «Договір оферти»: підзаголовки тексту (h2 — 40 px, h3 — 32 px) були більші за
   назву сторінки (30 px). */
body.page:not(.home) .entry-content > :is(h2, h3).wp-block-heading { margin: 44px 0 14px; line-height: 1.2; }
body.page:not(.home) .entry-content > h2.wp-block-heading { font-size: 24px; }
body.page:not(.home) .entry-content > h3.wp-block-heading { font-size: 21px; }
body.page:not(.home) .entry-content > :is(h2, h3).wp-block-heading:first-child { margin-top: 0; }
@media (max-width: 689.98px) {
	body.page:not(.home) .entry-content > :is(h2, h3).wp-block-heading { margin-top: 34px; }
	body.page:not(.home) .entry-content > h2.wp-block-heading { font-size: 21px; }
	body.page:not(.home) .entry-content > h3.wp-block-heading { font-size: 19px; }
}

/* Пошук: заголовок «Результати пошуку» стояв із відступом 47 px від лівого краю сторінки (вузький блок теми по центру). */
body.search .hero-section.is-width-constrained { max-width: none; margin-left: 0; margin-right: 0; }

/* «Купити в один клік» (рішення власника 25.10): на всю ширину одразу під «Додати в кошик», «Додати в обране» — нижче.
   Була вузькою (модуль ставить max-width: fit-content) й стояла під «Додати в обране». Контурна — щоб головною лишалась «Додати в кошик». */
.single-product .ct-cart-actions { flex-wrap: wrap; }
.single-product .ct-cart-actions .mrkv_buy-one-click__open-call { order: 5; flex: 0 0 100%; width: 100%; max-width: none; box-sizing: border-box; justify-content: center; text-align: center; margin: 0 !important; background: #fff !important; color: var(--hb-black, #111) !important; border: 1px solid var(--hb-black, #111) !important; }
.single-product .ct-cart-actions .mrkv_buy-one-click__open-call:hover { background: var(--hb-black, #111) !important; color: #fff !important; }
.single-product .ct-cart-actions .tinv-wraper { order: 6; }

/* Перемикач мови UA / RU перед кошиком у шапці (27.10, російська версія) — hb_lay_lang_switcher() */
#header .hb-lang { display: inline-flex; align-items: center; gap: 2px; margin-right: 14px; font-size: 13px; font-weight: 500; letter-spacing: .04em; line-height: 1; }
/* Білим, як іконки кошика й меню: шапка чорна (#111), а змінна кольору посилань рядка — #111 (Богдан 15:50: «не читається текст»
   — активна мова була чорною на чорному). Неактивна мова — напівпрозора. */
#header .hb-lang { color: #fff; }
#header .hb-lang__item { padding: 4px 5px; color: inherit; opacity: .55; text-decoration: none; }
#header .hb-lang__item.is-active { opacity: 1; font-weight: 700; }
#header a.hb-lang__item:hover { opacity: 1; }
#header .hb-lang__item + .hb-lang__item { border-left: 1px solid currentColor; }
@media (max-width: 999px) { #header .hb-lang { margin-right: 8px; font-size: 12px; } }
