:root {
    /* Основные цвета */
    --color-primary: #D75F32;
    --color-primary-hover: #c04b1f;

    --color-background: #F4EDDF;
    --color-secondary: #E9DCC7;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-brown: #381D05;

    /* Текст */
    --color-text: var(--color-brown);
    --color-text-light: var(--color-white);
    --color-text-dark: var(--color-black);

    /* Кнопки и интерактивные элементы */
    --color-button-bg: var(--color-primary);
    --color-button-text: var(--color-white);
    --color-button-hover: var(--color-primary-hover);

    /* Карточки */
    --color-card-bg: var(--color-white);
    --color-card-shadow: rgba(0, 0, 0, 0.1);
    --color-card-shadow-hover: rgba(0, 0, 0, 0.3);

    /* Фильтры */
    --color-filter-bg: var(--color-white);
    --color-filter-text: var(--color-text-dark);
    --color-filter-option-bg: #F5F4F2;
}

/* Шрифты */
@font-face {
    font-family: "Chocolate";
    src: url("../fonts/ChocolateClassicalSans-Regular.ttf") format("woff2");
    font-display: swap;
}

/* Общие утилиты */
* {
    font-family: "Chocolate", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: var(--color-text);
    transition: color 0.3s;
}

ul {
    list-style: none;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
}

/* HEADER */
header {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.header-content {
    width: 100%;
    max-width: 1440px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    font-size: 16px;
    padding: 0 20px;
}

.logo {
    width: clamp(120px, 10vw, 175px);
    height: auto;
}

.navbar {
    display: flex;
    width: 100%;
    max-width: 445px;
    justify-content: space-between;
}

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

.login {
    width: clamp(100px, 26vw, 300px);
    height: 58px;
    border: 1px solid var(--color-black);
    border-radius: 100px;
    color: var(--color-text);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s;
}

.login:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.header__icons {
    width: 40px;
    color: var(--color-button-hover);
}

.header__icons:hover {
    filter: invert(43%) sepia(83%) saturate(349%) hue-rotate(343deg);
}

.user-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile:hover {
    filter: invert(43%) sepia(83%) saturate(349%) hue-rotate(343deg);
}

.username {
    font-weight: 500;
    color: var(--color-text);
}

/* Скрываем мобильные элементы на десктопе */
.mobile-user-actions,
.mobile-login {
    display: none;
}

/* Бургер-меню */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 101;
    background: none;
    border: none;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-text);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* MAIN */
main {
    min-height: 75vh;
}

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-content {
    width: 100%;
    max-width: 1440px;
    margin-top: 50px;
    padding: 0 20px;
}

/* FOOTER */
.footer {
    width: 100%;
    background-color: #000;
    color: #eee;
    font-family: sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 100px;
}

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

/* Верхняя часть */
.footer__top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer__brand {
    flex: 1 1 250px;
    margin-right: 40px;
}

.footer__logo {
    display: block;
    width: 100px;
    height: auto;
    margin-bottom: 16px;
}

.footer__desc {
    max-width: 280px;
    color: #ccc;
}

/* Навигация */
.footer__nav {
    display: flex;
    flex: 2 1 400px;
    gap: 60px;
}

.footer__column {
    flex: 1;
}

.footer__title {
    font-weight: 600;
    margin-bottom: 12px;
}

.footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__list li+li {
    margin-top: 8px;
}

.footer__list a {
    color: #ccc;
    text-decoration: none;
}

.footer__list a:hover {
    color: #fff;
}

/* Социальные и рассылка */
.footer__social {
    flex: 1 1 200px;
    text-align: right;
}

.footer__icons {
    margin-bottom: 16px;
}

.icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    margin-left: 8px;
    background-size: contain;
    background-repeat: no-repeat;
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer__newsletter {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background-color: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.footer__newsletter:hover {
    background-color: var(--color-primary-hover);
}

.footer__arrow {
    margin-left: 8px;
}

/* Нижняя часть */
.footer__bottom {
    border-top: 1px solid #222;
    padding: 20px 20px 10px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer__copy {
    margin: 0;
    color: #666;
}

.footer__legal {
    display: flex;
    align-items: center;
}

.footer__legal a {
    color: #666;
    text-decoration: none;
    margin: 0 8px;
}

.footer__legal a:hover {
    color: #aaa;
}

.footer__sep {
    color: #444;
}

/* Стили для уведомлений */
.notification-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
}

.notification {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    color: white;
    position: relative;
    animation: slideIn 0.5s forwards;
    opacity: 0;
    transform: translateX(100%);
}

.notification.success {
    background-color: #4CAF50;
}

.notification.error {
    background-color: #F44336;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Адаптивные стили для мобильных устройств */

/* Медиа-запросы для планшетов */
@media screen and (max-width: 1024px) {
    .header-content {
        padding: 0 30px;
    }

    .main-content {
        padding: 0 30px;
    }

}

/* Медиа-запросы для мобильных устройств */
@media screen and (max-width: 768px) {

    /* Header адаптив */
    .header-content {
        padding: 0 15px;
        position: relative;
    }

    .logo {
        width: 120px;
        z-index: 102;
    }

    /* Скрываем десктопное меню */
    .navbar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--color-white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 120px 30px 30px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 100;
        max-width: none;
        gap: 0;
    }

    .navbar.active {
        left: 0;
    }

    .navbar a {
        font-size: 18px;
        font-weight: 500;
        padding: 20px 0;
        border-bottom: 1px solid var(--color-secondary);
        width: 100%;
        display: block;
    }

    .navbar a:last-child {
        border-bottom: none;
    }

    /* Мобильные элементы в меню */
    .mobile-user-actions {
        display: flex;
        align-items: center;
        gap: 5px;
        width: 200px;
    }

    .mobile-user-actions a,
    .mobile-login {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 16px;
        font-weight: 500;
        padding: 20px 0;
        border-bottom: 1px solid var(--color-secondary);
        width: 100%;
    }

    .mobile-user-actions a:last-child {
        border-bottom: none;
    }

    .mobile-user-actions img {
        width: 24px;
        height: 24px;
    }

    .mobile-login {
        background-color: var(--color-primary);
        color: var(--color-white);
        padding: 15px 20px;
        border-radius: 25px;
        text-align: center;
        margin-top: 20px;
        justify-content: center;
        border: none;
    }

    /* Скрываем десктопные элементы пользователя */
    .user-info {
        display: none;
    }

    .login {
        display: none;
    }

    /* Показываем бургер-меню */
    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 102;
    }

    /* Оверлей для закрытия меню */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 99;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        padding: 0 15px;
        margin-top: 30px;
    }

    .footer__top {
        font-size: 12px;
    }

    .footer__nav {
        margin-top: 10px;
        flex-direction: column;
        gap: 20px;
    }

    .footer__social {
        display: flex;
        margin-top: 25px;
    }

    .footer__icons {
        display: flex;
        align-items: center;
        margin: 0;
    }

    .footer__icons img {
        width: 20px;
        height: 20px;
    }

    .footer__newsletter {
        font-size: 10px;
        padding: 4px 10px;
        display: flex;
        align-items: center;
    }

    .footer__bottom {
        font-size: 12px;
    }

    .container {
        padding: 30px 15px;
    }
}

/* Медиа-запросы для очень маленьких экранов */
@media screen and (max-width: 480px) {
    .header-content {
        padding: 0 10px;
    }

    .logo {
        width: 100px;
    }

    .navbar {
        width: 100%;
        left: -100%;
        padding: 100px 20px 30px;
    }

    .main-content {
        padding: 0 10px;
        margin-top: 20px;
    }

    .container {
        padding: 20px 10px;
    }

    .icon {
        width: 28px;
        height: 28px;
        margin: 0 4px;
    }

}

/* Фиксы для Safari и iOS */
@supports (-webkit-touch-callout: none) {
    .navbar {
        height: 100vh;
        height: -webkit-fill-available;
    }
}

/* Анимации для плавности */
@media (prefers-reduced-motion: no-preference) {
    .navbar a {
        transition: color 0.2s ease, padding-left 0.2s ease;
    }

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

    .mobile-user-actions a:hover,
    .mobile-login:hover {
        transform: translateX(5px);
        transition: transform 0.2s ease;
    }
}