/* MDS Ferroni Import — отображение фото товаров Ferroni.
   Рендеры дверей очень высокие (например 1200x2560), поэтому ограничиваем высоту основного фото.
   ВАЖНО: правило не должно затрагивать img.zoomImg — это «окно лупы» WooCommerce (jquery.zoom),
   иначе увеличение при наведении перестаёт работать (окно сжимается вместе с превью). */

/* Страница товара Ferroni (класс body mds-fr-product) */
.mds-fr-product .woocommerce-product-gallery .woocommerce-product-gallery__image {
    text-align: center;
}
.mds-fr-product .woocommerce-product-gallery .woocommerce-product-gallery__image img:not(.zoomImg) {
    max-height: var(--mds-fr-img-max-h, 560px) !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto;
    display: inline-block;
}

/* Окно лупы: не ограничиваем размеры (свои width/height ставит сам плагин зума) */
.mds-fr-product .woocommerce-product-gallery .woocommerce-product-gallery__image img.zoomImg {
    max-width: none !important;
    max-height: none !important;
}

.mds-fr-product .woocommerce-product-gallery .flex-viewport { max-width: 100%; }
.mds-fr-product .woocommerce-product-gallery .flex-control-thumbs li img {
    max-height: 120px;
    width: auto;
    margin: 0 auto;
}

