:root {
    --primary: #459353;
    --primary-light: #5cb872;
    --text: #2c2c2c;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f7f7f7;
    color: var(--text);
}

/* Кнопки */
.top-buttons {
    display: flex;
    gap: 10px;
    padding: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: 0.25s ease;
    font-size: 15px;
}

.primary {
    background: var(--primary);
    color: white;
}

.primary:hover {
    background: var(--primary-light);
}

.outline {
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
}

.outline:hover {
    background: var(--primary);
    color: white;
}

/* ---------- КАРУСЕЛЬ ---------- */
.carousel-container {
    position: relative;
    max-width: 600px;
    margin: 20px auto;
}

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.slide {
    display: none;
    animation: fade 0.6s ease-in-out;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    display: block;
}

/* Анимация */
@keyframes fade {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* Навигация */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    padding: 10px 14px;
    color: white;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: 0.25s;
}

.nav:hover {
    opacity: 1;
}

.prev { left: 10px; }
.next { right: 10px; }

/* Точки */
.dots {
    text-align: center;
    margin-top: 10px;
}

.dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin: 4px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--primary);
}

/* ---------- ОПИСАНИЕ ---------- */
.description {
    max-width: 700px;
    margin: 25px auto;
    background: #fff;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    line-height: 1.6;
    animation: fade 0.8s ease;
}

.description p {
    margin-bottom: 16px;
    font-size: 16px;
}

/* ---------- СЕТКА КАРТОЧЕК (3 в ряд) ---------- */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 20px 40px;
    justify-items: center;
}

/* ---------- КАРТОЧКА ---------- */
.product-card {
    width: 100%;
    max-width:400px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 260px;
    object-fit: contain;
    background: #f7f7f7;
    padding: 20px;
}

.product-details {
    padding: 20px;
    text-align: center;
}

.product-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-description {
    font-size: 15px;
    color: #555;
    margin-bottom: 20px;
}

.product-button {
    background-color: #14c86e;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: 0.3s;
}

.product-button:hover {
    background-color: #12ab0a;
}

.product-button a {
    color: white;
    text-decoration: none;
}

/* ---------- АДАПТИВ ---------- */

/* Планшеты — 2 карточки */
@media (max-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Телефоны — 1 карточка */
@media (max-width: 600px) {
    .btn { width: 100%; }
    .nav { padding: 7px 10px; font-size: 16px; }

    .catalog-grid {
        grid-template-columns: 1fr;
        padding: 10px 15px;
        gap: 18px;
    }

    .product-card {
        max-width: 100%;
        border-radius: 10px;
    }

    .product-image {
        height: 160px;
        padding: 10px;
    }

    .product-details {
        padding: 15px;
    }

    .product-title {
        font-size: 18px;
    }

    .product-description {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .product-button {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }
}

/* Маленькие телефоны */
@media (max-width: 380px) {
    .product-image {
        height: 140px;
    }

    .product-title {
        font-size: 17px;
    }

    .product-description {
        font-size: 13px;
    }
}
