/* ==========================================
   КОМПАКТНАЯ СТРАНИЦА ПРОДУКТА
   ========================================== */

.product-main {
    margin-top: 100px;
    padding: 30px 0 60px;
    background: #f8f9fa;
    min-height: calc(100vh - 100px);
}

/* Хлебные крошки - компактные */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: var(--text-gray);
    font-size: 0.75rem;
}

.breadcrumbs .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* Основной Layout - УДАЛЕНО (заменено на компактный дизайн) */

/* ==========================================
   СТАРАЯ АДАПТИВНОСТЬ - УДАЛЕНА
   Используется новая адаптивность для компактного дизайна
   ========================================== */


/* ==========================================
   НОВЫЙ КОМПАКТНЫЙ ДИЗАЙН
   ========================================== */

/* Компактный layout с большим фото */
.product-compact-layout {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Большое изображение */
.product-large-image {
    width: 100%;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    overflow: hidden;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-product-image:hover {
    transform: scale(1.05);
}

/* Компактная информация */
.product-compact-info {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product-compact-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
}

/* Компактные характеристики */
.compact-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compact-spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-dark);
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.compact-spec-item:last-child {
    border-bottom: none;
}

.spec-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Компактная цена */
.compact-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-top: 2px solid #e0e0e0;
    border-bottom: 2px solid #e0e0e0;
}

.price-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Компактные кнопки */
.compact-actions {
    display: flex;
    gap: 10px;
}

.btn-compact {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-compact-primary {
    background: var(--primary-color);
    color: white;
}

.btn-compact-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-compact-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-compact-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Компактные преимущества */
.compact-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compact-features li {
    font-size: 0.8rem;
    color: var(--text-gray);
    padding-left: 0;
}

/* Компактное описание */
.compact-description {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.compact-section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.compact-description p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.compact-description p:last-child {
    margin-bottom: 0;
}

/* Компактная комплектация */
.compact-composition {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.composition-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.composition-compact-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.composition-compact-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

/* Компактная дополнительная информация */
.compact-extra-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.compact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.info-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.compact-info-item strong {
    display: block;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.compact-info-item p {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 0;
}

/* Компактная кнопка внизу */
.compact-bottom-action {
    text-align: center;
    padding: 30px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-compact-large {
    padding: 16px 48px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--primary-color);
    color: white;
}

.btn-compact-large:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.3);
}

/* ==========================================
   АДАПТИВНОСТЬ ДЛЯ КОМПАКТНОГО ДИЗАЙНА
   ========================================== */

@media (max-width: 1024px) {
    .product-compact-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .product-large-image {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .product-main {
        margin-top: 80px;
        padding: 20px 0 40px;
    }

    .product-compact-info {
        padding: 20px;
        gap: 20px;
    }

    .product-compact-title {
        font-size: 1.6rem;
    }

    .price-amount {
        font-size: 1.6rem;
    }

    .product-large-image {
        min-height: 300px;
    }

    .compact-actions {
        flex-direction: column;
    }

    .btn-compact {
        width: 100%;
    }

    .compact-description,
    .compact-composition {
        padding: 20px;
    }

    .compact-section-title {
        font-size: 1.2rem;
    }

    .composition-grid-compact {
        grid-template-columns: 1fr;
    }

    .compact-extra-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .product-compact-title {
        font-size: 1.4rem;
    }

    .price-amount {
        font-size: 1.4rem;
    }

    .btn-compact {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .btn-compact-large {
        padding: 14px 32px;
        font-size: 0.9rem;
    }

    .compact-description,
    .compact-composition {
        padding: 16px;
    }
}


/* ==========================================
   ГАЛЕРЕЯ-СЛАЙДЕР ДЛЯ ДОМОВ
   ========================================== */

.product-house-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Слайдер галерея */
.house-gallery-slider {
    position: relative;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gallery-main-image {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.gallery-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.gallery-slide.active {
    display: block;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Стрелки слайдера */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-arrow-prev {
    left: 20px;
}

.gallery-arrow-next {
    right: 20px;
}

/* Счетчик фото */
.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10;
}

/* Миниатюры */
.gallery-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    background: #f5f5f5;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.gallery-thumb:hover {
    transform: scale(1.05);
}

.gallery-thumb.active {
    border-color: var(--primary-color);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Информация о доме */
.house-info-short {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Полное описание на всю ширину */
.house-full-description {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
}

.house-main-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.house-main-specs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.house-spec-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.house-main-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.house-description-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.house-description-text p {
    margin-bottom: 12px;
}

/* Планировка */
.house-planning {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.house-planning h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.house-planning p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-gray);
}

/* Комплектация дома */
.house-includes {
    margin-bottom: 20px;
}

.house-includes h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.house-includes-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.house-includes-list li {
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.house-includes-list li::before {
    content: '✓ ';
    color: var(--primary-color);
    font-weight: 600;
    margin-right: 6px;
}

/* Материалы */
.house-materials {
    margin-bottom: 20px;
}

.house-materials h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.house-materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.house-material-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.house-material-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

/* Кнопка заказа консультации */
.house-consult-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.house-consult-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.3);
}

/* Адаптивность для домов */
@media (max-width: 1024px) {
    .product-house-layout {
        grid-template-columns: 1fr;
    }
    
    .house-full-description {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .gallery-main-image {
        height: 400px;
    }
    
    .gallery-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .gallery-arrow-prev {
        left: 10px;
    }
    
    .gallery-arrow-next {
        right: 10px;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 60px;
    }
    
    .house-main-title {
        font-size: 1.6rem;
    }
    
    .house-main-price {
        font-size: 1.6rem;
    }
    
    .house-info-short {
        padding: 20px;
    }
    
    .house-full-description {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-main-image {
        height: 300px;
    }
}


/* ==========================================
   LIGHTBOX (ПОЛНОЭКРАННЫЙ ПРОСМОТР ФОТО)
   ========================================== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-arrow-prev {
    left: 30px;
}

.lightbox-arrow-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .lightbox-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .lightbox-arrow-prev {
        left: 15px;
    }
    
    .lightbox-arrow-next {
        right: 15px;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}
