/* ==========================================
   SMART SEARCH BOUTIQUE STYLES
   ========================================== */

   .smart-search-wrapper {
    position: relative;
    width: 100%;
    z-index: 100;
}

/* Строка ввода */
.catalog-search-hero {
    background: #FFFFFF;
    border-radius: 28px;
    padding: 8px 20px;
    border: 1.5px solid rgba(59, 13, 27, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.catalog-search-hero:focus-within {
    border-color: var(--text-wine, #4A1525);
    box-shadow: 0 14px 36px rgba(74, 21, 37, 0.12);
    transform: translateY(-1px);
}

.smart-search-input {
    width: 100%;
    border: none;
    outline: none;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark, #1A1A1A);
    background: transparent;
    padding: 8px 0;
}

.smart-search-input::placeholder {
    color: #9E9E9E;
    font-weight: 500;
}

/* Кнопка очистки */
.smart-search-clear {
    background: #F4F1EB;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    color: #777777;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
    flex-shrink: 0;
}

.smart-search-clear:hover {
    background: var(--text-wine, #4A1525);
    color: #FFFFFF;
}

/* Спиннер загрузки */
.smart-search-spinner .search-spin-icon {
    animation: boutiqueSearchSpin 0.8s linear infinite;
    color: var(--text-wine, #4A1525);
}

@keyframes boutiqueSearchSpin {
    100% { transform: rotate(360deg); }
}

/* Всплывающее меню (Dropdown) */
.smart-search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-radius: 28px;
    box-shadow: 0 20px 48px rgba(59, 13, 27, 0.12);
    border: 1px solid rgba(59, 13, 27, 0.08);
    padding: 20px;
    z-index: 1000;
    max-height: 520px;
    overflow-y: auto;
    scrollbar-width: none;
}
.smart-search-dropdown::-webkit-scrollbar { display: none; }

/* Заголовки секций внутри выпадающего окна */
.suggest-section-title {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #8C6D58;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-history-btn {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 600;
    color: #999999;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
}
.clear-history-btn:hover {
    color: var(--text-wine, #4A1525);
    text-decoration: underline;
}

/* Чипсы (Теги недавних и популярных запросов) */
.search-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.search-chip-item {
    background: #F4F1EB;
    border: 1px solid rgba(59, 13, 27, 0.06);
    border-radius: 100px;
    padding: 7px 14px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1A1A1A;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.search-chip-item:hover {
    background: var(--text-wine, #4A1525);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 21, 37, 0.15);
}

.search-chip-item .remove-single-history {
    font-size: 12px;
    opacity: 0.5;
    margin-left: 2px;
}
.search-chip-item:hover .remove-single-history {
    opacity: 0.9;
}

/* Товары в подсказках */
.suggest-prod-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.suggest-prod-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 18px;
    text-decoration: none;
    transition: background 0.2s ease;
    background: #FAFAFA;
}

.suggest-prod-item:hover {
    background: #F4EBE8; /* Легкий винный оттенок */
}

.suggest-prod-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    background: #FFFFFF;
    padding: 2px;
    border: 1px solid rgba(0,0,0,0.04);
}

.suggest-prod-info {
    flex: 1;
    min-width: 0;
}

.suggest-prod-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggest-prod-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}

.suggest-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-wine, #4A1525);
}

.suggest-old-price {
    font-size: 12px;
    color: #999999;
    text-decoration: line-through;
}

/* Кнопка "Показать все результаты" */
.search-view-all-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: #1C2E24;
    color: #FFFFFF;
    border-radius: 100px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.search-view-all-btn:hover {
    background: var(--text-wine, #4A1525);
    box-shadow: 0 6px 18px rgba(74, 21, 37, 0.2);
}

/* Кнопка микрофона */
.smart-search-voice-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8C6D58;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.smart-search-voice-btn:hover {
    color: var(--text-wine, #4A1525);
    background: #F4F1EB;
}

/* Анимация пульсации при активной записи голоса */
.smart-search-voice-btn.recording {
    color: #FFFFFF !important;
    background: #D93838 !important;
    animation: voicePulse 1.2s infinite;
}

@keyframes voicePulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 56, 56, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(217, 56, 56, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 56, 56, 0); }
}

/* ==========================================
   ПАНЕЛЬ СОРТИРОВКИ И ФИЛЬТРОВ НА СТРАНИЦЕ ВЫДАЧИ
   ========================================== */
.search-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 28px;
    padding: 12px 18px;
    background: #FFFFFF;
    border-radius: 20px;
    border: 1px solid rgba(59, 13, 27, 0.06);
    box-shadow: 0 4px 16px rgba(0,0,0,0.02);
}

.search-sort-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.search-sort-chips::-webkit-scrollbar { display: none; }

.sort-pill {
    padding: 8px 16px;
    background: #F4F1EB;
    border: 1px solid rgba(59, 13, 27, 0.05);
    border-radius: 100px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1A1A1A;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sort-pill:hover {
    background: #EFE7DA;
    color: var(--text-wine, #4A1525);
}

.sort-pill.active {
    background: var(--text-wine, #4A1525);
    color: #FFFFFF;
    border-color: var(--text-wine, #4A1525);
}


/* ==========================================
   БЫСТРОЕ ДОБАВЛЕНИЕ В КОРЗИНУ В САГГЕСТАХ
   ========================================== */
   .suggest-prod-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 18px;
    text-decoration: none;
    transition: background 0.2s ease;
    background: #FAFAFA;
}

.suggest-prod-item:hover {
    background: #F4EBE8;
}

/* Кликабельная левая часть (ссылка на товар) */
.suggest-prod-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

/* Правая зона действий (кнопка + / степпер) */
.suggest-prod-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Круглая кнопка быстрого добавления (+) */
.suggest-add-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1.5px solid rgba(59, 13, 27, 0.12);
    color: var(--text-wine, #4A1525);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.suggest-add-btn:hover {
    background: var(--text-wine, #4A1525);
    color: #FFFFFF;
    border-color: var(--text-wine, #4A1525);
    transform: scale(1.08);
}

/* Активный степпер [ - N + ] */
.suggest-stepper {
    display: flex;
    align-items: center;
    background: var(--text-wine, #4A1525);
    border-radius: 100px;
    padding: 3px 6px;
    gap: 6px;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(74, 21, 37, 0.25);
}

.suggest-stepper-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s ease;
}

.suggest-stepper-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.suggest-stepper-count {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 800;
    min-width: 14px;
    text-align: center;
}

/* Подсветка совпадения в тексте */
.search-highlight {
    color: var(--text-wine, #4A1525);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(74, 21, 37, 0.3);
}


/* ========================================================
   EDITORIAL BOUTIQUE — SEARCH RESULTS SPECIFIC STYLES
   ======================================================== */

   .search-results-hero {
    margin-bottom: 24px;
}

.search-title-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.search-main-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 600;
    color: var(--wine-primary, #3E101D);
    line-height: 1.15;
    margin: 0;
}

.search-query-word {
    font-style: italic;
    color: var(--wine-hover, #5A162B);
}

.search-count-badge {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-accent, #9A7B56);
    background: #FFFFFF;
    border: 1px solid rgba(154, 123, 86, 0.2);
    padding: 4px 12px;
    border-radius: 100px;
}

/* БЛОК "ВОЗМОЖНО ВЫ ИСКАЛИ" */
.search-did-you-mean {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 13px;
    flex-wrap: wrap;
}

.dym-label {
    color: var(--text-muted, #78716C);
    font-weight: 500;
}

.dym-chip {
    color: var(--wine-primary, #3E101D);
    font-weight: 700;
    text-decoration: none;
    background: #FFFFFF;
    border: 1px solid rgba(62, 16, 29, 0.15);
    padding: 4px 12px;
    border-radius: 100px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.dym-chip:hover {
    background: var(--wine-primary, #3E101D);
    color: #FFFFFF;
    border-color: var(--wine-primary, #3E101D);
    transform: translateY(-1px);
}

/* ПАНЕЛЬ СОРТИРОВКИ */
.search-sort-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    background: #FFFFFF;
    border: 1px solid var(--card-border, rgba(62, 16, 29, 0.08));
    padding: 10px 18px;
    border-radius: 100px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.sort-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-accent, #9A7B56);
    white-space: nowrap;
}

.search-sort-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.search-sort-chips::-webkit-scrollbar { display: none; }

.sort-pill {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main, #1C1917);
    background: var(--page-bg, #FAF9F6);
    border: 1px solid var(--card-border, rgba(62, 16, 29, 0.08));
    padding: 6px 14px;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sort-pill:hover {
    border-color: var(--wine-primary, #3E101D);
    color: var(--wine-primary, #3E101D);
}

.sort-pill.active {
    background: var(--wine-primary, #3E101D);
    color: #FFFFFF;
    border-color: var(--wine-primary, #3E101D);
    box-shadow: 0 4px 12px rgba(62, 16, 29, 0.2);
}

/* ПАГИНАЦИЯ */
.search-pagination-wrap {
    margin-top: 48px;
    text-align: center;
}

.pagination-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
}

.spinner-dot-ring {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(62, 16, 29, 0.15);
    border-top-color: var(--wine-primary, #3E101D);
    border-radius: 50%;
    animation: spinRing 0.8s linear infinite;
}

@keyframes spinRing {
    to { transform: rotate(360deg); }
}

.spinner-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-accent, #9A7B56);
}

.show-more-boutique-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
    padding: 12px 32px;
    background: #FFFFFF;
    border: 1.5px solid var(--wine-primary, #3E101D);
    color: var(--wine-primary, #3E101D);
    border-radius: 100px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(62, 16, 29, 0.06);
    transition: all 0.25s ease;
}

.show-more-boutique-btn:hover {
    background: var(--wine-primary, #3E101D);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(62, 16, 29, 0.16);
}

/* ПУСТОЙ РЕЗУЛЬТАТ */
.search-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #FFFFFF;
    border-radius: 24px;
    border: 1px solid var(--card-border, rgba(62, 16, 29, 0.08));
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0,0,0,0.03));
    max-width: 640px;
    margin: 20px auto 0;
}

.empty-icon-circle {
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 50%;
    background: var(--page-bg, #FAF9F6);
    font-size: 28px;
    margin: 0 auto 16px;
}

.empty-state-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--wine-primary, #3E101D);
    margin: 0 0 8px;
}

.empty-state-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted, #78716C);
    margin: 0 0 20px;
}

/* ========================================================
   АДАПТИВ ДЛЯ ПОИСКА (SMARTPHONES)
   ======================================================== */

@media (max-width: 768px) {
    .search-results-hero {
        margin-bottom: 16px;
    }

    .search-main-title {
        font-size: 20px;
    }

    .search-count-badge {
        font-size: 11px;
        padding: 3px 9px;
    }

    .search-sort-bar {
        padding: 8px 12px;
        border-radius: 16px;
        margin-bottom: 18px;
        gap: 8px;
    }

    .sort-label {
        font-size: 11.5px;
    }

    .sort-pill {
        font-size: 11px;
        padding: 5px 11px;
    }

    .search-empty-state {
        padding: 40px 16px;
    }
}


/* ========================================================
   EDITORIAL BOUTIQUE — SEARCH HERO & MODERN LAYOUT
   ======================================================== */

   .search-modern-page {
    padding-top: 100px;
}

/* 1. ВЕРХНЯЯ НАВИГАЦИЯ */
.search-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

/* 2. EDITORIAL HERO-БЛОК */
.search-modern-hero {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 36px;
}

.search-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-accent, #9A7B56);
    margin-bottom: 6px;
}

.search-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 4.8vw, 52px);
    font-weight: 600;
    color: var(--wine-primary, #3E101D);
    line-height: 1.1;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.search-hero-subtitle {
    font-size: 14px;
    color: var(--text-muted, #78716C);
    margin: 0 auto 20px;
    line-height: 1.5;
}

.search-hero-subtitle strong {
    color: var(--text-main, #1C1917);
    font-weight: 700;
}

/* 3. ПОИСКОВАЯ СТРОКА ПОД ЗАГОЛОВКОМ */
.search-hero-input-box {
    width: 100%;
    max-width: 620px;
    margin: 0 auto 20px;
}

.search-hero-input-box .search-input-wrap {
    background: #FFFFFF;
    border: 2px solid rgba(62, 16, 29, 0.12);
    box-shadow: 0 8px 24px rgba(62, 16, 29, 0.04);
}

.search-hero-input-box .search-input-wrap:focus-within {
    border-color: var(--wine-primary, #3E101D);
    box-shadow: 0 12px 32px rgba(62, 16, 29, 0.12);
}

/* ПОДСКАЗКИ "ВОЗМОЖНО ВЫ ИСКАЛИ" */
.search-suggestion-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12.5px;
    flex-wrap: wrap;
}

.suggestion-text {
    color: var(--text-muted, #78716C);
}

.suggestion-chip {
    color: var(--wine-primary, #3E101D);
    font-weight: 700;
    text-decoration: none;
    background: #FFFFFF;
    border: 1px solid rgba(62, 16, 29, 0.15);
    padding: 3px 10px;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.suggestion-chip:hover {
    background: var(--wine-primary, #3E101D);
    color: #FFFFFF;
}

/* 4. ПАНЕЛЬ СОРТИРОВКИ */
.search-sort-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.search-sort-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.search-sort-pills::-webkit-scrollbar { display: none; }

/* ПУСТАЯ ВЫДАЧА */
.search-empty-state {
    text-align: center;
    padding: 70px 20px;
    background: #FFFFFF;
    border-radius: 24px;
    border: 1px solid var(--card-border, rgba(62, 16, 29, 0.08));
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0,0,0,0.03));
    max-width: 600px;
    margin: 20px auto 0;
}

.empty-icon-circle {
    font-size: 46px;
    margin-bottom: 12px;
}

.empty-state-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--wine-primary, #3E101D);
    margin: 0 0 8px;
}

.empty-state-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted, #78716C);
    margin: 0 0 20px;
}

/* ========================================================
   АДАПТИВ ДЛЯ МОБИЛЬНЫХ
   ======================================================== */
@media (max-width: 768px) {
    .search-modern-page {
        padding-top: 70px;
    }

    .search-top-nav {
        margin-bottom: 12px;
    }

    .search-modern-hero {
        margin-bottom: 22px;
    }

    .search-eyebrow {
        font-size: 9.5px;
        margin-bottom: 4px;
    }

    .search-hero-title {
        font-size: clamp(24px, 6vw, 32px);
    }

    .search-hero-subtitle {
        font-size: 12.5px;
        margin-bottom: 14px;
    }

    .search-sort-pills {
        justify-content: flex-start;
    }
}
