/* Общие стили для всех блоков */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Контейнер категорий */
.product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    background-color: #f9f9f9;
}

/* Стили для карточки категории */
.category-card {
    width: 240px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.category-card .category-name {
    font-size: 16px;
    margin-top: 10px;
    font-weight: bold;
    text-align: center; 
    margin-bottom: 20px;
}
.category-title {

    font-weight: bold;
    text-align: center; 
  
}


/* Модальное окно */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Темный фон, перекрывающий экран */
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Темный фон */
    z-index: 900;
}

/* Модальное окно внутри */
.popup .popup-content {
    margin: 5vw;
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

/* Карточка товара */
.popup .product-card {
    text-align: center;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.popup .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.popup .product-card img {
    width: 100%;
    height: 150px;  
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.popup .product-card .product-name {
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

.popup .product-card .product-price {
    font-size: 14px;
    color: #777;
    margin-top: 5px;
}

.popup .product-card .add-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.popup .product-card .add-button:hover {
    background-color: #218838;
}

/* Кнопка закрытия модального окна */
.popup .close-button {
    width: 40px;
    height: 40px;
    position: fixed;
    top: 5vw;
    right: 5vw;
    background-color: #ff5c5c;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
}

.popup .close-button:hover {
    background-color: #e64e4e;
}


/* Список товаров внутри модального окна */
.popup .product-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 товаров в ряд */
    gap: 20px;
}

/* Для планшетов */
@media (max-width: 1024px) {
    .popup .product-list {
        grid-template-columns: repeat(3, 1fr); /* 3 товара в ряд */
    }
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .popup .product-list {
        grid-template-columns: repeat(2, 1fr); /* 2 товара в ряд */
    }
}

.hidden {
    display: none !important;
}
