/*
 * id13dev OCT Blog Plus — шаблон статті блогу.
 * Усі правила обмежені .obp-page, щоб не чіпати решту теми.
 * Колір акценту скрипт бере з кольору посилань теми (--obp-accent), висоту закріпленої шапки — з її розмірів (--obp-sticky-top).
 */
.obp-page {
	--obp-accent: #2b6cb0;
	--obp-on-accent: #fff;
	/* Свій колір тексту: деякі теми (oct_deals) дають body світло-сірий, а темний задають лише своїм класам. */
	--obp-text: #1f2328;
	--obp-muted: #6b7280;
	--obp-surface: #f4f4f1;
	--obp-border: #e4e4df;
	--obp-radius: 16px;
	--obp-gap: 16px;
	--obp-sticky-top: 0px;
	--obp-offset: calc(var(--obp-sticky-top) + var(--obp-gap));
	color: var(--obp-text);
}

.obp-page *,
.obp-page *::before,
.obp-page *::after { box-sizing: border-box; }

.obp-main { min-width: 0; }

/* Теми, що на телефоні знімають відступи контейнера (ShowCase: .mobile-no-gutters), — повертаємо їх тексту. */
@media (max-width: 767.98px) {
	.obp-page.mobile-no-gutters,
	.obp-page.obp-page--pad { padding-left: 16px !important; padding-right: 16px !important; }
	.obp-page.mobile-no-gutters nav[aria-label=breadcrumb],
	.obp-page.mobile-no-gutters .sc-page-title { padding-left: 0 !important; padding-right: 0 !important; }
}

.obp-preview-note {
	margin: 8px 0 16px;
	padding: 8px 12px;
	border: 1px solid #f0d36b;
	border-radius: 10px;
	background: #fff8db;
	color: #6b5800;
	font-size: 13px;
}

/* ---------- Сітка: зміст | текст | банер --------------------------------- */
.obp-grid { display: block; }
.obp-col--toc { display: none; }
.obp-col--aside .obp-banner-slot--aside { display: none; }
.obp-col--main { min-width: 0; }

@media (min-width: 1200px) {
	.obp-grid {
		display: grid;
		grid-template-columns: minmax(180px, 240px) minmax(0, 720px) minmax(200px, 280px);
		column-gap: 32px;
		justify-content: space-between;
		align-items: start;
	}

	.obp-article--no-toc .obp-grid { grid-template-columns: minmax(0, 760px) minmax(200px, 280px); }
	.obp-article--no-aside .obp-grid { grid-template-columns: minmax(180px, 240px) minmax(0, 760px); justify-content: start; }
	.obp-article--no-toc.obp-article--no-aside .obp-grid { grid-template-columns: minmax(0, 760px); justify-content: center; }

	.obp-col--toc { display: block; height: 100%; }
	.obp-col--aside { height: 100%; }
	.obp-col--aside .obp-banner-slot--aside { display: block; }
	.obp-banner-slot--top,
	.obp-banner-slot--bottom,
	.obp-toc-mobile { display: none !important; }

	.obp-sticky {
		position: -webkit-sticky;
		position: sticky;
		top: var(--obp-offset);
		max-height: calc(100vh - var(--obp-offset) - var(--obp-gap));
		overflow: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}
}

