.woocommerce-product-gallery{display:flex;flex-wrap:wrap;gap:var(--wd-gallery-gap, 10px)}.woocommerce-product-gallery>*{flex:1 1 100%;max-width:100%}.woocommerce-product-gallery img{width:100%;border-radius:var(--wd-brd-radius)}.woocommerce-product-gallery .wd-carousel-inner{margin:0}.woocommerce-product-gallery .wd-carousel{--wd-gap: var(--wd-gallery-gap, 10px);padding:0;border-radius:var(--wd-brd-radius)}.woocommerce-product-gallery .wd-nav-arrows.wd-pos-sep{--wd-arrow-offset-h: calc(var(--wd-arrow-width, var(--wd-arrow-size, 50px)) / -1)}.woocommerce-product-gallery .wd-nav-pagin-wrap{position:absolute;inset-inline:15px;bottom:15px;z-index:2}.woocommerce-product-gallery .woocommerce-product-gallery__image{position:relative;overflow:hidden;border-radius:var(--wd-brd-radius)}.woocommerce-product-gallery .zoomImg[src$=".png"]{background-color:var(--wd-main-bgcolor);backface-visibility:hidden;-webkit-backface-visibility:hidden}.woocommerce-product-gallery .wd-carousel-wrap[style*="grabbing"] .zoomImg{opacity:0 !important;transition:opacity .25s ease}.wd-gallery-thumb .wd-carousel-item{cursor:pointer;transition:opacity .25s ease}.wd-gallery-thumb :is(.wd-carousel-item:hover,.wd-thumb-active,.wd-carousel:not(.wd-initialized) .wd-carousel-item:first-child){opacity:.5}.woocommerce-product-gallery:not(.wd-has-thumb) .wd-gallery-thumb{display:none}.woocommerce-product-gallery .wd-carousel[data-center_mode="yes"] .wd-carousel-wrap:not([style]){transform:translate3d(calc(50% - (100% / var(--wd-col)) * 1.5), 0, 0)}.rtl .woocommerce-product-gallery .wd-carousel[data-center_mode="yes"] .wd-carousel-wrap:not([style]){transform:translate3d(calc(-50% + (100% / var(--wd-col)) * 1.5), 0, 0)}.woocommerce-product-gallery .wd-carousel[data-center_mode="yes"] .wd-carousel-wrap:not([style]) .wd-carousel-item:first-child:last-child{margin-inline-start:auto}.product-additional-galleries{position:absolute;bottom:0;inset-inline-start:0;z-index:3;display:flex;align-items:flex-start;flex-direction:column;gap:10px;padding:15px;transition:all .3s ease}.wd-action-btn.wd-style-icon-bg-text{--wd-action-icon-size: 18px;--wd-action-color: var(--color-gray-600);--wd-action-color-hover: var(--color-gray-800)}.wd-action-btn.wd-style-icon-bg-text>a{flex-wrap:nowrap;overflow:hidden;min-width:calc(var(--wd-action-icon-size) * 2.8);height:calc(var(--wd-action-icon-size) * 2.8);border-radius:calc(var(--wd-action-icon-size) * 2);background-color:var(--bgcolor-white);box-shadow:0 0 5px rgba(0,0,0,0.08)}.wd-action-btn.wd-style-icon-bg-text>a:before{display:inline-flex;align-items:center;justify-content:center;width:calc(var(--wd-action-icon-size) * 2.8);height:calc(var(--wd-action-icon-size) * 2.8)}.wd-action-btn.wd-style-icon-bg-text>a>span{overflow:hidden;max-width:0;white-space:nowrap;font-size:90%;font-weight:600;transition:padding 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15),max-width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15)}.wd-action-btn.wd-style-icon-bg-text>a:hover>span{padding-inline-end:calc(var(--wd-action-icon-size) * 1.4);max-width:280px}.product-360-button>a:before{content:"\f102"}.wd-show-product-gallery-wrap>a:before{content:"\f127"}.wd-play-icon>a:before{content:"\f101"}.product-360-view-wrapper{--wd-popup-width: 700px}.product-360-view-wrapper.wd-popup{--wd-popup-padding: .001px;background-color:transparent}.woocommerce-product-gallery.image-action-zoom .wd-carousel-item figure a:last-child,.woocommerce-product-gallery.image-action-none .wd-carousel-item figure a{cursor:default;pointer-events:none}.woocommerce-product-gallery .product-labels{inset-inline-start:auto;z-index:10;align-items:flex-end;max-width:30%}.woocommerce-product-gallery .product-labels.labels-rectangular{inset-inline:auto 0}.woocommerce-product-gallery .product-labels[class*="labels-rounded"]{top:15px;inset-inline-end:15px}.woocommerce-product-gallery .product-labels.labels-rounded .product-label{min-width:55px;min-height:55px}.woocommerce-product-gallery .product-labels.labels-rounded .label-with-img{min-height:auto}@media (min-width: 1025px){[style*="col-lg:auto"] .wd-carousel-item{flex:0 0 auto;max-width:unset}.wd-builder-on :is(.thumbs-grid-bottom_grid,.thumbs-grid-bottom_column) .wd-carousel{--wd-col: var(--wd-col-lg)!important}}@media (max-width: 1024px){.wd-action-btn.wd-style-icon-bg-text{--wd-action-icon-size: 16px}}@media (max-width: 768.98px){[style*="col-sm:auto"] .wd-carousel-item{flex:0 0 auto;max-width:unset}.wd-builder-on :is(.thumbs-grid-bottom_grid,.thumbs-grid-bottom_column) .wd-carousel{--wd-col: var(--wd-col-sm)!important}}@media (max-width: 576px){.woocommerce-product-gallery .product-labels[class*="labels-rounded"]{top:10px;inset-inline-end:10px}.woocommerce-product-gallery .product-labels.labels-rounded .product-label{min-width:40px;min-height:40px}.woocommerce-product-gallery .product-labels.labels-rounded .label-with-img{min-height:auto}}@media (min-width: 769px) and (max-width: 1024px){[style*="col-md:auto"] .wd-carousel-item{flex:0 0 auto;max-width:unset}.wd-builder-on :is(.thumbs-grid-bottom_grid,.thumbs-grid-bottom_column) .wd-carousel{--wd-col: var(--wd-col-md)!important}}


