/* ==== ГЛАВНЫЙ БАННЕР — С АКЦЕНТОМ СЛЕВА ==== */
.hero-banner {
    border-radius: 20px;
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 350px;
    margin-bottom: 30px;
}

.hero-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    height: 100%;
    height: 350px;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Важно: чтобы изображение "смотрело" влево — можно добавить offset */
    object-position: left center; /* ← акцент на левой части изображения */
}

.hero-content-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
}

.hero-content {
    padding: 20px 20px 40px 40px;
    width: 60%;
    text-align: left;
    color: white;
    display: flex;
    align-items: start;
    flex-direction: column;
    justify-content: end;
 /* backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); */
    position: relative;
    background: linear-gradient(270deg, transparent 0%, rgba(0,0,0,0.01) 30%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.7) 100%);
}

.hero-title {
    font-size: 26px;
    line-height: 30px;
    margin: 0px;
}

.hero-subtitle {
    margin-top: 14px;
    font-size: 18px;
    line-height: 22px;
}

.hero-content .badge {
    margin-left: -20px;
    margin-bottom: auto;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content .btn {
    box-shadow: 0 4px 15px rgba(56, 178, 172, 0.3);
    background: linear-gradient(135deg, #9F7AEA, #38B2AC);
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    margin-top: 30px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(56, 178, 172, 0.3);
}


/*  */
.catalog_head {
    background-color: white;
    border-radius: 20px;
    padding: 20px 20px 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.catalog_head_top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Секции контента */
.section-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0px 0 0px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    height: max-content;
    width: max-content;
    /* max-width: 100%; */
    max-width: 48%;


}

.section-title span {
    white-space: nowrap; /* Запрет переноса строк */
  overflow: hidden; /* Скрытие текста за пределами */
  text-overflow: ellipsis;
}

/* Сетка карточек */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    margin-top: 20px;
}


.card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 150px;
    background: linear-gradient(45deg, #ff7eb3, #7873f5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-image img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    display: none;
}
.card-image.has-image img {
    display: block;
}

.card-icon {
    font-size: 40px;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    background-color: #f0e6ff;
    color: #6e45e2;
    width: max-content;
    max-width: 100%;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 10px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}


/* ── Search bar ── */
.catalog-search-wrap {
    width: 48%;
    display: flex; align-items: center;
    background: #fff; border: 1.5px solid #ede9f8;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(159,122,234,.08);
   transition: border-color .2s;
}
.catalog-search-wrap:focus-within { border-color: #9F7AEA; box-shadow: 0 0 0 3px rgba(159,122,234,.15); }
.catalog-search-icon { padding: 0 14px 0 18px; color: #bbb; font-size: 18px; flex-shrink: 0; }
.catalog-search-wrap input {
    flex: 1; border: none; outline: none; padding: 14px 0;
    font-size: 15px; color: #322659; background: transparent;
}
.catalog-search-wrap input::placeholder { color: #c4b5fd; }
.catalog-search-btn {
    padding: 10px 20px; margin: 6px; background: #9F7AEA; color: #fff;
    border: none; border-radius: 10px; cursor: pointer; font-size: 14px;
    font-weight: 600; transition: background .15s; flex-shrink: 0;
}
.catalog-search-btn:hover { background: #7c5dc9; }

/* ── Category pills ── */
.filter-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 16px; border-radius: 20px;
    background: #faf5ff; border: 1.5px solid #ede9f8;
    color: #7c5dc9; text-decoration: none; font-size: 13px; font-weight: 600;
    transition: all .15s; white-space: nowrap;
    margin-top: 6px;
}
.filter-pill:hover  { background: #f0ebff; border-color: #c4b5fd; color: #322659; }
.filter-pill.active { background: #9F7AEA; border-color: #9F7AEA; color: #fff; }

/* ── Result count ── */
.catalog-count {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #888; margin-bottom: 18px;
}
.catalog-count strong { color: #322659; }


/* ── Mobile categories toggle button (hidden on desktop) ── */
.cat-toggle-btn { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero-banner {
        /* padding: 20px; */
        height: 250px;
    }
    .hero-slide {
        height: 250px;
    }
    .hero-content {
        width: 100%;
    }
    .hero-title {
        font-size: 22px;
        line-height: 26px;
    }

    .hero-subtitle {
        margin-top: 12px;
        font-size: 16px;
        line-height: 20px;
    }

    .hero-content {
        max-width: 100%;
    }

    .section-title {
        font-size: 18px;
    }

    .card-image {
        height: 120px;
    }

    .card-content {
        padding: 15px;
    }

    .card-title {
        font-size: 16px;
    }
}

@media (max-width: 550px) {
    .hero-banner {
        height: 150px;
    }

    .hero-slide {
        height: 150px;
    }


    .hero-content {
        padding: 12px 14px 20px 20px;
        width: 100%;
    }

    .hero-title {
        font-size: 16px;
        line-height: 20px;
    }

    .hero-subtitle {
        margin-top: 10px;
        font-size: 12px;
        line-height: 16px;
    }

    .hero-content .badge {
        margin-left: -10px;
    }

    .hero-content .btn {
        padding: 6px 14px;
        margin-top: 20px;
        font-size: 12px;
        line-height: 12px;
    }


}

@media (max-width: 700px) {
    /* Head: заголовок и поиск в колонку */
    .catalog_head {
        padding: 16px 14px 10px;
    }
    .catalog_head_top {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 10px;
    }
    .section-title {
        max-width: 100%;
        font-size: 19px;
    }
    .catalog-search-wrap {
        width: 100%;
    }
    .catalog-search-wrap input {
        font-size: 14px;
        padding: 11px 0;
    }
    .catalog-search-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    /* Toggle-кнопка для категорий */
    .cat-toggle-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 10px 14px;
        background: #faf5ff;
        border: 1.5px solid #ede9f8;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
        color: #7c5dc9;
        cursor: pointer;
        transition: all .15s;
        text-align: left;
        margin-bottom: 0;
    }
    .cat-toggle-btn:hover { background: #f0ebff; border-color: #c4b5fd; }
    .cat-toggle-btn.has-active { background: #ede9f8; border-color: #9F7AEA; color: #322659; }

    .cat-toggle-chevron {
        margin-left: auto;
        transition: transform .22s ease;
        flex-shrink: 0;
    }
    .cat-toggle-clear {
        display: inline-flex;
        align-items: center;
        color: #9F7AEA;
        text-decoration: none;
        padding: 2px 4px;
        border-radius: 6px;
        transition: background .12s;
    }
    .cat-toggle-clear:hover { background: rgba(159,122,234,.15); }

    /* Пиллы скрыты по умолчанию на мобильных */
    #category-pills {
        display: none;
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 2px 4px;
        border-top: 1px solid #f0ebfa;
        margin-top: 8px;
    }
    #category-pills.cats-open {
        display: flex;
    }

    .filter-pill {
        font-size: 12px;
        padding: 6px 12px;
        margin-top: 0;
    }

    .catalog-count {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .card-stats {
        flex-direction: column;
        gap: 5px;
    }
}