/* ---------- Зміст -------------------------------------------------------- */
.obp-toc { font-size: 14px; line-height: 1.45; padding-right: 4px; }
.obp-toc__title { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.obp-toc__list { list-style: none; margin: 0; padding: 0; }
.obp-toc__item { margin: 0; padding: 0; }
.obp-toc__item--h3 { padding-left: 14px; font-size: 13px; }
.obp-toc__item--h4 { padding-left: 28px; font-size: 13px; }
.obp-toc__link {
	display: block;
	padding: 6px 0 6px 12px;
	border-left: 2px solid transparent;
	color: inherit !important;
	opacity: .78;
	text-decoration: none !important;
	transition: color .15s, border-color .15s, opacity .15s;
}
.obp-toc__link:hover { opacity: 1; color: var(--obp-accent) !important; }
.obp-toc__link.is-active { opacity: 1; color: var(--obp-accent) !important; border-left-color: var(--obp-accent); font-weight: 600; }

.obp-toc-mobile {
	margin: 4px 0 16px;
	border: 1px solid var(--obp-border);
	border-radius: 12px;
	background: #fff;
}
.obp-toc-mobile__summary {
	position: relative;
	padding: 12px 44px 12px 16px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
.obp-toc-mobile__summary::-webkit-details-marker { display: none; }
.obp-toc-mobile__summary::after,
.obp-faq__q::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 18px;
	width: 9px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	transition: transform .2s;
}
.obp-toc-mobile[open] > .obp-toc-mobile__summary::after,
.obp-faq__item[open] > .obp-faq__q::after { transform: translateY(-25%) rotate(225deg); }
.obp-toc-mobile .obp-toc__list { padding: 0 12px 10px 4px; }

/* ---------- Шапка статті ------------------------------------------------- */
.obp-head { margin-bottom: 8px; }
.obp-title {
	margin: 8px 0 12px;
	font-size: clamp(26px, 3.4vw, 40px);
	line-height: 1.2;
	font-weight: 700;
	overflow-wrap: anywhere;
}
.obp-meta { margin: 12px 0 20px; font-size: 15px; }
.obp-meta__facts { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 0; }
.obp-meta__fact { min-width: 0; }
.obp-meta__fact dt,
.obp-meta__label { margin: 0 0 4px; font-size: 13px; font-weight: 400; color: var(--obp-muted); }
.obp-meta__fact dd { margin: 0; font-weight: 600; white-space: nowrap; }
.obp-icon { display: inline-block; flex: 0 0 auto; margin-right: 6px; vertical-align: -3px; color: var(--obp-accent); }
.obp-meta__label .obp-icon { margin-right: 5px; vertical-align: -3px; color: var(--obp-muted); }
.obp-meta__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 44px; margin-top: 18px; }
.obp-author__card { display: flex; align-items: center; gap: 12px; }
.obp-author__photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 56px; }
.obp-author__info { display: flex; flex-direction: column; min-width: 0; }
.obp-author__name { font-weight: 700; color: inherit !important; text-decoration: none !important; }
a.obp-author__name:hover { color: var(--obp-accent) !important; }
.obp-author__role { font-size: 14px; color: var(--obp-muted); }

.obp-share__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.obp-share__list li { margin: 0; padding: 0; }
.obp-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--obp-border);
	border-radius: 50%;
	background: #fff;
	color: inherit !important;
	cursor: pointer;
	position: relative;
	transition: color .15s, border-color .15s;
}
.obp-share__btn:hover,
.obp-share__btn:focus-visible { color: var(--obp-accent) !important; border-color: var(--obp-accent); outline: none; }
.obp-share__btn.is-copied::after {
	content: attr(data-obp-copied);
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	padding: 4px 8px;
	border-radius: 6px;
	background: #111;
	color: #fff;
	font-size: 12px;
	white-space: nowrap;
}

.obp-cover { margin: 0 0 8px; }
/* Не вища за 420px: квадратні й вертикальні фото товарів не розтягують шапку; широкі банери — на всю ширину. */
.obp-cover__img { display: block; width: auto; max-width: 100%; height: auto; max-height: 420px; margin: 0 auto; border-radius: var(--obp-radius); }

/* ---------- TL;DR -------------------------------------------------------- */
.obp-tldr {
	margin: 24px 0;
	padding: 20px 24px;
	border-radius: 18px;
	background: var(--obp-surface);
	font-size: 1.04em;
	line-height: 1.65;
}
.obp-tldr__label { margin-bottom: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--obp-muted); }
.obp-tldr__body > :last-child { margin-bottom: 0; }
.obp-tldr__body ul,
.obp-tldr__body ol { margin: .5em 0 0; padding-left: 1.25em; }