/* ==========================================
   ИСПРАВЛЕННАЯ ГАЛЕРЕЯ В СТИЛЕ NOTINO
   ========================================== */

/* Основной контейнер галереи - сохраняем flex */
.woocommerce-product-gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
}

.woocommerce-product-gallery > * {
    flex: 1 1 100% !important;
    max-width: 100% !important;
}

/* ГЛАВНОЕ ИЗОБРАЖЕНИЕ - ПРАВИЛЬНОЕ ЦЕНТРИРОВАНИЕ */
.woocommerce-product-gallery img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    object-fit: contain !important; /* КЛЮЧЕВОЕ - содержать а не растягивать */
    object-position: center !important; /* ЦЕНТРИРОВАТЬ */
}

/* Контейнер основного изображения */
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    background: #ffffff !important;
    border-radius: 8px !important;
    padding: 20px !important;
    text-align: center !important;
    margin-bottom: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 400px !important; /* Минимальная высота для центрирования */
}

/* Основное изображение в контейнере */
.woocommerce-product-gallery .woocommerce-product-gallery__image {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    width: 100% !important;
    max-width: 500px !important; /* Максимальная ширина */
    margin: 0 auto !important;
}

.woocommerce-product-gallery .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    max-height: 450px !important; /* Максимальная высота */
    object-fit: contain !important; /* СОДЕРЖАТЬ ПОЛНОСТЬЮ */
    object-position: center !important;
    border-radius: 6px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* МИНИАТЮРЫ - ИСПРАВЛЕННОЕ ЦЕНТРИРОВАНИЕ */
.woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 15px 0 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
    flex-wrap: wrap !important;
}

.woocommerce-product-gallery .flex-control-thumbs li {
    width: 80px !important;
    height: 80px !important;
    margin: 0 !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 2px solid #e0e0e0 !important;
    padding: 4px !important;
    box-sizing: border-box !important;
}

.woocommerce-product-gallery .flex-control-thumbs li img {
    width: 100% !important;
    height: 100% !important;
    max-width: 70px !important;
    max-height: 70px !important;
    object-fit: contain !important; /* СОДЕРЖАТЬ ПОЛНОСТЬЮ */
    object-position: center !important;
    border-radius: 4px !important;
    transition: border-color 0.3s ease !important;
    display: block !important;
}

.woocommerce-product-gallery .flex-control-thumbs li:hover,
.woocommerce-product-gallery .flex-control-thumbs li.flex-active-slide {
    border-color: #333333 !important;
}

/* Carousel и внутренние элементы */
.woocommerce-product-gallery .wd-carousel-inner {
    margin: 0 !important;
}

.woocommerce-product-gallery .wd-carousel {
    --wd-gap: 10px;
    padding: 0 !important;
    border-radius: 8px !important;
}

/* Скрываем навигационные элементы */
.woocommerce-product-gallery .wd-nav-arrows.wd-pos-sep {
    --wd-arrow-offset-h: calc(var(--wd-arrow-width, var(--wd-arrow-size, 50px)) / -1);
    display: none !important; /* Скрываем стрелки */
}

.woocommerce-product-gallery .wd-nav-pagin-wrap {
    position: absolute;
    inset-inline: 15px;
    bottom: 15px;
    z-index: 2;
    display: none !important; /* Скрываем пагинацию */
}

