/* Detail section*/
.mobile_only {
    display: none;
}

p.caption.mobile {
    display: none;
}

.order_title.mobile {
    display: none;
}

button, input, select, textarea {
    font-family: inherit; /* Наследовать шрифт от родителя */
    font-size: inherit;   /* Наследовать размер */
    color: inherit;       /* Наследовать цвет текста */
}

.back_title {
    margin: 40px 0 20px;
    width: 70%;
    margin-inline: auto;
}

.back_link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back_link svg {
    display: inline-block;
    vertical-align: middle;
}

.camera_common {
    display: flex;
    /*justify-content: space-between;*/
    gap: 40px;
    width: 70%;
    margin-inline: auto;
}

.camera_images {
    display: flex;
    flex-direction: column;
    width: 40%;
    /*margin: 25px;*/
}

.big_image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.big_image img {
    transition: opacity 1s ease;
    aspect-ratio: 4 / 3;
    object-fit: fill;
}

.big_image img:hover {
    /*opacity: 0.5;*/
    opacity: 1;
}

/* Левая зона-шторка (Назад) */
.big_image .swiper-button-next,
.big_image .swiper-button-prev {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    width: 50px !important;
    margin: 0 !important;
    background: transparent !important;
    cursor: pointer;
    z-index: 10;
}

.big_image .swiper-button-next {
    right: 0 !important;
}

.big_image .swiper-button-prev {
    left: 0 !important;
}

.big_image .swiper-button-prev::before,
.big_image .swiper-button-next::before {
    content: "" !important;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px; /* Жесткая ширина шторки */
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Левая шторка: объединяем стрелочку и градиент в ОДНО свойство */
.big_image .swiper-button-prev::before {
    left: 0;
    /* Первым слоем кладем стрелочку, вторым слоем (через запятую) — жесткий градиент */
    background:
        url('/static/main/images/arrow_prev_swiper.svg') no-repeat center / 30px 30px,
        linear-gradient(to right, rgba(0, 0, 0, 0.2) 40px, rgba(0, 0, 0, 0) 40px);
    transform: translateX(-5px);
}

/* Правая шторка: зеркально */
.big_image .swiper-button-next::before {
    right: 0;
    background:
        url('/static/main/images/arrow_next_swiper.svg') no-repeat center / 30px 30px,
        linear-gradient(to left, rgba(0, 0, 0, 0.2) 40px, rgba(0, 0, 0, 0) 40px);
    transform: translateX(5px);
}

/* === ЭФФЕКТ ПЛАВНОГО НАВЕДЕНИЯ === */
.big_image .swiper-button-prev:hover::before,
.big_image .swiper-button-next:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/*.big_image .swiper-button-next:hover::before {
    opacity: 1;
    transform: translateX(0);
}*/

/* Контейнер миниатюр */
.small_images_set {
    width: 100% !important;
    margin-top: 10px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    overflow: visible !important; /* Разрешаем элементам дышать */
    box-sizing: border-box !important;
}

/* Обертка для иконок */
.small_images_set .swiper-wrapper {
    display: flex !important;
    width: 100% !important;
    /* Выравниваем иконки по левому краю */
    justify-content: flex-start !important;
    align-items: center !important;
    transform: none !important;
    box-sizing: border-box !important;
    /* Включаем перенос, чтобы флекс-элементы вели себя предсказуемо */
    flex-wrap: wrap !important;
}

/* Слайд-контейнер */
.small_images_set .swiper-slide {
    /* Каждая иконка теперь имеет строго фиксированную ширину (примерно 15.3% от общей ширины) */
    width: calc((100% - 50px) / 6) !important;
    max-width: 120px; /* Ограничение для больших мониторов */

    /* Задаем фиксированный шаг между иконками */
    margin-right: 10px !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    position: relative !important;
    cursor: pointer !important;
    opacity: 0.5;
    transition: opacity 0.3s;
    border: none !important;
    box-sizing: border-box !important;
}

/* Убираем правый отступ у каждой 6-й иконки, чтобы ряд идеально вписывался в край */
.small_images_set .swiper-slide:nth-child(6n) {
    margin-right: 0 !important;
}

/* Изображение внутри */
.small_images_set .swiper-slide img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 4px !important;
}

/* --- СИНЯЯ РАМКА С ЛЮБИМЫМ 3 ВАРИАНТОМ --- */
.small_images_set .swiper-slide-thumb-active {
    opacity: 1 !important;
}

