/* =========================================================
   Собственные шаблоны магазина (замена Brizy-страниц).
   Палитра сайта: фон #f5f8fc, заголовки "Red Hat Text" #355ca7,
   текст Roboto #494954.
   ========================================================= */

/* =========================================================
   Каталог (shop и категории).
   Карточки в рамке: белый фон, кольцевая рамка, скругление 12px.
   Все карточки одинаковые: изображение вписывается в область 4:3,
   заголовок обрезается до 2 строк, кнопка прижата к низу.
   ========================================================= */

.ppl-woo-archive h1.page-title,
.ppl-woo-archive .woocommerce-products-header h1 {
	font-family: "DM Serif Text", Georgia, serif;
	font-size: 46px;
	font-weight: 400;
	letter-spacing: -1.5px;
	color: #5b6067;
	text-align: center;
	margin: 0 0 25px;
}

.ppl-woo-archive ul.products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 20px;
	row-gap: 20px;
	max-width: 1128px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
	align-items: stretch;
}

/* Отключаем clearfix WC: в сетке псевдоэлементы становятся ячейками. */
.ppl-woo-archive ul.products::before,
.ppl-woo-archive ul.products::after {
	content: none !important;
	display: none !important;
}

/* Рамка карточки. Перебиваем ширину li.product из WooCommerce
   (30.75%/48%) и оформление из Gecko. */
.ppl-woo-archive ul.products li.product {
	width: auto !important;
	margin: 0;
	padding: 0 !important;
	float: none;
	background: #fff !important;
	box-shadow: 0 0 0 1px rgba(18, 38, 65, 0.09) !important;
	border-radius: 12px !important;
	overflow: hidden;
}

.ppl-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	overflow: hidden;
}

.ppl-card__image {
	display: block;
	background: #fff;
}

/* Изображение товара: фиксированные пропорции 4:3 —
   блоки картинок у всех карточек одинаковой высоты. */
.ppl-card__img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* ❗️ РЕЗЕРВНЫЙ ВАРИАНТ для очень старых Safari (поддержка aspect-ratio) */
@supports not (aspect-ratio: 4 / 3) {
	.ppl-card__image {
		position: relative;
		width: 100%;
		padding-bottom: 75%; /* 4:3 = 3/4 = 0.75 */
		background: #f5f8fc;
		overflow: hidden;
	}

	.ppl-card__img {
		position: absolute !important;
		top: 0;
		left: 0;
		width: 100% !important;
		height: 100% !important;
		object-fit: cover;
	}
}

.ppl-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 16px 10px;
	text-align: center;
}

.ppl-card__cats {
	text-align: center;
	font-size: 15px;
	color: #607cbc;
}

.ppl-card__cats a {
	font-family: "Red Hat Text", sans-serif;
	color: #607cbc;
	text-decoration: none;
	line-height: inherit;
}

.ppl-card__cats a:hover {
	color: #4a63a3;
	text-decoration: underline;
}

/* Заголовок всегда занимает ровно 2 строки — карточки одинаковые. */
.ppl-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 66px;
	font-size: 22px !important;
	font-weight: 600 !important;
	line-height: 33px !important;
	color: #355ca7 !important;
	word-break: break-word; /* ❗️ для Safari */
}

.ppl-card__title a {
	color: inherit;
	text-decoration: none;
	line-height: inherit;
}

.ppl-card__title a:hover {
	color: #2a4a86;
}

.ppl-card__price {
	margin: 10px 0 14px;
	font-family: Lato, "Roboto", sans-serif !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 27px;
	color: #061726 !important;
}

/* Кнопка прижата к низу карточки. */
.ppl-card__button {
	align-self: center;
	margin-top: auto;
	padding: 14px 42px;
	background: #30b46e;
	color: #fff;
	font-size: 15px;
	font-weight: 500;
	line-height: 24px;
	border-radius: 100px;
	text-decoration: none;
	text-align: center;
	transition: background 0.2s ease;
	display: inline-block; /* ❗️ для Safari */
}
.bm-lc-button-products{
	margin-top:10px;
	padding: 20px;
	border-radius:8px
}

.ppl-card__button:hover {
	background: #27a05f;
	color: #fff;
	text-decoration: none;
}

.ppl-card__button--nostock {
	background: #9aa3b2;
}

.ppl-card__button--nostock:hover {
	background: #9aa3b2;
}

/* ---------- Корзина-счётчик ---------- */

.ppl-cartbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 10px;
}

