/* Блог: оформлення тексту статті блогу OCTemplates (кольори — змінні теми oct_deals) */

/* Посилання в тексті статті — видно, що це посилання */
.ds-blog-post-text a:not(.button):not(.btn) {
	color: var(--ds-links-color, var(--ds-primary-color, #00a8e8));
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: rgba(0, 168, 232, .45);
	transition: color .15s, text-decoration-color .15s;
}

.ds-blog-post-text a:not(.button):not(.btn):hover {
	color: var(--ds-primary-dark-color, var(--ds-primary-color, #0090c8));
	text-decoration-color: currentColor;
}

/* Заголовки розділів: відступ під липку шапку при переході зі змісту */
.ds-blog-post-text h2[id],
.ds-blog-post-text h3[id] {
	scroll-margin-top: 110px;
}

.ds-blog-post-text h2 {
	margin: 2rem 0 .85rem;
}

.ds-blog-post-text h3 {
	margin: 1.5rem 0 .6rem;
}

/* Автор · оновлено · час читання */
.msb-byline {
	margin: 0 0 1rem;
	font-size: 14px;
	color: var(--ds-secondary-text-color, #667085);
}

.msb-byline strong {
	color: var(--ds-dark-text-color, #1d2939);
	font-weight: 600;
}

/* «Коротко» — головні висновки */
.msb-summary {
	margin: 1.25rem 0;
	padding: 16px 22px 10px;
	background: #fffbea;
	border: 1px solid #f5e6a8;
	border-radius: 12px;
}

.msb-summary > p {
	margin: 0 0 8px;
	font-size: 1.1em;
	color: var(--ds-dark-text-color, #1d2939);
}

.msb-summary ul {
	margin: 0;
	padding-left: 1.2em;
}

.msb-summary li {
	margin: 0 0 6px;
}

/* Зміст */
.msb-toc {
	margin: 1.25rem 0 1.75rem;
	padding: 18px 22px;
	background: var(--ds-light-bg-color, #f4f7fb);
	border: 1px solid var(--ds-border-color, #e3e8ef);
	border-left: 4px solid var(--ds-primary-color, #00a8e8);
	border-radius: 12px;
}

.msb-toc > p {
	margin: 0 0 10px;
	font-size: 1.1em;
	color: var(--ds-dark-text-color, #1d2939);
}

.msb-toc ol {
	margin: 0;
	padding-left: 1.5em;
	column-count: 2;
	column-gap: 40px;
}

.msb-toc li {
	margin: 0 0 6px;
	padding-left: 2px;
	break-inside: avoid;
}

.msb-toc li::marker {
	color: var(--ds-primary-color, #00a8e8);
	font-weight: 600;
}

.ds-blog-post-text .msb-toc a:not(.button):not(.btn) {
	color: var(--ds-dark-text-color, #1d2939);
	text-decoration: none;
}

.ds-blog-post-text .msb-toc a:not(.button):not(.btn):hover {
	color: var(--ds-primary-color, #00a8e8);
	text-decoration: underline;
}

/* Картинки */
.msb-figure {
	margin: 1.5rem 0;
	text-align: center;
}

.msb-figure img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

/*
 * Фото товару (квадратне, на білому тлі) — не на всю ширину, а не вище за 360 px.
 * Стокові й згенеровані фото лежать у image/catalog/blog/ і лишаються на всю ширину;
 * у статтях до 1.13 у фото товару немає класу — їх видно за адресою поза catalog/blog/.
 */
.msb-figure-product img,
.msb-figure img:not([src*="catalog/blog/"]) {
	width: auto;
	max-height: min(360px, 50vh);
	object-fit: contain;
}

.msb-figure figcaption {
	margin-top: 8px;
	font-size: 13px;
	color: var(--ds-secondary-text-color, #667085);
}

.ds-blog-post-text .msb-figure figcaption a:not(.button):not(.btn) {
	color: inherit;
}

/* Таблиці */
.msb-table {
	margin: 1.25rem 0 1.5rem;
	border-radius: 12px;
	border: 1px solid var(--ds-border-color, #e3e8ef);
}

.msb-table table {
	margin: 0;
	min-width: 520px;
	font-size: 15px;
}

.msb-table th {
	background: var(--ds-light-bg-color, #f4f7fb);
	font-weight: 600;
	white-space: nowrap;
}

.msb-table th,
.msb-table td {
	padding: 10px 14px;
	vertical-align: top;
}

/* Цитата / порада */
.ds-blog-post-text blockquote {
	margin: 1.25rem 0;
	padding: 14px 18px;
	background: var(--ds-light-bg-color, #f4f7fb);
	border-left: 4px solid var(--ds-primary-color, #00a8e8);
	border-radius: 0 12px 12px 0;
}

/* Рецепт */
.msb-recipe {
	margin: 0 0 1.75rem;
	padding: 18px 22px;
	border: 1px solid var(--ds-border-color, #e3e8ef);
	border-radius: 12px;
}

.msb-recipe-meta {
	margin: 0 0 6px;
	color: var(--ds-secondary-text-color, #667085);
	font-size: 14px;
}

.msb-recipe h3 {
	margin: 1rem 0 .5rem;
	font-size: 1.1em;
}

.msb-recipe ol li,
.msb-recipe ul li {
	margin-bottom: 6px;
}

/* Часті запитання — розгортаючі пункти (<details>) */
.msb-faq {
	margin: .5rem 0 1.5rem;
	border: 1px solid var(--ds-border-color, #e3e8ef);
	border-radius: 12px;
	overflow: hidden;
}

.msb-faq-item + .msb-faq-item {
	border-top: 1px solid var(--ds-border-color, #e3e8ef);
}

.msb-faq-item summary {
	position: relative;
	display: block;
	padding: 16px 52px 16px 20px;
	font-weight: 600;
	color: var(--ds-dark-text-color, #1d2939);
	cursor: pointer;
	list-style: none;
	transition: background .15s;
}

.msb-faq-item summary::-webkit-details-marker {
	display: none;
}

.msb-faq-item summary:hover {
	background: var(--ds-light-bg-color, #f4f7fb);
}

/* Плюс, що стає мінусом */
.msb-faq-item summary::before,
.msb-faq-item summary::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 22px;
	width: 14px;
	height: 2px;
	margin-top: -1px;
	background: var(--ds-primary-color, #00a8e8);
	border-radius: 2px;
	transition: transform .2s;
}

.msb-faq-item summary::after {
	transform: rotate(90deg);
}

.msb-faq-item[open] summary::after {
	transform: rotate(0deg);
}

.msb-faq-item[open] summary {
	background: var(--ds-light-bg-color, #f4f7fb);
}

.msb-faq-answer {
	padding: 12px 20px 16px;
}

.msb-faq-answer p {
	margin: 0;
}

/* Старі статті без розгортання (до 1.4) */
.msb-faq > h3 {
	margin: 1.1rem 20px .4rem;
	font-size: 1.08em;
}

.msb-faq > p {
	margin: 0 20px .9rem;
}

/* Джерела новини */
.msb-sources {
	font-size: 14px;
	color: var(--ds-secondary-text-color, #667085);
}

@media (max-width: 767px) {
	.msb-toc {
		padding: 14px 16px;
	}

	.msb-toc ol {
		column-count: 1;
	}

	.msb-recipe {
		padding: 14px 16px;
	}
}

/* Автор і редактор під статтею */
.msb-byline a {
	font-weight: 600;
}

.msb-authors {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 40px;
	margin: 1.75rem 0 .5rem;
	padding: 18px 22px;
	border: 1px solid var(--ds-border-color, #e3e8ef);
	border-radius: 12px;
}

.msb-person {
	display: flex;
	align-items: center;
	gap: 12px;
	line-height: 1.35;
}

.msb-person img,
.msb-person-initial {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
}

.msb-person-initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ds-light-bg-color, #f4f7fb);
	color: var(--ds-primary-color, #00a8e8);
	font-weight: 700;
	font-size: 22px;
}

.msb-person-label {
	font-size: 13px;
	color: var(--ds-secondary-text-color, #667085);
}

.ds-blog-post-text .msb-person a:not(.button):not(.btn) {
	font-weight: 600;
	text-decoration: none;
}

.msb-person-role {
	font-size: 13px;
	color: var(--ds-secondary-text-color, #667085);
}

/* Сторінка автора */
.msb-profile {
	display: flex;
	gap: 32px;
	padding: 28px;
	margin-bottom: 28px;
	background: var(--ds-light-bg-color, #eef6fb);
	border-radius: 16px;
}

.msb-profile-photo {
	flex: none;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	object-fit: cover;
	font-size: 56px;
}

.msb-profile-name {
	font-size: 24px;
	font-weight: 700;
	color: var(--ds-dark-text-color, #1d2939);
}

.msb-profile-meta {
	margin-top: 10px;
	color: var(--ds-secondary-text-color, #667085);
}

.msb-profile-role {
	font-weight: 600;
}

.msb-profile-about {
	margin-top: 16px;
}

.msb-profile-about-title {
	margin-bottom: 8px;
	font-size: 18px;
	font-weight: 700;
}

.msb-profile-about p {
	margin: 0 0 10px;
}

.msb-profile-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
}

.msb-profile-articles-title {
	margin: 0 0 16px;
}

.msb-profile-articles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.msb-profile-article {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--ds-border-color, #e3e8ef);
	border-radius: 12px;
	color: inherit;
	text-decoration: none;
	transition: box-shadow .2s;
}

.msb-profile-article:hover {
	box-shadow: 0 6px 20px rgba(16, 24, 40, .08);
}

.msb-profile-article img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.msb-profile-article-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px 16px;
}

.msb-profile-article-date {
	font-size: 13px;
	color: var(--ds-secondary-text-color, #667085);
}

.msb-profile-article-name {
	font-weight: 600;
	color: var(--ds-dark-text-color, #1d2939);
}

.msb-profile-article-text {
	font-size: 14px;
	color: var(--ds-secondary-text-color, #667085);
}

@media (max-width: 767px) {
	.msb-profile {
		flex-direction: column;
		align-items: center;
		gap: 16px;
		padding: 20px 16px;
		text-align: center;
	}

	.msb-profile-photo {
		width: 120px;
		height: 120px;
	}

	.msb-profile-links {
		justify-content: center;
	}
}

/* Вкладки блогу: «Усі статті · розділи» */
.msb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
}

.msb-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	background: #fff;
	border: 1px solid var(--ds-border-color, #e3e8ef);
	border-radius: 8px;
	color: var(--ds-dark-text-color, #1d2939);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: border-color .15s, color .15s;
}

.msb-chip span {
	color: var(--ds-secondary-text-color, #667085);
	font-size: 12px;
	font-weight: 400;
}

.msb-chip:hover {
	border-color: var(--ds-primary-color, #00a8e8);
	color: var(--ds-primary-color, #00a8e8);
	text-decoration: none;
}

.msb-chip.active {
	background: var(--ds-primary-color, #00a8e8);
	border-color: var(--ds-primary-color, #00a8e8);
	color: #fff;
}

.msb-chip.active span {
	color: rgba(255, 255, 255, .8);
}

@media (max-width: 767px) {
	.msb-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 4px;
		-webkit-overflow-scrolling: touch;
	}

	.msb-chip {
		flex: none;
	}
}


/* Картки статей (як блок «Блог на головній»): «Усі статті» й розділи блогу */
.msb-cards {
	--msb-accent: var(--ds-primary-color, #2abd13);
	--msb-text: #1d2433;
	--msb-muted: #7a8291;
	--msb-soft: #f5f7fa;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.msb-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 16px 16px 20px;
	background: #fff;
	border-radius: 16px;
	color: var(--msb-text) !important;
	text-decoration: none !important;
	transition: box-shadow .2s;
}

.msb-card:hover {
	box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
}

.msb-card-img {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	background: var(--msb-soft);
}

.msb-card-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.msb-card:hover .msb-card-img img {
	transform: scale(1.04);
}

.msb-card-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 16px 0 10px;
}

.msb-card-cat {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	padding: 4px 12px;
	border-radius: 14px;
	background: #e8f1fd;
	color: #1e66d0;
	font-size: 14px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.msb-card:nth-child(3n+2) .msb-card-cat {
	background: #f1eafe;
	color: #7b3fe4;
}

.msb-card:nth-child(3n+3) .msb-card-cat {
	background: #fdecf3;
	color: #b0245f;
}

.msb-card-date {
	color: var(--msb-muted);
	font-size: 14px;
}

.msb-card-name {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	transition: color .15s;
}

.msb-card:hover .msb-card-name {
	color: var(--msb-accent);
}

.msb-card-short {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	margin-top: 8px;
	color: var(--msb-muted);
	font-size: 14px;
	line-height: 1.5;
}

.msb-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin-top: auto;
	padding-top: 12px;
	color: var(--msb-muted);
	font-size: 13px;
}

.msb-card-meta > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.msb-card-meta svg {
	flex: none;
	opacity: .8;
}

.msb-pagination {
	margin-top: 24px;
}

.msb-empty {
	padding: 24px;
}

@media (max-width: 991.98px) {
	.msb-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (max-width: 575.98px) {
	.msb-cards {
		grid-template-columns: 1fr;
	}

	.msb-card-name {
		font-size: 16px;
	}
}

.dark-theme .msb-cards {
	--msb-text: #f1f3f5;
	--msb-muted: #9aa1a9;
	--msb-soft: #222;
}

.dark-theme .msb-card {
	background: #1b1b1b;
}
