/* ===== ОСНОВНЫЕ СТИЛИ ===== */
body {
    background-attachment: fixed !important;
    font-family: 'Helvetica Neue Cyr Light', sans-serif !important;
    background-size: cover !important;
    background-color: #f9f9f9 !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
}

h1 {
    font-size: 23px !important;
}

ol, ul {
    padding-left: 0;
}
.menu-modal,
.menu-modal *,
.menu-modal *::before,
.menu-modal *::after {
    box-sizing: content-box !important;
}

#topHeader .auth-links a,
#topHeader a.email,
#footer_content a.email,
#footer_content a.phone {
    color: #1d1d1d !important;
}

form .border {
    border-bottom: 1px solid #ccd3d5;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

#topMenu li a:hover {
    color: #fff !important;
}
/* ===== СТИЛИ ДЛЯ КАТЕГОРИЙ ===== */
.category-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 20px 15px 15px;
    height: 100%;
    transition: all 0.3s;
    border: 1px solid #edf2f7;
}

.category-wrapper:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border-color: transparent;
}

.category-main-card {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
}

.category-image-wrapper {
    height: 120px;
    margin: 0 auto 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s;
}

.category-wrapper:hover .category-image-wrapper {
    border-color: #fb2b35;
}

.category-image {
    height: 100%;
    object-fit: contain;
}

.category-heading {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
}

/* ===== ПОДКАТЕГОРИИ ===== */
.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.subcategory-list li {
    margin-bottom: 8px;
}

.subcategory-link {
    color: #4a5568;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.subcategory-link:hover {
    color: #fb2b35;
}

.subcategory-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

/* ===== POPOVER / MORE МЕНЮ ===== */
.more-link {
    position: relative;
    list-style: none;
}

.more-trigger {
    color: #fb2b35;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    border-bottom: 1px dashed currentColor;
}

.more-arrow {
    transition: transform 0.2s;
}

.more-trigger:hover .more-arrow {
    transform: translateX(4px);
}

.more-popover {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 12px;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 50;
    margin-bottom: 8px;
    border: 1px solid #edf2f7;
    pointer-events: none;
}

.more-popover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.more-trigger:hover + .more-popover,
.more-popover:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

.more-popover::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    border-right: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    border-radius: 0 0 4px 0;
}
.more-popover > .popover-item{
    margin: 5px 0;
}
/* ===== POPOVER ITEMS ===== */
.popover-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding:0 35px 0 0;
    color: #2d3748;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.popover-item:hover {
    background: #f7fafc;
    color: #fb2b35;
    padding-left: 16px;
}

.popover-item img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 6px;
}

/* ===== ПЛЕЙСХОЛДЕР ДЛЯ ИКОНОК ===== */
.item-icon-placeholder {
    width: 24px;
    height: 24px;
    background: #fb2b35;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

/* ===== НОВЫЙ БЛОК ПОПУЛЯРНЫХ ПОДБОРОК ===== */
.popular-section {
    margin-top: 3rem;
    border-top: 1px solid #edf2f7;
    padding-top: 2rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.popular-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.popular-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    border-color: transparent;
}

.popular-card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #fb2b35;
    font-size: 0.95rem;
    line-height: 1.4;
}

.popular-category-link {
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.popular-category-link:hover {
    color: #fb2b35;
}

.popular-current-item {
    /*color: #fb2b35;*/
    font-weight: 600;
}

.popular-separator {
    color: #cbd5e0;
    margin: 0 2px;
}

.popular-param-title {
    color: #718096;
    font-weight: 400;
}

.popular-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.popular-items .popover-item {
    background: #f8fafc;
    border: 1px solid transparent;
    justify-content: flex-start;
}

.popular-items .popover-item:hover {
    background: #fff;
    border-color: #fb2b35;
    padding-left: 16px;
}

.popular-item-arrow {
    margin-left: auto;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
    color: #fb2b35;
}

.popover-item:hover .popular-item-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 767px) {
    .row {
        margin: 0 !important;
    }

    /* Отключаем hover-поведение на мобильных */
    .more-trigger:hover + .more-popover,
    .more-popover:hover {
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        pointer-events: none;
    }

    /* Включаем отображение по классу active */
    .more-popover.active {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translate(-50%, -50%) !important;
        pointer-events: all !important;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 1000;
        bottom: auto; /* переопределяем bottom:100% из десктопной версии */
    }

    .more-popover.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
    }

    .more-popover::after {
        display: none;
    }

    .popover-item {
        white-space: normal;
        padding: 12px;
        border-bottom: 1px solid #edf2f7;
    }

    .popover-item:last-child {
        border-bottom: none;
    }

    /* Мобильные стили для популярного блока */
    .popular-card-header {
        font-size: 0.9rem;
    }

    .popular-items .popover-item {
        padding: 0.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}