/* Критические стили для детальной карточки товара */

/* Галерея */
.product-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    cursor: pointer;
}
.product-gallery.single-image-gallery img {
    max-height: 620px;
}
.product-gallery .swiper-pagination {
    bottom: -32px;
}
.product-gallery .sb-wrapper {
    width: 100%;
    aspect-ratio: 2 / 1;
}
/* Блок информации о товаре */
.product-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 51px;
    margin: 56px 0;
}
/* Блок Цена + CTA */
.product-info-price-wrap{
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 9px;
    align-items: center;
}
.product-info-price{
    display: flex;
    flex-direction: column;
}
.product-info-price-title{
    font-size: 20px;
    color: var(--text-main);
}
.product-info-price-value{
    font-size: 32px;
    color: var(--text-black);
    font-weight: 600;
    position: relative;
}

.product-info-button button{
    background-color: var(--bg-cta-main);
    color: var(--text-white);
    font-size: 22px;
    padding: 12px 40px;
    border-radius: 8px;
    transition: 0.3s ease;
    height: 54px;
    font-weight: 600;
}
.product-info-button button:hover{
    background-color: var(--link-hover-alt-2);
}

.per-month {
    font-size: 18px;
}

.product-info-price-value.product-price-pm {
    font-size: 16px;
    color: #777;
    font-weight: 400;
}
.product-info-price-value.product-price-pm .ruble {
    font-weight: 400;
}
.infobar {
     position: relative;
    top: 0;
    right: 0;
    display: inline;
    margin-left: 0;
}
.product-main-price .infobar{
    margin-left: 6px;
}
.infobar > .info-icon{
    position: absolute;
    cursor: pointer;
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    top: 0;
    right: -16px;
}
.infobar > .info-icon svg{
    max-width: unset;
    position: absolute;
    top: 0;
    left: 0;
}
.infobar > .info-icon svg:hover path:nth-child(1){
    fill: var(--link-hover-main);
    transition:  .2s ease;
}
.infobar > .info-body{
    position: absolute;
    top: 24px;
    left: -141px;
    width: 245px;
    height: fit-content;
    background-color: var(--bg-white);
    border-radius: 8px;
    -webkit-box-shadow: 0 4px 12px 0 rgba(0, 0, 0, .1);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, .1);
    padding: 20px;
    font-size: 14px;
    z-index: 2;
    display: none;
    font-weight: 400;
    color: var(--text-main);
}

@media (max-width: 992px) {
    .product-info-button button{
        font-size: 18px;
        padding: 12px 30px;
        height: 45px;
    }
    .product-info-price-title{
        font-size: 16px;
    }
    .product-info-price-value{
        font-size: 24px;
    }
    .product-info-price-value.product-price-pm {
        font-size: 14px;
    }
    .sb-wrapper {
        aspect-ratio: unset;
    }
    .product-gallery .sb-wrapper {
        width: 100%;
        aspect-ratio: 3 / 2;
    }
}
@media (max-width: 768px) {
    .product-info-button button {
        font-size: 15px;
        padding: 8px 12px;
        height: 40px;
    }
    .product-info-price-title{
        font-size: 12px;
    }
    .product-info-price-value{
        font-size: 20px;
    }
    .product-info-price-value.product-price-pm {
        font-size: 12px;
    }
}
@media (max-width: 576px) {
    .product-info-price-wrap{
        flex-direction: column;
        gap: 20px;
        align-items: unset;
    }
    .product-info-price-title{
        font-size: 16px;
    }
    .product-info-price-value{
        font-size: 24px;
    }
    .product-info-button{
        width: 100%;
    }
    .product-info-button button{
        font-size: 16px;
        padding: 8px 22px;
        height: 45px;
        width: 100%;
    }
    .product-info-wrap {
        gap: 36px;
    }
    .product-info-price-value.product-price-pm {
        font-size: 14px;
    }
}


/* Остальные стили */

/* Блок навигации и характеристик */
    .product-params-nav {
    background: var(--bg-white-f7);
    border-radius: 16px;
    }
.product-nav-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Плавный скролл для iOS */
    scrollbar-width: none; /* Скрыть скроллбар в Firefox */
    background-color: #fff;
    background: var(--bg-white);
    border-radius: 16px;
    border: solid 1px #f4f4f4;
}
.product-nav-wrapper::-webkit-scrollbar {
    display: none; /* Скрыть скроллбар в Chrome/Safari */
}
    .product-nav {
    display: inline-flex;
    white-space: nowrap;
    gap: 48px;
    padding: 8px 24px;
}
.product-nav a {
    padding: 12px 0;
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
}
.product-nav a h2 {
    font-size: unset;
    color: #444;
}

.product-params-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 24px;
    grid-column-gap: clamp(32px, 6vw, 80px);
}

.product-params-title {
    font-weight: 500;
    margin-bottom: 8px;
}
.product-params-title-size {
    margin-top: 8px;
}
.product-params-wrap dl {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    font-size: 14px;
    margin: 2px;
}
.product-params-wrap dt, .product-params-wrap dd {
    width: 50%;
    box-sizing: border-box;
    display: block;
    margin:0;
    margin-bottom: 8px;
    position: relative;
    word-break: break-word;
}
.product-params-wrap dt:before {
    border-bottom: 1px dotted rgba(204, 214, 228, .6);
    bottom: .2em;
    content: "";
    display: block;
    left: 0;
    position: absolute;
    width: 100%;
}
.product-params-wrap dt span {
    background: var(--bg-white-f7);
    padding-right: 4px;
    position: relative;
}
.product-detail-page h2 {
    color: var(--text-black-alt-2);
}
.product-info-description h2 {
    margin-bottom: 4px;
}
/* Adaptive 768px */
@media (max-width: 768px) {
    .product-params-wrap {
        grid-template-columns: repeat(1, 1fr);
        row-gap: 16px;
    }
    .product-params-title-size {
        margin-top: 16px;
    }
}