/* ---------- Текст статті -------------------------------------------------- */
.obp-body { font-size: 17px; line-height: 1.72; overflow-wrap: break-word; }
@media (max-width: 767.98px) { .obp-body { font-size: 16px; } }
.obp-body > :first-child { margin-top: 0; }
.obp-body p { margin: 0 0 1em; }
.obp-body h1,
.obp-body h2,
.obp-body h3,
.obp-body h4 { line-height: 1.3; font-weight: 700; text-align: left; }
.obp-body h1,
.obp-body h2 { margin: 1.9em 0 .6em; font-size: 1.55em; }
.obp-body h3 { margin: 1.6em 0 .5em; font-size: 1.25em; }
.obp-body h4 { margin: 1.4em 0 .4em; font-size: 1.1em; }
.obp-body h1,
.obp-body h2,
.obp-body h3,
.obp-body h4,
.obp-faq__title,
.obp-tldr { scroll-margin-top: calc(var(--obp-offset) + 8px); }
.obp-body a { color: var(--obp-accent); text-decoration: underline; text-underline-offset: .15em; }
.obp-body ul,
.obp-body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.obp-body li { margin: .35em 0; padding-left: .15em; }
.obp-body ul li::marker { color: var(--obp-accent); }
.obp-body ol li::marker { color: var(--obp-accent); font-weight: 700; }
.obp-body img { max-width: 100%; height: auto; border-radius: 12px; }
.obp-body hr { margin: 2em 0; border: 0; border-top: 1px solid var(--obp-border); }

/* Шрифти, задані в редакторі, поступаються типографіці шаблону. */
.obp-body--plain [style*="font-family"],
.obp-tldr [style*="font-family"] { font-family: inherit !important; }
.obp-body--plain [style*="font-size"],
.obp-tldr [style*="font-size"] { font-size: inherit !important; }
.obp-body--plain [style*="line-height"] { line-height: inherit !important; }

.obp-body blockquote {
	position: relative;
	margin: 1.6em 0;
	padding: 1.2em 1.4em 1.2em 1.6em;
	border-left: 4px solid var(--obp-accent);
	border-radius: 0 14px 14px 0;
	background: var(--obp-surface);
	font-style: italic;
}
.obp-body blockquote > :last-child { margin-bottom: 0; }
.obp-body blockquote cite,
.obp-body blockquote footer {
	display: block;
	margin-top: .8em;
	font-style: normal;
	font-weight: 700;
	font-size: .92em;
	text-align: right;
}
.obp-body blockquote cite::before,
.obp-body blockquote footer::before { content: "— "; }

/* Таблиця: скрол на телефоні, заголовок обовʼязковий (thead додає модуль). */
.obp-table {
	margin: 1.6em 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--obp-border);
	border-radius: 14px;
	/* Тіні біля країв, за якими ще є стовпці: видно, що таблицю можна прокрутити. */
	background:
		linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left center / 32px 100% no-repeat local,
		linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right center / 32px 100% no-repeat local,
		radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0)) left center / 12px 100% no-repeat scroll,
		radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0)) right center / 12px 100% no-repeat scroll,
		#fff;
}
.obp-table:focus-visible { outline: 2px solid var(--obp-accent); outline-offset: 2px; }
.obp-body .obp-table table {
	width: 100%;
	min-width: 0;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: collapse;
	font-size: .94em;
	line-height: 1.5;
	background: transparent;
}
.obp-body .obp-table table > :not(caption) > *,
.obp-body .obp-table tr { border: 0 !important; }
.obp-body .obp-table th,
.obp-body .obp-table td {
	padding: .75em 1em;
	border: 0 !important;
	border-top: 1px solid var(--obp-border) !important;
	text-align: left;
	vertical-align: top;
	background: transparent !important;
}
.obp-body .obp-table thead th,
.obp-body .obp-table thead td { border-top: 0 !important; background: var(--obp-surface) !important; font-weight: 700; }
.obp-body .obp-table tr > :first-child { font-weight: 600; }
/* Широкою (зі скролом) робимо лише таблицю з 3+ стовпцями — дві колонки вміщаються й на телефоні. */
.obp-body .obp-table table:has(tr > :nth-child(3)) { min-width: 520px; }
@media (max-width: 767.98px) {
	.obp-body .obp-table table { font-size: .875em; }
	.obp-body .obp-table table:has(tr > :nth-child(3)) { min-width: 480px; }
	.obp-body .obp-table th,
	.obp-body .obp-table td { padding: .6em .75em; }
}

