/**
 * Информационные страницы (page.php, классы .doc*) и «Бренды»  (стили «Бренды» — assets/css/brands.css).
 * Подключается только на обычных страницах (soundmarket_is_doc_page в functions.php).
 */
body.sr-doc-body, body.sr-doc-body.page { background: #fff !important; }

.doc-page { padding-top: 20px; padding-bottom: 96px; }
.doc-crumbs { flex-wrap: wrap; row-gap: 4px; }

.doc { display: block; }
.doc-page--nav .doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 72px; align-items: start; }
.doc__main { min-width: 0; max-width: 760px; margin: 0; }

.doc__title {
	margin: 0 0 36px;
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: clamp(24px, 4.2vw, 48px);
	line-height: 1.05;
	letter-spacing: -0.035em;
	text-transform: uppercase;
	color: var(--c-text);
	overflow-wrap: break-word;
	hyphens: auto;
}

/* --- Меню раздела --- */
.doc__aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 24px; }
.doc__aside-title { margin: 0 0 -12px; padding-left: 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9CA3AF; }
.doc__nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.doc__nav li { margin: 0; }
.doc__nav a {
	display: block;
	padding: 9px 12px;
	border-radius: 10px;
	font-size: 14.5px;
	line-height: 1.35;
	color: #4B5563;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
.doc__nav a:hover { background: #F4F5F7; color: var(--c-text); }
.doc__nav a[aria-current] { background: #F4F5F7; color: var(--c-text); font-weight: 600; }

.doc__help {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	border: 1px solid #E6E8EC;
	border-radius: 14px;
	color: var(--c-text) !important;
	text-decoration: none !important;
	transition: border-color .2s ease;
}
.doc__help:hover { border-color: var(--c-text); }
.doc__help-icon { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--c-primary-light); color: var(--c-primary-deep); }
.doc__help-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #6B7280; }
.doc__help-text strong { font-size: 14.5px; font-weight: 600; color: var(--c-text); }

/* --- Текст --- */
.doc__body { font-size: 16.5px; line-height: 1.7; color: #374151; }
.doc__body > *:first-child { margin-top: 0 !important; }
.doc__body > *:last-child { margin-bottom: 0 !important; }
.doc__body p { margin: 0 0 16px; }
.doc__body strong, .doc__body b { color: var(--c-text); font-weight: 600; }
.doc__body a { color: var(--c-primary-dark); text-decoration: underline; text-decoration-color: rgba(26, 95, 204, .3); text-underline-offset: 3px; transition: text-decoration-color .2s ease; }
.doc__body a:hover { text-decoration-color: currentColor; }

.doc__body h2, .doc__body h3, .doc__body h4 {
	margin: 44px 0 14px;
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--c-text);
}
.doc__body h2 { font-size: 21px; }
.doc__body h3 { font-size: 18px; }
.doc__body h4 { font-size: 16px; }
.doc__body hr { height: 0; margin: 44px 0; border: 0; border-top: 1px solid #EEF0F3; background: none; opacity: 1; }
.doc__body hr + h2, .doc__body hr + h3, .doc__body hr + h4 { margin-top: 0; }

.doc__body ul, .doc__body ol { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.doc__body li { position: relative; margin: 0; padding-left: 26px; }
.doc__body ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); }
.doc__body ol { counter-reset: doc; }
.doc__body ol > li { counter-increment: doc; padding-left: 38px; }
.doc__body ol > li::before {
	content: counter(doc);
	position: absolute;
	left: 0;
	top: .1em;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: var(--c-primary-light);
	color: var(--c-primary-deep);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.doc__body table { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 15px; }
.doc__body th, .doc__body td { padding: 12px 14px; border-bottom: 1px solid #EEF0F3; text-align: left; vertical-align: top; }
.doc__body th { font-weight: 600; color: var(--c-text); }
.doc__body img { max-width: 100%; height: auto; border-radius: 16px; }

/* Страницы со своей старой вёрсткой внутри текста */
.doc-banner { margin: 0 0 40px; border-radius: 20px; overflow: hidden; line-height: 0; background: #F4F5F7; }
.doc-banner img { display: block; width: 100%; height: auto; border-radius: 0 !important; }
.doc-note { font-size: 14px !important; color: #6B7280; }
.doc-legacy { max-width: none; }

.doc__body .sr-faq { display: grid; gap: 10px; margin-top: 8px; }
.doc__body .sr-faq-title { margin: 0 0 8px !important; font-family: var(--font-heading); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; text-transform: uppercase; color: var(--c-text); }
.doc__body .sr-faq details { border: 1px solid #E6E8EC; border-radius: 14px; transition: border-color .2s ease; }
.doc__body .sr-faq details:hover, .doc__body .sr-faq details[open] { border-color: #C9CED6; }
.doc__body .sr-faq summary { position: relative; display: block; padding: 18px 56px 18px 20px; cursor: pointer; font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--c-text); list-style: none; }
.doc__body .sr-faq summary::-webkit-details-marker { display: none; }
.doc__body .sr-faq summary::after {
	content: "";
	position: absolute;
	right: 20px;
	top: 50%;
	width: 12px;
	height: 12px;
	margin-top: -6px;
	background:
		linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat,
		linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat;
	transition: transform .25s ease;
}
.doc__body .sr-faq details[open] summary::after { transform: rotate(45deg); }
.doc__body .sr-faq-body { padding: 0 20px 18px; font-size: 15.5px; line-height: 1.6; color: #4B5563; }

.doc-soon { margin-top: 0; }

@media (max-width: 1024px) {
	.doc-page--nav .doc { grid-template-columns: 210px minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 860px) {
	.doc-page { padding-bottom: 64px; }
	.doc-page--nav .doc { grid-template-columns: minmax(0, 1fr); gap: 48px; }
	.doc__aside { position: static; order: 2; padding-top: 40px; border-top: 1px solid #EEF0F3; }
	.doc__aside-title { padding-left: 0; }
	.doc__nav a { padding: 10px 0; border-radius: 0; border-bottom: 1px solid #F1F2F4; }
	.doc__nav a:hover, .doc__nav a[aria-current] { background: none; }
	.doc__title { margin-bottom: 28px; }
	.doc__body { font-size: 16px; }
	.doc__body h2 { font-size: 19px; }
	.doc__body h3 { font-size: 17px; }
	.doc__body hr { margin: 36px 0; }
	.doc-banner { margin-bottom: 32px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
}

/* --- Промокоды: карточка в списке (template-parts/content/content-promocode.php) --- */
.promocodes-list { display: grid; gap: 12px; }
.sr-promo-card { margin: 0; }
.sr-promo-card__link {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 16px 20px 16px 16px;
	border: 1px solid #E6E8EC;
	border-radius: 20px;
	color: var(--c-text) !important;
	text-decoration: none !important;
	transition: border-color .2s ease;
}
.sr-promo-card__link:hover { border-color: var(--c-text); }
.sr-promo-card__badge { flex: 0 0 auto; display: grid; place-items: center; min-width: 88px; height: 72px; padding: 0 12px; border-radius: 14px; background: var(--c-primary-light); color: var(--c-primary-deep); font-family: var(--font-heading); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.sr-promo-card__body { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sr-promo-card__title { flex: 1 1 100%; margin: 0; font-family: var(--font-body); font-size: 17px; font-weight: 600; line-height: 1.35; }
.sr-promo-card__code { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px dashed #C9CED6; border-radius: 8px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 600; letter-spacing: .04em; }
.sr-promo-card__dates { font-size: 13.5px; color: #6B7280; }
.sr-promo-card__go { flex: 0 0 auto; color: #9CA3AF; transition: transform .3s ease, color .2s ease; }
.sr-promo-card__link:hover .sr-promo-card__go { color: var(--c-text); transform: translate(2px, -2px); }

/* --- Промокод: отдельная страница (single-promocode.php) --- */
.sr-promo-single__discount { display: inline-flex; align-items: center; height: 30px; margin-bottom: 16px; padding: 0 12px; border-radius: 999px; background: var(--c-primary-light); color: var(--c-primary-deep); font-size: 13px; font-weight: 700; }
.sr-promo-single__code { margin: 0 0 32px; }
.sr-promo-single__label { display: block; margin-bottom: 8px; font-size: 13.5px; color: #6B7280; }
.sr-promo-single__field { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 8px 8px 18px; border: 1px solid #E6E8EC; border-radius: 16px; }
.sr-promo-single__field code { flex: 1 1 auto; min-width: 0; padding: 0; background: none; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 20px; font-weight: 600; letter-spacing: .05em; color: var(--c-text); overflow-wrap: anywhere; }
.sr-promo-single__field .copy-promo { flex: 0 0 auto; height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--c-text); color: #fff; font: 600 14px/1 var(--font-body); cursor: pointer; transition: opacity .2s ease; }
.sr-promo-single__field .copy-promo:hover { opacity: .88; }
.sr-promo-single__dates { margin: 24px 0 0; }
.sr-promo-single__btn { display: inline-flex; align-items: center; height: 52px; margin-top: 28px; padding: 0 24px; border-radius: 14px; background: var(--c-accent); color: #fff !important; font-size: 15.5px; font-weight: 600; text-decoration: none !important; transition: background-color .2s ease; }
.sr-promo-single__btn:hover { background: var(--c-primary-dark); }
@media (max-width: 600px) {
	.sr-promo-card__link { gap: 14px; padding: 12px 14px 12px 12px; }
	.sr-promo-card__badge { min-width: 64px; height: 60px; font-size: 17px; }
	.sr-promo-card__title { font-size: 15.5px; }
	.sr-promo-single__field { flex-direction: column; align-items: stretch; padding: 14px; }
	.sr-promo-single__field .copy-promo { width: 100%; }
	.sr-promo-single__btn { width: 100%; justify-content: center; }
}

/* --- Акция на странице промокодов (archive-promocode.php, блок .sp): картинка, таймер, цифры, хиты --- */
.sp { margin-bottom: 56px; }
.sp-hero {
	display: block;
	aspect-ratio: 2000 / 1047;
	border-radius: 24px 24px 0 0;
	overflow: hidden;
	background: #151515;
	animation: rv-fade-up 1s var(--rv-ease) .3s both;
}
.sp-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--rv-ease); }
.sp:has(.sp-hero:hover, .sp-btn:hover) .sp-hero__img { transform: scale(1.02); }

.sp-bar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 40px;
	padding: 28px 32px 28px 36px;
	border: 1px solid var(--c-border);
	border-top: 0;
	border-radius: 0 0 24px 24px;
	animation: rv-fade-up 1s var(--rv-ease) .4s both;
}
.sp-bar__info { min-width: 0; }
.sp-live { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--c-primary-deep); }
.sp-live__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); }
.sp-live__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c-accent); animation: ct-pulse 2s cubic-bezier(.2, .6, .35, 1) infinite; }
.sp-bar__title { margin: 0 0 8px; font-family: var(--font-heading); font-weight: 700; font-size: clamp(20px, 2vw, 26px); line-height: 1.2; letter-spacing: -0.03em; }
.sp-bar__text { margin: 0; max-width: 460px; font-size: 15px; line-height: 1.55; color: #5B6473; }

/* Таймер: крупные цифры без рамок, секунды «перелистываются» */
.sp-timer { display: flex; flex-direction: column; gap: 8px; }
.sp-timer__label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9CA3AF; }
.sp-timer__cells { display: flex; align-items: flex-start; gap: 10px; }
.sp-timer__cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 48px; }
.sp-timer__num {
	display: inline-block;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 34px;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
	color: var(--c-text);
}
.sp-timer__num.is-tick { animation: sp-tick .45s var(--rv-ease); }
.sp-timer__unit { font-size: 12px; color: #9CA3AF; }
.sp-timer__sep { font-family: var(--font-heading); font-weight: 600; font-size: 28px; line-height: 1.1; color: #D5DAE1; }
@keyframes sp-tick { from { opacity: 0; transform: translateY(-40%); } to { opacity: 1; transform: none; } }

.sp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 56px;
	padding: 0 26px;
	border-radius: 14px;
	background: var(--c-text);
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none !important;
	transition: background-color .25s ease;
}
.sp-btn:hover { background: var(--c-primary-deep); }
.sp-btn:hover .rv-arrow, .sp-hits__link:hover .rv-arrow { transform: translate(3px, -3px); }
.sp-btn .rv-arrow, .sp-hits__link .rv-arrow { transition: transform .3s var(--rv-ease); }

/* Цифры акции */
.sp-facts {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 16px 0 0;
	padding: 0;
	border: 1px solid var(--c-border);
	border-radius: 20px;
	animation: rv-fade-up 1s var(--rv-ease) .5s both;
}
.sp-fact { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 22px 28px; }
.sp-fact + .sp-fact { border-left: 1px solid var(--c-border); }
.sp-fact__num { font-family: var(--font-heading); font-weight: 700; font-size: clamp(20px, 2vw, 26px); line-height: 1.15; letter-spacing: -0.03em; white-space: nowrap; }
.sp-fact__text { font-size: 14px; line-height: 1.4; color: #6B7280; }

/* Хиты акции — обычные карточки каталога (catalog.css) */
.sp-hits { margin-top: 72px; animation: rv-fade-up 1s var(--rv-ease) .6s both; }
.sp-hits__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.sp-hits__title { margin: 0; font-family: var(--font-heading); font-weight: 800; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.1; letter-spacing: -0.035em; text-transform: uppercase; }
.sp-hits__link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--c-text) !important; text-decoration: none !important; white-space: nowrap; }
.sp-hits__link:hover { color: var(--c-primary-dark) !important; }
.sp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Промокодов нет, но акция идёт — тихая строка вместо большого блока */
.sp-note { display: flex; align-items: center; gap: 12px; margin: 0; padding: 18px 22px; border: 1px dashed #D5DAE1; border-radius: 16px; font-size: 14.5px; line-height: 1.5; color: #6B7280; }
.sp-note svg { flex: 0 0 auto; color: #9CA3AF; }

@media (max-width: 1100px) {
	.sp-bar { grid-template-columns: minmax(0, 1fr) auto; }
	.sp-btn { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
	.sp { margin-bottom: 40px; }
	.sp-hero { border-radius: 20px 20px 0 0; }
	.sp-bar { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px 20px 20px; border-radius: 0 0 20px 20px; }
	.sp-timer__cells { justify-content: space-between; gap: 4px; }
	.sp-timer__cell { flex: 1 1 0; padding: 12px 0 10px; border-radius: 14px; background: #F5F6F8; }
	.sp-timer__num { font-size: 28px; }
	.sp-timer__sep { display: none; }
	.sp-btn { width: 100%; }
	.sp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sp-fact { padding: 18px 18px; }
	.sp-fact:nth-child(3) { border-left: 0; }
	.sp-fact:nth-child(n+3) { border-top: 1px solid var(--c-border); }
	.sp-fact__num { font-size: 20px; }
	.sp-fact__text { font-size: 13px; }
	.sp-hits { margin-top: 48px; }
	.sp-hits__head { margin-bottom: 18px; }
	.sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
	.sp-hero, .sp-bar, .sp-facts, .sp-hits, .sp-timer__num.is-tick, .sp-live__dot::after { animation: none; }
	.sp-hero__img { transition: none; }
}
