/*
Theme Name: Best Promokod Child
Theme URI: https://best-promokod.ru
Description: Child theme for PremiumPress Coupon CP10.
Author: Best Promokod
Template: CP10
Version: 1.0.0
Text Domain: best-promokod-child
*/

/*
Здесь будут безопасные CSS-правки для сайта.
Родительскую тему CP10 не редактируем.
*/

/*
 * Таблицы в контенте (рамки, отступы, шапка, мобильная прокрутка).
 * Карточка магазина /shops/...: текст описания идёт из single-content-data-description.php
 * в обёртку .ppt-single-desc > … > .overflow-hidden — без <main id="main">, поэтому правила
 * только для #main / body.post-type-* на эту таблицу не действовали.
 *
 * Страница терма магазина (пример: /shops/dominopizza-ru/): HTML из ответа сервера —
 * блок с секциями внутри .card.card-mobile-transparent.text-dark > .card-body > section > table
 * (без #main и без .ppt-single-desc), поэтому добавлен этот префикс.
 */
#main table,
.ppt-single-desc table,
.card.card-mobile-transparent.text-dark .card-body table,
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	max-width: 100%;
	margin: 1em 0;
	border: 1px solid #ccc;
	font-size: 0.95rem;
	line-height: 1.45;
}

#main th,
#main td,
.ppt-single-desc table th,
.ppt-single-desc table td,
.card.card-mobile-transparent.text-dark .card-body table th,
.card.card-mobile-transparent.text-dark .card-body table td,
.wp-block-table th,
.wp-block-table td {
	border: 1px solid #ccc;
	padding: 0.65em 0.75em;
	vertical-align: top;
}

#main thead th,
.ppt-single-desc table thead th,
.card.card-mobile-transparent.text-dark .card-body table thead th,
.wp-block-table thead th {
	background-color: #f5f5f5;
	font-weight: 700;
}

/* Первая строка как шапка, если нет thead */
#main table:not(:has(thead)) tbody tr:first-child th,
#main table:not(:has(thead)) tbody tr:first-child td,
.ppt-single-desc table:not(:has(thead)) tbody tr:first-child th,
.ppt-single-desc table:not(:has(thead)) tbody tr:first-child td,
.card.card-mobile-transparent.text-dark .card-body table:not(:has(thead)) tbody tr:first-child th,
.card.card-mobile-transparent.text-dark .card-body table:not(:has(thead)) tbody tr:first-child td,
.wp-block-table table:not(:has(thead)) tbody tr:first-child th,
.wp-block-table table:not(:has(thead)) tbody tr:first-child td {
	background-color: #f5f5f5;
	font-weight: 700;
}

#main table tbody tr:nth-child(even),
.ppt-single-desc table tbody tr:nth-child(even),
.card.card-mobile-transparent.text-dark .card-body table tbody tr:nth-child(even),
.wp-block-table tbody tr:nth-child(even) {
	background-color: #fafafa;
}

/*
 * Только #ajax-search-output: скрипт темы задаёт фиксированную высоту (например 800px) — сбрасываем,
 * чтобы блок по высоте совпадал с карточками. Селекторы с .col-lg-* перебивают правила родителя на широкой сетке.
 */
#ppt-search-main-wrap .col-md-12.col-lg-9 #ajax-search-output,
#ppt-search-main-wrap .col-md-12.col-lg-8 #ajax-search-output,
#ppt-search-main-wrap #ajax-search-output,
#ajax-search-output {
	display: flow-root;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
}

/*
 * /shops/… на мобильных: скрываем блок поиска и «Фильтры» (filterboxWrap-mobile).
 * Шаблон search-filters1 остаётся в разметке — так не ломается инициализация фонов карточек.
 */
@media (max-width: 991px) {
	body.tax-store #ppt-search-main-wrap .filterboxWrap-mobile {
		display: none !important;
	}

	body.tax-store #ppt-search-main-wrap > div > .row > .col-md-12:has(> #currentFilters:empty) {
		display: none !important;
		margin: 0 !important;
		padding: 0 !important;
		min-height: 0 !important;
	}
}

/*
 * Полоса под выдачей (#ajax-navbar-showhide): у внутреннего .d-flex в шаблоне стоят my-4 и pt-3 —
 * в сумме дают десятки пикселей пустоты перед SEO. Перебиваем только этот прямой потомок.
 */
#ajax-navbar-showhide > .d-flex {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0.5rem !important;
	padding-bottom: 0.5rem !important;
}

/*
 * Списки в контенте: в теме часто ul/ol без маркеров (list-style: none; padding: 0).
 * Те же области, что у таблиц: #main, .ppt-single-desc, карточка терма store, блоки Gutenberg.
 * <ol> — нумерация; <ul> — кружки (disc).
 */
#main ul,
#main ol,
.ppt-single-desc ul,
.ppt-single-desc ol,
.card.card-mobile-transparent.text-dark .card-body ul,
.card.card-mobile-transparent.text-dark .card-body ol,
ul.wp-block-list,
ol.wp-block-list {
	list-style-position: outside;
	margin: 1em 0;
	padding-left: 1.5em;
}

#main ul,
.ppt-single-desc ul,
.card.card-mobile-transparent.text-dark .card-body ul,
ul.wp-block-list {
	list-style-type: disc;
}

#main ol,
.ppt-single-desc ol,
.card.card-mobile-transparent.text-dark .card-body ol,
ol.wp-block-list {
	list-style-type: decimal;
}

#main li,
.ppt-single-desc li,
.card.card-mobile-transparent.text-dark .card-body li,
.wp-block-list li {
	display: list-item;
	margin: 0.35em 0;
}

