*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background: #050505;
    color: white;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* HEADER */
header{
    width: 100%;
    height: 80px;
    padding: 0 120px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 5, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* LOGO */
.logo{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 30px;
    font-weight: 800;
}

.max{
    background: #ff2b2b;
    padding: 4px 10px;
    border-radius: 8px;
    color: white;
}

/* NAV */
nav{
    display: flex;
    gap: 40px;
}

nav a{
    color: #8b8b8b;
    text-decoration: none;
    transition: 0.3s;
}

nav a:hover,
nav .active{
    color: white;
}

/* LANG */
.lang{
    display: flex;
    gap: 10px;
}

.lang button{
    width: 42px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: #101010;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.lang-btn {
    color: #fff;
    text-decoration: none;
    background: #101010;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;

}

.lang-btn:hover {
    background: #171717;
}

/* HERO */
.shop-hero{
    width: 100%;
    padding: 180px 120px 100px;
    text-align: center;
}

.shop-hero p{
    color: #ff2b2b;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.shop-hero h1{
    font-size: 78px;
    margin-bottom: 20px;
}

.shop-hero span{
    color: #8b8b8b;
    font-size: 20px;
    line-height: 34px;
}

/* FILTERS */
.filters{
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 0 120px 80px;
    flex-wrap: wrap;
}

.filters button{
    padding: 16px 28px;
    border: none;
    border-radius: 18px;
    background: #101010;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.filters button:hover{
    transform: translateY(-4px);
}

.active-filter{
    background: #ff2b2b !important;
}

/* PRODUCTS SECTION */
.products{
    padding: 0 120px 120px;
}

.cards{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    width: 100%;
}

/* CARDS STRUCT */
.product-card{
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 32px;
    overflow: hidden;
    text-decoration: none;
    color: white !important; /* Принудительно убираем фиолетовый цвет ссылок */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: .35s;
}

.product-card:hover{
    transform: translateY(-10px);
    border-color: rgba(255, 43, 43, .35);
    box-shadow: 0 20px 50px rgba(255, 43, 43, .12);
}

/* BADGE */
.product-badge{
    position: absolute;
    top: 20px;
    left: 20px;
    background: #ff2b2b;
    color: white !important; /* Убираем фиолетовый цвет текста */
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
}

/* IMAGE WORK (Фикс гигантских картинок) */
.product-image{
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 20px;
    position: relative;
}

.product-image img{
    max-width: 90%;
    max-height: 220px;
    object-fit: contain; /* Картинка больше не растянется на весь экран */
    transition: .4s;
    display: block;
}

.product-card:hover img{
    transform: scale(1.06);
}

/* INFO */
.product-info{
    padding: 0 28px 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3{
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    color: white;
}

.product-specs{
    display: flex;
    gap: 12px;
    color: #9a9a9a;
    margin-bottom: 18px;
    font-size: 14px;
}

.product-price{
    font-size: 26px;
    font-weight: 800;
    color: white;
    margin-top: auto; /* Прижимает цену к низу карточки для ровности */
    margin-bottom: 18px;
}

.product-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 0;
    border-radius: 16px;
    background: #141414;
    color: white;
    font-weight: 600;
    transition: .3s;
}

.product-card:hover .product-btn{
    background: #ff2b2b;
}

/* ==========================================
   АДАПТИВНОСТЬ И БУРГЕР ДЛЯ CASEMAX
   ========================================== */

/* Скрываем бургер на компьютерах */
.burger {
    display: none;
    font-size: 32px;
    cursor: pointer;
    color: white;
    user-select: none;
    z-index: 1001;
}

/* Экраны ноутбуков и планшетов (до 1024px) */
@media (max-width: 1024px) {
    header {
        padding: 0 40px;
    }
    .shop-hero {
        padding: 140px 40px 30px;
    }
    .filters, .products {
        padding-left: 40px;
        padding-right: 40px;
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 колонки вместо 4 */
        gap: 20px;
    }
}

/* Мобильные телефоны (до 768px) */
@media (max-width: 768px) {
    header {
        padding: 0 20px;
        height: 70px;
    }

    .burger {
        display: block; /* Показываем иконку бургера */
    }

    /* Перестраиваем меню под мобилку */
    header nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: -100%; /* Изначально меню спрятано слева за экраном */
        width: 100%;
        height: 100vh;
        background: #050505;
        gap: 30px;
        z-index: 1000;
        transition: 0.4s ease; /* Плавное выдвижение */
    }

    /* Когда добавляется класс .show через JS, меню выезжает */
    header nav.show {
        left: 0;
    }

    header nav a {
        font-size: 24px; /* Делаем ссылки крупными для пальца */
    }

    .lang {
        display: none; /* Скрываем кнопку парфюма на мобилках, чтобы не перегружать шапку */
    }

    .shop-hero {
        padding: 120px 20px 20px;
    }

    .shop-hero h1 {
        font-size: 36px;
    }

    /* Удобный горизонтальный скролл фильтров пальцем */
    .filters {
        padding: 10px 20px 30px;
        gap: 10px;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .filters::-webkit-scrollbar {
        display: none; /* Прячем полосу прокрутки */
    }

    .filter-btn {
        padding: 10px 18px;
        font-size: 14px;
        border-radius: 12px;
    }

    .products {
        padding: 0 20px 60px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на телефонах */
        gap: 15px;
    }

    .product-card {
        padding: 15px;
        border-radius: 20px;
    }

    .product-img {
        height: 150px;
        margin-bottom: 15px;
    }

    .product-title {
        font-size: 18px;
    }

    .product-price {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .product-btn {
        height: 42px;
        font-size: 13px;
        border-radius: 12px;
    }
}

/* Крошечные экраны (до 480px) */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr; /* По одному товару в ряд на самых маленьких телефонах */
    }
}

@media (max-width: 768px) {
    header nav.active {
        max-height: 350px !important;
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .burger-toggle {
        display: block !important; /* Показываем бургер на мобилке */
    }
    header nav {
        display: none; /* Скрываем обычное меню */
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #000;
        padding: 20px 0;
    }
    header nav.active {
        display: flex !important; /* Показываем меню при клике */
    }
    .lang {
        display: none !important; /* Прячем парфюм на мобилке, чтобы не мешал */
    }
}