.ppl-cartbar__inner {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 15px;
	color: #405376;
	font-size: 15px;
	line-height: 24px;
	text-decoration: none;
}

.ppl-cartbar__icon {
	color: #355ca7;
}

.ppl-cartbar__total {
	font-weight: 500;
}

/* ---------- Блок товара ---------- */

.ppl-product__box {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	align-items: center;
}

.ppl-product__gallery,
.ppl-product__summary {
	padding: 5px 15px;
}

.ppl-product__gallery .woocommerce-product-gallery {
	width: 100% !important;
	float: none;
	margin: 0;
}

/* Изображение в фиксированной области 4:3 — у всех товаров один размер,
   страница не растягивается изображениями разной пропорции. */
.ppl-product__gallery .woocommerce-product-gallery__wrapper {
	width: 100%;
	margin: 0;
}

.ppl-product__gallery .woocommerce-product-gallery__image {
	width: 100%;
	margin: 0;
}

/* ❗️ ИСПРАВЛЕНИЕ: основной контейнер для изображения с aspect-ratio */
.ppl-product__gallery .woocommerce-product-gallery__image a {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f5f8fc; /* фон на случай пустого места */
}

/* ❗️ РЕЗЕРВНЫЙ ВАРИАНТ для очень старых Safari (поддержка aspect-ratio) */
@supports not (aspect-ratio: 4 / 3) {
	.ppl-product__gallery .woocommerce-product-gallery__image a {
		position: relative;
		padding-bottom: 75%; /* 4:3 = 3/4 = 0.75 */
		height: 0;
	}

	.ppl-product__gallery .woocommerce-product-gallery__image img {
		position: absolute !important;
		top: 0;
		left: 0;
		width: 100% !important;
		height: 100% !important;
		object-fit: cover;
	}
}

.ppl-product__gallery .woocommerce-product-gallery__image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

.ppl-product__gallery .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
	padding: 0;
	list-style: none;
}

.ppl-product__gallery .flex-control-thumbs li {
	list-style: none;
	margin: 0;
	width: 60px;
	flex-shrink: 0;
}

.ppl-product__gallery .flex-control-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	opacity: 0.8;
	transition: opacity 0.2s;
}

.ppl-product__gallery .flex-control-thumbs img.flex-active {
	opacity: 1;
	box-shadow: 0 0 0 2px #355ca7;
}

.ppl-product__summary {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100% !important;
	font-size: 150%;
}

.ppl-product__summary .product_title {
	margin: 0 0 20px;
	font-family: "DM Serif Text", Georgia, serif;
	font-size: 36px;
	font-weight: 400;
	line-height: 50.4px;
	letter-spacing: -1px;
	color: #000;
	word-break: break-word; /* ❗️ для Safari */
}

.ppl-product__summary .price {
	margin: 0 0 20px;
	font-family: Lato, "Roboto", sans-serif;
	font-size: 20px;
	font-weight: 900;
	color: #405376;
}

/* Количество скрыто (товары продаются по 1 шт.). */
.ppl-product__summary form.cart .quantity {
	display: none;
}

.ppl-product__summary form.cart {
	margin: 0;
}

.ppl-product__summary form.cart button.single_add_to_cart_button {
	display: inline-block;
	border: none;
	padding: 10px 20px;
	background: #11c149;
	color: #fff;
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 24px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease;
	-webkit-appearance: none; /* ❗️ для Safari — убирает стандартный стиль */
	appearance: none;
}

.ppl-product__summary form.cart button.single_add_to_cart_button:hover {
	background: #0eaa40;
	color: #fff;
}

/* ---------- Аккордеон: Описание / Отзывы / Правила оформления ---------- */

.ppl-acc {
	margin-top: 25px;
	background: #fff;
}

.ppl-acc__item {
	border-bottom: 1px solid #eef1f6;
}

.ppl-acc__item:last-child {
	border-bottom: none;
}

.ppl-acc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 10px;
	font-family: Lato, "Roboto", sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #355ca7;
	cursor: pointer;
	list-style: none; /* убираем маркер details в Safari */
}

.ppl-acc__head::-webkit-details-marker {
	display: none;
}

.ppl-acc__head::after {
	content: "";
	width: 10px;
	height: 10px;
	border-right: 2px solid #355ca7;
	border-bottom: 2px solid #355ca7;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
	margin-right: 4px;
}

.ppl-acc__item[open] .ppl-acc__head::after {
	transform: rotate(-135deg);
}