.obp-video {
	position: relative;
	margin: 1.6em 0;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	overflow: hidden;
	background: #000;
}
.obp-video iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: 0; }

/* ---------- Товари в тексті --------------------------------------------- */
.obp-products { margin: 1.6em 0; }
/* 180px: три картки в ряд і в колонці ~640px (ноутбуки 1280–1366), а не «2 + 1». */
.obp-products--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.obp-product {
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	gap: 16px;
	align-items: center;
	padding: 16px;
	border: 1px solid var(--obp-border);
	border-radius: var(--obp-radius);
	background: #fff;
	font-size: 15px;
	line-height: 1.45;
}
.obp-products--grid .obp-product { grid-template-columns: 1fr; align-content: start; }
.obp-product__media img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 10px; }
.obp-product__info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.obp-product__name { font-weight: 700; color: inherit !important; text-decoration: none !important; }
.obp-product__name:hover { color: var(--obp-accent) !important; }
.obp-product__price { font-size: 18px; font-weight: 700; }
.obp-product__special { color: #d32f2f; }
.obp-product__old { margin-left: 4px; font-size: 14px; font-weight: 400; color: var(--obp-muted); }
.obp-product__stock { font-size: 13px; color: var(--obp-muted); }
@media (max-width: 575.98px) {
	.obp-products--grid { grid-template-columns: 1fr; gap: 12px; }
	.obp-product,
	.obp-products--grid .obp-product { grid-template-columns: 96px minmax(0, 1fr); align-items: center; padding: 12px; }
}

.obp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 20px;
	border: 1px solid var(--obp-accent);
	border-radius: 10px;
	background: var(--obp-accent);
	color: var(--obp-on-accent) !important;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: filter .15s;
}
.obp-button:hover { filter: brightness(.94); }
.obp-button--ghost { background: transparent; color: var(--obp-accent) !important; }
.obp-button[disabled] { opacity: .6; cursor: default; }

/* ---------- Банер -------------------------------------------------------- */
.obp-banner-slot { margin: 24px 0; }
.obp-col--aside .obp-banner-slot { margin: 0; }
.obp-banner {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px;
	border: 1px solid var(--obp-border);
	border-radius: 20px;
	background: var(--obp-surface);
}
.obp-banner__media { display: block; }
.obp-banner__img { display: block; width: 100%; height: auto; border-radius: 12px; }
.obp-banner__body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.obp-banner .obp-banner__title { display: block; font-size: 20px; line-height: 1.25; font-weight: 700; color: var(--obp-banner-title, inherit) !important; text-decoration: none !important; }
.obp-banner a.obp-banner__title:hover { text-decoration: underline !important; }
.obp-banner__text { font-size: 14px; line-height: 1.55; color: var(--obp-muted); }
.obp-banner__text > :last-child { margin-bottom: 0; }
.obp-banner__button {
	align-self: flex-start;
	padding: 10px 20px;
	border-radius: 999px;
	background: #111;
	color: #fff !important;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none !important;
	transition: filter .15s;
}
.obp-banner__button:hover { filter: brightness(1.15); }
/* Банер у тексті (телефон, планшет): компактна картка — картинка ліворуч, текст праворуч,
   щоб квадратна картинка не займала весь екран. Широкий банер лишається на всю ширину. */
