body {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../images/logo-bmai.png') center center fixed;
    background-size: cover;
    color: rgb(0, 0, 0);
    backdrop-filter: blur(4px);
}

header {
    background-color: rgba(0, 0, 0, 0.85);
    padding: 20px;
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    box-shadow: 0 0 20px #a700ff;
}

.filter {
    text-align: center;
    margin: 20px;
}

.filter select {
    font-family: 'Orbitron', sans-serif;
    padding: 10px 15px;
    background-color: black;
    color: white;
    border: 1px solid #a700ff;
    border-radius: 8px;
    box-shadow: 0 0 10px #a700ff;
}

/* Поисковая форма */
.search-form {
    display: flex;
    justify-content: center;
    margin: 30px auto;
    max-width: 500px;
    background-color: #1b073e;
    border: 2px solid #a700ff;
    border-radius: 999px;
    box-shadow: 0 0 15px #a700ff88;
    overflow: hidden;
    flex-wrap: nowrap;
}

.search-form input[type="text"] {
    
    padding: 12px 20px;
    border: none;
    background-color: transparent;
    font-family: 'Courier New', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0d9ff;
    font-size: 1rem;
    width: 100%;
    box-shadow: inset 0 0 10px #a700ff;
    outline: none;
    min-width: 0; /* для корректной работы flex */
    flex-grow: 1;
}

.search-form input[type="text"]::placeholder {
    color: #c1b8e6;
}

.search-form button {
    padding: 12px 20px;
    background-color: #a700ff;
    color: #fff;
    font-size: 1rem;
    font-family: 'Courier New', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0; /* !!!!!!!*/
    margin-left: 8px; /*!!!!!!!!!!!!!*/
}

.search-form button:hover {
    background-color: #d154ff;
    color: black;
}




/* Контейнер для товаров */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 30px 20px;
}

/* Карточка товара */
.product {
    background-color: rgba(0, 0, 0, 0.75);
    border: 1px solid #a700ff;
    border-radius: 15px;
    margin: 20px;
    padding: 20px;
    width: 240px;
    text-align: center;
    box-shadow: 0 0 20px #a700ff;
    animation: fadeIn 1s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    opacity: 0;
}

.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 30px #a700ff;
}
/*Название товара*/


/*Product-detail*/
.price {
    font-size: 1.2rem;
    margin: 10px 0;
}

.old-price{
    text-decoration: line-through;
    color: #aaa;
    margin-right: 10px;
    font-size: 1rem;
}
.new-price{
    color: #ff5a5a;
    font-weight: bold;
    font-size: 1.3rem;
    text-shadow: 0 0 8px #ff5a5a;
}

.product:active {
    transform: translateY(-3px);
    box-shadow: 0 0 40px #a700ff;
}

.product:nth-child(odd) {
    animation-delay: 0.2s;
}

.product:nth-child(even) {
    animation-delay: 0.4s;
}




@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Обертка картинки, фиксируем максимальный размер */
.image-wrapper {
    max-width: 240px;
    max-height: 240px;
    width: 100%;
    height: 240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a2b;
    border-radius: 12px;
    box-shadow: 0 0 15px #a700ff;
    overflow: hidden; /* теперь обрезает выходящие части */
}



.image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

/* Название товара */
.product h3 {
    margin-top: 15px;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;

    color: white;
    text-shadow: #a700ff;
}

/* Описание товара */
.product p {
    color: #f7f7f7;
    font-size: 18px;
}

/* Ссылка "Подробнее" */
.product a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid #a700ff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 0 10px #a700ff;
    transition: background 0.3s ease, color 0.3s ease;
}

.product a:hover {
    background-color: #a700ff;
    color: black;
}

footer {
    background-color: rgba(0, 0, 0, 0.9);
    text-align: center;
    padding: 15px;
    font-size: 14px;
    box-shadow: 0 -2px 10px #a700ff;
    color: white;
}

/* Фильтр по категориям */
.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 25px 0;
}


.category-button {
    padding: 10px 20px;
    border: 2px solid #ffaa00;
    border-radius: 20px;
    text-decoration: none;
    color: #ffaa00;
    font-weight: bold;
    transition: all 0.3s ease;
}

.category-button:hover,
.category-button.active {
    background-color: #ffaa00;
    color: #000;
}

/* Адаптив для мобильных */
@media (max-width: 600px) {
    .category-filter {
        flex-direction: column;
        align-items: center;
    }

    .search-form {
        
        flex-wrap: nowrap;
        width: 90%;
        
    }

    .search-form input[type="text"]{
        font-size: 1rem;
        padding: 10px 12px;
    }

    .search-form button {
        padding: 10px 12px;
        font-size: 0.9rem;
        
    }
}