/* =========================================
   1. БАЗОВЫЕ СТИЛИ И СБРОС
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #4a3b32;
    background-color: #fdfbf7;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   2. ШАПКА САЙТА
   ========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: rgba(253, 251, 247, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    font-style: italic;
    color: #8b5a2b;
}

nav a {
    color: #4a3b32;
    margin-left: 20px;
    font-weight: 400;
    transition: color 0.3s;
}

nav a:hover {
    color: #8b5a2b;
}

.btn-nav {
    background-color: #8b5a2b;
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
}

/* =========================================
   3. ГЛАВНЫЙ ЭКРАН (HERO)
   ========================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 150px 5% 80px;
    background: linear-gradient(135deg, #fdfbf7 0%, #f4ece2 100%);
    min-height: 70vh;
}

.hero-text {
    flex: 1;
    padding-right: 40px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 600;
}

.hero-text h1 span {
    color: #8b5a2b;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #6b5a4d;
}

.btn-main {
    display: inline-block;
    background-color: #8b5a2b;
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn-main:hover {
    background-color: #6b421e;
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* =========================================
   4. КАТАЛОГ (ГЛАВНАЯ СТРАНИЦА)
   ========================================= */
.section-divider {
    text-align: center;
    padding: 80px 10% 40px;
    background-color: #fdfbf7;
}

.section-divider h2 {
    font-size: 2.8rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
}

.section-divider p {
    color: #6b5a4d;
    font-size: 1.1rem;
}

.category-section {
    padding: 60px 10% 80px;
    background-color: #fdfbf7;
}

.category-section.bg-alt {
    background-color: #f4ece2;
    border-top: 1px solid #e0d6c8;
    border-bottom: 1px solid #e0d6c8;
}

.category-header {
    margin-bottom: 50px;
    text-align: center;
}

.category-header h2 {
    font-size: 2.2rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
    color: #4a3b32;
}

.category-header p {
    color: #6b5a4d;
    max-width: 600px;
    margin: 0 auto;
}

/* Сетка карточек */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-img {
    height: 300px;
    overflow: hidden;
    background-color: #f4ece2;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #4a3b32;
    font-family: 'Playfair Display', serif;
}

.product-desc {
    font-size: 0.95rem;
    color: #6b5a4d;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid #e0d6c8;
    padding-top: 15px;
}

.product-price {
    font-weight: 600;
    font-size: 1.3rem;
    color: #8b5a2b;
}

.btn-detail {
    background-color: #f4ece2;
    color: #8b5a2b;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s, color 0.3s;
    border: none;
    cursor: pointer;
}

.btn-detail:hover {
    background-color: #8b5a2b;
    color: white;
}

/* =========================================
   5. БЛОК КОНТАКТОВ (ПОДВАЛ-СЕКЦИЯ)
   ========================================= */
.buy {
    background-color: #8b5a2b;
    color: white;
    padding: 80px 10%;
    text-align: center;
}

.buy-container {
    max-width: 600px;
    margin: 0 auto;
}

.buy h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.buy p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-telegram, .btn-whatsapp {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: opacity 0.3s;
    color: #4a3b32;
}

.btn-telegram { background-color: #e6f0fa; }
.btn-whatsapp { background-color: #e8f5e9; }
.btn-telegram:hover, .btn-whatsapp:hover { opacity: 0.8; }

/* =========================================
   6. СТРАНИЦА ТОВАРА (КАРТОЧКА) + СЛАЙДЕР
   ========================================= */
.product-page {
    display: flex;
    padding: 150px 10% 80px;
    gap: 60px;
    align-items: flex-start;
    min-height: 80vh;
}

/* Контейнер для слайдера */
.product-page-image {
    flex: 1;
    position: sticky;
    top: 120px; 
    width: 100%;
}

/* Сам слайдер */
.slider-container {
    display: flex;
    overflow-x: auto; /* Горизонтальная прокрутка */
    scroll-snap-type: x mandatory; /* Прилипание фото */
    scroll-behavior: smooth;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-color: #f4ece2;
    -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
    scrollbar-width: none; /* Скрываем скроллбар в Firefox */
}

/* Скрываем скроллбар в Chrome/Safari */
.slider-container::-webkit-scrollbar {
    display: none;
}

/* Отдельный слайд */
.slide {
    flex: 0 0 100%; /* Фото занимает 100% ширины контейнера */
    scroll-snap-align: start;
    height: 500px; /* Высота слайдера на десктопе */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполняет блок без искажений */
    display: block;
}

/* Подсказка "Листайте фото" */
.slider-hint {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #8b5a2b;
    font-weight: 600;
    opacity: 0.8;
}

/* Информация о товаре */
.product-page-info {
    flex: 1;
    padding-top: 20px;
}

.back-link {
    display: inline-block;
    color: #8b5a2b;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.back-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.product-page-info h1 {
    font-size: 3rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 15px;
    line-height: 1.1;
}

.product-page-price {
    font-size: 2.2rem;
    font-weight: 600;
    color: #8b5a2b;
    margin-bottom: 25px;
}

.product-page-info p {
    font-size: 1.1rem;
    color: #6b5a4d;
    margin-bottom: 30px;
}

.product-details {
    list-style: none;
    margin-bottom: 40px;
    border-top: 1px solid #e0d6c8;
    padding-top: 20px;
}

.product-details li {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #4a3b32;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #e0d6c8;
    padding-bottom: 8px;
}

.product-details strong {
    color: #8b5a2b;
    font-weight: 600;
}

/* =========================================
   7. ПОДВАЛ (FOOTER)
   ========================================= */
footer {
    background-color: #2e241e;
    color: #a09288;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* =========================================
   8. АДАПТИВНОСТЬ (МОБИЛЬНЫЕ УСТРОЙСТВА)
   ========================================= */
@media (max-width: 900px) {
    .product-page {
        flex-direction: column;
        padding-top: 120px;
        gap: 30px;
    }
    .product-page-image {
        position: static; /* Убираем "прилипание" на мобильных */
        width: 100%;
    }
    .slide {
        height: 350px; /* Уменьшаем высоту слайдера на телефонах */
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        padding-top: 120px;
        text-align: center;
        min-height: auto;
    }

    .hero-text {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    nav {
        display: none; /* Скрываем меню на мобильных */
    }
    
    .product-page-info h1 {
        font-size: 2.2rem;
    }
    
    .category-header h2 {
        font-size: 1.8rem;
    }
}