/* ==========================================================================
   PRODUCT PAGE STYLES
   Карточка товара с липкой каруселью
   ========================================================================== */

/* ==========================================================================
   1. ХЛЕБНЫЕ КРОШКИ
   ========================================================================== */

.breadcrumbs {
    padding: 16px 0;
    font-size: 0.85rem;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

.breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #0284c7;
}

.breadcrumbs span {
    color: #0f172a;
}

/* ==========================================================================
   2. КОНТЕЙНЕР С ЛИПКОЙ КАРУСЕЛЬЮ
   ========================================================================== */

.product-sticky-container {
    display: flex;
    gap: 48px;
    margin-bottom: 60px;
}

.product-gallery-sticky {
    flex: 1;
    position: sticky;
    top: 120px;
    align-self: flex-start;
    transition: all 0.3s ease;
}

.product-info-sticky {
    flex: 1;
}

/* ==========================================================================
   3. ГАЛЕРЕЯ (ОСНОВНОЕ ИЗОБРАЖЕНИЕ + МИНИАТЮРЫ)
   ========================================================================== */

.product-main-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 20px;
}

.product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    max-height: 600px;
    object-fit: contain;
}

.product-main-image:hover img {
    transform: scale(1.02);
}

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: white;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Контейнер миниатюр - с прокруткой для всех устройств */
.product-thumbnails-container {
    position: relative;
    width: 100%;
}

.thumbnails-wrapper {
    display: flex;
    flex-direction: row;      /* Всегда горизонтально */
    gap: 2px;
    overflow-x: auto;         /* Включаем горизонтальную прокрутку */
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    
    /* Скрываем scrollbar в Firefox и Edge, но оставляем функционал */
    scrollbar-width: thin;
    
    /* Плавные края для скролла */
    padding-bottom: 8px;
}

/* Стилизация скроллбара для Webkit (Chrome, Safari) */
.thumbnails-wrapper::-webkit-scrollbar {
    height: 4px;
}

.thumbnails-wrapper::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.thumbnails-wrapper::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

.thumbnails-wrapper::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Миниатюры - фиксированная ширина */
.thumbnail-item {
    flex-shrink: 0;           /* Запрещаем сжатие */
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #f1f5f9;
}

/* Десктоп: 6 миниатюр видны (100% / 6 ≈ 16.666%) */
@media (min-width: 992px) {
    .thumbnail-item {
        width: calc(16.666% - 10px);
        min-width: calc(16.666% - 10px);
    }
}

/* Планшеты: 4-5 миниатюр */
@media (min-width: 768px) and (max-width: 991px) {
    .thumbnail-item {
        width: 120px;
        min-width: 120px;
    }
}

/* Мобильные: 3-4 миниатюры */
@media (max-width: 767px) {
    .thumbnail-item {
        width: 90px;
        min-width: 90px;
    }
}

/* Очень маленькие телефоны */
@media (max-width: 576px) {
    .thumbnail-item {
        width: 75px;
        min-width: 75px;
    }
}

.thumbnail-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* .thumbnail-item.active {
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
} */

.thumbnail-item:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

/* Индикатор количества миниатюр (показываем если миниатюр больше 6) */
.thumbnails-counter {
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 12px;
    display: none;  /* По умолчанию скрыт, покажем через JS если нужно */
}

.thumbnails-counter.active {
    display: block;
}
/* ==========================================================================
   4. ИНФОРМАЦИЯ О ТОВАРЕ (ПРАВАЯ КОЛОНКА)
   ========================================================================== */

.product-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}

.product-model {
    font-size: 1rem;
    font-weight: 400;
    color: #64748b;
}

.product-brand {
    display: inline-block;
    background: #e6f0fa;
    color: #0284c7;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 12px;
    vertical-align: middle;
}

/* Рейтинг */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.product-rating .stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.rating-value {
    font-weight: 600;
    color: #0f172a;
}

.reviews-count {
    color: #64748b;
    font-size: 0.85rem;
}

/* Цена */
.product-price-block {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
}

