/* ==========================================================================
   PRODUCT PAGE STYLES
   ==========================================================================
   Этот файл содержит CSS-правила, специфичные для страницы товара.
   Выделено из custom-v1_1.css на Шаге 3.2.
   Подключение: только на product-страницах.
   ========================================================================== */


/* ==========================================================================
   Buy Box
   ========================================================================== */

.product-buybox-desktop {
    background: #fff;
    border: 1px solid #e6e6e6;
    padding: 20px;
    border-radius: 8px;
}

.buybox-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    align-items: flex-start;
}

.buybox-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}

.meta-brand-link { color: #333; text-decoration: underline; }

.delivery-text {
    font-size: 11px !important;
    font-weight: 700;
    text-transform: uppercase;
    color: #444;
}

.badge-original-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 12px;
    border-radius: 10px;
    line-height: 1.1;
    flex-shrink: 0;
    border: 1px solid #c8e6c9;
}

.badge-original-v2 i {
    font-size: 18px;
}

.badge-original-v2 .badge-text {
    display: flex;
    flex-direction: column;
}

.badge-original-v2 .badge-text span {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

@media (max-width: 480px) {
    .badge-original-v2 {
        padding: 4px 10px;
        gap: 6px;
    }
}

.buybox-actions {
    display: flex;
    gap: 10px;
}

.qty-stepper {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    height: 44px;
    flex-shrink: 0;
    width: 100px;
}

.qty-stepper button {
    background: #f8f8f8;
    border: none;
    width: 30px;
    font-weight: bold;
    cursor: pointer;
    color: #555;
    padding: 0;
}

.qty-stepper button:hover { background: #eee; }

.qty-stepper input {
    border: none;
    text-align: center;
    width: 40px;
    height: 100%;
    padding: 0;
    margin: 0;
    box-shadow: none;
    font-weight: 600;
}


/* ==========================================================================
   Telegram
   ========================================================================== */

.btn-ask-telegram {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;       /* Отступ между текстом и иконкой */
    text-decoration: none !important;
    background: transparent !important; /* Убираем фон */
    border: none !important;    /* Убираем общую рамку */
    padding: 0 !important;      /* Убираем отступы */
    box-shadow: none !important;/* Убираем общую тень */
    flex-shrink: 0 !important;
}

.btn-ask-telegram .btn-text {
    color: #2AABEE !important;  /* Фирменный синий цвет текста */
    font-size: 13px !important;
    font-weight: 700 !important;
    transition: color 0.2s ease;
}

.tg-icon-wrapper {
    position: relative;
    width: 34px;            /* Чуть крупнее для акцента */
    height: 34px;
    background: #2AABEE;    /* Синий фон только у иконки */
    border-radius: 10px;    /* Скругленный квадрат (iOS стиль) */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Легкая тень только у иконки для объема */
    box-shadow: 0 2px 6px rgba(42, 171, 238, 0.3) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tg-icon-wrapper i {
    color: #ffffff !important;
    font-size: 16px !important;
    transform: translateX(-1px) translateY(1px);
}

.tg-notification-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 11px;
    height: 11px;
    background: #ff4b2b;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.btn-ask-telegram:hover .btn-text {
    color: #1b8aba !important; /* Текст темнеет */
}

.btn-ask-telegram:hover .tg-icon-wrapper {
    transform: translateY(-2px); /* Иконка слегка "всплывает" */
    box-shadow: 0 4px 10px rgba(42, 171, 238, 0.4) !important;
}

@media (max-width: 767px) {
    .btn-ask-telegram .btn-text {
        display: inline-block !important;
    }
}

.delivery-text { font-size: 11px !important; font-weight: 700; text-transform: uppercase; color: #444; }

.cdek-inline-logo {
    height: 14px !important;
    width: auto !important;
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    margin-left: 6px;
}


/* ==========================================================================
   Trust
   ========================================================================== */

.product-buybox-wrapper {
    margin-top: 0;
}

.product-trust-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    background: #fdfdfd;
    border-radius: 4px;
}

.trust-item {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
    padding: 8px 5px;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid transparent; 
}

.trust-item:hover {
    background: #f0f0f0;
}

.trust-item i {
    font-size: 18px;
    color: #28a745;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.trust-text {
    line-height: 1.2;
    overflow: hidden;
}

.trust-text span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
}

.trust-text small {
    display: block;
    font-size: 10px;
    color: #777;
    white-space: normal;
    line-height: 1.2;
}

.tab-pane {
    min-height: 100px; /* Оптимальная высота, чтобы футер не летал */
    position: relative; /* Для позиционирования */
}

.tab-loading {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
    color: #666;
}


/* ==========================================================================
   Gallery DT
   ========================================================================== */

.product-gallery-desktop {
    margin-bottom: 20px;
}

.main-image-container {
    border: 1px solid #eaeaea; 
    border-radius: 4px; /* Сделал закругление поменьше, как в оригинале */
    padding: 0; /* Убрал отступы внутри рамки */
    text-align: center;
    background-color: #fff;
    margin-bottom: 10px;
    overflow: hidden;
    /* Ограничиваем максимальную высоту главного фото, чтобы оно не было гигантским */
    max-height: 450px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-container img {
    max-height: 450px; /* Фото не будет превышать эту высоту */
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease; 
}

.thumbnails-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start; /* Прижимаем к левому краю */
}

.thumbnails-container .thumb {
    width: 74px;  /* Жестко фиксируем ширину */
    height: 74px; /* Жестко фиксируем высоту */
    border: 1px solid #eaeaea;
    border-radius: 4px;
    padding: 2px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease;
}

.thumbnails-container .thumb:hover {
    border-color: var(--accent); /* Используем ваш желтый акцент */
}

.thumbnails-container .thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* ==========================================================================
   Gallery MB
   ========================================================================== */

.product-gallery-mobile {
    margin-bottom: 20px;
    padding-bottom: 30px; /* Отступ для кружочков */
    
    /* Переопределяем нативные переменные Swiper вашим желтым цветом */
    --swiper-pagination-color: var(--accent); 
    --swiper-pagination-bullet-inactive-color: #999; 
    --swiper-pagination-bullet-inactive-opacity: 0.5;
}

.product-gallery-mobile .swiper-slide {
    text-align: center;
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
}

.product-gallery-mobile .swiper-slide img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}