/* Стили для названия товара на странице single product */

/* Делаем название товара жирным - текст над ценой справа */
.single-product .spabest-single-right-title,
.single-product .spabest-single-right-col .product_title,
.single-product .spabest-single-right-col h1.product_title,
.single-product .spabest-single-right-col .spabest-single-right-title,
.single-product .summary .product_title,
.single-product .summary h1.product_title,
.single-product .woocommerce-product-details__short-description+.product_title {
    font-weight: 700 !important;
    font-weight: bold !important;
}

/* Скрываем кнопку на главной картинке товара */
.single-product .woocommerce-product-gallery__trigger,
body.single-product .woocommerce-product-gallery__trigger,
.spabest-single-page .woocommerce-product-gallery__trigger {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Делаем стрелочки для пролистывания изображений видимыми */
.single-product .woocommerce-product-gallery .flex-direction-nav,
.single-product .woocommerce-product-gallery .flex-direction-nav li,
.single-product .woocommerce-product-gallery .flex-direction-nav a,
body.single-product .woocommerce-product-gallery .flex-direction-nav,
body.single-product .woocommerce-product-gallery .flex-direction-nav li,
body.single-product .woocommerce-product-gallery .flex-direction-nav a,
.spabest-single-page .woocommerce-product-gallery .flex-direction-nav,
.spabest-single-page .woocommerce-product-gallery .flex-direction-nav li,
.spabest-single-page .woocommerce-product-gallery .flex-direction-nav a {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Стили для стрелочек навигации галереи - узкие полоски по краям */
.single-product .woocommerce-product-gallery .flex-direction-nav a,
body.single-product .woocommerce-product-gallery .flex-direction-nav a,
.spabest-single-page .woocommerce-product-gallery .flex-direction-nav a {
    color: #FFFFFF !important;
    background: rgba(0, 0, 0, 0.6) !important;
    width: 50px !important;
    height: 100% !important;
    line-height: 1 !important;
    text-align: center !important;
    border-radius: 0 !important;
    font-size: 24px !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    opacity: 0.8 !important;
    transition: opacity 0.3s ease, background 0.3s ease !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a:hover,
body.single-product .woocommerce-product-gallery .flex-direction-nav a:hover,
.spabest-single-page .woocommerce-product-gallery .flex-direction-nav a:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    color: #FFFFFF !important;
    opacity: 1 !important;
}

/* Стрелка влево - узкая полоска слева */
.single-product .woocommerce-product-gallery .flex-direction-nav .flex-prev,
body.single-product .woocommerce-product-gallery .flex-direction-nav .flex-prev,
.spabest-single-page .woocommerce-product-gallery .flex-direction-nav .flex-prev {
    left: 0 !important;
    right: auto !important;
}

/* Стрелка вправо - узкая полоска справа */
.single-product .woocommerce-product-gallery .flex-direction-nav .flex-next,
body.single-product .woocommerce-product-gallery .flex-direction-nav .flex-next,
.spabest-single-page .woocommerce-product-gallery .flex-direction-nav .flex-next {
    right: 0 !important;
    left: auto !important;
}

/* Иконки стрелок по центру полосок */
.single-product .woocommerce-product-gallery .flex-direction-nav a::before,
body.single-product .woocommerce-product-gallery .flex-direction-nav a::before,
.spabest-single-page .woocommerce-product-gallery .flex-direction-nav a::before {
    content: '' !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    border: 2px solid #FFFFFF !important;
    border-top: none !important;
    border-right: none !important;
    transform: rotate(45deg) !important;
    margin: 0 auto !important;
    text-indent: 0 !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav .flex-next::before,
body.single-product .woocommerce-product-gallery .flex-direction-nav .flex-next::before,
.spabest-single-page .woocommerce-product-gallery .flex-direction-nav .flex-next::before {
    transform: rotate(-135deg) !important;
}

/* Альтернативные селекторы для стрелок (если используется другой плагин) */
.single-product .woocommerce-product-gallery .owl-nav,
.single-product .woocommerce-product-gallery .owl-prev,
.single-product .woocommerce-product-gallery .owl-next,
body.single-product .woocommerce-product-gallery .owl-nav,
body.single-product .woocommerce-product-gallery .owl-prev,
body.single-product .woocommerce-product-gallery .owl-next,
.spabest-single-page .woocommerce-product-gallery .owl-nav,
.spabest-single-page .woocommerce-product-gallery .owl-prev,
.spabest-single-page .woocommerce-product-gallery .owl-next {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Стили для альтернативных стрелок (Owl Carousel) - узкие полоски */
.single-product .woocommerce-product-gallery .owl-prev,
.single-product .woocommerce-product-gallery .owl-next,
body.single-product .woocommerce-product-gallery .owl-prev,
body.single-product .woocommerce-product-gallery .owl-next,
.spabest-single-page .woocommerce-product-gallery .owl-prev,
.spabest-single-page .woocommerce-product-gallery .owl-next {
    color: #FFFFFF !important;
    background: rgba(0, 0, 0, 0.6) !important;
    width: 50px !important;
    height: 100% !important;
    line-height: 1 !important;
    text-align: center !important;
    border-radius: 0 !important;
    font-size: 24px !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    opacity: 0.8 !important;
    transition: opacity 0.3s ease, background 0.3s ease !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

.single-product .woocommerce-product-gallery .owl-prev::before,
.single-product .woocommerce-product-gallery .owl-next::before,
body.single-product .woocommerce-product-gallery .owl-prev::before,
body.single-product .woocommerce-product-gallery .owl-next::before,
.spabest-single-page .woocommerce-product-gallery .owl-prev::before,
.spabest-single-page .woocommerce-product-gallery .owl-next::before {
    content: '' !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    border: 2px solid #FFFFFF !important;
    border-top: none !important;
    border-right: none !important;
    transform: rotate(45deg) !important;
    margin: 0 auto !important;
    text-indent: 0 !important;
}

.single-product .woocommerce-product-gallery .owl-next::before,
body.single-product .woocommerce-product-gallery .owl-next::before,
.spabest-single-page .woocommerce-product-gallery .owl-next::before {
    transform: rotate(-135deg) !important;
}

.single-product .woocommerce-product-gallery .owl-prev:hover,
.single-product .woocommerce-product-gallery .owl-next:hover,
body.single-product .woocommerce-product-gallery .owl-prev:hover,
body.single-product .woocommerce-product-gallery .owl-next:hover,
.spabest-single-page .woocommerce-product-gallery .owl-prev:hover,
.spabest-single-page .woocommerce-product-gallery .owl-next:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    opacity: 1 !important;
}

.single-product .woocommerce-product-gallery .owl-prev {
    left: 0 !important;
    right: auto !important;
}

.single-product .woocommerce-product-gallery .owl-next {
    right: 0 !important;
    left: auto !important;
}

/* Скрываем миниатюры галереи - показываем только основное изображение со стрелками */
.single-product .woocommerce-product-gallery .flex-control-nav,
.single-product .woocommerce-product-gallery .flex-control-thumbs,
.single-product .woocommerce-product-gallery ol.flex-control-nav,
.single-product .woocommerce-product-gallery ol.flex-control-thumbs,
body.single-product .woocommerce-product-gallery .flex-control-nav,
body.single-product .woocommerce-product-gallery .flex-control-thumbs,
body.single-product .woocommerce-product-gallery ol.flex-control-nav,
body.single-product .woocommerce-product-gallery ol.flex-control-thumbs,
.spabest-single-page .woocommerce-product-gallery .flex-control-nav,
.spabest-single-page .woocommerce-product-gallery .flex-control-thumbs,
.spabest-single-page .woocommerce-product-gallery ol.flex-control-nav,
.spabest-single-page .woocommerce-product-gallery ol.flex-control-thumbs,
.single-product .woocommerce-product-gallery__wrapper .flex-control-nav,
.single-product .woocommerce-product-gallery__wrapper .flex-control-thumbs,
body.single-product .woocommerce-product-gallery__wrapper .flex-control-nav,
body.single-product .woocommerce-product-gallery__wrapper .flex-control-thumbs,
.spabest-single-page .woocommerce-product-gallery__wrapper .flex-control-nav,
.spabest-single-page .woocommerce-product-gallery__wrapper .flex-control-thumbs {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {

    .single-product .woocommerce-product-gallery .flex-direction-nav a,
    body.single-product .woocommerce-product-gallery .flex-direction-nav a,
    .spabest-single-page .woocommerce-product-gallery .flex-direction-nav a {
        width: 35px !important;
        height: 35px !important;
        line-height: 35px !important;
        font-size: 18px !important;
    }
}

/* Центрирование изображения товара в слайдере */
.single-product .woocommerce-product-gallery .flex-viewport {
    /* display: flex !important; REMOVED - breaks slider */
}

/* Ensure individual slides (LI elements) are centered */
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image {
    margin: 0 auto !important;
    text-align: center !important;
    display: block !important;
}

/* Center the image itself */
.single-product .woocommerce-product-gallery img {
    margin: 0 auto !important;
    display: inline-block !important;
    /* Changed from block to respect text-align if needed, or block with margin auto works too */
    max-height: 100% !important;
    object-fit: contain !important;
}