.obp-banner-slot--top .obp-banner--compact,
.obp-banner-slot--bottom .obp-banner--compact { flex-direction: row; align-items: center; gap: 16px; padding: 14px 16px; }
.obp-banner-slot--top .obp-banner--compact > .obp-banner__media,
.obp-banner-slot--top .obp-banner--compact > .obp-banner__img,
.obp-banner-slot--bottom .obp-banner--compact > .obp-banner__media,
.obp-banner-slot--bottom .obp-banner--compact > .obp-banner__img { flex: 0 0 104px; width: 104px; }
.obp-banner-slot--top .obp-banner--compact .obp-banner__body,
.obp-banner-slot--bottom .obp-banner--compact .obp-banner__body { gap: 8px; }
.obp-banner-slot--top .obp-banner--compact .obp-banner__title,
.obp-banner-slot--bottom .obp-banner--compact .obp-banner__title { font-size: 17px; }
.obp-aside-modules { margin-top: 24px; }

/* ---------- FAQ ---------------------------------------------------------- */
.obp-faq { margin: 40px 0 24px; }
.obp-faq__title { margin: 0 0 16px; font-size: 1.55em; line-height: 1.3; font-weight: 700; }
.obp-faq__item { margin: 10px 0; border-radius: 14px; background: var(--obp-surface); }
.obp-faq__q {
	position: relative;
	padding: 16px 48px 16px 20px;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
	list-style: none;
}
.obp-faq__q::-webkit-details-marker { display: none; }
.obp-faq__q:focus-visible { outline: 2px solid var(--obp-accent); outline-offset: 2px; border-radius: 14px; }
.obp-faq__a { padding: 0 20px 16px; line-height: 1.65; }
.obp-faq__a > :last-child { margin-bottom: 0; }
.obp-faq__a a { color: var(--obp-accent); }

/* ---------- Теги, галерея, коментарі, повʼязане -------------------------- */
.obp-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0; font-size: 14px; }
.obp-tags__label { color: var(--obp-muted); }
.obp-tags__item { padding: 4px 12px; border-radius: 999px; background: var(--obp-surface); color: inherit !important; text-decoration: none !important; }
.obp-tags__item:hover { color: var(--obp-accent) !important; }

.obp-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.obp-gallery__item img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }

.obp-comments { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--obp-border); }
.obp-comments__title { margin: 0 0 16px; font-size: 1.3em; font-weight: 700; }
.obp-comments__form { display: grid; gap: 12px; max-width: 640px; margin-top: 16px; }
.obp-field { display: grid; gap: 4px; margin: 0; font-size: 14px; }
.obp-field input,
.obp-field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--obp-border); border-radius: 10px; font: inherit; }
.obp-comments__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.obp-comments__status { font-size: 14px; }
.obp-comments__status.is-error { color: #c62828; }
.obp-comments__status.is-success { color: #2e7d32; }

.obp-related { margin: 40px 0; }
.obp-related__title { margin: 0 0 16px; font-size: 1.4em; font-weight: 700; }
.obp-related__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.obp-related__card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	border: 1px solid var(--obp-border);
	border-radius: var(--obp-radius);
	background: #fff;
	color: inherit !important;
	text-decoration: none !important;
}
.obp-related__card img { width: 100%; height: auto; border-radius: 10px; }
.obp-related__name { font-weight: 700; line-height: 1.35; }
.obp-related__card:hover .obp-related__name { color: var(--obp-accent); }
.obp-related__date { font-size: 13px; color: var(--obp-muted); }

@media print {
	.obp-col--toc,
	.obp-col--aside,
	.obp-toc-mobile,
	.obp-share,
	.obp-banner-slot,
	.obp-comments { display: none !important; }
	.obp-grid { display: block !important; }
	.obp-faq__item { break-inside: avoid; }
}