/* Zoom изображения */
.woocommerce-product-gallery .zoomImg[src$=".png"] {
    background-color: #ffffff !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.woocommerce-product-gallery .wd-carousel-wrap[style*="grabbing"] .zoomImg {
    opacity: 0 !important;
    transition: opacity .25s ease;
}

/* Thumb галерея */
.wd-gallery-thumb .wd-carousel-item {
    cursor: pointer;
    transition: opacity .25s ease;
}

.wd-gallery-thumb :is(.wd-carousel-item:hover, .wd-thumb-active, .wd-carousel:not(.wd-initialized) .wd-carousel-item:first-child) {
    opacity: 1 !important; /* Изменил с 0.5 на 1 */
}

.woocommerce-product-gallery:not(.wd-has-thumb) .wd-gallery-thumb {
    display: none;
}

/* Центрирование carousel */
.woocommerce-product-gallery .wd-carousel[data-center_mode="yes"] .wd-carousel-wrap:not([style]) {
    transform: translate3d(calc(50% - (100% / var(--wd-col)) * 1.5), 0, 0);
}

.rtl .woocommerce-product-gallery .wd-carousel[data-center_mode="yes"] .wd-carousel-wrap:not([style]) {
    transform: translate3d(calc(-50% + (100% / var(--wd-col)) * 1.5), 0, 0);
}

.woocommerce-product-gallery .wd-carousel[data-center_mode="yes"] .wd-carousel-wrap:not([style]) .wd-carousel-item:first-child:last-child {
    margin-inline-start: auto;
}

/* Дополнительные галереи */
.product-additional-galleries {
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    transition: all .3s ease;
}

/* Кнопки действий */
.wd-action-btn.wd-style-icon-bg-text {
    --wd-action-icon-size: 18px;
    --wd-action-color: var(--color-gray-600);
    --wd-action-color-hover: var(--color-gray-800);
}

.wd-action-btn.wd-style-icon-bg-text > a {
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: calc(var(--wd-action-icon-size) * 2.8);
    height: calc(var(--wd-action-icon-size) * 2.8);
    border-radius: calc(var(--wd-action-icon-size) * 2);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.08);
}

.wd-action-btn.wd-style-icon-bg-text > a:before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--wd-action-icon-size) * 2.8);
    height: calc(var(--wd-action-icon-size) * 2.8);
}

.wd-action-btn.wd-style-icon-bg-text > a > span {
    overflow: hidden;
    max-width: 0;
    white-space: nowrap;
    font-size: 90%;
    font-weight: 600;
    transition: padding 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15), max-width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.wd-action-btn.wd-style-icon-bg-text > a:hover > span {
    padding-inline-end: calc(var(--wd-action-icon-size) * 1.4);
    max-width: 280px;
}

/* Иконки кнопок */
.product-360-button > a:before {
    content: "\f102";
}

.wd-show-product-gallery-wrap > a:before {
    content: "\f127";
}

.wd-play-icon > a:before {
    content: "\f101";
}

/* 360 view */
.product-360-view-wrapper {
    --wd-popup-width: 700px;
}

.product-360-view-wrapper.wd-popup {
    --wd-popup-padding: .001px;
    background-color: transparent;
}

/* Действия с изображениями */
.woocommerce-product-gallery.image-action-zoom .wd-carousel-item figure a:last-child,
.woocommerce-product-gallery.image-action-none .wd-carousel-item figure a {
    cursor: default;
    pointer-events: none;
}

/* Лейблы товаров */
.woocommerce-product-gallery .product-labels {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 10 !important;
    align-items: flex-end;
    max-width: 30% !important;
}

.woocommerce-product-gallery .product-labels.labels-rectangular {
    inset-inline: auto 0;
}

.woocommerce-product-gallery .product-labels[class*="labels-rounded"] {
    top: 15px;
    inset-inline-end: 15px;
}

.woocommerce-product-gallery .product-labels.labels-rounded .product-label {
    min-width: 55px;
    min-height: 55px;
}

.woocommerce-product-gallery .product-labels.labels-rounded .label-with-img {
    min-height: auto;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (min-width: 1025px) {
    [style*="col-lg:auto"] .wd-carousel-item {
        flex: 0 0 auto;
        max-width: unset;
    }

    .wd-builder-on :is(.thumbs-grid-bottom_grid, .thumbs-grid-bottom_column) .wd-carousel {
        --wd-col: var(--wd-col-lg) !important;
    }
}

@media (max-width: 1024px) {
    .wd-action-btn.wd-style-icon-bg-text {
        --wd-action-icon-size: 16px;
    }
    
    .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        min-height: 350px !important;
    }
    
    .woocommerce-product-gallery .woocommerce-product-gallery__image img {
        max-height: 400px !important;
    }
}

