.body {
    background-color: var(--white);
    color: var(--text-dark);
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    margin: 0;
}

.container {
    margin: 0 auto;
    padding: 0 1rem;
    max-width: 1440px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.logo__pic {
    max-width: 100px;
}

/* ========== КНОПКИ ========== */
.btn {
    display: inline-block;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
}
.btn--primary {
    background-color: var(--primary);
    color: white;
}
.btn--primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58,123,112,0.2);
}
.btn--outline-primary {
    /*border: 1px solid var(--primary);*/
    color: var(--primary);
    background: var(--text-dark);
    box-shadow: var(--header-shadow);
}
.btn--outline-primary:hover {
    background-color: var(--primary);
    color: var(--text-dark);

}
.btn--outline-secondary {
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.btn--small {
    padding: 0.3rem 1rem;
    font-size: 0.9rem;
}

/* ========== ХЕДЕР (БЭМ) ========== */
.header, .main, .footer {
    width: 100%;
}

.main {
    max-width: 1440px;
    flex: 1;
}

/* ========== НАВИГАЦИЯ (БЭМ) ========== */
.navbar {
    background-color: var(--white);
    box-shadow: var(--header-shadow);
    padding: 1rem 0;
}

.navbar__brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--text-dark);
    text-decoration: none;
}
.navbar__brand-accent {
    color: var(--primary);
}

.navbar__toggler {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Новая сетка — грид */
.navbar__collapse {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}

/* Левая часть: логотип + навигация в строку */
.navbar__left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Центральная часть: поиск */
.navbar__search {
    justify-self: center;
    width: 100%;
    max-width: 400px;
}

.search-form {
    display: flex;
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 2rem;
    background-color: var(--white);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.search-form:focus-within {
    box-shadow: 0 0 0 2px var(--primary-soft);
    border-color: var(--primary);
}
.search-form__input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    outline: none;
    font-size: 0.9rem;
    background: transparent;
}
.search-form__button {
    background: none;
    border: none;
    padding: 0 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.search-form__button:hover {
    color: var(--primary);
}

/* Правая часть */
.navbar__actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-self: end;
}

.navbar__nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}
.nav__link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}
.nav__link--active, .nav__link:hover {
    color: var(--primary);
}

.cart-icon {
    position: relative;
    color: var(--text-dark);
}
.cart-icon__badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    padding: 2px 6px;
}

/* Адаптивность (мобильные) */
@media (max-width: 768px) {
    .navbar__toggler {
        display: block;
        margin-bottom: 0.5rem;
    }
    /*.navbar__collapse {*/
    /*    display: flex;*/
    /*    flex-direction: column;*/
    /*    align-items: stretch;*/
    /*    gap: 1rem;*/
    /*}*/
    .navbar__collapse{
        grid-template-rows: 1fr max-content;
    }
    .navbar__left {
        justify-content: space-between;
        grid-row: 1/2;
        grid-column: 1/2;
    }
    .navbar__search {
        max-width: none;
        width: 100%;
        grid-row: 2/3;
        grid-column: 1/-1;
    }
    .navbar__actions {
        justify-content: flex-end;
        grid-row: 1/2;
        grid-column: 2/-1;
    }
    .navbar__nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .navbar__collapse--show .navbar__nav {
        display: flex;
    }
}

/* ========== HERO ========== */
.hero {
    padding: 3rem 0;
}
.hero__grid {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.hero__content {
    flex: 1;
}
.hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.hero__subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.hero__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero__image-wrapper {
    flex: 1;
    text-align: center;
}
.hero__image {
    margin: 0 auto;
    object-fit: contain;
    max-width: 100%;
    height: 300px;
    border-radius: 1.2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    .hero__grid {
        flex-direction: column;
        text-align: center;
    }
    .hero__buttons {
        justify-content: center;
    }
}

/* ========== КАТЕГОРИИ ========== */
.categories {
    background-color: var(--white);
    padding: 3rem 0;
}
.categories__title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 2rem;
}
.categories__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}
.category-card {
    background: var(--white);
    border-radius: 1.2rem;
    padding: 1.5rem;
    text-align: center;
    transition: 0.2s;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    /*border: 1px solid var(--primary-light);*/
    /*border: 1px solid var(--light-shadow-yellow);*/
    border: 1px solid var(--primary);
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -15px rgba(0,0,0,0.1);
    cursor: pointer;
}
.category-card__icon {
    font-size: 2.5rem;
    color: var(--primary);
    background-color: var(--primary-soft);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}