.ppl-acc__head:hover {
	color: #2a4a86;
}

.ppl-acc__body {
	padding: 0 10px 20px;
}

/* Секции в прокручиваемом блоке фиксированной высоты (350px). */
.ppl-acc__body--scroll {
	/*max-height: 350px;
	overflow-y: auto;*/
	border: 1px solid #e3e8f0;
	border-radius: 8px;
	padding: 12px 16px;
	background: #fbfcfe;
	-webkit-overflow-scrolling: touch; /* ❗️ для плавного скролла на iOS */
}

/* ---------- Контент описания ---------- */

.ppl-product-content h2 {
	margin: 30px 0;
	font-family: "DM Serif Text", Georgia, serif;
	font-size: 36px;
	font-weight: 400;
	line-height: 50.4px;
	color: #607cbc;
}

.ppl-product-content h3 {
	margin: 23px 0;
	font-family: Lato, "Roboto", sans-serif;
	font-size: 23px;
	font-weight: 700;
	line-height: 29.9px;
	color: #607cbc;
}

.ppl-product-content h3:first-child {
	margin-top: 0;
}

.ppl-product-content p {
	margin: 16px 0;
	font-family: "Red Hat Text", sans-serif;
	font-size: 16px;
	line-height: 30.4px;
	color: #000;
}

.ppl-product-content ul.tire {
	margin: 16px 0;
	padding-left: 20px;
	list-style: none;
}

.ppl-product-content ul.tire li {
	font-family: "Red Hat Text", sans-serif;
	font-size: 16px;
	line-height: 30.4px;
	color: #000;
}

.ppl-product-content strong {
	font-weight: 700;
}

.ppl-product-content a {
	color: #3366ff;
	text-decoration: none;
}

.ppl-product-content a:hover {
	text-decoration: underline;
}

/* ---------- Отзывы ---------- */

.ppl-reviews {
	font-family: "Red Hat Text", sans-serif;
	color: #000;
}

.ppl-reviews .woocommerce-noreviews {
	margin: 16px 0;
	font-size: 16px;
}

/* Заголовок «N отзывов». */
.ppl-reviews .woocommerce-Reviews-title {
	margin: 16px 0;
	font-family: Lato, "Roboto", sans-serif;
	font-size: 23px;
	font-weight: 700;
	line-height: 29.9px;
	color: #607cbc;
}

.ppl-reviews .comment-reply-title {
	font-family: Lato, "Roboto", sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #607cbc;
}