.old-price {
    font-size: 1.2rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.discount-badge {
    background: #e11d48;
    color: white;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Наличие */
.product-availability {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.availability.in-stock {
    color: #10b981;
    font-weight: 500;
}

.availability i,
.shipping-info i {
    margin-right: 6px;
}

.shipping-info {
    color: #64748b;
    font-size: 0.9rem;
}

/* Действия (количество + кнопка) */
.product-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 60px;
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    height: 48px;
    border: none;
    background: #f8fafc;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.quantity-selector input {
    width: 60px;
    height: 48px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 500;
}

.add-to-cart-btn {
    flex: 1;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    border: none;
    border-radius: 60px;
    padding: 0 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

/* Кнопки связи */
.contact-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.call-btn,
.tg-btn,
.wa-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 60px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.call-btn {
    background: #0f172a;
    color: white;
}

.call-btn:hover {
    background: #1e293b;
    transform: translateY(-2px);
}

.tg-btn {
    background: #0088cc;
    color: white;
}

.tg-btn:hover {
    background: #0077b3;
    transform: translateY(-2px);
}

.wa-btn {
    background: #25d366;
    color: white;
}

.wa-btn:hover {
    background: #20b859;
    transform: translateY(-2px);
}

/* Габариты */
.product-dimensions {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.product-dimensions h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #0f172a;
}

.dimensions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
}

.dimensions-list li {
    font-size: 0.9rem;
    color: #475569;
}

.dimensions-list li span {
    font-weight: 600;
    color: #0f172a;
}

/* PDF файлы */
.product-pdfs {
    margin-bottom: 28px;
}

.product-pdfs h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #0f172a;
}

.pdf-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pdf-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: #475569;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.pdf-item i {
    color: #e11d48;
}

.pdf-item:hover {
    background: #e6f0fa;
    transform: translateX(5px);
}

/* Подходящие модели */
.related-models {
    margin-top: 20px;
}

.related-models h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #0f172a;
}

.model-thumbnails {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.model-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    width: calc(20% - 10px);
}

.model-item img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 6px;
    background: #f8fafc;
    padding: 8px;
}

.model-item span {
    font-size: 0.75rem;
    color: #475569;
}

.model-item:hover {
    transform: translateY(-4px);
}

/* ==========================================================================
   5. БЛОК ТЕХНОЛОГИЙ
   ========================================================================== */

.product-tech-section {
    margin: 60px 0;
    padding: 48px 0;
    background: #f8fafc;
    border-radius: 32px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.section-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    margin: 0 auto;
    border-radius: 3px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 0 20px;
}

.tech-card {
    background: white;
    padding: 28px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.tech-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: #e6f0fa;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-icon img {
    width: 32px;
    height: 32px;
}

.tech-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #0f172a;
}

