/* Характеристики (таблица свойств) */
.product-specs td {
    font-family: 'TildaSans', sans-serif !important;
}

@media screen and (min-width: 640px) {
    .js-store-single-product-info {
        max-width: 500px;
    }
    
    /* Заголовок */
    .t762__title {
      font-size: 32px !important;
    }
    
    /* Характеристики (таблица свойств) */
    .product-specs td {
      font-size: 18px !important;
    }
    
    /* Заголовки опций (Цвет, Объём памяти) */
    .t-product__option-title.t-descr.t-descr_xxs {
      font-size: 16px !important;
    }

    .t762__col.t762__col_padding {
        padding-top: 60px !important;
        padding-bottom: 0 !important;
    }
    
    /* Кнопка "В корзину" */
    .t762__btn {
      font-size: 18px !important;
      height: 60px !important;
    }
}

@media screen and (min-width: 960px) {
    .t-rec_pt_120 {
        padding-top: 40px !important;
    }
    
    .t-slds__thumbsbullet.t-slds__bullet {
        max-width: 136px !important;
        max-height: 136px !important;
    }
}

@media screen and (min-width: 1600px) {
    .t-rec_pt_120 {
        padding-top: 70px !important;
    }
    
    .t-slds__thumbsbullet.t-slds__bullet {
        max-width: 156px !important;
        max-height: 156px !important;
    }
}

body {
    overflow-x: hidden;
}

/* ========================================================= */
/* Общая логика показа/скрытия — теперь завязана на           */
/* .uppermenu-container / .uppermenu-banner                   */
/* ========================================================= */
.uppermenu, .uppermenu-container, .uppermenu-basic, .uppermenu-banner {
    position: absolute !important; /* Убираем из потока */
    left: 0; /* Позиция по горизонтали */
    z-index: -1 !important;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s !important; /* Задержка visibility при скрытии */
    opacity: 0 !important; /* Начальное состояние - скрыто */
    visibility: hidden !important; /* Начальное состояние - скрыто */
    pointer-events: none !important; /* Не перехватываем события, пока скрыто */
}

.uppermenu-container, .uppermenu-basic, .uppermenu-banner {
  z-index: -1 !important; /* Контейнер/баннер поверх меню */
}

.uppermenu-banner {
    display: table !important;
}

.uppermenu-container.visible .tn-molecule:hover {
    background-image: linear-gradient(0.851turn,rgba(142,142,142,0.5) 42%, rgba(255,255,255,0.5) 76%) !important;
}

/* Показ элементов при активации */
.uppermenu.visible, .uppermenu-container.visible, .uppermenu-basic.visible, .uppermenu-banner.visible {
    opacity: 1 !important;
    z-index: 1000 !important; /* Возвращаем поверх контента */
    visibility: visible !important;
    transition: opacity 0.3s ease, visibility 0s linear !important; /* Появление без задержки */
    pointer-events: auto !important; /* Включаем обратно, когда видимо */
}

/* Внутренности контейнера (title/text/image) скрыты/показаны вместе с ним */
.uppermenu-container .tn-atom, .uppermenu-banner .tn-atom, .uppermenu-basic .tn-atom {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none;
    z-index: 1500 !important;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s !important;
    pointer-events: none !important;
}

.uppermenu-container.visible .tn-atom, .uppermenu-banner.visible .tn-atom, .uppermenu-basic.visible .tn-atom {
    opacity: 1 !important;
    visibility: visible !important;
    display: table-cell !important;
    transition: opacity 0.3s ease, visibility 0s linear !important;
    pointer-events: auto !important;
}

.t396__artboard:not(.t396__artboard-flex) .t396__filter {
    opacity: 0 !important; /* Начальное состояние - скрыто */
    visibility: hidden !important; /* Начальное состояние - скрыто */
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
}

.t396__artboard:not(.t396__artboard-flex) .t396__filter.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity 0.3s ease, visibility 0s linear !important;
    pointer-events: auto !important;
}

