﻿/* ============================================
   HOME.CSS — главная страница (витрина)
   Подключать ТОЛЬКО на Home/Index
   ============================================ */

/* ===== HERO-SECTION ===== */
.hero-section {
    background: url('../images/newbckgrnd.png') center center / cover no-repeat fixed;
    padding: 80px 40px 120px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    min-height: 600px;
}

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.01);
        z-index: 1;
    }

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 40px;
    line-height: 1.2;
    max-width: 900px;
}

.catalog-btn {
    display: inline-block;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.3);
    color: #000;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

    .catalog-btn:hover {
        background: rgba(255, 255, 255, 0.5);
    }

/* ===== CATEGORIES SECTION ===== */
.categories-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 30px;
    text-align: left;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.category-card {
    display: block;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    text-decoration: none;
    color: #000;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

    .category-card:not(.dark) {
        grid-column: span 1;
    }

    .category-card.dark {
        background: #000;
        color: #fff;
    }

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .category-card h3 {
        color: #fff;
    }

    .category-card p {
        color: #666;
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 20px;
        min-height: 50px;
    }

.category-link {
    display: inline-block;
    padding: 12px 20px;
    background: #fff;
    color: #000 !important;
    border: none;
    border-bottom: 3px solid #FFE733;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

    .category-link:hover {
        background: #FFE733 !important;
        color: #000 !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.category-card.dark p,
.category-card.dark li {
    color: #ccc;
}

.category-card.dark .category-link {
    background: #333;
    color: #FFE733 !important;
}

    .category-card.dark .category-link:hover {
        background: #FFE733 !important;
        color: #000 !important;
    }

.category-card.dark ul {
    list-style: none;
    margin-bottom: 20px;
    min-height: 150px;
    position: relative;
    z-index: 1;
}

.category-card.dark li {
    padding: 3px 0;
    font-size: 0.9rem;
    color: #ccc;
}

.category-card.dark .btn-primary {
    display: inline-block;
    padding: 12px 20px;
    background: #FFE733;
    color: #000 !important;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .category-card.dark .btn-primary:hover {
        background: #fff !important;
        color: #000 !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    }

/* ===== ABOUT SECTION (главная) ===== */
.home-about-section {
    background: linear-gradient(135deg, #FFE733 0%, #FFD700 100%);
    padding: 60px 40px;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.home-about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.home-about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-about-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    max-height: 450px;
    overflow: hidden;
}

    .home-about-image-wrapper img {
        height: 100%;
        object-fit: cover;
    }

.home-about-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 25px;
}

.home-about-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #000;
    margin-bottom: 20px;
    font-weight: 500;
}

/* ===== BESTSELLERS SECTION ===== */
.bestsellers-section {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 40px;
}

.bestsellers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.bestseller-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .bestseller-card:hover {
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        transform: translateY(-5px);
    }

    /* Кнопка прижимается к низу карточки — и все кнопки встают на одну линию */
    .bestseller-card .add-to-cart-btn {
        margin-top: auto;
        width: 100%;
    }

/* Линия идёт сразу под кнопкой */
.bestseller-divider {
    margin: 12px 0 0;
    width: 100%;
}

.bestseller-image {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

    .bestseller-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.bestseller-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
}

.bestseller-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.bestseller-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 20px;
}

    .bestseller-price span {
        font-size: 1rem;
        font-weight: 400;
    }

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #000;
    border: 2px solid #000;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s;
}

    .add-to-cart-btn:hover {
        background: #000;
        color: #FFE733;
    }

.bestseller-divider {
    border: none;
    border-top: 2px solid #000;
    margin-top: 30px;
}

/* ===== АДАПТИВНОСТЬ ГЛАВНОЙ ===== */
@media (max-width: 968px) {
    .categories-grid,
    .bestsellers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-about-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 20px 60px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding: 60px 20px 80px;
    }

        .hero-section h1 {
            font-size: 2rem;
        }

    .categories-grid,
    .bestsellers-grid {
        grid-template-columns: 1fr;
    }

    .categories-section,
    .bestsellers-section {
        padding: 60px 20px;
    }
}
