/* css/styles.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background: #2c3e50;
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-img {
    height: 50px;
    width: auto;
}
.nav a {
    color: #ecf0f1;
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s;
}
.nav a:hover {
    color: #f1c40f;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        background: #2c3e50;
        padding: 15px 0;
        position: absolute;
        top: 70px;
        left: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .nav.active {
        display: flex;
    }
    .nav a {
        margin: 10px 20px;
        display: block;
    }
    .menu-toggle {
        display: block;
    }
}

/* Герой */
.hero {
    background: linear-gradient(135deg, rgba(139, 107, 77, 0.7), rgba(93, 58, 26, 0.2)), 
                url('../images/hero_bg.webp') center/cover no-repeat;
    color: #fff;
    padding: 80px 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}
.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Секции */
.section {
    padding: 60px 0;
}
.section.bg-light {
    background: #f8f4f0;
}
.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}
.section p {
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: center;
    font-size: 1.1rem;
}

/* Сетка продуктов */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eaeaea;
    text-decoration: none;
    color: #333;
    display: block;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}
.product-card i {
    font-size: 3rem;
    color: #8b6b4d;
    margin-bottom: 12px;
    display: block;
}
.product-card img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 4px;
    margin: 0 auto 12px;
    display: block;
}
.product-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Контакты */
.contact-info {
    max-width: 500px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}
.contact-info p {
    margin: 12px 0;
    text-align: left;
}
.contact-info i {
    width: 30px;
    color: #8b6b4d;
}
.btn {
    background: #8b6b4d;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 1.1rem;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-block;
    text-decoration: none;
}
.btn:hover {
    background: #5d3a1a;
}

/* Детали продукта */
.product-detail {
    padding: 40px 0;
}
.detail-back {
    display: inline-block;
    margin-bottom: 25px;
    color: #8b6b4d;
    text-decoration: none;
    font-weight: 500;
}
.detail-back i {
    margin-right: 8px;
}
.detail-back:hover {
    text-decoration: underline;
}
.detail-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}
.detail-price {
    font-size: 1.4rem;
    color: #8b6b4d;
    font-weight: 600;
    margin-bottom: 20px;
}
.detail-description {
    font-size: 1.1rem;
    margin-bottom: 25px;
    max-width: 800px;
}
.detail-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}
.detail-features li {
    background: #f1ede9;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.95rem;
}
.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.detail-gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.detail-gallery img:hover {
    transform: scale(1.03);
}
.detail-not-found {
    text-align: center;
    padding: 60px 0;
    font-size: 1.3rem;
    color: #888;
}

/* Футер */
.footer {
    background: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
}
.footer p {
    margin: 5px 0;
}

/* Адаптив */
@media (max-width: 600px) {
    .hero h2 { font-size: 2rem; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .detail-gallery { grid-template-columns: 1fr 1fr; }
    .detail-title { font-size: 2rem; }
}
/* ===== Lightbox (галерея увеличенных фото) ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.lightbox.active {
    display: flex;
}
.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
    transition: transform 0.2s;
}
.lightbox .close-lightbox {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1001;
    background: none;
    border: none;
}
.lightbox .close-lightbox:hover {
    color: #f1c40f;
}
.lightbox .prev, 
.lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    padding: 20px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: background 0.2s;
    z-index: 1001;
    user-select: none;
}
.lightbox .prev:hover, 
.lightbox .next:hover {
    background: rgba(255,255,255,0.25);
}
.lightbox .prev {
    left: 20px;
}
.lightbox .next {
    right: 20px;
}
.lightbox .counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    background: rgba(0,0,0,0.5);
    padding: 6px 16px;
    border-radius: 20px;
}

/* Адаптив для мобильных */
@media (max-width: 600px) {
    .lightbox img {
        max-width: 95%;
        max-height: 70vh;
    }
    .lightbox .prev, 
    .lightbox .next {
        font-size: 30px;
        padding: 12px 10px;
        top: 45%;
    }
    .lightbox .prev { left: 5px; }
    .lightbox .next { right: 5px; }
    .lightbox .close-lightbox {
        top: 15px;
        right: 20px;
        font-size: 32px;
    }
}