/* Основные стили для body */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    margin: 0;
    padding-bottom: 50px;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #EAEAEA;
}

/* Контейнер для основного контента */
.main-content {
    flex-grow: 1;
}

/* Центрирование контейнера для поиска */
.search-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 50px 0;
}

/* Стили для поиска */
.search-bar {
    width: 100%;
    max-width: 400px;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 14px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Стили для списка товаров */
.products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin: -40px 0 50px 0;
    min-height: 300px;
    align-items: flex-start;
    padding: 0 0 10px 0;
}

/* Стили для отдельного товара */
.product {
    text-align: center;
    border: 1px solid #ddd;
    padding: 10px;
    width: 100%;
    max-width: 180px;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: #fff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.product img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-top: 0;
    color: black;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.product-price {
    font-size: 5px;
    color: green;
    margin-top: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Убираем подчеркивание у ссылок */
a {
    text-decoration: none;
}

/* Стили для зачёркнутой и новой цены */
.old-price {
    color: #888;
    text-decoration: line-through;
    margin-right: 5px;
    font-size: 5px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.new-price {
    color: green;
    font-weight: bold;
    font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.sub-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 50px 0 60px; /* отступ сверху от шапки */
    padding-top: 10px;
}

.sub-tab {
    flex: 0 1 45%; /* по 2 кнопки в строку */
	max-width: 200px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    font-size: 14px;
    color: #555;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.sub-tab.active {
    color: white;               /* Текст белым */
    font-weight: bold;          /* Жирный шрифт */
    border-color: black;        /* Черная граница */
    background-color: black;    /* Черный фон */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);  /* Тень */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Сам эффект прыжка */
@keyframes jump {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/* Класс, который будет запускать анимацию */
.jump-animation {
    animation: jump 0.6s ease-in-out;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 600px) {
    .search-bar {
        max-width: 90%;
        margin: 5px auto;
        padding: 8px;
    }

    .products {
        justify-content: center;
        margin: 0;
        margin-top: -42px;
        margin-bottom: 10px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .product {
        max-width: calc(50% - 10px); /* Два товара в ряд */
    }

    .product-price {
        font-size: 12px;
    }

    .product-name {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .search-bar {
        max-width: 85%;
        padding: 8px;
        margin-top: 5px;
    }

    .products {
        justify-content: center;
        margin-top: -42px;
    }

    .product {
        max-width: calc(50% - 10px); /* Два товара в ряд */
    }

    h1 {
        font-size: 18px;
    }
}