/* Убираем скролл и растягиваем фон */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;           /* важно: min-height */
    height: auto;
    scrollbar-gutter: stable;
    margin: 0;
}

/* Фон на весь экран */
body {
    background-image: url('img/background2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;   /* фон не будет сдвигаться */
    color: #fff;
    font-family: 'Playfair Display', serif;
    display: flex;
    flex-direction: column; 
    overflow-y: scroll;        /* главное изменение */
    overflow-x: hidden;
    
}

/* Хедер */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
}

/* ЛОГО */
.logo {
    height: 90px;
    transition: 0.3s;
}
.logo:hover {
    transform: scale(1.05);
}

/* ТЕЛЕФОН */
.header-phone {
    font-family: 'Times New Roman', Times, serif;
    color: #ffd700;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}
.header-phone:hover {

    color: #ffa500;
}

/* ===== NAV DESKTOP ===== */
.site-nav {
    display: flex;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.site-nav a {
    color: #ffd700;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    position: relative;
    transition: 0.3s;
}

.site-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: 0.3s;
}

.site-nav a:hover::after {
    width: 100%;
}

/* ===== BURGER ===== */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-left: auto;
    z-index: 200;
}

.burger span {
    width: 25px;
    height: 3px;
    background: #ffd700;
    border-radius: 2px;
    transition: 0.3s;
}

/* АНИМАЦИЯ БУРГЕРА */
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* ===== OVERLAY (затемнение) ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 90;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .header-phone {
        display: none;
    }

    .logo {
        height: 55px;
        flex: 0 0 auto;
    }

    .burger {
        display: flex;
        margin-left: auto;
    }

    .site-nav {
        margin: 0 auto;
        position: fixed;
        top: 80px;
        right: -100%;
        width: 75%;
        height: calc(100vh - 80px);

        background: rgba(0,0,0,0.95);
        backdrop-filter: blur(10px);

        display: flex;
        flex: none;
        justify-content: center;
        align-items: center;

        transition: 0.3s;
        z-index: 100;
    }

    .site-nav.active {
        right: 0;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .site-nav a {
        font-size: 1.4rem;
    }
}
/* Основной экран */
.product-page {
    padding-top: 90px;        /* одинаковое расстояние от хедера */
    padding-bottom: 160px;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
}

/* Контейнер товара */
.product-container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 50px;
    align-items: start;
}

/* Изображение */
.product-image {
    width: 100%;
    height: 420px;               /* было 520–600px, теперь значительно меньше */
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);               /* прилипает при скролле */
}



/* Информация */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product-info h1 {
    font-size: 2.9rem;           /* немного уменьшил заголовок */
    margin: 0 0 8px 0;
    color: #d4af37;
    line-height: 1.1;
}

.product-description {
    font-size: 1.18rem;
    line-height: 1.45;
    margin-bottom: 4px;
    color: #ddd;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.feature-block h3 {
    color: #d4af37;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.product-features {
    padding-left: 20px;
}

.product-features li {
    margin-bottom: 6px;
    font-size: 1.08rem;
}

/* Кнопка */
.product-btn {
    display: block;              /* блок для центрирования */
    width: fit-content;
    min-width: 260px;
    margin: 30px auto 0 auto;    /* автоматически по центру + отступ сверху */
    padding: 16px 36px;
    border: 2px solid #d4af37;
    border-radius: 8px;
    text-decoration: none;
    color: #000;
    background: #fff;
    font-size: 1.18rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.product-btn:hover {
    background: linear-gradient(45deg, #b87333, #caa179);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212,175,55,0.4);
}

/* Картинка */
.product-image {
    margin-top: 20px;
    flex: 1;
}

.product-image img {
    width: 100%;
}
/* Карусель */
.carousel {
    position: relative;
    overflow: hidden;
}

/* Лента */
.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

/* Картинки */
.carousel-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Кнопки */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.8);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}
/* Превью */
.carousel-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

/* Мини-картинки */
.thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: 0.3s;
}

/* Активная */
.thumb.active {
    opacity: 1;
    border-color: #d4af37;
}

/* Hover */
.thumb:hover {
    opacity: 1;
}
.product-subtitle {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: #d4af37;
}
footer {
    background-color: #000;
    color: #fff;
    padding: 20px 20px 20px;
    margin-top: auto;            /* прижимает футер к низу */
}

/* Контейнер */
.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-family: Arial, Helvetica, sans-serif;
    flex-wrap: wrap;
}

/* Блок */
.footer-block {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Ссылки */
.footer-block a {
    color: #d4af37;
    text-decoration: none;
}

.footer-block a:hover {
    text-decoration: underline;
}

  
/* ===== МОБИЛЬНЫЙ АДАПТИВ (НОРМАЛЬНЫЙ) ===== */
@media (max-width: 768px) {

    /* ===== PAGE WRAPPER ===== */
    .product-page {
        padding-top: 110px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .product-container {
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding-bottom: 120px;
    }

    /* =========================
       1. КАРУСЕЛЬ ВВЕРХУ
    ========================== */

    .product-image {
        width: 100%;
    }

    .carousel {
        border-radius: 12px;
        overflow: hidden;
    }

    .carousel-img {
        height: 280px;
        object-fit: cover;
    }

    .carousel-track {
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }

    .carousel-btn {
        font-size: 1.4rem;
        padding: 6px 10px;
    }

    /* скрываем превью на мобилке */
    .carousel-thumbs {
        display: none;
    }

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

    .product-btn {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: calc(12px + env(safe-area-inset-bottom));

        width: auto;          /* важно */
        max-width: 420px;     /* ограничение ширины */
        margin: 0 auto 0 auto;

        padding: 12px 14px;   /* уже по высоте */
        font-size: 1rem;

        border-radius: 12px;
        text-align: center;

        z-index: 999;
        box-shadow: 0 8px 18px rgba(0,0,0,0.25);
    }

    /* =========================
       3. ТЕКСТ ВНИЗУ
    ========================== */

    .product-info {
        text-align: center;
    }

    .product-info h1 {
        font-size: 1.9rem;
        margin-bottom: 6px;
    }

    .product-description {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-block h3 {
        font-size: 1.2rem;
    }

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

    .product-features li {
        font-size: 1rem;
    }

    /* ===== FOOTER ===== */
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .footer-block {
        line-height: 1.4;
    }
}

/* ========== Свайп для мобильных устройств ========== */
.carousel-track {
    touch-action: pan-y;
    -webkit-user-drag: none;
    user-select: none;
}