@media (max-width: 781px) {
	#main .container {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Родитель .overflow-hidden иначе обрезает широкую таблицу без прокрутки */
	.ppt-single-desc .overflow-hidden {
		overflow-x: auto;
		overflow-y: visible;
		-webkit-overflow-scrolling: touch;
	}

	/*
	 * Карточка SEO перед блоком автора (.bp-seo-card--before-author-mobile): без overflow-x на .card-body,
	 * иначе появляется серая полоска (артефакт полосы прокрутки / контейнера).
	 */
	.card.card-mobile-transparent.text-dark:not(.bp-seo-card--before-author-mobile) .card-body {
		overflow-x: auto;
		overflow-y: visible;
		-webkit-overflow-scrolling: touch;
	}

	/*
	 * SEO-карточка перед автором: прокрутка вбок только у таблиц (не на всём .card-body — без серой полоски).
	 */
	.bp-seo-card--before-author-mobile .card-body section:has(table) {
		overflow-x: auto;
		overflow-y: visible;
		-webkit-overflow-scrolling: touch;
		max-width: 100%;
	}

	.bp-seo-card--before-author-mobile .card-body section:has(table) table {
		width: max-content;
		max-width: none !important;
		min-width: 100%;
	}

	.bp-seo-card--before-author-mobile .card-body > table {
		display: block;
		width: max-content;
		min-width: 100%;
		max-width: 100%;
		overflow-x: auto;
		overflow-y: visible;
		-webkit-overflow-scrolling: touch;
	}

	#main table,
	.ppt-single-desc table,
	.card.card-mobile-transparent.text-dark .card-body table,
	.wp-block-table table {
		font-size: 0.875rem;
	}

	#main th,
	#main td,
	.ppt-single-desc table th,
	.ppt-single-desc table td,
	.card.card-mobile-transparent.text-dark .card-body table th,
	.card.card-mobile-transparent.text-dark .card-body table td,
	.wp-block-table th,
	.wp-block-table td {
		padding: 0.5em 0.55em;
	}

	figure.wp-block-table {
		overflow-x: auto;
		max-width: 100%;
		-webkit-overflow-scrolling: touch;
	}
}

/*
 * Блок автора (/shops/…): шапка как у виджетов сайдбара (_title + bg-primary + text-light), тело в стиле ppt-box.
 * Высота шапка и отступы по бокам — как у «Популярные магазины» (≈50px по box model).
 */
.bp-author-card > ._title.bg-primary.text-light,
.bp-product-categories > ._title.bg-primary.text-light {
	box-sizing: border-box;
	min-height: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	padding: 0 15px;
	margin: 0;
}

.bp-author-card__inner {
	padding: 0.85rem 1rem;
	background: #fff;
}

.bp-author-card__author {
	display: grid;
	grid-template-columns: 56px 1fr;
	grid-template-rows: auto auto;
	column-gap: 0.75rem;
	row-gap: 0.15rem;
	align-items: start;
}

.bp-author-card__img {
	grid-row: 1 / span 2;
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
}

.bp-author-card__img--placeholder {
	background: #eee;
	min-height: 56px;
}

.bp-author-card__name {
	grid-column: 2;
	grid-row: 1;
	line-height: 1.25;
}

.bp-author-card__jobTitle {
	grid-column: 2;
	grid-row: 2;
	line-height: 1.3;
}

