/* YOUtoo — исправления сайта */

/* ---------- Звёзды отзывов: тема рисовала ★★★★★ для любой оценки ---------- */
.ytf-stars #tab-reviews .star-rating {
	position: relative;
	display: inline-block;
	gap: 0;
	font-size: 12px;
	line-height: 1;
	height: 1em;
	color: #d9d4ce;
	overflow: hidden;
	white-space: nowrap;
}
.ytf-stars #tab-reviews .star-rating::before {
	content: "★★★★★";
	letter-spacing: 1px;
	color: #d9d4ce;
}
.ytf-stars #tab-reviews .star-rating span {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	clip: auto;
	overflow: hidden;
	font-size: 0;
	padding-top: 0;
}
.ytf-stars #tab-reviews .star-rating span::before {
	content: "★★★★★";
	position: absolute;
	top: 0;
	left: 0;
	font-size: 12px;
	line-height: 1;
	letter-spacing: 1px;
	color: #ffa800;
}

/* ---------- Корзина: товар до ответа сервера ---------- */
.cart-item.ytf-pending { opacity: .75; }
.ytf-pending__note { font-size: 12px; color: #888; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.ytf-spinner { width: 12px; height: 12px; border: 2px solid #ddd; border-top-color: #151515; border-radius: 50%; animation: ytf-spin .8s linear infinite; }
@keyframes ytf-spin { to { transform: rotate(360deg); } }
.cart-pvz-btn.ytf-loading, .pvz-change.ytf-loading { opacity: .6; pointer-events: none; }

/* ---------- Заголовки ---------- */
.ytf-home-h1-wrap { padding-top: 28px; }
.ytf-home-h1 {
	font-size: 13px;
	line-height: 1.4;
	font-weight: 400;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #6b645e;
	text-align: center;
	margin: 0;
}
h1.cooperation-hero__title { line-height: 1.3; }
.page-content__body .ytf-lead { font-size: 15px; line-height: 1.6; }

/* ---------- Текст раздела ---------- */
.ytf-cat-text { padding: 8px 0 56px; }
.ytf-cat-text__inner { max-width: 820px; margin: 0 auto; font-size: 15px; line-height: 1.65; color: #3d3833; border-top: 1px solid #ebe7e2; padding-top: 32px; }
.ytf-cat-text__inner p + p { margin-top: 12px; }

/* ---------- Контакты ---------- */
.ytf-contacts { padding: 8px 0 48px; font-size: 16px; line-height: 1.6; }
.ytf-contacts__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.ytf-contacts__card { background: #f7f6f4; border-radius: 16px; padding: 28px; }
.ytf-contacts__card h2 { font-size: 22px; line-height: 1.25; margin: 0 0 14px; }
.ytf-contacts__big { font-size: 26px; font-weight: 700; color: #151515; text-decoration: none; }
.ytf-contacts__links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.ytf-contacts__list { margin: 12px 0 0; padding-left: 18px; }
.ytf-contacts__list li { margin: 4px 0; }
.ytf-contacts a { color: #151515; }
.ytf-muted { color: #7a736c; font-size: 14px; }
@media (max-width: 768px) {
	.ytf-contacts__grid { grid-template-columns: 1fr; }
	.ytf-contacts__card { padding: 20px; }
}

/* ---------- Возврат ---------- */
.ytf-refund { max-width: 820px; margin: 32px 0 48px; font-size: 16px; line-height: 1.65; }
.ytf-refund h2 { font-size: 22px; line-height: 1.25; margin: 28px 0 10px; }
.ytf-refund h2:first-child { margin-top: 0; }
.ytf-refund ol { padding-left: 20px; }
.ytf-refund li { margin: 6px 0; }
.ytf-refund a { color: #151515; }

/* ---------- Подписка ---------- */
.ytf-sub-trigger { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ytf-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .55); display: none; align-items: center; justify-content: center; padding: 16px; }
.ytf-modal.is-open { display: flex; }
.ytf-modal__box { position: relative; background: #fff; border-radius: 20px; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; }
.ytf-modal__body { padding: 36px 32px 28px; font-size: 15px; line-height: 1.55; color: #3d3833; }
.ytf-modal__body h3 { font-size: 28px; line-height: 1.15; margin: 4px 0 10px; color: #151515; }
.ytf-modal__kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8a817a; margin: 0; }
.ytf-modal__close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f2f0ed; font-size: 22px; line-height: 1; cursor: pointer; }
.ytf-sub-form { margin-top: 18px; display: grid; gap: 12px; }
.ytf-sub-form input[type=email] { width: 100%; height: 52px; border: 1px solid #ddd8d2; border-radius: 12px; padding: 0 16px; font-size: 16px; }
.ytf-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: #6b645e; }
.ytf-check input { margin-top: 3px; flex: none; }
.ytf-check a { color: #151515; }
.ytf-btn { height: 52px; border: 0; border-radius: 12px; background: #151515; color: #fff; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; width: 100%; }
.ytf-btn:disabled { opacity: .6; }
.ytf-sub-msg { min-height: 1em; margin: 0; font-size: 13px; color: #b8432f; }
.ytf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ytf-code { font-size: 26px; font-weight: 700; letter-spacing: .08em; text-align: center; padding: 16px; border: 2px dashed #151515; border-radius: 12px; margin: 10px 0 14px; user-select: all; }
.ytf-sub-done p { margin: 0; }

/* ---------- Cookie ---------- */
.ytf-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 990; /* ниже корзины темы (9998–9999) */ max-width: 560px; margin: 0 auto; background: #151515; color: #eee8e1; border-radius: 16px; padding: 16px 18px; display: flex; align-items: center; gap: 16px; font-size: 13px; line-height: 1.45; }
.ytf-cookie p { margin: 0; }
.ytf-cookie a { color: #fff; }
.ytf-btn--sm { height: 40px; width: auto; padding: 0 18px; background: #fff; color: #151515; flex: none; font-size: 13px; }
@media (max-width: 520px) {
	.ytf-cookie { left: 10px; right: 10px; bottom: 10px; padding: 10px 12px; gap: 10px; font-size: 12px; border-radius: 12px; }
	.ytf-cookie .ytf-btn--sm { height: 34px; padding: 0 14px; font-size: 12px; }
	.ytf-modal__body { padding: 32px 20px 22px; }
	.ytf-modal__body h3 { font-size: 24px; }
}

/* ---------- Бесплатная доставка от суммы ---------- */
.ytf-free-ship { background: #f3ecdf; border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 14px; line-height: 1.4; color: #3d3226; }
.ytf-free-ship__text b { white-space: nowrap; }
.ytf-free-ship__bar { height: 4px; background: rgba(61, 50, 38, .15); border-radius: 4px; margin: 10px 0 6px; overflow: hidden; }
.ytf-free-ship__bar i { display: block; height: 100%; width: 0; background: #151515; border-radius: 4px; transition: width .3s; }
.ytf-free-ship__hint { font-size: 12px; color: #7a6a58; }
/* тема задаёт блоку display:flex в строку — раскладываем столбиком */
.cart-free-delivery-notice.ytf-free-ship { flex-direction: column; align-items: stretch; gap: 0; }
.cart-free-delivery-notice.ytf-free-ship > div { width: 100%; }
/* «Доставка»: после снятия карточки курьера — две колонки вместо трёх */
@media (min-width: 993px) { .info-cards.ytf-cards-2 { grid-template-columns: repeat(2, 1fr); } }

/* Telegram: «Связаться с нами» (правки 21.10) */
.ytf-tg-ico { flex-shrink: 0; }
.ytf-tg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ytf-tg-btn--footer { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 18px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 6px; color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .02em; text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s; }
.ytf-tg-btn--footer:hover { background: #fff; color: #151515; }
.ytf-tg-ask { margin: 14px 0 18px; font-size: 14px; line-height: 1.5; color: #6b645e; }
.ytf-tg-inline { display: inline-flex; align-items: center; gap: 5px; color: #151515; text-decoration: underline; text-underline-offset: 3px; }
.ytf-tg-inline .ytf-tg-ico { width: 15px; height: 15px; }
.ytf-tg-cta { padding: 64px 0; text-align: center; background: #f7f6f4; }
.ytf-tg-cta__title { margin: 0 0 10px; }
.ytf-tg-cta__text { margin: 0 auto 24px; max-width: 520px; font-size: 16px; line-height: 1.5; color: #6b645e; }
.ytf-tg-pair { display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (max-width: 576px) { .ytf-tg-cta { padding: 44px 0; } .ytf-tg-pair { flex-direction: column; align-items: stretch; } }

/* Бонусы на сайте (22.10): подарки из бота скрыты, свой блок списания */
.cart-bonus-rewards-section { display: none !important; }
.ytf-pts { margin: 16px 0; padding: 14px 16px; background: #f7f6f4; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.ytf-pts__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.ytf-pts__bal { font-weight: 400; color: #6b645e; font-size: 14px; }
.ytf-pts__use { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 6px 0 4px; }
.ytf-pts__use input { width: 18px; height: 18px; accent-color: #151515; }
.ytf-pts__text { margin: 4px 0 0; color: #6b645e; }
.ytf-pts a { color: #151515; text-decoration: underline; text-underline-offset: 2px; }
.ytf-sub-reg { margin: 14px 0 0; font-size: 14px; color: #6b645e; }
.ytf-sub-reg a { color: #151515; }
.ytf-sub-done p + p { margin-top: 12px; }
.ytf-pts-account table.ytf-pts-log { width: 100%; border-collapse: collapse; margin-top: 12px; }
.ytf-pts-account .ytf-pts-log th, .ytf-pts-account .ytf-pts-log td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eee; }

/* Блок «С YOUtoo выгоднее» на главной (23.10). Тема делает абзацы секции полупрозрачными (opacity .8) — перекрываем. */
.ytf-club { text-align: left; }
.ytf-club p { opacity: 1; margin: 0; }
.ytf-club .ytf-club__head { max-width: 640px; margin-bottom: 28px; }
.ytf-club h2.ytf-club__title { margin: 0 0 12px; }
.ytf-club .ytf-club__lead { font-size: 17px; line-height: 1.5; color: #2b2622; }
.ytf-club .ytf-club__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ytf-club .ytf-club__card { background: #fff; border: 1px solid #e6e2dd; border-radius: 16px; padding: 26px 24px; }
.ytf-club .ytf-club__value { font-size: 36px; line-height: 1.1; font-weight: 700; color: #151515; white-space: nowrap; letter-spacing: -.01em; }
.ytf-club .ytf-club__name { margin-top: 8px; font-size: 17px; line-height: 1.35; font-weight: 700; color: #151515; }
.ytf-club .ytf-club__text { margin-top: 8px; font-size: 15px; line-height: 1.5; color: #2b2622; }
.ytf-club .ytf-club__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: 24px; }
.ytf-club .ytf-club__terms { font-size: 16px; line-height: 1.5; color: #2b2622; }
.ytf-club .ytf-club__terms b { color: #151515; }
.ytf-club .ytf-club__btn { flex-shrink: 0; min-width: 240px; padding: 14px 28px; margin: 0; }
@media (max-width: 860px) {
	.ytf-club .ytf-club__cards { grid-template-columns: 1fr; gap: 12px; }
	.ytf-club .ytf-club__card { padding: 20px; }
	.ytf-club .ytf-club__value { font-size: 32px; }
	.ytf-club .ytf-club__foot { flex-direction: column; align-items: stretch; }
	.ytf-club .ytf-club__btn { width: 100%; min-width: 0; }
}
.about-section__image img[src*="about-products"] { border-radius: 16px; height: auto; }

/* ===== Тестирование 23.10: ошибки вёрстки темы ===== */
/* Две колонки каталога на телефоне раздувались по длинному слову и уезжали за экран. */
@media (max-width: 768px) {
	.products-grid, .products-grid--5, .products-grid--4, .products-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.products-grid > .product-card, .product-card { min-width: 0; }
	.product-card__title { overflow-wrap: anywhere; }
}
@media (max-width: 360px) {
	.products-grid, .products-grid--5, .products-grid--4, .products-grid--3 { grid-template-columns: minmax(0, 1fr); }
}
/* «Наши бестселлеры» на 1024 px: 3 + 1 карточка — держим 4 в ряд. */
@media (min-width: 769px) and (max-width: 1024px) {
	.about-bestsellers-section .products-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
/* Карточки в ряду одной высоты, кнопка внизу. */
.products-grid .product-card { display: flex; flex-direction: column; }
.products-grid .product-card__info { flex: 1 1 auto; display: flex; flex-direction: column; }
.products-grid .product-card__info > .btn, .products-grid .product-card__info > .ytdemo-oos, .products-grid .product-card__info > button { margin-top: auto; }
.products-grid .product-card__price-row { margin-bottom: 12px; }
/* Плашка в шапке: при одном тексте анимация уводила его, 2/3 времени полоса была пустой. */
.announcement-bar__item:only-child { animation: none; opacity: 1; transform: none; }
/* Шапка на 320 px шире экрана; иконки на телефоне — удобнее для пальца. */
@media (max-width: 768px) { .header__icon { width: 36px; height: 36px; } .header__icons { gap: 2px; } }
@media (max-width: 360px) { .header__icon { width: 30px; height: 30px; } .header__icons { gap: 0; } .header__icon svg { width: 20px; height: 20px; } }
/* Мобильное меню: прокрутка в горизонтальной ориентации и затемнение под ним. */
@media (max-width: 992px) { .main-nav.active { max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; } }
.ytf-nav-overlay { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .35); z-index: 999; }
body.ytf-lock { overflow: hidden; }
/* Корзина: шапка с крестиком остаётся видна, «×» удаления — нормального размера и не липнет к названию. */
.side-cart__header { position: sticky; top: 0; z-index: 3; background: #fff; }
.cart-item-remove { min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: 6px; font-size: 20px; line-height: 1; }
/* Видео-карусель: слишком мелкие бонусы и бейджи. */
.video-carousel__product-bonus { font-size: 12px; }
.video-carousel__card .product-card__badge, .video-carousel__badge { font-size: 11px; }
/* Ошибки полей оформления: текст под полем. */
.ytf-field-err { display: block; margin-top: 4px; font-size: 12px; color: #d33; }
/* Согласие в форме опта. */
.ytf-wf-consent { margin: 4px 0 16px; font-size: 14px; }
.ytf-wf-consent .ytf-check { display: flex; gap: 8px; align-items: flex-start; }
.ytf-wf-consent input { margin-top: 3px; }
.ytf-wf-consent__err { display: block; color: #d33; font-size: 13px; margin-top: 4px; }
/* Товар без наличия: серая неактивная кнопка, как в каталоге. */
.ytf-oos .btn[disabled] { opacity: .55; cursor: not-allowed; width: 100%; }
/* На 320–360 px кружок счётчика корзины (right: -8px) выходил за экран. */
@media (max-width: 360px) { .header__icons .cart-count { right: -2px; top: -4px; } }
.ytf-oos-card[disabled] { opacity: .55; cursor: not-allowed; }
/* Названия в двух колонках на телефоне: 18 px темы не вмещали длинные слова («ВОССТАНАВЛИВАЮЩИЙ») — слово рвалось без дефиса. */
@media (max-width: 768px) {
	.products-grid .product-card__title { font-size: 14px; letter-spacing: 0; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 12 5 5; }
}

/* ---------- База клиентов (23.10): окно «−15 % за регистрацию», поля регистрации, новости ---------- */
.ytf-join-form { margin-top: 16px; display: grid; gap: 10px; }
.ytf-join-form input[type=text], .ytf-join-form input[type=tel], .ytf-join-form input[type=email] { width: 100%; height: 50px; border: 1px solid #ddd8d2; border-radius: 12px; padding: 0 16px; font-size: 16px; color: #151515; background: #fff; }
.ytf-join-form input.is-error { border-color: #b8432f; }
.ytf-join-form .ytf-check { margin-top: 2px; }
.ytf-join-form .ytf-check b { color: #151515; white-space: nowrap; }
.ytf-sub-msg a { color: #151515; }
.ytf-join-tg { margin: 18px 0 10px; }
#ytf-join .ytf-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
#ytf-join .ytf-btn--tg { background: #229ed9; color: #fff; opacity: 1; }
#ytf-join .ytf-btn--ghost { background: #f2f0ed; color: #151515; opacity: 1; margin-top: 10px; } /* тема красит .btn-ссылки серым */
.ytf-reg-extra { display: grid; gap: 4px; margin-bottom: 12px; }
.ytf-reg-extra .ytf-check { margin: 6px 0 0; }
.ytf-reg-extra .ytf-check b { white-space: nowrap; color: #151515; }
.ytf-news-toast { position: fixed; left: 16px; bottom: 16px; z-index: 980; max-width: 360px; background: #fff; color: #151515; border-radius: 14px; padding: 14px 40px 14px 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, .15); text-decoration: none; display: grid; gap: 4px; font-size: 14px; line-height: 1.4; transform: translateY(140%); transition: transform .4s ease; }
.ytf-news-toast.is-on { transform: none; }
.ytf-news-toast b { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #8a817a; }
.ytf-news-toast i { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 20px; color: #8a817a; padding: 2px 6px; }
.ytf-news__item { padding: 20px 0; border-bottom: 1px solid #eee; }
.ytf-news__item h3 { margin: 4px 0 10px; }
.ytf-news__date { margin: 0; font-size: 13px; color: #8a817a; }
.ytf-news__img { max-width: 100%; height: auto; border-radius: 12px; margin-bottom: 12px; }
@media (max-width: 520px) {
	.ytf-news-toast { left: 10px; right: 10px; max-width: none; }
	#ytf-join .ytf-modal__body { padding-top: 28px; }
}

/* «Сотрудничество»: «Связаться с нами» в Telegram под обложкой (клиент 23.10) */
.ytf-coop-tg { padding: 28px 0 0; }
.ytf-coop-tg .container { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.ytf-coop-tg__text { margin: 0; font-size: 16px; color: #3d3833; }
.ytf-coop-tg .ytf-tg-btn { padding: 0 28px; min-height: 50px; text-decoration: none; }
@media (max-width: 768px) {
	.ytf-coop-tg { padding-top: 22px; }
	.ytf-coop-tg .ytf-tg-btn { width: 100%; }
}
