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

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

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

.mds-ti-product .woocommerce-product-gallery .flex-viewport { max-width: 100%; }
.mds-ti-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-ti-variants { margin: 32px 0 10px; padding-top: 22px; border-top: 1px solid #e8e8e8; clear: both; }
.mds-ti-variants__title { font-size: 18px; margin: 0 0 14px; }
.mds-ti-variants__list { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0 0 22px; padding: 0; }
.mds-ti-variants__list li a { display: flex; flex-direction: column; align-items: center; width: 112px; text-decoration: none; }
.mds-ti-variants__list img { width: 104px; height: 104px; object-fit: contain; border: 1px solid #ececec; border-radius: 4px; background: #fff; }
.mds-ti-variants__list a:hover img { border-color: #0ac2fa; }
.mds-ti-variants__size { font-size: 13px; margin-top: 6px; color: #333; }
.mds-ti-variants__price { font-size: 13px; font-weight: 600; }
.mds-ti-variants__colors { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.mds-ti-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-ti-variants__colors img { width: 72px; height: 72px; object-fit: contain; border: 1px solid #ececec; border-radius: 50%; background: #fff; margin-bottom: 4px; }
.mds-ti-variants__colors a:hover img { border-color: #0ac2fa; }

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

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

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

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