.small_images_set .swiper-slide-thumb-active::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    box-shadow: inset 0 0 0 2px #001EE0 !important;
    border-radius: 3px !important; /* Твой рабочий 3-й вариант */
    pointer-events: none;
    z-index: 2;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    background: #f0f0f0;
}

.small_images_item {
    width: 100%;
}

.small_images_item a {
    display: block;
    width: 100%;
    /* Создаем жесткую пропорцию 4:3 */
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.small_images_item img,
.small_images_item .video-wrapper {
    width: 100%;
    height: 100%;
    /* Ключевое свойство: заполняет область, обрезая лишнее, но сохраняя пропорции */
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity 1s ease;
}

.small_images_item img:hover {
    opacity: 0.5;
}

/* Контейнер для видео-превью */
.video_wrapper {
    position: relative;
    display: block;
    /*width: 100%;
    height: 100%;*/
    overflow: hidden;
}

/* Затемнение при наведении на видео */
.video_wrapper:hover img {
    filter: brightness(0.8);
    transition: 0.3s;
}

/* Сама кнопка Play */
.play_button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6); /* Полупрозрачный черный круг */
    border-radius: 50%;
    border: 2px solid #fff;
    transition: all 0.3s ease;
    pointer-events: none; /* Чтобы клик проходил сквозь кнопку на ссылку */
}

/* Треугольник внутри кнопки */
.play_button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 55%; /* Чуть смещаем вправо для визуального баланса */
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent #fff;
}

/* Эффект при наведении */
.small_images_item:hover .play_button {
    background: #ff0000; /* Цвет YouTube при ховере */
    border-color: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.more-photos-thumb {
    position: relative;
}

.more-photos-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Затемнение */
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    transition: background 0.3s;
}

.more-photos-badge:hover {
    background: rgba(0, 0, 0, 0.4); /* Чуть светлее при наведении */
}

.order_button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    background-color: #001EE0;
    border-radius: 15px;
    text-align: center;
    /*padding: 25px;*/
    padding-top: 15px;
    padding-bottom: 15px;
    font-size: 40px;
    font-weight: 500;
    border: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    will-change: transform;
}

.order_button img {
    width: 50px;
    height: 50px;
}

.order_button:hover {
    transform: scale(1.05);
}

.camera_data {
    width: 55%;
}

.camera_data hr {
  border: 0;
  border-top: 1px solid #FFFFFF;
}

.camera_name{
    font-size: 64px;
    font-weight: 600;
    margin-top: auto;
    margin-bottom: auto;
}

.data {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    overflow: hidden;
}

.data_item {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-left: 0;
    padding-right: 0;
    margin-right: 40px; /* Отступ МЕЖДУ колонками */
}

.data_item hr {
    border: 0;
    border-top: 1px solid #FFFFFF;
    margin: 3px 0 3px 0;
    width: calc(100% + 40px);
}

.data_item:last-child {
  margin-right: 0;
}

.data_item:last-child hr {
  width: 100%;
}

.data_title {
    font-size: 25px;
    font-weight: 500;
    padding-left: 5px;
    white-space: nowrap;
}

.data_text_prefix {
    font-size: 15px;
    font-weight: 700;
}

.data_text {
    display: flex;
    gap: 5px;
    align-items: center;
    font-size: 15px;
    font-weight: 400;
    margin: 0;
    /*margin: 10px 0 0 0;*/
    /*margin: 10px 0;*/
    /*height: 1.2em; /* Фиксируем высоту строки, чтобы они всегда совпадали */
    /*height: auto;*/
    height: 44px;
    line-height: 1.15em;
    /*margin: 0px;
    margin-top: 20px;*/
    padding-left: 5px;
}