/* Adaptive 576px */
@media (max-width: 576px) {
    .product-params-wrap {
        padding: 12px;
    }
    .product-nav {
        gap: 16px;
        padding: 6px 12px;
    }
    .product-nav a {
        font-size: 14px;
    }
    .product-params-wrap dl {
        font-size: 13px;
    }
}
/* Adaptive 390px */
@media (max-width: 390px) {
    .product-params-nav {
        margin-left: -12px;
        margin-right: -12px;
    }
}















    /* LightBOX */

/* Контейнер модального окна */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Оверлей для затемнения фона */
.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

/* Контейнер контента лайтбокса */
.lightbox-content {
    position: relative;
    width: 96%;
    height: 96%;
    border-radius: 4px;
    overflow: hidden;
    z-index: 10;
}

/* Кнопка закрытия лайтбокса */
.lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
    background: transparent;
    border: none;
    font-size: 64px;
    color: #fff;
    cursor: pointer;
    line-height: 50%;
}
.lightbox-close:hover {
    color: #ccc;
}

/* Стили для контейнера Swiper внутри лайтбокса */
.lightbox-swiper {
    width: 100%;
    height: 100%;
}
.lightbox-swiper .swiper-wrapper {
    height: 100%;
}
.lightbox-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-swiper .swiper-button-prev {
    left:0;
}
.lightbox-swiper .swiper-button-next {
    right:0;
}

/* Стили блока Цвета товара */
.product-colors-content {
    display: flex;
    gap: clamp(24px,4.7vw,64px);
}
.product-colors-content > div {
    width: 100%;
}
.product-colors-slider-column .product-card__image-wrapper {
    border-radius: 16px;
}
.product-colors-text-column {
    display: flex;
    flex-direction: column;
    font-size: 18px;
    font-weight: 300;
    line-height: 140%;
    gap: 24px;
}
.product-colors-text-column-text {
    font-size: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-colors-text-column-text-title {
    font-weight: 500;
    font-size: 30px;
    color: var(--text-alt);
    line-height: 125%;
}
.product-colors-text-column-text-subtitle {
    font-size: 18px;
}

/* Adaptive 1150px */
@media (max-width: 1150px) {
    .product-colors-text-column-text-title {
        font-size: clamp(22px, 2.2vw, 26px);
    }
    .product-colors-text-column-text-subtitle {
        font-size: 16px;
    }
}
/* Adaptive 768px */
@media (max-width: 768px) {
    .product-colors-content {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
    .product-colors-text-column-text {
        max-width: unset;
    }
    .product-colors-text-column-text-title {
        font-size: clamp(22px, 4.7vw, 32px);
    }
    .product-colors-text-column-text-subtitle {
        font-size: 18px;
    }
}
/* Adaptive 576px */
@media (max-width: 576px) {
    .product-colors-text-column-text-subtitle {
        font-size: 16px;
    }
    .product-colors-text-column-button button {
        width: 100%;
        font-size: 16px;
        padding: 14px 24px;
    }
    .product-colors-text-column {
        gap: 16px;
    }
}

.product-colors-slider-column .product-card__image-wrapper.product-slider-with-nav {
    position: relative; /* Необходимо для позиционирования кнопок */
}

.slider-custom-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 1);
    border: none;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.slider-custom-nav-button:hover {
    background-color: var(--bg-blue);
}

.slider-custom-nav-button svg {
    fill: var(--bg-blue);
    width: 24px; /* Размер иконок */
    height: 24px;
    transition: 0.3s ease;
}
.slider-custom-nav-button:hover svg {
    fill: #ffffff;
}

.slider-custom-nav-prev {
    left: 10px; /* Отступ слева */
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.slider-custom-nav-next {
    right: 10px; /* Отступ справа */
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.slider-custom-nav-button.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none; /* Чтобы нельзя было кликнуть */
}

/* Адаптивность для кнопок, если нужно */
@media (max-width: 768px) {
    .slider-custom-nav-button {
        width: 32px;
        height: 32px;
    }
    .slider-custom-nav-button svg {
        width: 20px;
        height: 20px;
    }
    .slider-custom-nav-prev {
        left: 5px;
    }
    .slider-custom-nav-next {
        right: 5px;
    }
}


/*/* --- Стили для блока "Коллекция" --- */

/* Обертка картинки должна быть позиционирована для дочерних абсолютных элементов */
.product-collection-slider .product-card__image-wrapper {
    position: relative;
    /* Убираем отступ снизу, т.к. заголовок теперь внутри */
    padding-bottom: 0;
}


/* Контейнер для заголовка под слайдером */
.product-collection-slider .collection-slider-title {
    /* Абсолютное позиционирование */
    position: absolute;
    bottom: 32px; /* Отступ снизу */
    right: 0;  /* Отступ справа, чтобы текст не вылезал за пределы */

    /* Внешний вид */
    background-color: rgba(0, 0, 0, 0.6); /* Черный полупрозрачный фон */
    color: #fff; /* Белый цвет текста */
    padding: 8px 12px; /* Внутренние отступы */
    border-radius: 8px 0 0 8px;

    /* Текст */
    font-size: 14px;
    line-height: 1.3;
    text-align: right;

    /* Анимация для плавного появления/исчезновения (опционально, но красиво) */
    transition: opacity 0.3s ease;

    /* Убираем старые свойства, которые больше не нужны */
    margin-top: 0;
    height: auto;

}

.product-collection-slider .slider-custom-nav-button.disabled, .product-colors-slider .slider-custom-nav-button:disabled {
    opacity: 0.7;
    cursor: auto;
    pointer-events: auto;
}