@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Geologica&display=swap');

body {
    margin: 0;
    background: #111;
    font-family: 'Montserrat', sans-serif;
    color: white;
}
.background-layer4 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: black url("/assets/bg/bg-prod.svg") no-repeat center center;
    background-size: cover;
}
.catalog-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 20px;
}
.catalog-title {
    margin-top: 72px;
    margin-left: 365px;
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 64px;
    font-weight: 400;
    line-height: 93px;
    color: white;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 80px;
    justify-items: center;
}
.product-card {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.4s ease;
    overflow: visible;
    position: relative;
    border-radius: 15px;
    padding: 12px;
    box-sizing: border-box;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow:
            -3px 18px 39px rgba(140, 0, 255, 0.29),
            -11px 71px 72px rgba(140, 0, 255, 0.26),
            -25px 159px 97px rgba(140, 0, 255, 0.15),
            -45px 283px 115px rgba(140, 0, 255, 0.04),
            -70px 442px 125px rgba(140, 0, 255, 0.01),
            0 40px 60px rgba(168, 101, 255, 0.3);
}
.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;

    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 15px;
}
.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    display: block;
}



.product-title {
    margin-top: 14px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
    display: -webkit-box;
    overflow: hidden;
    color: white;
    text-decoration: none;
    white-space: normal;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 56px;
}
.product-bottom {
    margin-top: 8px;
    border-radius: 0 0 15px 15px;
}
.product-price {
    background: #8744a4;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    display: inline-block;
}
.product-filter {
    /* Стили для десктопа (по умолчанию) */
    margin: 0 0 30px auto;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    font-size: 18px;
    color: #fff;
    padding: 0 20px; /* Добавляем боковые отступы для мобилок */
}
.product-filter label {
    margin-bottom: 8px;
}
.product-filter select {
    background: #fff;
    color: #1c1c1c;
    border-radius: 10px;
    border: none;
    padding: 10px 16px;
    font-size: 16px;
}

/* Адаптив */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .catalog-title {
        font-size: 38px;
        line-height: 48px;
    }

}
@media (max-width: 500px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .product-card {

        padding: 10px;
        max-width: none;
    }.catalog-title {
         font-size: 28px;
         line-height: 38px;
     }
    .product-title {
        font-size: 14px;
        line-height: 1.2;
        -webkit-line-clamp: 3;
        min-height: 54px;
    }
    .product-price {
        font-size: 13px;
        padding: 4px 10px;
    }

}
@media (max-width: 330px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .product-title {
        font-size: 13px;
    }
}
@media (max-width: 768px) {
    .catalog-title {
        margin-top: 180px;
        font-size: 36px;
        line-height: 1.2;
        text-align: center;
        margin-left: 0;
    }
}


/* Для экранов шире 1440px - ваш оригинальный расчет */
@media (min-width: 1440px) {
    .product-filter {
        margin: 0 0 30px calc((100% - 1440px)/2 + 1440px - 320px - 20px);
    }
}

/* Адаптация для планшетов */
@media (max-width: 1024px) {
    .product-filter {
        margin: 0 auto 30px; /* Центрируем на планшетах */
        max-width: 100%;
        padding: 0 40px;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .product-filter {
        margin: 0 auto 20px;
        padding: 0 20px;
        font-size: 16px;
    }

    .product-filter select {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .product-filter {
        padding: 0 15px;
    }
}



.category-list1 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    justify-content: center;
}

.category-item {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.active-category {
    background: linear-gradient(105deg, #8744a4, #d035e2);
    border-color: #fff;
    color: #fff;
}

.category-more-button {
    background: linear-gradient(105deg, #8744a4, #d035e2);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.category-more-button:hover {
    transform: scale(1.05);
}

/* Скрытая часть */
/* Скрытая панель сбоку */
.category-list-hidden {
    position: fixed;
    top: 20px;
    left: -320px;
    width: 280px; /* ← немного уже */
    height: calc(100% - 40px);
    background: rgba(25, 25, 25, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px 16px 20px 16px; /* ← равные отступы слева/справа */
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    transition: left 0.4s ease;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 12px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    scrollbar-width: thin;
    scrollbar-color: #8744a4 transparent;
    direction: rtl;
    text-align: left; /* Чтобы текст не стал справа */
}

.category-list-hidden.show {
    left: 0px;
}
.category-list-hidden * {
    direction: ltr; /* Возвращаем нормальное направление вложенным элементам */
}
/* Chrome, Edge, Safari */
.category-list-hidden::-webkit-scrollbar {
    width: 6px;
}

.category-list-hidden::-webkit-scrollbar-track {
    background: transparent;
}

.category-list-hidden::-webkit-scrollbar-thumb {
    background-color: #8744a4;
    border-radius: 8px;
}

/* Кнопка закрытия — чуть левее, внутри */
.category-close-button {
    position: absolute;
    top: 10px;
    right: 16px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}


.category-item-hidden {
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-item-hidden:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.category-item-hidden.active-category {
    background: linear-gradient(105deg, #8744a4, #d035e2);
    border: 1px solid #fff;
    color: #fff;
}

.mobile-close-btn {
    position: sticky;
    bottom: 20px;
    margin-left: auto;
    margin-top: 20px;
    margin-right: -18px;
    background: linear-gradient(105deg, #8744a4, #d035e2);
    color: #fff;
    border: none;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 4px 14px rgba(135, 68, 164, 0.3);
    transition: background 0.3s ease;
}

.mobile-close-btn:hover {
    background: linear-gradient(105deg, #a359c6, #e348ec);
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 480px) {
    .category-list-hidden {
        width: 82vw;
        left: -100vw;
        padding: 16px 10px 16px 10px;
        border-radius: 0 12px 12px 0;
        gap: 8px;
    }

    .category-list-hidden.show {
        left: 0;
    }

    .category-item-hidden {
        font-size: 13px;
        padding: 6px 10px;
        border-radius: 10px;
    }

    .category-close-button {
        display: none;
    }

    .mobile-close-btn {
        position: sticky;
        bottom: 10px;
        margin-left: auto;
        margin-right: -14px; /* Вынос за границу */
        background: linear-gradient(105deg, #8744a4, #d035e2);
        color: #fff;
        border: none;
        padding: 8px 16px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 12px 0 0 12px;
        cursor: pointer;
        z-index: 10001;
        box-shadow: 0 4px 12px rgba(135, 68, 164, 0.3);
    }
}

.cart-empty {

    font-weight: 600;
    color: rgb(135, 68, 164); /* фиолетовый */
    text-align: center;
    margin-top: 100px;
    font-size: 48px;
    line-height: 59px;
    letter-spacing: 0%;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@media (max-width: 1024px) {


    .cart-empty {
        font-size: 24px;
    }
}

@media (max-width: 768px) {



    .cart-empty {
        font-size: 20px;
      
        margin: 250px auto 80px;
    }
}

@media (max-width: 480px) {


    .cart-empty {
        font-size: 18px;
        margin: 250px auto 80px;
    }
}
.back-button {
    position: absolute;
    top: 25%; /* ← стало 120px вместо 30px */
    left: 30px;
    z-index: 1000;
    background: linear-gradient(105deg, #8744a4, #d035e2);
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 16px;
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.back-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(105deg, #9a57c6, #e14ae8);
}

@media (max-width: 480px) {
    .back-button {
        top: 140px; /* фиксированный отступ, более предсказуем */
        left: 16px;
        font-size: 14px;
        padding: 8px 14px;
    }
}

@media (max-width: 400px) {
    .back-button {
        top: 150px;
    }
}

@media (max-width: 360px) {
    .back-button {
        top: 150px;
    }
}