/* Карточки товаров в каталоге: высокие рендеры не должны раздувать плитку */
ul.products li.product img:not(.zoomImg),
.products .product img:not(.zoomImg),
.woocommerce ul.products li.product a img:not(.zoomImg) {
    max-height: 320px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* Блок «Другие размеры и цвета» на карточке товара */
.mds-fr-variants { margin: 32px 0 10px; padding-top: 22px; border-top: 1px solid #e8e8e8; clear: both; }
.mds-fr-variants__title { font-size: 18px; margin: 0 0 14px; }
.mds-fr-variants__list { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0 0 22px; padding: 0; }
.mds-fr-variants__list li a { display: flex; flex-direction: column; align-items: center; width: 112px; text-decoration: none; }
.mds-fr-variants__list img { width: 104px; height: 104px; object-fit: contain; border: 1px solid #ececec; border-radius: 4px; background: #fff; }
.mds-fr-variants__list a:hover img { border-color: #0ac2fa; }
.mds-fr-variants__size { font-size: 13px; margin-top: 6px; color: #333; }
.mds-fr-variants__price { font-size: 13px; font-weight: 600; }
.mds-fr-variants__colors { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.mds-fr-variants__colors li a { display: flex; flex-direction: column; align-items: center; width: 86px; font-size: 12px; text-decoration: none; color: #333; text-align: center; }
.mds-fr-variants__colors img { width: 72px; height: 72px; object-fit: contain; border: 1px solid #ececec; border-radius: 50%; background: #fff; margin-bottom: 4px; }
.mds-fr-variants__colors a:hover img { border-color: #0ac2fa; }

/* Баннер категории */
.mds-fr-cat-banner { margin: 0 0 22px; text-align: center; }
.mds-fr-cat-banner__img { max-height: 220px; width: auto; max-width: 100%; border-radius: 6px; }

.mds-fr-variants__list li.is-current .mds-fr-variants__link { pointer-events: none; }
.mds-fr-variants__list li.is-current img { border: 2px solid #0ac2fa; }
.mds-fr-variants__list li.is-current .mds-fr-variants__size { font-weight: 700; }
.mds-fr-variants__current { font-size: 11px; color: #0ac2fa; }
.mds-fr-variants__colors li.is-current img { border: 2px solid #0ac2fa; }
.mds-fr-variants__colors em { display: block; font-size: 11px; font-style: normal; color: #0ac2fa; }

/* на случай не-ссылочных элементов внутри блока — тот же вид, что у ссылок */
.mds-fr-variants__list li > span.mds-fr-variants__link,
.mds-fr-variants__colors li > span.mds-fr-variants__colorlink { display: flex; flex-direction: column; align-items: center; }

/* Схема стороны открывания */
.mds-fr-scheme { margin: 26px 0 6px; padding: 16px 18px; border: 1px solid #eee; border-radius: 6px; background: #fafafa; clear: both; }
.mds-fr-scheme__title { font-size: 17px; margin: 0 0 10px; }
.mds-fr-scheme__row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.mds-fr-scheme__svg { width: 240px; max-width: 100%; height: auto; background: #fff; border-radius: 4px; }
.mds-fr-scheme__list { margin: 0; padding-left: 18px; max-width: 520px; }
.mds-fr-scheme__list li { margin-bottom: 5px; }

/* Цена по запросу (Ferroni: у поставщика цен нет).
   Тема оформляет .price в блоке summary как крупный заголовок (clamp до 26px, 700, nowrap),
   поэтому задаём размер и перенос прямо на нашем элементе — иначе надпись выглядит как цена-гигант. */
.mds-fr-price-request {
	display: inline-block;
	font-size: 16px;
	line-height: 1.4;
	font-weight: 600;
	letter-spacing: 0;
	white-space: normal;
	color: #334155;
}
/* В карточке товара — спокойная строка «цена по запросу», а не заголовок */
.woocommerce div.product div.summary .price .mds-fr-price-request,
.woocommerce div.product div.summary p.price.mds-fr-price-request-wrap {
	font-size: 16px !important;
	white-space: normal !important;
	line-height: 1.4 !important;
}
.mds-fr-price-request-wrap { margin: 4px 0 10px !important; }

/* Кнопка «Узнать цену» — как кнопка темы «Все характеристики» в активном виде:
   сплошной синий фон, белый текст. Стиль задаём строго отдельно для ссылки,
   внутренний span нейтрализуем (иначе он рисовал свою плашку). */
a.mds-fr-cta__call,
.woocommerce div.product div.summary a.mds-fr-cta__call,
.woocommerce ul.products li.product a.mds-fr-cta__call {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 7px !important;
	padding: 8px 16px !important;
	margin: 0 !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	color: #ffffff !important;
	fill: #ffffff !important;
	background: #0284c7 !important;
	border: 0 !important;
	border-radius: 4px !important;
	box-shadow: none !important;
	text-decoration: none !important;
	white-space: nowrap !important;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
a.mds-fr-cta__call span,
.woocommerce div.product div.summary a.mds-fr-cta__call span,
.woocommerce ul.products li.product a.mds-fr-cta__call span {
	display: inline !important;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
	fill: inherit !important;
	font: inherit !important;
	line-height: inherit !important;
}
a.mds-fr-cta__call:hover,
a.mds-fr-cta__call:focus,
.woocommerce div.product div.summary a.mds-fr-cta__call:hover,
.woocommerce div.product div.summary a.mds-fr-cta__call:focus,
.woocommerce ul.products li.product a.mds-fr-cta__call:hover,
.woocommerce ul.products li.product a.mds-fr-cta__call:focus {
	background: #026aa2 !important;
	color: #ffffff !important;
	fill: #ffffff !important;
	border: 0 !important;
	text-decoration: none !important;
}
a.mds-fr-cta__call:hover span,
a.mds-fr-cta__call:focus span { background: none !important; color: inherit !important; }

a.mds-fr-cta__call svg {
	width: 16px !important;
	height: 16px !important;
	fill: currentColor !important;
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	flex: none;
}

.mds-fr-cta__sms-line { margin: 0 0 14px; font-size: 13px; color: #475569; }
.mds-fr-cta__sms-line a { text-decoration: underline; text-underline-offset: 2px; }

/* На узких экранах строка «цена | бренд | кнопка» может не влезть — разрешаем перенос */
@media (max-width: 600px) {
	.woocommerce div.product div.summary .mds-summary-action-row { flex-wrap: wrap !important; }
	a.mds-fr-cta__call { padding: 7px 13px !important; font-size: 14px !important; }
}

/* Если надпись «Цена по запросу» отключена, пустой блок цены не должен оставлять пустое место */
.woocommerce div.product div.summary .price:empty,
.woocommerce ul.products li.product .price:empty { display: none !important; }
body.mds-fr-no-price .woocommerce div.product div.summary .mds-summary-action-row > p.price,
body.mds-fr-no-price .woocommerce div.product div.summary .mds-summary-action-row > .price { display: none !important; }