.category-card__title {
    margin-bottom: 0.5rem;
}
.category-card__desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========== ПОПУЛЯРНЫЕ ТОВАРЫ ========== */
.products {
    padding: 3rem 0;
}
.products__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2rem;
}
.products__title {
    font-weight: 600;
}
.products__link {
    color: var(--primary);
}
.products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}
.product-card {
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    /*border: 1px solid var(--primary);*/
    /*border: 1px solid var(--light-shadow-yellow);*/
    border: 1px solid var(--primary);
    border-radius: 1rem;
    overflow: hidden;
    transition: 0.2s;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -10px rgba(0,0,0,0.1);
}
.product-card__image {
    width: 100%;
    padding: 1rem;
    object-fit: contain;
    height: 300px;
    box-shadow: 0 4px 17px rgba(247, 201, 72, 0.38);
}
.product-card__body {
    padding: 1rem;

}
.product-card__name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
.product-card__price {
    font-weight: bold;
    margin: 0.5rem 0;
}
.product-card__cart {
    width: 100%;
    border: 1px solid var(--primary);
    box-shadow: var(--header-shadow);
}
.product-card__cart:hover{
    background-color: var(--primary);
    color: var(--text-dark);
    cursor: pointer;
}

/* ========== ОТЗЫВЫ ========== */
.testimonials {
    background-color: var(--white);
    padding: 3rem 0;
}
.testimonials__title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 2rem;
}
.testimonials__slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}
.testimonial-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    /*border: 1px solid var(--primary-light);*/
    border: 1px solid var(--primary);
    height: 300px;                /* фиксированная высота карточки */
    display: flex;
    flex-direction: column;
}
.testimonial-card__quote {
    color: var(--primary-soft);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;               /* иконка не сжимается */
}
.testimonial-card__text {
    flex: 1;                      /* занимает всё доступное место */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;        /* количество видимых строк текста */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    margin-bottom: 1rem;
}
.testimonial-card__author {
    font-weight: bold;
    flex-shrink: 0;
    margin-top: auto;             /* прижимает автора к низу */
}
.testimonial-card__stars {
    color: #f4b400;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* ========== ПРЕИМУЩЕСТВА ========== */
.advantages {
    padding: 3rem 0;
}
.advantages__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}
.advantage-item__icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.advantage-item__title {
    font-weight: 600;
}
.advantage-item__desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========== ПОДВАЛ ========== */
.footer {
    background-color: var(--white);
    box-shadow: var(--footer-shadow);  /* тень сверху */
    padding: 2rem 0 1rem;
}
.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer__brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-dark);
    text-decoration: none;
}
.footer__brand-accent {
    color: var(--primary);
}
.footer__description {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer__title {
    font-weight: 600;
    margin-bottom: 1rem;
}
.footer__list {
    list-style: none;
}
.footer__list li {
    margin-bottom: 0.5rem;
}
.footer__list a {
    color: var(--text-secondary);
    text-decoration: none;
}
.footer__list a:hover {
    color: var(--primary);
}
.footer__icon {
    width: 1.5rem;
    color: var(--primary);
}
.footer__social {
    display: flex;
    gap: 1rem;
}
.footer__social-link {
    color: var(--text-secondary);
    font-size: 1.5rem;
}
.footer__social-link:hover {
    color: var(--primary);
}
.footer__separator {
    border: none;                /* убираем стандартную рамку */
    height: 1px;                /* толщина линии */
    background: linear-gradient(90deg, transparent, var(--primary) 20%, var(--primary) 80%, transparent);
    margin: 1rem 0;             /* отступы сверху и снизу (как у вас) */
    width: 100%;
}
.footer__copyright {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ========== СТРАНИЦА КАТАЛОГА ========== */
.catalog-hero {
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--white) 100%);
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}
.catalog-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}
.catalog-hero__subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.categories--catalog {
    padding: 20px;
    background-color: transparent;
}

.categories__grid--large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.category-card--link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    background: var(--white);
    border-radius: 1.5rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.category-card--link:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.15);
}

.category-card__icon {
    width: 100px;
    height: 100px;
    line-height: 100px;
    font-size: 3rem;
    background-color: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}
.category-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.category-card__title {
    font-size: 1.6rem;
    height: 4.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}
.category-card__desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.category-card__arrow {
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    display: inline-block;
    margin-top: auto;
}
.category-card--link:hover .category-card__arrow {
    opacity: 1;
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .catalog-hero__title {
        font-size: 1.8rem;
    }
    .category-card__icon {
        width: 70px;
        height: 70px;
        line-height: 70px;
        font-size: 2rem;
    }
    .category-card__title {
        font-size: 1.3rem;
    }
    .testimonial-card {
        flex: 1;
    }
    .nav__item--dropdown {
        position: static;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: transparent;
        padding-left: 1rem;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none; /* скрываем по умолчанию */
    }
    .nav__item--dropdown.active .dropdown-menu {
        display: block;
    }
}
/* ========== ВЫПАДАЮЩЕЕ МЕНЮ ========== */
.nav__item--dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 220px;
    border-radius: 0.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s, transform 0.3s ease;
    z-index: 100;
}

.nav__item--dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    font-size: 0.95rem;
}

.dropdown-menu li a:hover {
    background-color: var(--primary-soft);
    color: var(--primary);
}

/* Стрелка (иконка) */
.dropdown-arrow {
    font-size: 0.8rem;
    margin-left: 0.4rem;
    transition: transform 0.3s;
}

.nav__item--dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

