/* =====================================================================
   ОСИ ВЫБОРА / ПЕРЕКЛЮЧАТЕЛЬ ПРЕДЛОЖЕНИЙ (тег [offers_switcher])
   Вставить в основной CSS сайта. Цвета/радиус/отступы вынесены в
   переменные вверху -- поменяйте значения под свой дизайн, ничего
   больше трогать не нужно.
   ===================================================================== */

.catalog-offers-switcher {
	--offers-accent: #e6e1de;
	--offers-accent-contrast: #000000;
	--offers-border: #e2e2e2;
	--offers-border-hover: #e6e1de;
	--offers-text: #000000;
	--offers-text-muted: #767c82;
	--offers-radius: 2px;
	--offers-danger: #c0392b;
	--offers-stock-ok: #333333;
	color: var(--offers-text);
}

.catalog-offers-axis {
	margin-bottom: 16px;
}

.catalog-offers-axis-name {
font-family: 'Rubik';
font-weight: 400;
font-size: 13px;
color: #000;
margin-bottom: 10px;

}

.catalog-offers-values {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Каждое значение оси -- "таблетка" с текстом. Сам radio визуально
   спрятан (но остаётся кликабельным и доступным для клавиатуры/скринридеров),
   вся стилизация -- на подписи рядом с ним. */
   
.catalog-offers-value {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 8px 8px!important;
	border: 1px solid var(--offers-border);
	border-radius: var(--offers-radius);
	background: #fff;
	cursor: pointer;
	user-select: none;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.catalog-offers-value input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.catalog-offers-value span {
	line-height: 1;
	font-family: 'Rubik';
font-weight: 400;
font-size: 13px;
color: #666;
}

.catalog-offers-value:hover {
	border-color: var(--offers-border-hover);
	background: var(--offers-accent);
	color: #666;
}

.catalog-offers-value input:focus-visible ~ span {
	outline: 2px solid var(--offers-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Выбранное значение -- заливка акцентным цветом. :has() поддерживают все
   современные браузеры; если у посетителя очень старый браузер без
   поддержки -- таблетка останется белой, но текст всё равно сменит цвет
   (см. правило чуть ниже, оно работает без :has()) -- деградация плавная. */
   
.catalog-offers-value:has(input:checked) {
	background: var(--offers-accent);
	border-color: var(--offers-accent);
font-family: 'Rubik';
font-weight: 400;
font-size: 13px;
color: #666;
}

.catalog-offers-value input:checked + span {
	font-family: 'Rubik';
font-weight: 400;
font-size: 13px;
color: #000;
}

/* Переключатель цены/цены-2 -- визуально отличается от значений осей
   (не "таблетки", а компактные радио-строки), чтобы посетитель не путал
   выбор варианта товара с выбором способа покупки. */
.catalog-offers-price-type-row {
margin-top: 10px;
}

div.catalog-offers-price-type-options label,
div.catalog-offers-price-type-option-kit-wrap label {
color: #001e29!important;	
}

.catalog-offers-price-type-options {
	display: flex;
	flex-wrap: wrap;
}

/* 1. Прячем стандартную радио-кнопку, но оставляем её доступной для скринридеров и фокуса */
.catalog-offers-price-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

span.catalog-offers-price-type-price-value,
span.catalog-offers-price-type-kit-value {
font-family: 'Montserrat'!important;
font-weight: 700!important;
color: #001e29!important;
font-size: 20px!important;
}

/* 2. Стилизуем сам label как кликабельный прямоугольный таб */
.catalog-offers-price-type-option {
   min-width: 120px;
   height: 60px;
	padding: 8px 14px!important;
	border: 1px solid var(--offers-border);
	border-radius: var(--offers-radius);
	background: #fff;
   cursor: pointer;
   transition: all 0.2s ease-in-out!;
   user-select: none;
   margin: 2px 10px 2px 0px;
}

/* 3. Эффект при наведении (hover) для неактивного таба */
.catalog-offers-price-type-option:hover {
    border-color: #b3b3b3;
    background-color: #f5f5f5;
}

/* 4. Стили для активного (выбранного) таба */
.catalog-offers-price-type-option:has(input[type="radio"]:checked) {
    border: 1px solid #e6e1de; 
    background-color: #e6e1de;
    color: #000;
}

/* 5. Добавляем визуальный контур при навигации с клавиатуры (доступность) */
.catalog-offers-price-type-option:has(input[type="radio"]:focus-visible) {
    outline: 2px solid #dddddd;
    outline-offset: 2px;
}

/* Опционально: стилизуем пустой span, если в него будет подставляться цена */
span.catalog-offers-price-type-price-label,
span.catalog-offers-price-type-price2-label,
span.catalog-offers-price-type-kit-label {
font-family: 'Rubik';
font-weight: 400;
font-size: 13px;
color: #666;
text-align: left;
}



.catalog-offers-stock {
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--offers-stock-ok);
}

.catalog-offers-stock:empty {
	display: none;
}

.catalog-offers-not-found {
	margin-top: 10px;
	padding: 9px 12px;
	border-radius: 6px;
	background: rgba(192, 57, 43, .08);
	color: var(--offers-danger);
	font-size: 13px;
	font-weight: 500;
	display: inline-block;
}

/* =====================================================================
   ЦВЕТ (ось типа "своя страница") -- кружки-иконки, ссылки на реальные
   страницы вариантов. Активный (текущий) цвет подсвечивается кольцом.
   ===================================================================== */

.catalog-offers-axis--page {
	margin-bottom: 20px;
}

.catalog-offers-colors {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.catalog-offers-color {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background-color: #fff;
	background-size: cover;
	background-position: center;
  outline: 2px solid #e6e1de;
  outline-offset: 2px;
	transition: box-shadow .15s ease, transform .1s ease;
}

.catalog-offers-color:hover {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.catalog-offers-color--active {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.catalog-offers-color span {
	line-height: 1;
	text-transform: uppercase;
}

.catalog-offers-color-unavailable {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background-color: #f9f2f2;
 outline: 2px solid #f9f2f2;
  outline-offset: 2px;
	opacity: .50;
	cursor: not-allowed;
}

.catalog-offers-color-unavailable span {
	line-height: 1;
	text-transform: uppercase;
}

/* [FEATURE] "Комплектация" -- мелкая подпись ПОД самим переключателем
   "Комплект" (не на нём) -- список комплектующих всплывает при наведении
   именно на эту подпись, не на весь пункт "Комплект". HTML уже собран
   целиком в PHP ($kit_tooltip_html в _buildSwitcherAxesHtml()), тут только
   показ по :hover/:focus -- никакого JS не требуется. */
   
.catalog-offers-price-type-option-kit-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}

.catalog-offers-kit-composition-trigger {
	position: relative;
	margin: 10px 0px 10px 15px;
	cursor: help;
background-image: url(../images/kit.svg);
background-position: left;
background-repeat: no-repeat;
padding-left: 25px;	
	font-size: 12px;
	font-weight: 400;
	color: #666;
	font-family: 'Rubik';
	line-height: 11px;
}

.catalog-offers-kit-tooltip {
	display: none;
	position: absolute;
	left: 0;
	bottom: calc(100% + 8px);
	z-index: 5;
	min-width: 250px;
	max-width: 400px;
	padding: 10px 12px;
	background: #fff;
	color: #000;
	font-size: 13px;
	font-weight: 400;
	font-family: 'Rubik';
	border-radius: 4px;
	line-height: 1.4;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	white-space: normal;
	cursor: default;
}

.catalog-offers-kit-composition-trigger:hover .catalog-offers-kit-tooltip,
.catalog-offers-kit-composition-trigger:focus .catalog-offers-kit-tooltip {
	display: block;
}

.catalog-offers-kit-tooltip-title {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.catalog-offers-kit-tooltip ul {
	margin: 0;
	padding-left: 16px;
}

.catalog-offers-kit-tooltip li {
	margin: 2px 0;
}