.price_data {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.price {
    font-size: 40px;
    font-weight: 400;
    align-content: center;
}

.price_without_discount {
    font-size: 25px;
    font-weight: 400;
    align-content: center;
    opacity: 0.5;
}

.price_discount {
    background-color: #001EE0;
    border-radius: 15px;
    font-size: 40px;
    font-weight: 400;
    width: 120px;
    height: 60px;
    align-content: center;
    text-align: center;
}

.description_title {
    font-size: 25px;
    font-weight: 500;
}

.common_hr {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 115px;
    margin-bottom: 17px;
}

.camera_shots {
    margin-bottom: 75px;
}

.camera_shots_title {
    margin-left: 65px;
    margin-right: 111px;
}

/* Главный контейнер слайдера */
.camera_shots_gallery {
    margin-left: 111px;
    margin-right: 111px;
    margin-bottom: 20px;
    overflow: hidden; /* Прячем картинки, которые уходят за край */
    position: relative;
}

/* Обертка для слайдов — оставляем дефолтной для Swiper */
.camera_shots_gallery .swiper-wrapper {
    display: flex !important;
}

/* Элемент слайдера — задаем ему жесткую ширину, чтобы Swiper мог его двигать */
.camera_shots_gallery .camera_shots_item {
    width: 551px !important; /* Ширина одной карточки в ленте */
    flex-shrink: 0 !important; /* Запрещаем картинкам сжиматься */
    aspect-ratio: 4 / 3;
    position: relative;
}

/* Картинка внутри слайда */
.camera_shots_gallery .camera_shots_item img {
    transition: opacity 0.5s ease;
    display: block;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.camera_shots_gallery .camera_shots_item img:hover {
    opacity: 0.5;
}

.camera_shots_gallery .swiper-button-next,
.camera_shots_gallery .swiper-button-prev {
    opacity: 0;
    transition: opacity 0.5s;
    /*color: #001EE0;
    width: 40px;
    height: 40px;
    border-radius: 50%;*/
}

.camera_shots_gallery:hover .swiper-button-next,
.camera_shots_gallery:hover .swiper-button-prev {
    opacity: 1;
}

/*.camera_shots_gallery .swiper-button-next::after,
.camera_shots_gallery .swiper-button-prev::after {
    display: none;
}

.camera_images .swiper-button-next::after,
.camera_images .swiper-button-prev::after {
    display: none;
}*/

.swiper-navigation-icon {
    display: none !important;
}

.swiper-button-prev {
    margin-left: 20px !important;
    background-image: url('/static/main/images/arrow_prev_swiper.svg');
    background-repeat: no-repeat;
    background-size: contain;

}

.swiper-button-next {
    margin-right: 20px !important;
    background-image: url('/static/main/images/arrow_next_swiper.svg');
    background-repeat: no-repeat;
    background-size: contain;
}

/*.swiper-button-prev {
    margin-left: 20px !important;
}

.swiper-button-next {
    margin-right: 20px !important;
}*/

.order {
    border-radius: 8px;
    border: 1px solid white;
    text-align: center;
    padding: 10px;
    font-size: 25px;
}

.order_ways {
    display: flex;
    align-items: center;    /* Центрует иконку и текст по вертикали */
    /*justify-content: center; /* Центрует всё содержимое по горизонтали */
    gap: 10px;              /* Расстояние между картинкой и текстом */
    flex: 1;                /* Одинаковая ширина кнопок */
    /*padding: 10px;*/
    border-radius: 8px;
    text-decoration: none;
    color: white;
}

/* Фон затемнения */
.order_modal_overlay {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

/* Контейнер окна */
.order_modal_content {
    background-color: #090911; /* Глубокий темный цвет как на фото */
    padding: 40px;
    border-radius: 20px;
    position: relative;
    width: 90%;
    max-width: 400px;
    color: white;
    font-family: sans-serif;
}

/* Крестик */
.order_close_x {
    position: absolute;
    top: 20px; right: 20px;
    cursor: pointer;
    font-size: 24px;
    opacity: 0.7;
}

/* Заголовок */
.order_title {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 30px;
    font-weight: bold;
}

/* Сетка иконок */
/*.order_ways {
    display: flex;
    gap: 15px;
}*/

/* Кнопки мессенджеров */
.order_ways_item {
    width: 60px;
    height: 60px;
    background-color: #001EE0; /* Ярко-синий как на фото */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.order_ways_item img {
    width: 50px;
    height: 50px;
    filter: brightness(0) invert(1); /* Сделает черную иконку белой */
}

.order_ways_item:hover {
    transform: scale(1.1);
}
/* End detail section */

@media (max-width: 768px) {
    .desktop_only {
        display: none;
    }

    p.caption.desktop {
        display: none;
    }

    .mobile_only {
        display: flex;
        flex-direction: column;
    }

    .back_title.mobile {
        margin-left: 18px;
        margin-top: 15px;
        margin-bottom: 2px;
    }

    .back_link.mobile {
        font-size: 11px;
        gap: 0px;
    }

    .back_link.mobile svg{
        width: 9px;
        height: 18px;
    }

    .mobile_only .big_image {
        width: auto;
        margin-left: 18px;
        margin-right: 18px;
        height: auto;
    }

    .mobile_only .big_image img {
        border-radius: 5px;
    }

    .mobile_only .small_images_set {
        width: auto !important;
        margin-left: 18px;
        margin-right: 18px;
        margin-top: 6px !important;
    }

    .small_images_set .swiper-slide {
        width: calc((100% - 30px) / 6) !important;
        margin-right: 6px !important;
    }

    .mobile_only .camera_name {
        font-size: 22px;
        margin-left: 18px;
        margin-bottom: 2px;
    }

    .mobile_only .price_data {
        margin-left: 18px;
    }

    .mobile_only .price_data .price {
        font-size: 22px;
    }

    .mobile_only .price_data .price_without_discount {
        font-size: 15px;
    }

    .mobile_only .price_data .price_discount {
        font-size: 22px;
        border-radius: 5px;
        width: 60px;
        height: 30px;
    }

    .mobile_only .order_button {
       margin-left: 18px;
       margin-right: 18px;
       font-size: 17px;
       border-radius: 5px;
       padding-top: 5px;
       padding-bottom: 5px
    }

    .mobile_only .order_button img {
        width: 25px;
        height: 25px;
    }

    .mobile_only .common_hr {
        margin-top: 30px;
        margin-bottom: 7px;
    }

    .mobile_only .camera_shots .camera_shots_title {
        margin-left: 18px;
        margin-right: 18px;
    }

    .mobile_only .camera_shots{
        margin-bottom: 0px;
    }

    .mobile_only .camera_shots .camera_shots_title p.caption.mobile {
        display: block;
        font-size: 17px;
    }

    .mobile_only .camera_shots_gallery {
        margin-bottom: 6px;
    }

    .mobile_only .camera_shots_gallery .camera_shots_item {
        width: 250px !important;
        margin-right: 6px !important;
    }

    /*.data_item hr:last-child {
        display: none;
    }*/

    .mobile_only .data_title {
        padding-left: 0px;
    }

    .mobile_only .data_item {
        margin-left: 18px;
        margin-right: 18px;
    }

    .mobile_only .data_text {
        padding-left: 0px;
    }

    .mobile_only .data_double_items {
        display: flex;
        width: auto;
    }

    .mobile_only .data_item.left {
        margin-left: 18px;
        margin-right: 0px;
    }

    .mobile_only .data_item.right {
        margin-left: 0px;
        margin-right: 18px;
    }

    .mobile_only .data_item.right .data_text {
        justify-content: right;
        text-align: right !important;
    }

    .mobile_only .data_item.right .data_title {
        display: flex;
        justify-content: right;
    }

    .mobile_only .data_double_items .data_title {
        font-size: 17px;
    }

    .mobile_only .data_item hr {
        width: auto;
    }

    .mobile_only .data_text_prefix {
        font-size: 11px;
    }

    .mobile_only .data_text {
        justify-content: space-between;
        font-size: 11px;
        height: 24px;
    }

    .mobile_only .description {
        margin-left: 18px;
        margin-right: 18px;
        margin-bottom: 28px;
    }

    .mobile_only .description_title {
        font-size: 25px !important;
    }

    .mobile_only .description p {
        font-size: 11px;
    }

    .order_modal_content.mobile {
        width: 285px;
        height: 214px;
        padding: 0px;
        border-radius: 5px;
        background-color: #1D1D1D;
    }

    .order_title.desktop {
        display: none;
    }

    .order_title.mobile {
        display: block;
        font-size: 24px;
        font-weight: 600;
        margin-left: 22px;
        margin-top: 60px;
        margin-bottom: 15px;
    }

    .order_modal_content.mobile .order_close_x {
        top: 5px;
        right: 10px;
    }

    .order_modal_content.mobile .order_ways {
        gap: 5px;
        margin-left: 22px;
    }

    .order_modal_content.mobile .order_ways_item {
        width: 27px;
        height: 27px;
        border-radius: 5px;
    }

    .order_modal_content.mobile .order_ways_item img {
        width: 20px;
        height: 20px;
    }
}
