/* Дачные домики - страница с карточками товаров */

.dachnye-domiki-page {
    background: #f5f5f5;
    padding: 140px 0 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #060607;
    margin-bottom: 50px;
    text-align: center;
    line-height: 1.3;
}

.page-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: #666;
}

.page-intro {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.intro-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
}

.intro-text strong {
    font-weight: 600;
    color: #060607;
}

.intro-note {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Карточка товара */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Галерея в карточке */
.product-gallery {
    position: relative;
}

.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #f0f0f0;
    overflow: hidden;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* Стрелки галереи */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #060607;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.gallery-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.gallery-arrow-prev {
    left: 10px;
}

.gallery-arrow-next {
    right: 10px;
}

/* Индикаторы */
.gallery-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.indicator.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* Информация о товаре */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #060607;
    margin-bottom: 12px;
    line-height: 1.3;
    min-height: 50px;
}

.product-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 12px;
    flex: 1;
    min-height: 80px;
    max-height: 120px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.product-description p {
    margin-bottom: 10px;
}

.product-description strong {
    font-weight: 600;
    color: #060607;
}

.product-description ul {
    margin: 10px 0;
    padding-left: 20px;
}

.product-description li {
    margin-bottom: 5px;
}

.btn-details {
    width: 100%;
    padding: 10px 18px;
    background: #4169e1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.btn-details:hover {
    background: #3154c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

.product-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #060607;
    margin-bottom: 12px;
}

.btn-callback {
    width: 100%;
    padding: 10px 18px;
    background: #38a817;
    color: #fff;
    border: 2px solid #38a817;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-callback:hover {
    background: #fff;
    color: #38a817;
}

/* Секция особенностей */
.features-section {
    margin-top: 60px;
    padding: 40px 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.features-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #060607;
    margin-bottom: 25px;
    text-align: left;
}

.features-content {
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.features-text {
    margin-bottom: 18px;
}

.features-text strong {
    font-weight: 600;
    color: #060607;
}

.features-list {
    margin: 18px 0;
    padding-left: 25px;
    list-style-type: disc;
}

.features-list li {
    margin-bottom: 10px;
}

.features-list li strong {
    font-weight: 600;
    color: #060607;
}

/* Секция формы обратного звонка */
.callback-section {
    margin-top: 40px;
    padding: 50px 40px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.callback-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #060607;
    margin-bottom: 15px;
}

.callback-section-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.callback-inline-form {
    max-width: 600px;
    margin: 0 auto;
}

.callback-inline-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-field {
    position: relative;
    flex: 1;
}

.callback-inline-input {
    width: 100%;
    padding: 16px 20px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    background: #fff;
    transition: all 0.3s ease;
}

.callback-inline-input:focus {
    outline: none;
    border-color: #38a817;
}

.floating-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
    background: #fff;
    padding: 0 4px;
}

.callback-inline-input:focus + .floating-label,
.callback-inline-input:not(:placeholder-shown) + .floating-label {
    top: 0;
    font-size: 12px;
    color: #38a817;
}

.callback-inline-btn {
    padding: 14px 30px;
    background: #38a817;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.callback-inline-btn:hover {
    background: #2d8512;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 168, 23, 0.3);
}

.callback-inline-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.callback-inline-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.callback-inline-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
}

.callback-inline-message.success {
    background: #e8f5e9;
    color: #2d8512;
}

.callback-inline-message.error {
    background: #ffebee;
    color: #c62828;
}

/* Адаптивность */
@media (max-width: 768px) {
    .dachnye-domiki-page {
        padding: 100px 0 60px;
    }
    
    .page-intro {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .intro-text {
        font-size: 14px;
    }
    
    .intro-note {
        font-size: 13px;
    }
    
    .page-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-name {
        font-size: 18px;
    }
    
    .product-price {
        font-size: 20px;
    }
    
    .gallery-arrow {
        width: 32px;
        height: 32px;
    }
    
    .features-section {
        margin-top: 40px;
        padding: 30px 20px;
    }
    
    .features-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .features-content {
        font-size: 14px;
    }
    
    .features-list {
        padding-left: 20px;
    }
    
    .callback-section {
        margin-top: 30px;
        padding: 40px 20px;
    }
    
    .callback-section-title {
        font-size: 22px;
    }
    
    .callback-section-subtitle {
        font-size: 14px;
    }
    
    .callback-inline-form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .callback-inline-btn {
        width: 100%;
    }
}


/* Модальное окно товара */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 100000;
    overflow-y: auto;
}

.product-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100001;
}

.product-modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    margin: 50px auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    z-index: 100002;
}

.product-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-modal-close:hover {
    background: #e0e0e0;
    color: #000;
}

.product-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.modal-gallery {
    position: sticky;
    top: 20px;
}

.modal-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    cursor: pointer;
}

.modal-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-name {
    cursor: pointer;
    transition: color 0.3s ease;
}

.product-name:hover {
    color: #38a817;
}

.product-gallery {
    cursor: pointer;
}

.modal-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}

.modal-thumb {
    aspect-ratio: 4/3;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.modal-thumb.active {
    border-color: #38a817;
}

.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #060607;
    margin-bottom: 20px;
}

.modal-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #38a817;
    margin-bottom: 25px;
}

.modal-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 25px;
}

.modal-video {
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
}

.modal-video iframe {
    width: 100%;
    height: 300px;
    min-height: 250px;
    border-radius: 12px;
    display: block;
}

.modal-order-btn {
    width: 100%;
    padding: 16px 32px;
    background: #38a817;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-order-btn:hover {
    background: #2d8512;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 168, 23, 0.3);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-image {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    z-index: 2;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 36px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.3s ease;
    z-index: 10;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-arrow-prev {
    left: 30px;
}

.lightbox-arrow-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    z-index: 10;
}

/* Адаптивность модалки */
@media (max-width: 1024px) {
    .product-modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-gallery {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .product-modal.active {
        align-items: flex-start;
        padding: 0;
    }
    
    .product-modal-content {
        margin: 0;
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        padding: 60px 20px 40px;
    }
    
    .product-modal-body {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .modal-gallery {
        position: static;
    }
    
    .modal-info h1 {
        font-size: 22px;
    }
    
    .modal-price {
        font-size: 26px;
    }
    
    .modal-video iframe {
        height: 220px;
    }
    
    .lightbox-arrow {
        display: none;
    }
    
    .lightbox-counter {
        top: 10px;
        left: 10px;
        font-size: 14px;
    }
    
    .lightbox-image {
        transition: transform 0.3s ease;
    }
}
