* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #C28E46; /* Золотисто-пшеничный */
    --primary-dark: #A07233; /* Темно-золотистый для ховера */
    --secondary: #4A3320; /* Темно-коричневый (цвет корочки/шоколада) */
    --bg-color: #FAF7F2; /* Теплый кремовый фон */
    --white: #ffffff;
    --black: #2C241B; /* Мягкий черный/кофейный */
    --gray: #E8E3DC; /* Светло-серый теплый */
    --dark-gray: #7A7065;
    --shadow: rgba(74, 51, 32, 0.08); /* Теплые тени */
    --shadow-hover: rgba(74, 51, 32, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* Заголовки с засечками для премиального вида */
h1, h2, h3, .logo h1 {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px var(--shadow);
    z-index: 1000;
    transition: transform 0.3s ease, background 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo h1 {
    color: var(--secondary);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary);
}

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

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.burger-menu span {
    width: 28px;
    height: 2px;
    background: var(--secondary);
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -4px);
}

.hero {
    height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1509440159596-0249088772ff?w=1920&h=1080&fit=crop'); /* Фото красивого хлеба */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 36, 27, 0.6); /* Темно-коричневое затемнение */
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    max-width: 900px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    color: #F8F9FA;
    animation: fadeInUp 1s ease 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border: none;
    border-radius: 4px; /* Менее круглые кнопки для строгости */
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    animation: fadeInUp 1s ease 0.4s backwards;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(194, 142, 70, 0.3);
}

.btn-order, .btn-submit {
    background: var(--secondary);
    color: var(--white);
    width: 100%;
    border-radius: 4px;
}

.btn-order:hover, .btn-submit:hover {
    background: #3A2818;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(74, 51, 32, 0.3);
}

section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.section-subtitle {
    text-align: center;
    color: var(--dark-gray);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    font-weight: 400;
}

.catalog {
    background: var(--bg-color);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    transition: all 0.4s ease;
    border: 1px solid #F0ECE3;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--shadow-hover);
}

.product-image-wrapper {
    height: 260px;
    overflow: hidden;
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-image.lazy {
    background: linear-gradient(90deg, #f0ece3 25%, #e8e3dc 50%, #f0ece3 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.product-info {
    padding: 2rem;
    text-align: center;
}

.product-name {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--secondary);
}

.product-description {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.about {
    background: var(--white);
}

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-gray);
}

.advantages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.advantage-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #F0ECE3;
}

.advantage-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px var(--shadow);
}

.advantage-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
}

.advantage-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.advantage-card p {
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.gallery {
    background: var(--bg-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    height: 320px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2.5rem;
    color: var(--white);
    transition: transform 0.3s ease;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 51, 32, 0);
    transition: background 0.3s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    background: rgba(74, 51, 32, 0.5);
}

.contact {
    background: var(--white);
}

.contact-form {
    max-width: 650px;
    margin: 0 auto;
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #D5CEC4;
    border-radius: 4px;
    font-size: 1rem;
    background: var(--white);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(194, 142, 70, 0.1);
}

.form-message {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
    font-weight: 500;
}

.form-message.success {
    background: #E8F5E9;
    color: #2E7D32;
    display: block;
    border: 1px solid #C8E6C9;
}

.form-message.error {
    background: #FFEBEE;
    color: #C62828;
    display: block;
    border: 1px solid #FFCDD2;
}

.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 4rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    color: var(--primary);
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-family: 'Playfair Display', serif;
}

.footer-section p {
    margin-bottom: 0.8rem;
    color: #D5CEC4;
    font-size: 0.95rem;
}

.footer-section i {
    margin-right: 10px;
    color: var(--primary);
}

.social-icons {
    display: flex;
    gap: 1.2rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #D5CEC4;
    font-size: 0.9rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 36, 27, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.95); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 40px;
    color: var(--gray);
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary);
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-in.visible {
    opacity: 1;
}

.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        background: var(--white);
        box-shadow: 0 10px 15px var(--shadow);
        transition: left 0.3s ease;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .catalog-grid, .gallery-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
}