/* ============================================================================
   Редизайн вкладок товара: «Описание» (характеристики), «Доставка», «Оплата»
   ----------------------------------------------------------------------------
   Файл подключается ПОСЛЕ main.min.css на странице товара (product.blade.php)
   и только дополняет/переопределяет вид содержимого вкладок — переключение
   самих вкладок (data-tabs/data-tab/data-content, JS) не затрагивается.

   ОТКАТ: удалите строку с подключением этого файла в product.blade.php —
   верстка вернётся к обычному нестилизованному виду.
   ============================================================================ */

:root {
	--tabs-accent: var(--accent, #B584D3);
	--tabs-accent-strong: #593c6d;
	--tabs-card-bg: #ffffff;
	--tabs-card-border: rgba(0, 0, 0, 0.08);
	--tabs-label-color: rgba(0, 0, 0, 0.55);
	--tabs-value-color: #111111;
	--tabs-radius: 1.25rem;
}

/* ---------------------------------------------------------------------------
   Навигация «Описание / Доставка / Оплата» — единый вид на всех экранах.

   Раньше на мобильной версии раскладка «ломалась»: первая кнопка занимала
   фиксированные 37% ширины, вторая растягивалась (flex:1), третья схлопывалась
   и получала лишний правый отступ 2.8125rem — при трёх примерно равных по
   длине словах это выглядело перекошенным. Теперь все три кнопки — равные
   сегменты одной вкладки-переключателя, единообразно на телефоне и десктопе.
--------------------------------------------------------------------------- */
.product-tabs__nav {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	border-bottom: none;
}

.product-tabs__btn,
.product-tabs__btn:first-child,
.product-tabs__btn:nth-child(2),
.product-tabs__btn:last-child {
	flex: 1 1 0;
	width: auto;
	margin-left: 0;
}

.product-tabs__btn {
	min-height: 2.75rem;
	padding: 0.5rem 0.375rem;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-weight: 600;
	font-size: 0.8125rem;
	line-height: 1.2;
	color: rgba(0, 0, 0, 0.55);
	background: #f6f6f6;
	border: 0.0625rem solid transparent;
	border-radius: 0.875rem;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.product-tabs__btn.is-active::before {
	content: none;
}

.product-tabs__btn.is-active {
	background: var(--tabs-accent-strong);
	color: #fff;
	border: 0.0625rem solid var(--tabs-accent-strong);
}

.product-tabs__btn:not(.is-active):hover {
	background: #ececec;
	color: #000;
}

@media (min-width: 768px) {
	.product-tabs__nav {
		gap: 0.75rem;
		margin-bottom: 2rem;
	}

	.product-tabs__btn {
		min-height: 3.375rem;
		font-size: 0.9375rem;
		border-radius: 1.25rem;
	}
}

@media (min-width: 1200px) {
	.product-tabs__btn {
		min-height: 3.625rem;
		font-size: 1rem;
	}
}

/* ---------------------------------------------------------------------------
   Карточка-контейнер под содержимым каждой вкладки
--------------------------------------------------------------------------- */
.product-tabs__pane {
	padding: 1.5rem;
	background: var(--tabs-card-bg);
	border: 0.0625rem solid var(--tabs-card-border);
	border-radius: var(--tabs-radius);
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.product-tabs__pane {
		padding: 2rem;
	}
}

@media (min-width: 1200px) {
	.product-tabs__pane {
		padding: 2.5rem 2.75rem;
	}
}

/* ---------------------------------------------------------------------------
   Характеристики товара — аккуратные строки «параметр / значение»
--------------------------------------------------------------------------- */
.specs-list {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.specs-list__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0;
	border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.07);
}

.specs-list__row:first-child {
	padding-top: 0;
}

.specs-list__row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.specs-list__label {
	margin: 0;
	flex: 0 0 auto;
	max-width: 55%;
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 140%;
	color: var(--tabs-label-color);
}

.specs-list__value {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	text-align: right;
	font-weight: 600;
	font-size: 0.875rem;
	line-height: 140%;
	color: var(--tabs-value-color);
	word-break: break-word;
}

@media (min-width: 768px) {
	.specs-list__row {
		padding: 0.875rem 0;
	}

	.specs-list__label,
	.specs-list__value {
		font-size: 1rem;
	}
}

@media (min-width: 1200px) {
	.specs-list__row {
		padding: 1rem 0;
	}

	.specs-list__label,
	.specs-list__value {
		font-size: 1.0625rem;
	}
}

/* Описание товара — отдельным блоком под характеристиками */
.specs-description {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 0.0625rem solid rgba(0, 0, 0, 0.07);
}

.specs-list:not(:empty) + .specs-description {
	margin-top: 1.5rem;
}

.specs-description__title {
	margin: 0 0 0.75rem;
	font-weight: 600;
	font-size: 1.125rem;
	line-height: 120%;
	letter-spacing: -0.02em;
	color: var(--tabs-value-color);
}

.specs-description__text {
	margin: 0;
	max-width: 62ch;
	font-weight: 400;
	font-size: 0.9375rem;
	line-height: 160%;
	color: rgba(0, 0, 0, 0.72);
}

@media (min-width: 768px) {
	.specs-description__title {
		font-size: 1.25rem;
	}

	.specs-description__text {
		font-size: 1rem;
	}
}

/* ---------------------------------------------------------------------------
   Доставка / Оплата — типографика для HTML, заполняемого админом
--------------------------------------------------------------------------- */
.tab-richtext {
	max-width: 68ch;
	font-size: 0.9375rem;
	line-height: 165%;
	color: rgba(0, 0, 0, 0.78);
}

.tab-richtext h1,
.tab-richtext h2,
.tab-richtext h3,
.tab-richtext h4,
.tab-richtext h5,
.tab-richtext h6 {
	margin: 1.5rem 0 0.75rem;
	font-weight: 600;
	line-height: 130%;
	letter-spacing: -0.02em;
	color: var(--tabs-value-color);
}

.tab-richtext h1:first-child,
.tab-richtext h2:first-child,
.tab-richtext h3:first-child,
.tab-richtext h4:first-child,
.tab-richtext h5:first-child,
.tab-richtext h6:first-child {
	margin-top: 0;
}

.tab-richtext h1 { font-size: 1.5rem; }
.tab-richtext h2 { font-size: 1.375rem; }
.tab-richtext h3 { font-size: 1.25rem; }
.tab-richtext h4,
.tab-richtext h5,
.tab-richtext h6 { font-size: 1.125rem; }

.tab-richtext p {
	margin: 0 0 1rem;
}

.tab-richtext p:last-child {
	margin-bottom: 0;
}

.tab-richtext ul,
.tab-richtext ol {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
}

.tab-richtext ul:last-child,
.tab-richtext ol:last-child {
	margin-bottom: 0;
}

.tab-richtext li {
	margin-bottom: 0.4rem;
}

.tab-richtext li:last-child {
	margin-bottom: 0;
}

.tab-richtext ul li::marker {
	color: var(--tabs-accent);
}

.tab-richtext strong,
.tab-richtext b {
	font-weight: 700;
	color: var(--tabs-value-color);
}

.tab-richtext em,
.tab-richtext i {
	font-style: italic;
}

@media (min-width: 768px) {
	.tab-richtext {
		font-size: 1rem;
	}
}

/* ---------------------------------------------------------------------------
   Пустое состояние (текст ещё не заполнен админом)
--------------------------------------------------------------------------- */
.tab-richtext__empty {
	margin: 0;
	font-size: 0.9375rem;
	font-style: italic;
	color: rgba(0, 0, 0, 0.45);
}
