/* Общие стили */
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #000000;
    color: rgba(255, 255, 255, 0.87);
    font-family: "JetBrains Sans", Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
}

/* Контейнер приложения */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Основной контент */
.main-content {
    flex: 1;
    padding: 20px 0;
}

/* Хедер */
header {
    background: #222;
    color: white;
    text-align: center;
    width: 100%;
    padding: 20px 0;

    /*    background-image: url('/images/logo.png');*/
    /*!*    !*background-size: contain;*!*!*/
    /*    background-repeat: no-repeat;*/
    /*    background-position: left;*/
    /*background-size: 500px;*/
        /*height: 100px; !* Задай высоту, чтобы было видно *!*/
}

.list {
    text-align: left;
}

.header-content {
    max-width: 800px;
    margin: auto;
}

/*.logo {*/
/*    width: 180px; !* Размер логотипа *!*/
/*    margin-right: 15px; !* Отступ для текста *!*/
/*    position: page;*/
/*}*/

.header-content h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.header-content p {
    font-size: 18px;
    line-height: 1.6;
}

.highlight {
    color: #77a877;
    font-weight: bold;
}

/* Футер */
footer {
    text-align: center;
    padding: 20px;
    background: #222;
    color: white;
    margin-top: auto;
}

/* Контейнер */
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ✅ Карточки товаров */
.products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.product {
    max-width: 300px;
    border: 1px solid #444;
    padding: 15px;
    text-align: center;
    background: #333;
    border-radius: 8px;
    color: white;
    transition: transform 0.2s ease-in-out;
    width: calc(25% - 20px); /* 4 в ряд по умолчанию */
    min-width: 200px;
    box-sizing: border-box;
    overflow: hidden;
    /*height: auto !important; !* Позволяет карточке расти *!*/
    /*min-height: 100%; !* Убедимся, что она занимает всю высоту *!*/
}

.product:hover {
    transform: scale(1.05);
}

.product img {
    width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 5px;
    cursor: pointer;
    object-fit: cover;
}

/* ✅ 5 карточек в ряд для больших экранов */
@media (min-width: 1400px) {
    .product {
        width: calc(20% - 20px); /* 5 карточек в ряд */
    }
}

/* ✅ 4 карточки в ряд от 1024px до 1399px */
@media (min-width: 1024px) and (max-width: 1399px) {
    .product {
        width: calc(25% - 20px); /* 4 карточки в ряд */
    }
}

/* ✅ 3 карточки в ряд для средних экранов */
@media (min-width: 768px) and (max-width: 1023px) {
    .product {
        width: calc(33.33% - 20px); /* 3 карточки в ряд */
    }
}

/* ✅ 2 карточки в ряд на мобильных */
@media (max-width: 767px) {
    .product {
        width: calc(50% - 10px); /* 2 карточки в ряд */
    }
}

/* ✅ Полное отображение описания при раскрытии */
.product.expanded .full-desc {
    /*max-height: none;*/
    overflow: visible;
    max-height: none !important; /* Полностью убрать ограничение */


}

/* ✅ Форма контактов */
#contact {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: #222;
    border-radius: 10px;
}

#contact h2 {
    text-align: center;
}

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contactForm input,
#contactForm textarea {
    padding: 10px;
    border-radius: 5px;
    background: #333;
    color: white;
    resize: none;
    overflow-y: hidden;
    font-size: 16px;
    border: 1px solid #ccc;
}

#contactForm button {
    background: #77a877;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
}

#contactForm button:hover {
    background: #559955;
}

/* ✅ Кнопки */
.toggle-desc, .contact-btn {
    background: #555;
    color: white;
    border: none;
    padding: 10px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.toggle-desc:hover, .contact-btn:hover {
    background: #777;
}

/* ✅ Модальное окно */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.expanded-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

/* ✅ Кнопка "Добавить в корзину" */
.add-to-cart {
    background: #77a877;
    color: white;
    border: none;
    padding: 10px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #559955;
}

/* ✅ Стили корзины */
.cart {
    max-width: 400px;
    margin: 20px auto;
    padding: 15px;
    background: #222;
    border-radius: 10px;
    color: white;
    text-align: center;
}

.cart ul {
    list-style: none;
    padding: 0;
}

.cart li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #333;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.remove-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
}

.remove-btn:hover {
    background: #b71c1c;
}

/* 🔥 Уведомления */
.notification {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #4caf50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

