/* ========================================
   Product Information Tabs Styles
   ======================================== */

/* Sticky позиционирование для левой колонки с изображениями */
.t744__col_first.hyu {
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* Аккордеон табов */
.product-info-tabs {
    margin-top: 20px;
    width: 100%; /* Фиксируем ширину блока */
    max-width: 100%; /* Максимальная ширина */
    overflow: hidden; /* Предотвращаем выход за границы */
}

.tab-item {
    border-bottom: 1px solid #e0e0e0;
    width: 100%; /* Каждый таб на всю ширину */
}

.tab-item:last-child {
    border-bottom: none;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
}

.tab-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #000;
    padding-bottom: 5px;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.5s ease;
}

/* Пунктирная граница для открытого таба */
.tab-item.active .tab-header h3 {
    border-bottom: 1px dashed;
}

/* Иконка плюс/минус */
.tab-icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}

.tab-icon::before,
.tab-icon::after {
    content: '';
    position: absolute;
    background: #383838;
    transition: all 0.5s ease;
}

.tab-icon::before {
    width: 16px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tab-icon::after {
    width: 2px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Скрыть вертикальную линию при открытом табе (превращение в минус) */
.tab-item.active .tab-icon::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Контент таба */
.tab-content {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    line-height: 1.6;
    color: #5a5a5a;
    font-size: 16px;
    font-weight: 400;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
}

.tab-item.active .tab-content {
    max-height: 2000px;
    padding: 0 0 25px 0;
    opacity: 1;
}

/* ========================================
   Payment методы
   ======================================== */
.payment-methods {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.payment-method:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.1);
    transform: translateY(-2px);
}

.payment-method img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.payment-method span {
    font-size: 14px;
    color: #383838;
    font-weight: 500;
}

/* Tooltip для payment методов */
.payment-method::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #383838;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.payment-method::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #383838;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.payment-method:hover::after,
.payment-method:hover::before {
    opacity: 1;
}

/* ========================================
   Responsive стили
   ======================================== */
@media (max-width: 960px) {
    /* Отключить sticky на мобильных */
    .t744__col_first.hyu {
        position: relative;
        top: 0;
    }

    /* Уменьшить размер заголовков на мобильных */
    .tab-header h3 {
        font-size: 18px;
    }

    .tab-header {
        padding: 15px 0;
    }

    /* Payment методы в столбик на мобильных */
    .payment-methods {
        flex-direction: column;
    }

    .payment-method {
        width: 100%;
        justify-content: center;
    }

    /* Скрыть CSS tooltips на мобильных (будет alert через JS) */
    .payment-method::after,
    .payment-method::before {
        display: none;
    }
}