.tech-card p {
    color: #475569;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* ==========================================================================
   6. БЛОК СРАВНЕНИЯ
   ========================================================================== */

.product-comparison-section {
    margin: 60px 0;
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
}

.comparison-table tr.highlight {
    background: #e6f0fa;
}

.comparison-table .present {
    color: #10b981;
}

.comparison-table .missing {
    color: #e11d48;
}

/* ==========================================================================
   7. ПОЛНОЕ ОПИСАНИЕ
   ========================================================================== */

.product-description-full {
    margin: 60px 0;
}

.description-content {
    background: white;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.description-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #334155;
}

.description-content h3 {
    font-size: 1.3rem;
    margin: 24px 0 16px;
    color: #0f172a;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: #334155;
}

.features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.info-note {
    background: #e6f0fa;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 32px;
}

.info-note i {
    font-size: 1.5rem;
    color: #0284c7;
}

.info-note p {
    margin: 0;
    color: #0f172a;
}

/* ==========================================================================
   9. МОБИЛЬНАЯ ВЕРСИЯ — ПОЛНОСТЬЮ ПЕРЕРАБОТАНА
   ========================================================================== */

@media (max-width: 991px) {
    /* Отключаем sticky на мобильных */
    .product-gallery-sticky {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100%;
        margin-bottom: 24px;
    }
    

    .product-sticky-container {
        flex-direction: column;
        gap: 0;
        margin-bottom: 40px;
    }
    
    /* Карусель — обычный блок, не sticky */
    .product-gallery-sticky {
        position: relative;
        width: 100%;
        margin-bottom: 30px;
    }
    
    /* Основное изображение */
    .product-main-image {
        margin-bottom: 16px;
        border-radius: 16px;
        aspect-ratio: 4 / 5;
    }
    
    .product-main-image img {
        max-height: none;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Контейнер миниатюр — горизонтальный скролл */
    .product-thumbnails-container {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 10px;
    }
    
    .thumbnails-wrapper {
        display: flex;
        flex-direction: row;
        gap: 10px;
        width: max-content;
        min-width: 100%;
    }
    
    /* Миниатюры — фиксированная ширина, горизонтально */
    .thumbnail-item {
        width: 80px;
        min-width: 80px;
        flex-shrink: 0;
        aspect-ratio: 1 / 1;
        border-radius: 12px;
    }
    
    .thumbnail-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Индикатор скролла */
    .thumbnails-counter {
        display: block;
        text-align: center;
        margin-top: 12px;
        font-size: 0.7rem;
        color: #94a3b8;
    }
    
    /* Правая колонка — обычный поток */
    .product-info-sticky {
        width: 100%;
        padding: 0;
    }
    
    /* Заголовок */
    .product-title {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    
    .product-model {
        font-size: 0.85rem;
    }
    
    .product-brand {
        font-size: 0.7rem;
        padding: 3px 8px;
        margin-left: 8px;
    }
    
    /* Цена */
    .current-price {
        font-size: 1.5rem;
    }
    
    .old-price {
        font-size: 1rem;
    }
    
    /* Блоки преимуществ и описания */
    .product-key-features,
    .product-full-description {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .key-features-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .key-features-list li {
        font-size: 0.8rem;
    }
    
    /* Габариты */
    .product-dimensions {
        padding: 14px 16px;
    }
    
    .dimensions-list {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .dimensions-list li {
        font-size: 0.85rem;
    }
    
    /* PDF файлы */
    .pdf-item {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    /* Подходящие модели */
    .model-thumbnails {
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 8px;
        display: flex;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .model-item {
        width: 80px;
        min-width: 80px;
        flex-shrink: 0;
    }
    
    .model-item img {
        padding: 6px;
    }
    
    .model-item span {
        font-size: 0.7rem;
    }
    
    /* Блок технологий */
    .product-tech-section {
        margin: 40px 0;
        padding: 30px 0;
        border-radius: 20px;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .tech-grid {
        gap: 16px;
        padding: 0 16px;
    }
    
    .tech-card {
        padding: 20px;
    }
    
    .tech-card h3 {
        font-size: 1rem;
    }
    
    .tech-card p {
        font-size: 0.85rem;
    }
    
    /* Таблица сравнения */
    .comparison-table th,
    .comparison-table td {
        padding: 10px 12px;
        font-size: 0.75rem;
    }
    
    /* Полное описание */
    .product-description-full {
        margin: 40px 0;
    }
    
    .description-content {
        padding: 20px;
    }
    
    .description-content h3 {
        font-size: 1.1rem;
    }
    
    .description-content p,
    .features-list li {
        font-size: 0.85rem;
    }
    
    .info-note {
        padding: 16px;
        gap: 12px;
    }
    
    .info-note i {
        font-size: 1.2rem;
    }
}

/* Очень маленькие телефоны */
@media (max-width: 576px) {
    .thumbnail-item {
        width: 70px;
        min-width: 70px;
    }
    
    .model-item {
        width: 70px;
        min-width: 70px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
    
    .quantity-selector input {
        width: 80px;
    }
    
    .add-to-cart-btn {
        width: 100%;
        padding: 14px;
    }
    
    .contact-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .call-btn,
    .tg-btn,
    .wa-btn {
        width: 100%;
        padding: 10px 16px;
    }
    
    .product-key-features h4,
    .product-full-description h4,
    .product-dimensions h4,
    .product-pdfs h4,
    .related-models h4 {
        font-size: 0.9rem;
    }
    
    .specs-list li {
        font-size: 0.8rem;
    }
    
    .specs-list li span {
        min-width: 90px;
    }
    
    .description-text {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   8.5. НОВЫЕ БЛОКИ В ПРАВОЙ КОЛОНКЕ
   ========================================================================== */

/* Блок ключевых преимуществ */
.product-key-features {
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f0fa 100%);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    border-left: 4px solid #0284c7;
}

.product-key-features h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-key-features h4 i {
    color: #0284c7;
}

.key-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.key-features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #1e293b;
    padding: 4px 0;
}

.key-features-list li i {
    color: #10b981;
    font-size: 0.8rem;
    width: 20px;
}

/* Блок полного описания */
.product-full-description {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.product-full-description h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-full-description h4 i {
    color: #0284c7;
}

.specs-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.specs-list li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: #334155;
    border-bottom: 1px dashed #e2e8f0;
}

.specs-list li:last-child {
    border-bottom: none;
}

.specs-list li span {
    font-weight: 600;
    color: #0f172a;
    min-width: 110px;
    display: inline-block;
}

.specs-list li a {
    color: #0284c7;
    text-decoration: none;
}

.specs-list li a:hover {
    text-decoration: underline;
}

.description-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #334155;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.description-text strong {
    color: #0f172a;
}

/* Мобильная адаптация для новых блоков */
@media (max-width: 768px) {
    .key-features-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .specs-list li span {
        min-width: 100px;
    }
    
    .product-key-features,
    .product-full-description {
        padding: 16px;
    }
}