.bp-author-card__footer {
	padding-top: 0.65rem;
	margin-top: 0.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.bp-author-card__link {
	color: rgb(126, 198, 32);
	text-decoration: none;
	font-size: 0.95rem;
}

.bp-author-card__link:hover {
	color: rgb(106, 175, 24);
	text-decoration: underline;
}

/*
 * Блок «Категории товаров» (/shops/…): та же шапка и тело, что у карточки автора; список со строками-ссылками.
 */
.bp-product-categories__inner {
	padding: 0;
	background: #fff;
}

.bp-product-categories__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bp-product-categories__item {
	margin: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.bp-product-categories__item:last-child {
	border-bottom: 0;
}

.bp-product-categories__link {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.65rem 1rem;
	color: #212529;
	text-decoration: none;
	font-size: 0.95rem;
	line-height: 1.35;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.bp-product-categories__link:hover {
	background-color: rgba(126, 198, 50, 0.06);
	color: #111;
	text-decoration: none;
}

.bp-product-categories__ic {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
}

.bp-product-categories__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.bp-product-categories__label {
	flex: 1 1 auto;
	min-width: 0;
}

/* Слот под SEO-текстом (только мобильный вывод из search-taxonomy-bot.php) */
.bp-author-card-slot {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin-top: 0;
	padding-top: 0;
	border: 0;
	background: transparent;
}

/*
 * Серая полоска между SEO-карточкой и блоком автора — это нижняя граница Bootstrap .card
 * (1px solid rgba(0,0,0,.125)). Класс bp-seo-card--before-author-mobile ставится в шаблоне только
 * когда сразу под карточкой выводится блок автора.
 */
.mt-4.card.card-mobile-transparent.text-dark.bp-seo-card--before-author-mobile {
	border-bottom: 0 !important;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	margin-bottom: 0 !important;
	box-shadow: none !important;
}

.mt-4.card.card-mobile-transparent.text-dark.bp-seo-card--before-author-mobile .card-body {
	border-bottom: 0 !important;
}

.mt-4.card.card-mobile-transparent.text-dark.bp-seo-card--before-author-mobile .card-body > *:last-child {
	border-bottom: 0 !important;
	box-shadow: none !important;
	margin-bottom: 0 !important;
}

.mt-4.card.card-mobile-transparent.text-dark.bp-seo-card--before-author-mobile + .bp-author-card-slot {
	margin-top: -2px;
	position: relative;
	z-index: 1;
}

.mt-4.card.card-mobile-transparent.text-dark.bp-seo-card--before-author-mobile + .bp-author-card-slot .bp-author-card,
.mt-4.card.card-mobile-transparent.text-dark.bp-seo-card--before-author-mobile + .bp-author-card-slot div[ppt-box].bp-author-card {
	margin-top: 0 !important;
	border-top: 0 !important;
	box-shadow: none !important;
}

/* 
 * Отключение preloader overlay для улучшения LCP
 * #wrapper скрыт inline стилем style="display:none;" в header.php
 * Этот CSS делает wrapper видимым сразу и скрывает preloader
 */
#wrapper {
	display: block !important;
}

#page-loading {
	display: none !important;
}

/*
 * Карточка купона: .bp-coupon-card-safe.bp-list-coupon-card (дочерняя тема, без правки родителя).
 */
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] {
	box-sizing: border-box;
	max-width: 100%;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
	overflow: hidden;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._content {
	box-sizing: border-box;
	padding: 22px 24px !important;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer {
	box-sizing: border-box;
	min-height: 0;
	display: flex;
	align-items: center;
	padding: 10px 24px !important;
	background: #fafafb !important;
	border-top: 1px solid #e5e7eb;
	font-size: 13px;
	line-height: 1.35;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer.bp-list-coupon-card__footer {
	background: #fbfbfc !important;
	border-top-color: #eef0f3;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .bp-coupon-card-safe__footer-expiry,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .bp-coupon-card-safe__footer-expiry-text {
	color: #374151;
	font-weight: 500;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .bp-coupon-card-safe__footer-expiry-text {
	font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .text-danger {
	color: #b84a4a !important;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .text-danger .fa {
	opacity: 0.92;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badges {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	justify-content: flex-end !important;
	flex-wrap: wrap;
	gap: 14px;
	width: 100%;
	font-size: 14px;
	line-height: 1.25;
	margin-bottom: 10px !important;
}

/* Дочерние бейджи не на всю ширину колонки — иначе «Проверено» и «Использовали» уходят друг под друга. */
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badges > .bp-list-coupon-card__badge,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badges > .d-flex.bp-list-coupon-card__badge {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none;
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badges [ppt-icon-16] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 0;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badges [ppt-icon-16] svg {
	display: block;
}

/* Разделитель в разметке темы: скрываем обёртку с точкой, чтобы бейджи шли в одну линию. */
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badges > div:has(> .dot-sm) {
	display: none !important;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badges .dot-sm {
	display: none !important;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badge--uses,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badge--uses .ml-2 {
	color: #374151 !important;
	font-weight: 500;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badge--uses [ppt-icon-16] svg,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badge--uses svg {
	color: #6b7280;
	fill: currentColor;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__button {
	width: 100%;
	display: flex;
	justify-content: center;
}

@media (min-width: 992px) {
	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badges {
		flex-wrap: nowrap;
		white-space: nowrap;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] ._right.y-middle {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		align-self: center;
	}
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-coupon-card-safe__footer-right {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.65rem;
	margin-left: auto;
	padding-right: 6px;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-coupon-card-safe__footer-expiry {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 13px;
	line-height: 1.35;
	white-space: nowrap;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-coupon-card-safe__footer-expiry-icon {
	color: inherit;
	font-size: 0.95em;
	opacity: 0.9;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-coupon-card-safe__footer-expiry-text {
	color: inherit;
	font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* «Применили … назад» — Open Sans только у текста; .fa не трогаем (версия FA в теме). */
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .bp-coupon-card-safe__footer-used-text {
	font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .d-lg-flex.justify-content-between {
	align-items: center;
	gap: 1rem;
}

/* Заголовок и описание купона не переопределяем — остаются стили родительской темы. */

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .verified.text-success,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .verified.text-success .ml-2 {
	color: #7ec620 !important;
	font-weight: 500;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__logo.store-icon-small {
	width: 80px !important;
	min-width: 80px !important;
	height: 56px !important;
	flex: 0 0 auto;
	border-radius: 10px;
	border: 1px solid rgba(15, 23, 42, 0.06);
	background-color: #f9fafb;
	box-sizing: border-box;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__logo.store-icon-small [ppt-border1],
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__logo.store-icon-small .position-relative {
	display: flex;
	align-items: center;
	justify-content: center;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__logo.store-icon-small .bg-image {
	width: 72px !important;
	height: 48px !important;
	max-width: 72px;
	max-height: 48px;
	margin: auto;
	background-size: contain !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__logo.store-icon-small img {
	max-width: 72px;
	max-height: 48px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	margin: auto;
}

/* Правая колонка: ширина в inline-стиле темы; блок мета+кнопка по центру по вертикали рядом с левым контентом */
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] ._right .w-100.text-center {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 0;
}

/*
 * Кнопка [CBUTTON]: одна визуальная плитка, .pealbit — вся область, .codebit — скрыт до логики темы.
 * Если после клика «показать код» код не виден — во 2-м этапе подстроить селектор под класс «раскрыто» темы.
 */
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] a.btn-ppt-coupon {
	box-sizing: border-box;
	position: relative;
	width: 100%;
	max-width: 100%;
	height: 48px;
	min-height: 48px;
	padding: 0 !important;
	display: inline-flex;
	align-items: stretch;
	justify-content: center;
	overflow: hidden;
	border-radius: 8px !important;
	background-color: #7ec620 !important;
	border: 1px solid #7ec620 !important;
	color: #ffffff !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0.01em;
	transition: filter 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

/*
 * «Получить скидку» (без промокода): отдельный класс без btn-ppt-coupon / coupon-btn / data-ppt-btn —
 * иначе JS PremiumPress открывает лишние вкладки (/out/undefined/link/, ?__sid=undefined).
 */
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] a.bp-coupon-no-code-offer-btn {
	box-sizing: border-box;
	position: relative;
	width: 100%;
	max-width: 100%;
	height: 48px;
	min-height: 48px;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 8px !important;
	background-color: #7ec620 !important;
	border: 1px solid #7ec620 !important;
	color: #ffffff !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] a.bp-coupon-no-code-offer-btn:hover {
	filter: brightness(0.94);
	box-shadow: none !important;
	color: #ffffff !important;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] a.bp-coupon-no-code-offer-btn .pealbit {
	display: flex !important;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	height: 100%;
	min-height: 48px;
	margin: 0 !important;
	padding: 0 12px !important;
	box-sizing: border-box;
	border-radius: 8px;
	background: #7ec620 !important;
	color: #ffffff !important;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: none !important;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon:hover,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] a.btn-ppt-coupon:hover {
	filter: brightness(0.94);
	box-shadow: none !important;
	color: #ffffff !important;
}

/* Иконка в кнопке (лупа: div.icon-svg.text-primary и др.) — только в этой карточке; текст по центру на всю ширину. */
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .pealbit > i:first-child,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .pealbit > svg:first-child,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .pealbit [ppt-icon-16]:first-child,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .pealbit .mr-2:first-child,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .pealbit .fa-search,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .pealbit [class*="fa-search"],
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .icon-svg,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon div.icon-svg.text-primary,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .pealbit .icon-svg {
	display: none !important;
	width: 0 !important;
	min-width: 0 !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
	flex: 0 0 0 !important;
	pointer-events: none !important;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .pealbit {
	position: relative;
	z-index: 3;
	display: flex !important;
	align-items: center;
	justify-content: center;
	text-align: center;
	flex: 1 1 100%;
	width: 100% !important;
	height: 100% !important;
	min-height: 48px;
	margin: 0 !important;
	padding: 0 12px !important;
	box-sizing: border-box;
	transform: none !important;
	clip-path: none !important;
	border-radius: 8px;
	background: #7ec620 !important;
	color: #ffffff !important;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: none !important;
	transition: inherit;
}

.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .codebit {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	margin: 0;
	padding: 0 12px;
	background: #7ec620;
	color: #ffffff;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	border-radius: 8px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/*
 * Mobile (≤767px): одна карточка .bp-list-coupon-card, без дубликата .show-mobile.
 * Desktop (≥768px) не затрагивается.
 */
@media (max-width: 767px) {
	.show-mobile.bp-list-coupon-card__legacy-mobile {
		display: none !important;
	}

	.bp-coupon-card-safe.bp-list-coupon-card.hide-mobile[ppt-box] {
		display: block !important;
		visibility: visible !important;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] {
		border-radius: 12px;
		box-shadow: none;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._content {
		padding: 14px 16px !important;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer {
		padding: 10px 16px !important;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__desc {
		display: none !important;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .d-lg-flex.justify-content-between {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] ._left .d-flex.align-items-center {
		align-items: flex-start;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__title {
		flex: 1 1 auto;
		min-width: 0;
		line-height: 1.3;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__logo.store-icon-small {
		width: 60px !important;
		min-width: 60px !important;
		height: 38px !important;
		margin-right: 10px !important;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__logo.store-icon-small .bg-image {
		width: 55px !important;
		height: 34px !important;
		max-width: 55px;
		max-height: 34px;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__logo.store-icon-small img {
		max-width: 55px;
		max-height: 34px;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] ._right.y-middle {
		min-width: 0 !important;
		max-width: 100% !important;
		width: 100%;
		margin-top: 10px;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] ._right .w-100.text-center {
		align-items: stretch;
		text-align: left;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__badges {
		justify-content: flex-start !important;
		flex-wrap: wrap;
		gap: 10px 14px;
		margin-bottom: 12px !important;
		white-space: normal;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .bp-list-coupon-card__button {
		width: 100%;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] a.btn-ppt-coupon,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] a.bp-coupon-no-code-offer-btn {
		width: 100%;
		max-width: 100%;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] .btn-ppt-coupon .pealbit,
.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] a.bp-coupon-no-code-offer-btn .pealbit {
		white-space: normal;
		text-overflow: clip;
		overflow: visible;
		font-size: 15px;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .hide-ipad {
		display: inline !important;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .d-md-flex.w-100.justify-content-between {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 6px;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .bp-coupon-card-safe__footer-right {
		margin-left: 0 !important;
		align-self: flex-start;
		justify-content: flex-start !important;
		width: 100%;
		padding-right: 0 !important;
		text-align: left;
	}

	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .bp-coupon-card-safe__footer-expiry {
		justify-content: flex-start;
		align-self: flex-start;
		width: 100%;
		text-align: left;
		/* ml-2 + mr-1 у .fa-fire минус gap строки срока — текст «Действует до…» вровень с «Применили…» */
		padding-left: calc(0.5rem + 0.25rem - 0.35rem);
	}
}
/* Mobile coupon card footer: bigger gap between "Применили" and "Действует до" */
@media (max-width: 767px) {
	.bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer .bp-coupon-card-safe__footer-right {
		margin-top: 8px !important;
	}
}

/* Мобильное боковое меню - изменение цвета фона */
#sidebar-wrapper {
	background: #111827 !important;
}

/* ====================================================
   БЛОК "АКЦИИ И ПРОМОКОДЫ ПОХОЖИХ МАГАЗИНОВ"
   ==================================================== */
.related-store-coupons-section {
    margin-top: 3rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid #e5e7eb !important;
}

.related-store-coupons-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

/* Отладка для администраторов */
.related-store-coupons-section:empty {
    display: none;
}

/* Главная страница без Elementor */
.homepage-container {
    background-color: #fff;
}

.homepage-hero {
    padding: 2rem 0;
    text-align: center;
}

.homepage-hero h1 {
    color: #1a1a1a;
    font-weight: 700;
}

.homepage-hero .lead {
    color: #666;
}

/* ====================================================
   ТЕХНИЧЕСКИЕ СТРАНИЦЫ (bp_technical_page)
   ==================================================== */
.bp-tech-page {
    background-color: #f8f9fa;
    min-height: 70vh;
    padding: 2rem 0 4rem;
}

.bp-tech-page .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.bp-tech-page__inner {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Хлебные крошки */
.bp-tech-page__breadcrumbs {
    margin-bottom: 1.5rem;
}

.bp-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #6b7280;
}

.bp-breadcrumbs a {
    color: #7ec620;
    text-decoration: none;
    transition: color 0.2s;
}

.bp-breadcrumbs a:hover {
    color: #6aaf18;
    text-decoration: underline;
}

.bp-breadcrumbs span {
    color: #374151;
}

.bp-breadcrumbs span:last-child {
    font-weight: 500;
}

/* Заголовок */
.bp-tech-page__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

/* Контент */
.bp-tech-page__content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Картинка */
.bp-tech-page__image {
    flex: 0 0 280px;
    max-width: 280px;
}

.bp-tech-page__image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Текст */
.bp-tech-page__body {
    flex: 1 1 0;
    min-width: 300px;
}

.bp-tech-page__body p {
    margin-bottom: 1.25rem;
    line-height: 1.6;
    color: #374151;
}

.bp-tech-page__body h2,
.bp-tech-page__body h3,
.bp-tech-page__body h4 {
    margin: 1.5rem 0 1rem 0;
    color: #1f2937;
    font-weight: 600;
}

.bp-tech-page__body h2 {
    font-size: 1.75rem;
}

.bp-tech-page__body h3 {
    font-size: 1.5rem;
}

.bp-tech-page__body h4 {
    font-size: 1.25rem;
}

.bp-tech-page__body ul,
.bp-tech-page__body ol {
    margin: 1rem 0 1.5rem 1.5rem;
    padding: 0;
}

.bp-tech-page__body li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.bp-tech-page__body a {
    color: #7ec620;
    text-decoration: none;
}

.bp-tech-page__body a:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 991px) {
    .bp-tech-page__inner {
        padding: 24px 28px;
    }
    
    .bp-tech-page__title {
        font-size: 1.875rem;
    }
    
    .bp-tech-page__content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .bp-tech-page__image {
        flex: 0 0 auto;
        max-width: 100%;
        order: -1;
    }
    
    .bp-tech-page__image img {
        max-width: 100%;
        border-radius: 12px;
    }
}

@media (max-width: 767px) {
    .bp-tech-page {
        padding: 1.5rem 0 3rem;
    }
    
    .bp-tech-page__inner {
        padding: 20px 24px;
        border-radius: 16px;
    }
    
    .bp-tech-page__title {
        font-size: 1.625rem;
        margin-bottom: 1.25rem;
    }
    
    .bp-breadcrumbs {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .bp-tech-page__inner {
        padding: 16px 20px;
    }
    
    .bp-tech-page__title {
        font-size: 1.5rem;
    }
}

.homepage-hero .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    padding: 0.75rem 2rem;
    font-weight: 600;
}

.homepage-stores .store-card {
    transition: transform 0.2s ease;
}

.homepage-stores .store-card:hover {
    transform: translateY(-5px);
}

.homepage-stores .store-image img {
    background-color: #f8f9fa;
    padding: 5px;
}

.homepage-stores .store-name {
    font-weight: 600;
    color: #333;
}

.homepage-categories .category-card {
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

.homepage-categories .category-card:hover {
    background-color: #e9ecef;
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.homepage-categories .category-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.homepage-coupons .bp-list-coupon-card-safe {
    margin-bottom: 1rem;
}

.homepage-seo .seo-content {
    color: #555;
    line-height: 1.6;
}

.homepage-seo h2 {
    color: #1a1a1a;
    font-weight: 600;
}

/* ============================================
   Главная страница - Homepage Styles
============================================ */

.homepage-container {
    background-color: #fff;
}

/* Hero Section */
.homepage-hero {
    padding: 2rem 0;
    text-align: center;
}

.homepage-hero-banner img {
    max-height: 300px;
    width: 100%;
    object-fit: cover;
}

.homepage-hero h1 {
    color: #333;
    font-weight: 700;
    line-height: 1.2;
}

.homepage-hero .lead {
    color: #666;
    font-size: 1.25rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Statistics Section */
.homepage-stats {
    padding: 2rem 0;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: 2rem 0;
}

.homepage-stats .stat-number {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.homepage-stats .stat-label {
    color: #666;
    font-weight: 500;
}

/* Popular Stores Section */
.homepage-stores {
    padding: 2rem 0;
}

.homepage-stores .store-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
}

.homepage-stores .store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
}

.homepage-stores .store-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 8px;
    padding: 0.5rem;
    border: 1px solid #eee;
}

.homepage-stores .store-name {
    color: #333;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 0.5rem;
}

/* Categories Section - стили удалены, используем стандартные из /categories/ */

/* Coupons Section */
.homepage-coupons {
    padding: 2rem 0;
}

.homepage-coupons .card {
    transition: transform 0.2s ease;
}

.homepage-coupons .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* SEO Text Section */
.homepage-seo {
    padding: 2rem 0;
}

.homepage-seo .seo-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.homepage-seo .seo-content h2,
.homepage-seo .seo-content h3,
.homepage-seo .seo-content h4 {
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.homepage-seo .seo-content p {
    margin-bottom: 1rem;
}

.homepage-seo .seo-content ul,
.homepage-seo .seo-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.homepage-seo .seo-content a {
    color: #007bff;
    text-decoration: none;
}

.homepage-seo .seo-content a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .homepage-hero h1 {
        font-size: 2rem;
    }
    
    .homepage-hero .lead {
        font-size: 1.1rem;
    }
    
    .homepage-stats .stat-number {
        font-size: 2.5rem;
    }
    
    .homepage-stores .store-card {
        padding: 0.5rem;
    }
    
    .homepage-stores .store-image img {
        height: 60px;
    }
    
    .homepage-categories .category-card {
        padding: 1rem;
    }
}

/* Placeholder для карточек магазинов на главной */
.bp-home-store-card__placeholder {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: 8px;
    font-size: 32px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    border: 1px solid #ddd;
}

/* ============================================
   Блок "Свежие акции и промокоды" на главной
============================================ */

/* Основной контейнер блока */
.bp-home-section.bp-home-latest-coupons {
    padding: 2rem 0;
}

/* Контейнер для списка карточек - только внешняя обёртка */
.bp-home-latest-coupons__list {
    width: 100%;
    max-width: 100%;
}

/* Убираем любые grid/flex влияния от родительских контейнеров главной страницы */
.bp-home-latest-coupons__list .row {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Карточка купона должна занимать всю ширину, но внутренняя структура не меняется */
.bp-home-latest-coupons__list .col-12 {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 1.5rem !important;
}

/* Внутренняя карточка - не трогаем её структуру */
.bp-home-latest-coupons__list .col-12 > .bp-coupon-card-safe.bp-list-coupon-card,
.bp-home-latest-coupons__list .col-12 > div[ppt-box].bp-coupon-card-safe {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
}

/* Гарантируем, что footer карточки виден на мобильных */
@media (max-width: 767px) {
    .bp-home-section.bp-home-latest-coupons .bp-coupon-card-safe.bp-list-coupon-card[ppt-box] > ._footer {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .bp-home-section.bp-home-latest-coupons .bp-coupon-card-safe__footer-expiry {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .bp-home-section.bp-home-latest-coupons .bp-coupon-card-safe__footer-expiry-text {
        display: inline !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Отключаем любые CSS правила главной, которые могут скрывать дату */
.bp-home-section.bp-home-latest-coupons .bp-coupon-card-safe__footer-expiry,
.bp-home-section.bp-home-latest-coupons .bp-coupon-card-safe__footer-expiry-text,
.bp-home-section.bp-home-latest-coupons .bp-list-coupon-card__footer {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ============================================
   MODERN HERO BLOCK STYLES - UPDATED
============================================ */

.bp-home-hero {
    background-image: var(--bp-hero-desktop);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    min-height: 460px;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.bp-home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 20, 40, 0.3);
    z-index: 1;
}

.bp-home-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.bp-home-hero__content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
    /* Полупрозрачная подложка под текст */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(2px);
    border-radius: 20px;
    padding: 28px 36px;
}

.bp-home-hero__title {
    font-size: 3rem; /* ~48px */
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bp-home-hero__text {
    font-size: 1.125rem; /* ~18px */
    line-height: 1.5;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.bp-home-hero__button {
    display: inline-block;
    padding: 14px 34px;
    font-size: 1rem; /* 16px */
    font-weight: 600;
    background-color: #007bff;
    border-color: #007bff;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
}

.bp-home-hero__button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 123, 255, 0.35);
    color: #fff;
}

/* Mobile styles */
@media (max-width: 767px) {
    .bp-home-hero {
        background-image: var(--bp-hero-mobile);
        min-height: 620px;
        border-radius: 18px;
        margin-bottom: 2rem;
        align-items: flex-start;
        padding-top: 34px;
    }
    
    .bp-home-hero__inner {
        padding: 0 22px;
        display: flex;
        align-items: center;
        min-height: 620px;
    }
    
    .bp-home-hero__content {
        max-width: 100%;
        padding: 24px 28px;
        margin-top: 0;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(3px);
        border-radius: 16px;
    }
    
    .bp-home-hero__title {
        font-size: 2.125rem; /* ~34px */
        line-height: 1.12;
        margin-bottom: 1rem;
    }
    
    .bp-home-hero__text {
        font-size: 1rem; /* 16px */
        line-height: 1.45;
        margin-bottom: 1.75rem;
        padding: 0;
    }
    
    .bp-home-hero__button {
        width: 100%;
        max-width: 280px;
        padding: 14px 20px;
        font-size: 1rem;
        margin-top: 0.5rem;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 991px) {
    .bp-home-hero {
        min-height: 440px;
    }
    
    .bp-home-hero__title {
        font-size: 2.75rem; /* ~44px */
    }
    
    .bp-home-hero__text {
        font-size: 1.125rem;
    }
    
    .bp-home-hero__content {
        padding: 24px 32px;
    }
}

/* Desktop overlay adjustment for stronger overlay on mobile */
@media (max-width: 767px) {
    .bp-home-hero::before {
        background-color: rgba(15, 20, 40, 0.4);
    }
}

/* Ensure hero doesn't break container layout */
.homepage-container .container {
    position: relative;
    z-index: 2;
}

/* Fallback for empty background */
.bp-home-hero:not([style*="--bp-hero-desktop: url"]) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bp-home-hero:not([style*="--bp-hero-desktop: url"])::before {
    background-color: rgba(15, 20, 40, 0.25);
}

/* ============================================
   DESKTOP ENHANCEMENTS (≥992px)
============================================ */

@media (min-width: 992px) {
    /* Hero button enhancements */
    .bp-home-hero__button {
        font-size: 17px !important;
        padding: 14px 34px !important;
        min-width: 180px !important;
        border-radius: 10px !important;
        font-weight: 700 !important;
    }
    
    /* Statistics numbers enhancements */
    .homepage-stats .stat-number {
        font-size: 30px !important;
        font-weight: 800 !important;
        line-height: 1.1 !important;
    }
    
    /* Statistics labels enhancements */
    .homepage-stats .stat-label {
        font-size: 18px !important;
        line-height: 1.3 !important;
    }
}

/* ============================================
   Юридический текст в подвале
============================================ */

.bp-footer-disclaimer {
    font-size: 13px;
    line-height: 1.5;
    color: #8a8f98;
    margin-top: 16px;
    max-width: 900px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   БЛОК "ВСЕ КАТЕГОРИИ" НА ГЛАВНОЙ
============================================ */

.bp-home-category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.bp-home-category-icon {
    width: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-home-category-title {
    margin-top: 14px;
    position: static;
    z-index: auto;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Убираем старые стили, которые могли накладывать текст на картинку */
.homepage-categories-section .cat-icon {
    position: relative;
    z-index: 1;
}

.homepage-categories-section .icon-text {
    position: static !important;
    transform: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Убираем старые обертки текста */
.homepage-categories-section .text-center.mb-4 {
    display: none;
}

/* Картинки категорий на главной */
.homepage-categories-section .cat-icon {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.homepage-categories-section .cat-icon .bg-image {
  display: block;
  width: 130px;
  height: 130px;
  min-width: 130px;
  min-height: 130px;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

/* Убираем underline у ссылок */
.homepage-categories-section a {
  text-decoration: none !important;
}

.homepage-categories-section a:hover {
  text-decoration: none !important;
}

/* Иконки */
.homepage-categories-section .cat-icon .bg-image {
  width: 120px;
  height: 120px;
  min-width: 120px;
  min-height: 120px;
}

/* Названия */
.homepage-categories-section .bp-home-category-title {
  margin-top: 10px !important;
  max-width: 150px;
  text-align: center;
}

/* Центрирование иконок */
.homepage-categories-section .bp-home-category-link {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  text-align: center !important;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.homepage-categories-section .bp-home-category-link:hover {
  transform: translateY(-3px);
  filter: brightness(0.95);
}

.homepage-categories-section .bp-home-category-icon,
.homepage-categories-section .cat-icon {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 120px !important;
  height: 120px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.homepage-categories-section .cat-icon .bg-image {
  margin: 0 auto !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
  position: static !important;
}

.homepage-categories-section .bp-home-category-title {
  width: 100% !important;
  text-align: center !important;
}

/* Сбрасываем Bootstrap col-классы */
.homepage-categories-section .row > [class*="col-"] {
  float: none !important;
  flex: none !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Desktop: 7 колонок в ряд */
@media (min-width: 992px) {
  .homepage-categories-section .row {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(120px, 1fr)) !important;
    gap: 44px 28px !important;
    justify-items: center !important;
  }
}

/* Tablet: 4 колонки в ряд */
@media (min-width: 768px) and (max-width: 991px) {
  .homepage-categories-section .row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(120px, 1fr)) !important;
    gap: 36px 24px !important;
    justify-items: center !important;
  }
}

/* Mobile: 2 колонки в ряд */
@media (max-width: 767px) {
  .homepage-categories-section .row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
    gap: 34px 20px !important;
    justify-items: center !important;
  }
}

/* ============================================
   FIX LOGO CLS - Add dimensions to prevent layout shift
============================================ */

/* Fix for logo container to prevent CLS */
.navbar-brand-dark,
.navbar-brand-light {
    display: inline-block;
    min-width: 300px;
    min-height: 57px;
    width: 300px;
    height: 57px;
}

/* Ensure logo images have proper dimensions */
.navbar-brand-dark img,
.navbar-brand-light img {
    width: 300px !important;
    height: 57px !important;
    max-width: 300px !important;
    max-height: 57px !important;
    display: block;
}

/* ============================================
   FIX HUGE BLUE ICONS CLS - Stores and Categories icons
   Prevents visual jump of shopping bag and tag icons in mobile header
============================================ */

/* Target the icon containers for Stores and Categories links */
header a[href*="/stores/"] [data-ppt-icon2],
header a[href*="/categories/"] [data-ppt-icon2],
nav a[href*="/stores/"] [data-ppt-icon2],
nav a[href*="/categories/"] [data-ppt-icon2],
.hide-mobile a[href*="/stores/"] [data-ppt-icon2],
.hide-mobile a[href*="/categories/"] [data-ppt-icon2] {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}

/* Target the SVG icons inside - контурный вид */
header a[href*="/stores/"] [data-ppt-icon2] svg,
header a[href*="/categories/"] [data-ppt-icon2] svg,
nav a[href*="/stores/"] [data-ppt-icon2] svg,
nav a[href*="/categories/"] [data-ppt-icon2] svg,
.hide-mobile a[href*="/stores/"] [data-ppt-icon2] svg,
.hide-mobile a[href*="/categories/"] [data-ppt-icon2] svg,
header a[href*="/stores/"] svg.h-6.w-6,
header a[href*="/categories/"] svg.h-6.w-6,
nav a[href*="/stores/"] svg.h-6.w-6,
nav a[href*="/categories/"] svg.h-6.w-6,
.hide-mobile a[href*="/stores/"] svg.h-6.w-6,
.hide-mobile a[href*="/categories/"] svg.h-6.w-6,
header a[href*="/stores/"] svg,
header a[href*="/categories/"] svg,
nav a[href*="/stores/"] svg,
nav a[href*="/categories/"] svg,
.hide-mobile a[href*="/stores/"] svg,
.hide-mobile a[href*="/categories/"] svg {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  color: #111 !important;
  stroke: currentColor !important;
  fill: none !important;
}

/* Ensure path elements are also contour */
header a[href*="/stores/"] svg path,
header a[href*="/categories/"] svg path,
nav a[href*="/stores/"] svg path,
nav a[href*="/categories/"] svg path,
.hide-mobile a[href*="/stores/"] svg path,
.hide-mobile a[href*="/categories/"] svg path,
header a[href*="/stores/"] [data-ppt-icon2] svg path,
header a[href*="/categories/"] [data-ppt-icon2] svg path,
nav a[href*="/stores/"] [data-ppt-icon2] svg path,
nav a[href*="/categories/"] [data-ppt-icon2] svg path,
.hide-mobile a[href*="/stores/"] [data-ppt-icon2] svg path,
.hide-mobile a[href*="/categories/"] [data-ppt-icon2] svg path {
  fill: none !important;
  stroke: currentColor !important;
}

/* Ensure the links have proper dimensions to prevent CLS */
header a[href*="/stores/"],
header a[href*="/categories/"],
nav a[href*="/stores/"],
nav a[href*="/categories/"],
.hide-mobile a[href*="/stores/"],
.hide-mobile a[href*="/categories/"] {
  min-width: 64px;
  min-height: 48px;
  display: inline-block;
}

/* Additional fix for the specific widget container */
.hide-mobile .hide-ipad .ppt-flex-between.style3 a[href*="/stores/"],
.hide-mobile .hide-ipad .ppt-flex-between.style3 a[href*="/categories/"] {
  min-width: 64px;
  min-height: 48px;
}

/* ============================================
   MOBILE HEADER FIXES - Hide notification bell and fix breadcrumbs
============================================ */

/* Hide notification bell icon on mobile/tablet */
header .icon-notify,
header .show-mobile.icon-notify,
header .show-ipad.icon-notify {
  display: none !important;
}



/* ============================================
   END OF FILE
============================================ */

/* ============================================
   FIX BREADCRUMBS - Final fix for ">" symbol
   Prevents ">" from breaking to new line
============================================ */

#ppt-search-breadcrumbs nav[ppt-nav].crumbs ul {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#ppt-search-breadcrumbs nav[ppt-nav].crumbs li {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

#ppt-search-breadcrumbs nav[ppt-nav].crumbs li::after,
#ppt-search-breadcrumbs nav[ppt-nav].crumbs li::before {
  content: "" !important;
  display: none !important;
}

#ppt-search-breadcrumbs nav[ppt-nav].crumbs li:not(:last-child) a::after {
  content: ">" !important;
  display: inline-block !important;
  margin: 0 8px !important;
  color: #333 !important;
}

#ppt-search-breadcrumbs nav[ppt-nav].crumbs a {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

@media (max-width: 767px) {
  #ppt-search-breadcrumbs {
    overflow-x: auto !important;
  }

  #ppt-search-breadcrumbs nav[ppt-nav].crumbs ul {
    flex-wrap: nowrap !important;
  }
}

/* ============================================
   FONTS OPTIMIZATION - font-display: swap
   ============================================ */

/* FontAwesome override: показывать fallback до загрузки */
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-display: swap;
  src: local('Font Awesome 5 Free');
}
@font-face {
  font-family: 'Font Awesome 5 Brands';
  font-display: swap;
  src: local('Font Awesome 5 Brands');
}
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-display: swap;
  src: local('Font Awesome 6 Free');
}
@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-display: swap;
  src: local('Font Awesome 6 Brands');
}
@font-face {
  font-family: 'Open Sans';
  font-display: swap;
  src: local('Open Sans'), local('OpenSans'), local('OpenSans-Regular');
}

/* ============================================
   IMPROVED LOGO CLS FIX - aspect-ratio
   ============================================ */

/* Заменяем фиксированные width/height на aspect-ratio для адаптивности */
.navbar-brand-dark,
.navbar-brand-light {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: 300px;
  max-height: 57px;
  aspect-ratio: 300 / 57;
}

.navbar-brand-dark img,
.navbar-brand-light img {
  width: 100%;
  height: auto;
  max-width: 300px;
  display: block;
  aspect-ratio: 300 / 57;
}

/* Mobile: уменьшаем логотип, сохраняя пропорции */
@media (max-width: 575px) {
  .navbar-brand-dark,
  .navbar-brand-light {
    max-width: 220px;
  }
  .navbar-brand-dark img,
  .navbar-brand-light img {
    max-width: 220px;
  }
}

/* ============================================
   COUPON CARD LOGO - prevent CLS
   ============================================ */

/* Фиксируем соотношение сторон до загрузки bg-image */
.bp-list-coupon-card__logo.store-icon-small {
  aspect-ratio: 80 / 56;
}

@media (max-width: 767px) {
  .bp-list-coupon-card__logo.store-icon-small {
    aspect-ratio: 60 / 38;
  }
}