.ppl-reviews .commentlist {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Без нумерации: у li отзывов нет класса comment, поэтому цепляемся за
   .commentlist li; номера задаёт правило ol li в стилях темы. */
.ppl-reviews .commentlist li {
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 0 24px;
	padding: 0 0 24px;
	border-bottom: 1px solid #eef1f6;
}

.ppl-reviews .commentlist li:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.ppl-reviews .comment_container {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.ppl-reviews .comment_container .avatar {
	padding: 0 !important;
	width: 40px !important;
	height: 40px !important;
	background: none !important;
	border: none !important;
	object-fit: cover;
	border-radius: 50%;
	flex-shrink: 0;
}

.ppl-reviews .comment-text {
	flex: 1;
	padding: 5px 5px 0 !important;
}

.ppl-reviews .woocommerce-review__author {
	font-weight: 600;
	color: #2f3a52;
}

.ppl-reviews .woocommerce-review__dash,
.ppl-reviews time.woocommerce-review__published-date {
	color: #9aa3b2;
	font-size: 13px;
}

.ppl-reviews #review_form_wrapper {
	margin-top: 24px;
}

.ppl-reviews .comment-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ppl-reviews .comment-form p {
	margin: 0;
}

.ppl-reviews .comment-form label {
	display: block;
	margin-bottom: 4px;
	font-weight: 500;
	color: #2f3a52;
}

.ppl-reviews .comment-form input[type="text"],
.ppl-reviews .comment-form input[type="email"],
.ppl-reviews .comment-form textarea,
.ppl-reviews .comment-form select {
	width: 100%;
	max-width: 500px;
	padding: 10px 12px;
	border: 1px solid #dbe1ea;
	border-radius: 8px;
	background: #fff;
	-webkit-appearance: none; /* ❗️ для Safari */
	appearance: none;
}

.ppl-reviews .comment-form textarea {
	height: 120px;
}

.ppl-reviews .form-submit .submit {
	background: #355ca7;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 24px;
	font-size: 15px;
	cursor: pointer;
	transition: background 0.2s ease;
	-webkit-appearance: none; /* ❗️ для Safari */
	appearance: none;
}

.ppl-reviews .form-submit .submit:hover {
	background: #2a4a86;
}

/* ---------- Виджет ВКонтакте внизу страницы ---------- */

.ppl-product-vk {
	margin-top: 32px;
}

/* ---------- Нижний блок: кнопка «Заказать» + оферта ---------- */

.ppl-bottom-cta {
	margin-top: 32px;
	text-align: center;
}

.ppl-bottom-cta .ppl-add-to-cart {
	display: inline-block;
	border: none;
	padding: 14px 42px;
	background: #11c149;
	color: #fff;
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 24px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease;
	-webkit-appearance: none; /* ❗️ для Safari */
	appearance: none;
}

.ppl-bottom-cta .ppl-add-to-cart:hover {
	background: #0eaa40;
}

.ppl-bottom-cta__note {
	margin: 16px 0 0;
}

.ppl-bottom-cta__note-link {
	border: none;
	background: none;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	color: #000;
	cursor: pointer;
	-webkit-appearance: none; /* ❗️ для Safari */
	appearance: none;
}

.ppl-bottom-cta__note-link:hover,
.ppl-bottom-cta__note-link:focus {
	background: none;
	color: inherit;
}

/* ---------- Блок «нет в наличии» (кнопка + попап) ---------- */

.ppl-nostock {
	margin: 0 0 20px;
}

/* Кнопка «нет в наличии» — как «Заказать» (зелёная), открывает попап. */
.ppl-nostock__open {
	display: inline-block;
	border: none;
	padding: 10px 20px;
	background: #11c149;
	color: #fff;
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 24px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease;
	-webkit-appearance: none; /* ❗️ для Safari */
	appearance: none;
}

.ppl-nostock__open:hover {
	background: #0eaa40;
}

.ppl-nostock-modal__text {
	margin-bottom: 16px;
	font-size: 16px;
}

.ppl-nostock-modal__link {
	display: inline-block;
	background: #11c149;
	color: #fff;
	border-radius: 8px;
	padding: 10px 20px;
	text-decoration: none;
	font-size: 15px;
	transition: background 0.2s ease;
}

.ppl-nostock-modal__link:hover {
	background: #0eaa40;
	color: #fff;
	text-decoration: none;
}

/* ---------- Адаптивность ---------- */

@media (max-width: 1024px) {
	.ppl-woo-archive ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	/* Каталог: одна колонка, отступы как на Brizy-странице. */
	.ppl-woo-archive h1.page-title,
	.ppl-woo-archive .woocommerce-products-header h1 {
		font-size: 36px !important;
		margin: 0 0 65px;
	}

	.ppl-woo-archive ul.products {
		grid-template-columns: 1fr;
		column-gap: 0;
		row-gap: 20px;
		padding: 0 16px;
	}

	.ppl-card__title {
		min-height: 42px;
		font-size: 16px !important;
		line-height: 21px !important;
	}

	.ppl-card__price {
		font-size: 16px !important;
	}

	.ppl-card__button {
		padding: 11px 26px;
		font-size: 14px;
	}

	/* Страница товара. */
	.ppl-product__box {
		grid-template-columns: 1fr;
	}

	.ppl-product__gallery,
	.ppl-product__summary {
		padding: 0;
	}

	.ppl-product__summary {
		padding-top: 15px;
	}

	.ppl-product__summary .product_title {
		font-size: 26px;
		line-height: 36.4px;
	}

	.ppl-product__summary form.cart button.single_add_to_cart_button {
		font-size: 13px;
	}

	.ppl-cartbar {
		justify-content: stretch;
	}

	.ppl-cartbar__inner {
		width: 100%;
		justify-content: flex-start;
	}

	.ppl-product-content h2 {
		font-size: 30px;
		line-height: 42px;
	}
}

/* ❗️ ДОПОЛНИТЕЛЬНЫЙ FIX для Safari на iOS: предотвращаем увеличение при касании */
input,
select,
textarea,
button {
	font-size: 16px !important; /* iOS не увеличивает поля, если размер шрифта >= 16px */
}

/* ❗️ FIX для Safari: поддержка gap в flexbox на старых версиях */
@supports not (gap: 10px) {
	.ppl-cartbar__inner {
		margin-left: -3px;
		margin-right: -3px;
	}
	.ppl-cartbar__inner > * {
		margin-left: 3px;
		margin-right: 3px;
	}
}