:root {
    --primary: #2C1A1D;
    --accent: #D4A373;
    --cream: #FAEDCD;
    --white: #FEFAE0;
    --dark-overlay: rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: var(--white);
    color: var(--primary);
    overflow-x: hidden;
    /* Важно для анимаций, чтобы не было горизонтального скролла */
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

/* --- Навигация (GRID Layout) --- */
.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(44, 26, 29, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
}

.logo .accent {
    color: var(--accent);
}

/* Корзина */
.cart-btn {
    position: relative;
    cursor: pointer;
    color: var(--white);
    font-size: 1.3rem;
    transition: 0.3s;
    margin-right: 5px;
}

.cart-btn:hover {
    color: var(--accent);
    transform: scale(1.1);
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: var(--primary);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Центр: Ссылки */
.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-list a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
    transition: 0.3s;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: 0.3s;
}

.nav-list a:hover::after {
    width: 100%;
}

/* Правая часть */
.nav-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 25px;
}

/* Бургер */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 5px;
    transition: 0.3s;
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(44, 26, 29, 0.7)),
        url('https://images.unsplash.com/photo-1509042239860-f550ce710b93?q=80&w=1920');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.glass-card-hero {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem 4rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    max-width: 800px;
    /* Анимация свечения перенесена в класс загрузки, чтобы не конфликтовать */
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.separator {
    font-size: 2rem;
    color: var(--accent);
    margin: 10px 0;
}

.btn {
    padding: 15px 40px;
    background: var(--accent);
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    display: inline-block;
    margin-top: 25px;
    transition: all 0.3s ease;
    /* Плавнее */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* --- Секции --- */
.menu-section {
    padding: 5rem 5%;
}

.dark-bg {
    background-color: var(--primary);
    color: var(--white);
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

/* Карточки */
.card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    /* Очень модная пружинистая анимация */
    display: flex;
    flex-direction: column;
}

.dark-bg .card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    /* Чуть больше движение вверх */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-image {
    height: 240px;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
    /* Медленный зум */
}

.card:hover .card-image {
    transform: scale(1.1);
}

.card-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.card-info p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    opacity: 0.8;
    line-height: 1.5;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent);
}

.add-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
}

.dark-bg .add-btn {
    background: var(--accent);
    color: var(--primary);
}

.add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    /* Для JS анимации */
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    /* Старт анимации уменьшен */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: var(--accent);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-summary {
    margin-top: 25px;
    border-top: 2px solid var(--primary);
    padding-top: 20px;
}

.row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.highlight {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.3rem;
    margin-top: 10px;
}

.checkout-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
    transition: 0.3s;
}

.checkout-btn:hover {
    background: var(--accent);
}

/* Footer */
footer {
    background: #1a1011;
    color: #ccc;
    padding: 4rem 5% 1rem;
    border-top: 5px solid var(--accent);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.footer-col p {
    line-height: 1.6;
    margin-bottom: 10px;
}

.address {
    color: var(--accent);
    font-weight: bold;
    margin-top: 15px;
}

.socials a {
    color: var(--white);
    font-size: 1.8rem;
    margin-right: 15px;
    transition: 0.3s;
}

.socials a:hover {
    color: var(--accent);
    transform: translateY(-3px);
    display: inline-block;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

/* Мобайл */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .navbar {
        grid-template-columns: auto 1fr auto;
    }

    .nav-list {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--primary);
        width: 100%;
        height: 100vh;
        text-align: center;
        padding-top: 2rem;
        transition: 0.4s;
    }

    .nav-list.active {
        left: 0;
    }

    .hero-content {
        padding: 2rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(44, 26, 29, 0.7)),
            url('https://images.unsplash.com/photo-1509042239860-f550ce710b93?q=80&w=1920');
    }
}


/* --- !!! NEW ANIMATIONS BLOCK !!! --- */

/* 1. Начальное скрытое состояние для скролл-элементов */
.scroll-hidden {
    opacity: 0;
    transform: translateY(60px);
    /* Смещены вниз */
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

/* 2. Состояние видимости (добавляется JS) */
.scroll-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 3. Анимация Hero при загрузке страницы */
.animate-on-load {
    opacity: 0;
    animation: heroFadeIn 1.2s ease-out forwards;
    animation-delay: 0.2s;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 0 25px rgba(212, 163, 115, 0.4);
        /* Включаем свечение в конце */
    }
}