.tn-atom, .mobile-overview {
    text-transform: none !important;
}

/* ========================================================= */
/* Специфичные (не связанные с показом/скрытием) стили        */
/* ========================================================= */

/* Индивидуальная позиция конкретного текстового блока */
.uppermenu-text[data-elem-id="1748255996333"] {
    top: 23px !important; /* Из вашего HTML */
    left: 46px !important;
    width: auto !important;
    height: auto !important;
}

/* Цвет текста ссылок и заголовка бренда */
.uppermenu-text .tn-atom, .uppermenu-title .tn-atom {
    color: #ffffff;
}

/* Плавное затемнение текста при наведении */
.uppermenu-text:hover .tn-atom {
  color: #DCD2AF !important;
  transition: opacity 0.3s ease !important;
}

.t-slds__items-wrapper t-slds_animated-none {
    height: auto;
}

.t-slds__imgwrapper {
    margin: 50px auto 0 auto !important;
    width: 50%;
    max-width: 461px;
}

.mobile-menu {
    display: none !important;
    opacity: 0;
    background-color: #3A4120;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    display: block !important;
    opacity: 1;
}

.mobile-menu-text {
    display: none !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-text.active {
    display: block !important;
    opacity: 1;
}

.t762__btn-bottom {
    position: relative;
    z-index: 3;
    text-align: center;
}

.t762 .t-product__option {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.t-product__option-variants_radio {
    padding: 10px 0 0 0 !important;
}

.t762__price-currency.js-product-price-currency {
    font-size: 41px;
}

.t-name_xl {
    font-size: 23px !important;
}

@media (min-width: 768px) {
    .t-name_xl {
        font-size: 26px !important;
        line-height: 25px !important;
    }
    
    .t762__price-value {
        font-size: 33px;
    }
    
    .t762__price-currency.js-product-price-currency {
        font-size: 33px;
    }
   
}

@media (max-width: 768px) {
     .t-slds__imgwrapper {
        margin: 0 auto !important;
    }
}


/* Основные стили для контейнера цветов */
.t-product__option-variants_radio {
    display: flex !important;
    flex-direction: row !important;
    gap: 3px !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    padding: 10px 0 !important;
    overflow-x: auto !important;
}

/* Скрытие миниатюр */
.t-product__option-checkmark_image {
    display: none !important;
}

/* Стили для кастомных радиокнопок цвета */
.t-product__option-item_image,
.t-product__option-item_color {
    position: relative;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 25px !important;
    height: 25px !important;
    flex-shrink: 0 !important;
    border: 3px solid #FFFFFF !important;
    border-radius: 50% !important;
}

/* Стили для внутреннего цветного индикатора */
.t-product__option-item_image span:first-child,
.t-product__option-item_color span:first-child {
    width: 19px !important;
    height: 19px !important;
    border-radius: 50% !important;
}

/* Стили для кнопок памяти */
.t-product__option-variants_buttons .t-product__option-item_buttons {
    background-color: transparent !important;
    border: none !important;
    padding: 5px 10px !important;
    cursor: pointer;
}

.t-product__option-variants_buttons .t-product__option-title {
    font-weight: normal;
    transition: font-weight 0.2s ease;
}

.t-product__option-variants_buttons .t-product__option-item_active .t-product__option-title {
    font-weight: bold !important;
}

.t-product__option-checkmark_buttons {
    display: none !important;
}

.t762__title_small {
    display: none !important;
}

.js-product .t-product__option {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 26px;
}

.t762__price-currency.js-product-price-currency {
    font-family: inherit;
}

.t-slds__imgwrapper {
    margin: 0 auto;
    width: 50%;
    max-width: 461px;
}

.t-slds__thumbsbullet.t-slds__bullet {
    width: 100%;
    max-width: 176px;
    max-height: 176px;
}

.t-btn {
    color: #ffffff;
    background-color: #3A4120 !important;
    border-radius: 16px !important;
    -moz-border-radius: 16px !important;
    -webkit-border-radius: 16px !important;
    width: 100% !important;
    max-width: 434px !important;
    min-width: 309px !important;
    max-height: 40px;
    font-weight: 400;
}

/* Стили для таблицы характеристик */
.product-specs {
    margin-top: 15px;
    font-family: 'Calibri';
}

.product-specs table {
    width: 100%;
    border-collapse: collapse;
}

.product-specs td {
    padding: 3px 0;
    font-size: 14px;
}

.product-specs td:first-child {
    color: #666;
}

.product-specs td:last-child {
    text-align: right;
}

.js-product-name {
    display: inline-block;
    min-width: 475px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: none;
}

.t762__price-currency.js-product-price-currency {
    font-size: 33px;
}

@media (max-width: 1115px) {
    .t762__info {
        padding: 0 !important;
    }

    .t-slds__thumbsbullet.t-slds__bullet {
        max-width: 150px;
    }
}

/* Медиа-запросы для мобильной версии (≤768px) */
@media screen and (max-width: 768px) {
    /* Убираем ограничения ширины и высоты для слайдера */
    .mobile-overview {
        font-size: 20px;
        font-weight: 500;
        line-height: 21px;
    }

    .t762__descr {
        margin-top: 0px !important;
    }

    .t-slds__imgwrapper {
        width: 100% !important;
        max-width: 228px !important;
        max-height: 228px !important;
    }

    .t-slds__items-wrapper t-slds_animated-none {
        max-height: 228px;
    }

    /* Уменьшаем размер миниатюр */
    .t-slds__thumbsbullet.t-slds__bullet {
        max-width: 85px !important;
        max-height: 85px !important;
    }

    .t762__title-wrapper {
        text-align: center;
        margin-top: 25px;
        font-size: 23px !important;
    }

    .t762__price-currency.js-product-price-currency {
        font-size: 41px;
    }

    /* Стили для контейнера миниатюр */
    .t-slds__thumbswrapper {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    /* Название товара */
    .js-product-name {
        font-size: 23px !important;
        text-align: center !important;
        min-width: auto !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        margin-bottom: 0px !important;
    }

    /* Контейнер опций (память и цвет) */
    .js-product .t-product__option {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        margin: 0 !important;
    }

    /* Кнопки памяти в строку с уменьшенным расстоянием */
    .t-product__option-variants_buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 12px !important;
    }

    /* Радиокнопки цвета в строку */
    .t-product__option-variants_radio {
        justify-content: center !important;
        gap: 5px !important;
    }

    /* Цена */
    .t-name_md {
        font-size: 41px !important;
        margin-bottom: 37px !important;
    }

    .js-product .t-product__option .t-product__option-variants_custom.t-product__option-variants_radio {
        margin: 0 !important;
        padding: 0 !important;
    }

    .t-descr_xxs {
        font-size: 15px !important;
    }

    .js-product .t-product__option-variants_buttons .t-product__option-item_simple {
        padding: 0 !important;
        margin: 0 !important;
    }

    .t762__price-wrapper {
        text-align: center !important;
        margin: 0 auto !important;
    }

    /* Скрываем надписи "Цвет" и "Объём памяти" */
    .t-product__option-title:not(.t-product__option-title_radio):not(.t-product__option-title_buttons) {
        display: none !important;
    }

    /* Кнопка "В корзину" */
    .t-btn {
        max-width: 300px !important;
        margin: 10px auto !important;
        display: block !important;
    }

    /* Таблица характеристик */
    .product-specs {
        margin: 10px 0 !important;
        display: none;
    }

    .product-specs table {
        font-size: 12px !important;
    }

    .t-rec_pb_120 {
        padding-bottom: 30px;
    }

    .t762__col.t762__col_padding {
        display: flex;
        justify-content: center;
    }

    .t-slds__thumbsbullet-wrapper {
        padding-top: 20px;
    }
}