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;
    /*align-items: stretch; */ /*Это тоже новое*/
    padding: 30px 20px;
  
}

/* Кнопка подробнее */
.product .details-btn {
    position: absolute;
    bottom: 20px; /* 🔥 отступ от нижнего края карточки */
    left: 50%;

    width: fit-content;

    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;
}


@media (min-width: 801px) {
    .product .details-btn {
        transform: translateX(-50%);
    }
}

    /* Карточка товара */
.product {
    
    position: relative;
    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;

    padding-bottom: 60px;


    /*height: 420px; */
    
    
}

.product:hover {

    box-shadow: 0 0 30px #a700ff;
}
    /*Название товара*/


/*Product-detail*/
.price{
        display: flex;     
        flex-direction: column !important; 




}

.price-block-cards { 
    display: flex;     
    flex-direction: column !important; 

    align-items: center;
    justify-content: center; 
    gap: 4px;
    margin: 10px 0;
 

    } 

.old-price { 

        font-size: 0.9rem; 
        color: #aaa; 
        text-decoration: line-through; 

        opacity: 0.9; 
    } 

.new-price{


    color: #ff5a5a;
    font-weight: bold;
    font-size: 1.5rem;
    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.6rem;
    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;
}


.not-found {
    color: rgb(0, 0, 0);
    font-weight: bold;
    font-size: 50px;
    text-align: center; 
    width: 100%; 
    margin-top: 50px;


}

/* Адаптив для мобильных */
@media (max-width: 800px) {
    
 /* Контейнер для товаров */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 6px 0px;
    
}

/* Карточка товара */
.product {
    position: static;
    padding-bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    border: 1px solid #a700ff;
    border-radius: 15px;
    margin: 15px;
    padding: 6px;
    width: 140px;
    
    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;
    height: auto;


    display: flex;
    flex-direction: column;
    
}


.product-footer-info {
    margin-top: auto;
    padding-top: 10px;
}

.product .details-btn {
    position: static;
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    background-color: transparent;
    border: 1px solid #a700ff;
    border-radius: 6px;
    color: white;
    box-shadow: 0 0 10px #a700ff;
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

.details-btn:hover {
    background-color: #a700ff;
    color: black;
}


    .image-wrapper {
    max-width: 240px;
    max-height: 240px;
    width: 100%;
    height: 137px; 
    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;
    }

    .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;
        
    }

    .product-info{
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        /*flex: 0 0 30%; */
    }

   .product h3 {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
   }
   
   /*
   
   
   */

    /* Цены старые и новые*/
   .product .product-info .price-block-cards {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        gap: 4px;
        margin: 5px 0;
    }

   .product .product-info .price-block-cards .new-price {
        font-size: 1rem !important;
        font-weight: bold;
        text-shadow: 0 0 8px #ff5a5a;
    }

    .product .product-info .price-block-cards .old-price {
        font-size: 0.7rem !important;
        transform: translateY(-3px);
        color: #bbb;    
        }


    /*Кнопка подробнее*/
    .product a {
    font-size: 12px;    
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    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;
    }
    
}

