/* Анимация для dropdown */
.search__dropdown--suggestions {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.search__dropdown--suggestions.search__dropdown--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Стили для элементов результатов */
.suggestions__loading,
.suggestions__error,
.suggestions__no-results {
    padding: 12px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.suggestions__error {
    color: #e74c3c;
}

.suggestions__product {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.suggestions__product:last-child {
    border-bottom: none;
}

.suggestions__product:hover {
    background-color: #f8f8f8;
}

.suggestions__product-image {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 12px;
    position: relative;
    overflow: hidden;
}

/* Переопределяем глобальные стили для image--type--product в контексте поиска */
.suggestions__product-image.image--type--product .image__body {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    padding-bottom: 0 !important;
}

.suggestions__product-image.image--type--product .image__tag {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    margin: 0 !important;
}

.suggestions__product-info {
    flex: 1;
    min-width: 0;
}

.suggestions__product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestions__product-meta {
    font-size: 12px;
    color: #999;
}

.suggestions__product-price {
    flex-shrink: 0;
    margin-left: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Стили для футера с ссылкой "Все результаты поиска" */
.suggestions__footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 16px;
    text-align: center;
    background-color: #fafafa;
}

.suggestions__view-all {
    display: inline-block;
    color: #3d464d;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

.suggestions__view-all:hover {
    background-color: #f0f0f0;
    color: #1a1a1a;
    text-decoration: none;
}

.suggestions__view-all:active {
    background-color: #e8e8e8;
}

/* Стили для мобильного поиска */
.mobile-search .search__dropdown--suggestions {
    position: fixed;
    left: 0;
    right: 0;
    top: 60px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 1000;
}

