/* === Модуль: Product Hero (изображения, миниатюры) === */

/* Левая колонка hero: медиаблок + миниатюры под ним (сбрасывает flex-row из style.css). */
.product-hero__media.product-image-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    aspect-ratio: auto;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

/* Область главного изображения (визуальная рамка). */
.product-hero__viewer {
    position: relative;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.product-hero__main,
.product-slider-wrapper {
    width: 100%;
}

.product-hero__image,
.product-hero__main-image,
.main-product-image,
.product-image {
    display: block;
    width: 100%;
    height: auto;
    cursor: zoom-in;
}

.product-hero__zoom-hint,
.zoom-hint {
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
}

/* Миниатюры под главным изображением */
.product-hero__thumbnails,
.product-thumbnails {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.product-hero__thumbnail,
.product-thumbnail {
    flex: 0 0 auto;
    width: 100px;
    height: 100px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    opacity: 0.7;
    scroll-snap-align: start;
    overflow: hidden;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.product-hero__thumbnail:hover,
.product-hero__thumbnail:focus-visible,
.product-thumbnail:hover {
    opacity: 1;
}

.product-hero__thumbnail:focus-visible {
    outline: 2px solid #34495e;
    outline-offset: 2px;
}

.product-hero__thumbnail.is-active,
.product-hero__thumbnail--is-active,
.product-thumbnail.is-active {
    opacity: 1;
    border-color: #e67e22;
}

.product-hero__thumbnail-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Совместимость: миниатюра без обёртки-кнопки (старый вариант) */
img.product-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Скроллбар миниатюр */
.product-hero__thumbnails::-webkit-scrollbar,
.product-thumbnails::-webkit-scrollbar {
    height: 10px;
}

.product-hero__thumbnails::-webkit-scrollbar-track,
.product-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.product-hero__thumbnails::-webkit-scrollbar-thumb,
.product-thumbnails::-webkit-scrollbar-thumb {
    background: #e67e22;
    border-radius: 5px;
}

.product-hero__thumbnails::-webkit-scrollbar-thumb:hover,
.product-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #b35800;
}