@media (max-width: 768.98px) {
    [style*="col-sm:auto"] .wd-carousel-item {
        flex: 0 0 auto;
        max-width: unset;
    }

    .wd-builder-on :is(.thumbs-grid-bottom_grid, .thumbs-grid-bottom_column) .wd-carousel {
        --wd-col: var(--wd-col-sm) !important;
    }
    
    .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        min-height: 300px !important;
        padding: 15px !important;
    }
    
    .woocommerce-product-gallery .flex-control-thumbs {
        gap: 8px !important;
    }
    
    .woocommerce-product-gallery .flex-control-thumbs li {
        width: 70px !important;
        height: 70px !important;
    }
    
    .woocommerce-product-gallery .flex-control-thumbs li img {
        max-width: 60px !important;
        max-height: 60px !important;
    }
}

@media (max-width: 576px) {
    .woocommerce-product-gallery .product-labels[class*="labels-rounded"] {
        top: 10px;
        inset-inline-end: 10px;
    }

    .woocommerce-product-gallery .product-labels.labels-rounded .product-label {
        min-width: 40px;
        min-height: 40px;
    }

    .woocommerce-product-gallery .product-labels.labels-rounded .label-with-img {
        min-height: auto;
    }
    
    .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        min-height: 250px !important;
        padding: 10px !important;
    }
    
    .woocommerce-product-gallery .flex-control-thumbs li {
        width: 60px !important;
        height: 60px !important;
    }
    
    .woocommerce-product-gallery .flex-control-thumbs li img {
        max-width: 50px !important;
        max-height: 50px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    [style*="col-md:auto"] .wd-carousel-item {
        flex: 0 0 auto;
        max-width: unset;
    }

    .wd-builder-on :is(.thumbs-grid-bottom_grid, .thumbs-grid-bottom_column) .wd-carousel {
        --wd-col: var(--wd-col-md) !important;
    }
}
/* ===============================================
   ИСПРАВЛЕНИЕ ГЛАВНОГО ИЗОБРАЖЕНИЯ ГАЛЕРЕИ
   Серый фон на всю ширину/высоту + изображение по центру
   =============================================== */

/* Контейнер основного изображения - серый фон на весь блок */
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    background: #f5f5f5 !important; /* Серый фон вместо белого */
    border-radius: 8px !important;
    padding: 0 !important; /* Убираем padding чтобы фон был на весь блок */
    text-align: center !important;
    margin-bottom: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 400px !important;
    width: 100% !important; /* На всю ширину */
    height: 400px !important; /* Фиксированная высота */
}

/* Основное изображение в контейнере */
.woocommerce-product-gallery .woocommerce-product-gallery__image {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 0 !important; /* Убираем скругление у изображения */
    width: 100% !important; /* На всю ширину контейнера */
    height: 100% !important; /* На всю высоту контейнера */
    max-width: none !important; /* Убираем ограничение ширины */
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Само изображение - всегда по центру */
.woocommerce-product-gallery .woocommerce-product-gallery__image img {
    width: auto !important; /* Автоматическая ширина */
    height: auto !important; /* Автоматическая высота */
    max-width: 100% !important; /* Не выходить за границы контейнера */
    max-height: 100% !important; /* Не выходить за границы контейнера */
    object-fit: contain !important; /* СОДЕРЖАТЬ ПОЛНОСТЬЮ */
    object-position: center !important; /* По центру */
    border-radius: 0 !important; /* Убираем скругление */
    display: block !important;
    margin: 0 auto !important;
}

/* Убираем дополнительные отступы если есть ссылки или фигуры */
.woocommerce-product-gallery .woocommerce-product-gallery__image a,
.woocommerce-product-gallery .woocommerce-product-gallery__image figure {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===============================================
   АДАПТИВНЫЕ РАЗМЕРЫ ДЛЯ ГЛАВНОГО ИЗОБРАЖЕНИЯ
   =============================================== */

/* Планшеты */
@media (max-width: 1024px) {
    .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        height: 350px !important;
        min-height: 350px !important;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        height: 300px !important;
        min-height: 300px !important;
        border-radius: 6px !important; /* Меньшее скругление на мобильном */
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        height: 250px !important;
        min-height: 250px !important;
        border-radius: 4px !important;
    }
}

/* ===============================================
   ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ
   =============================================== */

/* Плавная анимация при смене изображений */
.woocommerce-product-gallery .woocommerce-product-gallery__image img {
    transition: opacity 0.3s ease !important;
}

/* Лоадер при загрузке нового изображения */
.woocommerce-product-gallery .woocommerce-product-gallery__image.loading {
    position: relative;
}

.woocommerce-product-gallery .woocommerce-product-gallery__image.loading:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #ddd;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Убираем эффект зума если он мешает центрированию */
.woocommerce-product-gallery .zoomImg {
    object-fit: contain !important;
    object-position: center !important;
}