/**
 * ============================================================
 * Search Styles - Riniba 01 Toy Store Theme
 * ============================================================
 * 搜索样式 - 玩具店主题风格
 * 主色调: #FBC270 (暖橙色), #67D4E0 (青色)
 * 字体: Nunito, Lato, Inter
 * 特点: 圆角、阴影、趣味动画
 * ============================================================
 */

/* ============================================================
   1. 基础搜索框
   ============================================================ */

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    background-color: #ffffff;
    border: 2px solid #e8e8e8;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.search-input:focus {
    border-color: #FBC270;
    box-shadow: 0 0 0 4px rgba(251, 194, 112, 0.15),
                0 4px 16px rgba(251, 194, 112, 0.1);
}

.search-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

.search-input::-webkit-search-cancel-button {
    display: none;
}

.search-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: #FBC270;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-button:hover {
    background-color: #f5b04d;
    transform: translateY(-50%) scale(1.05);
}

.search-button:active {
    transform: translateY(-50%) scale(0.98);
}

.search-button svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.search-button i {
    font-size: 16px;
    color: #fff;
}

/* ============================================================
   2. 搜索框变体 - 方形
   ============================================================ */

.search-box.search-box-square .search-input {
    border-radius: 12px;
    padding: 14px 50px 14px 16px;
}

.search-box.search-box-square .search-button {
    border-radius: 10px;
    right: 4px;
}

/* ============================================================
   3. 搜索框变体 - 带图标
   ============================================================ */

.search-box.search-box-icon .search-input {
    padding-left: 50px;
}

.search-box.search-box-icon .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.search-box.search-box-icon .search-icon svg {
    width: 20px;
    height: 20px;
    fill: #aaa;
    transition: fill 0.2s ease;
}

.search-box.search-box-icon .search-input:focus ~ .search-icon svg,
.search-box.search-box-icon:focus-within .search-icon svg {
    fill: #FBC270;
}

/* ============================================================
   4. 搜索框变体 - 大尺寸
   ============================================================ */

.search-box.search-box-lg .search-input {
    padding: 18px 60px 18px 24px;
    font-size: 17px;
}

.search-box.search-box-lg .search-button {
    width: 48px;
    height: 48px;
    right: 8px;
}

.search-box.search-box-lg .search-button svg {
    width: 22px;
    height: 22px;
}

.search-box.search-box-lg.search-box-icon .search-input {
    padding-left: 56px;
}

.search-box.search-box-lg.search-box-icon .search-icon {
    left: 22px;
}

.search-box.search-box-lg.search-box-icon .search-icon svg {
    width: 24px;
    height: 24px;
}

/* ============================================================
   5. 搜索框变体 - 小尺寸
   ============================================================ */

.search-box.search-box-sm .search-input {
    padding: 10px 40px 10px 16px;
    font-size: 13px;
}

.search-box.search-box-sm .search-button {
    width: 32px;
    height: 32px;
    right: 4px;
}

.search-box.search-box-sm .search-button svg {
    width: 14px;
    height: 14px;
}

.search-box.search-box-sm.search-box-icon .search-input {
    padding-left: 40px;
}

.search-box.search-box-sm.search-box-icon .search-icon {
    left: 14px;
}

.search-box.search-box-sm.search-box-icon .search-icon svg {
    width: 16px;
    height: 16px;
}

/* ============================================================
   6. 搜索框变体 - 透明背景
   ============================================================ */

.search-box.search-box-transparent .search-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.search-box.search-box-transparent .search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-box.search-box-transparent .search-input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(251, 194, 112, 0.5);
}

.search-box.search-box-transparent .search-icon svg {
    fill: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   7. 搜索框变体 - 填充背景
   ============================================================ */

.search-box.search-box-filled .search-input {
    background-color: #f5f5f5;
    border-color: transparent;
}

.search-box.search-box-filled .search-input:hover {
    background-color: #f0f0f0;
}

.search-box.search-box-filled .search-input:focus {
    background-color: #fff;
    border-color: #FBC270;
}

/* ============================================================
   8. 搜索框变体 - 彩色边框
   ============================================================ */

.search-box.search-box-primary .search-input {
    border-color: #FBC270;
}

.search-box.search-box-primary .search-input:focus {
    box-shadow: 0 0 0 4px rgba(251, 194, 112, 0.2);
}

.search-box.search-box-secondary .search-input {
    border-color: #67D4E0;
}

.search-box.search-box-secondary .search-input:focus {
    box-shadow: 0 0 0 4px rgba(103, 212, 224, 0.2);
}

.search-box.search-box-secondary .search-button {
    background-color: #67D4E0;
}

.search-box.search-box-secondary .search-button:hover {
    background-color: #4fc9d7;
}

/* ============================================================
   9. 搜索框带清除按钮
   ============================================================ */

.search-box.has-clear .search-input {
    padding-right: 90px;
}

.search-clear-btn {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background-color: #e8e8e8;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-box.has-value .search-clear-btn {
    display: flex;
}

.search-clear-btn:hover {
    background-color: #ddd;
}

.search-clear-btn svg {
    width: 12px;
    height: 12px;
    fill: #888;
}

/* ============================================================
   10. 搜索建议下拉
   ============================================================ */

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12),
                0 4px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 400px;
    overflow: hidden;
}

.search-suggestions.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-suggestions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.search-suggestions-title {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-suggestions-clear {
    font-size: 12px;
    font-weight: 600;
    color: #FBC270;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.search-suggestions-clear:hover {
    color: #f5a623;
}

.search-suggestions-list {
    padding: 8px 0;
    max-height: 320px;
    overflow-y: auto;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    gap: 14px;
}

.search-suggestion-item:hover,
.search-suggestion-item.focused {
    background-color: #fffaf0;
}

.search-suggestion-item.selected {
    background-color: rgba(251, 194, 112, 0.15);
}

.search-suggestion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #f5f5f5;
    border-radius: 10px;
    flex-shrink: 0;
}

.search-suggestion-icon svg {
    width: 18px;
    height: 18px;
    fill: #888;
}

.search-suggestion-icon.icon-history svg {
    fill: #aaa;
}

.search-suggestion-icon.icon-trending svg {
    fill: #ff6b6b;
}

.search-suggestion-icon.icon-product {
    background-color: #fff;
    border: 1px solid #eee;
}

.search-suggestion-icon.icon-product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
}

.search-suggestion-content {
    flex: 1;
    min-width: 0;
}

.search-suggestion-text {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-text .highlight {
    color: #FBC270;
    font-weight: 700;
}

.search-suggestion-meta {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.search-suggestion-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.search-suggestion-item:hover .search-suggestion-action {
    opacity: 1;
}

.search-suggestion-action svg {
    width: 14px;
    height: 14px;
    fill: #ccc;
}

/* ============================================================
   11. 搜索结果预览
   ============================================================ */

.search-results-preview {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    max-height: 500px;
    overflow: hidden;
}

.search-results-preview.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.search-results-count {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 14px;
    color: #666;
}

.search-results-count strong {
    color: #333;
    font-weight: 700;
}

.search-results-view-all {
    font-size: 14px;
    font-weight: 600;
    color: #FBC270;
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-results-view-all:hover {
    color: #f5a623;
}

.search-results-content {
    padding: 16px 0;
    max-height: 400px;
    overflow-y: auto;
}

.search-results-section {
    padding: 0 20px 16px;
}

.search-results-section:last-child {
    padding-bottom: 0;
}

.search-results-section + .search-results-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
}

.search-results-section-title {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none;
}

.search-result-item:hover {
    background-color: #fffaf0;
}

.search-result-image {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f5f5f5;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-name .highlight {
    background-color: rgba(251, 194, 112, 0.3);
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
}

.search-result-category {
    font-size: 12px;
    color: #888;
}

.search-result-price {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #FBC270;
    flex-shrink: 0;
}

.search-result-price .original {
    font-size: 12px;
    font-weight: 400;
    color: #bbb;
    text-decoration: line-through;
    margin-left: 6px;
}

/* ============================================================
   12. 搜索分类标签
   ============================================================ */

.search-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.search-category-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    background-color: #f5f5f5;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-category-tag:hover {
    background-color: #efe8dc;
    color: #333;
}

.search-category-tag.active {
    background-color: #FBC270;
    color: #fff;
}

.search-category-tag .tag-icon {
    margin-right: 6px;
}

.search-category-tag .tag-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.search-category-tag .tag-count {
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

.search-category-tag.active .tag-count {
    background-color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   13. 搜索历史
   ============================================================ */

.search-history {
    padding: 16px 20px;
}

.search-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.search-history-title {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #888;
}

.search-history-clear {
    font-size: 12px;
    font-weight: 600;
    color: #bbb;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.search-history-clear:hover {
    color: #ff6b6b;
}

.search-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-history-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    color: #666;
    background-color: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-history-item:hover {
    background-color: #efe8dc;
    color: #333;
}

.search-history-item .history-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-history-item .history-icon svg {
    width: 12px;
    height: 12px;
    fill: #aaa;
}

.search-history-item .history-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.search-history-item:hover .history-remove {
    opacity: 1;
}

.search-history-item .history-remove svg {
    width: 10px;
    height: 10px;
    fill: #bbb;
}

.search-history-item .history-remove:hover svg {
    fill: #ff6b6b;
}

/* ============================================================
   14. 热门搜索
   ============================================================ */

.search-trending {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.search-trending-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.search-trending-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-trending-icon svg {
    width: 16px;
    height: 16px;
    fill: #ff6b6b;
}

.search-trending-title {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #888;
}

.search-trending-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-trending-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    color: #666;
    background-color: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-trending-item:hover {
    background-color: #ffe5e5;
    color: #ff6b6b;
}

.search-trending-item .trending-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background-color: #ddd;
    border-radius: 4px;
}

.search-trending-item:nth-child(1) .trending-rank {
    background-color: #ff6b6b;
}

.search-trending-item:nth-child(2) .trending-rank {
    background-color: #FBC270;
}

.search-trending-item:nth-child(3) .trending-rank {
    background-color: #67D4E0;
}

/* ============================================================
   15. 全屏搜索遮罩
   ============================================================ */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.search-overlay.show {
    opacity: 1;
    visibility: visible;
}

.search-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: #ffffff;
    padding: 20px;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.search-fullscreen.show {
    transform: translateY(0);
}

.search-fullscreen-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-fullscreen-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.search-fullscreen-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-fullscreen-back:hover {
    background-color: #e8e8e8;
}

.search-fullscreen-back svg {
    width: 20px;
    height: 20px;
    fill: #666;
}

.search-fullscreen-input {
    flex: 1;
    padding: 16px 24px;
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 18px;
    color: #333;
    background-color: #f5f5f5;
    border: none;
    border-radius: 16px;
    outline: none;
}

.search-fullscreen-input:focus {
    background-color: #f0f0f0;
}

.search-fullscreen-input::placeholder {
    color: #aaa;
}

.search-fullscreen-content {
    padding: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* ============================================================
   16. 搜索过滤器
   ============================================================ */

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background-color: #fafafa;
    border-radius: 12px;
    margin-bottom: 16px;
}

.search-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-filter-label {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.search-filter-select {
    padding: 8px 32px 8px 14px;
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 13px;
    color: #333;
    background-color: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23666' d='M5 7L0 2h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.2s ease;
}

.search-filter-select:focus {
    outline: none;
    border-color: #FBC270;
}

.search-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.search-filter-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #FBC270;
    cursor: pointer;
}

.search-filter-checkbox span {
    font-size: 13px;
    color: #666;
}

.search-filter-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-filter-range input {
    width: 80px;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    outline: none;
}

.search-filter-range input:focus {
    border-color: #FBC270;
}

.search-filter-range span {
    color: #aaa;
}

.search-filter-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.search-filter-btn {
    padding: 8px 16px;
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-filter-btn.btn-apply {
    background-color: #FBC270;
    color: #fff;
    border: none;
}

.search-filter-btn.btn-apply:hover {
    background-color: #f5b04d;
}

.search-filter-btn.btn-reset {
    background-color: #fff;
    color: #666;
    border: 2px solid #e8e8e8;
}

.search-filter-btn.btn-reset:hover {
    border-color: #ddd;
    color: #333;
}

/* ============================================================
   17. 搜索排序
   ============================================================ */

.search-sort {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background-color: #fff;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-sort-label {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #888;
}

.search-sort-options {
    display: flex;
    gap: 8px;
}

.search-sort-option {
    padding: 8px 16px;
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    background-color: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-sort-option:hover {
    background-color: #efe8dc;
    color: #333;
}

.search-sort-option.active {
    background-color: #FBC270;
    color: #fff;
}

.search-sort-direction {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-sort-direction:hover {
    background-color: #e8e8e8;
}

.search-sort-direction svg {
    width: 16px;
    height: 16px;
    fill: #666;
    transition: transform 0.3s ease;
}

.search-sort-direction.desc svg {
    transform: rotate(180deg);
}

/* ============================================================
   18. 搜索无结果状态
   ============================================================ */

.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.search-no-results-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    opacity: 0.4;
}

.search-no-results-icon svg {
    width: 100%;
    height: 100%;
    fill: #ddd;
}

.search-no-results h3 {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.search-no-results p {
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
    max-width: 400px;
}

.search-no-results-suggestions {
    width: 100%;
    max-width: 400px;
}

.search-no-results-suggestions h4 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
}

.search-no-results-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.search-no-results-suggestions li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    color: #888;
}

.search-no-results-suggestions li::before {
    content: '•';
    color: #FBC270;
    font-weight: bold;
}

.search-no-results-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.search-no-results-actions .btn {
    padding: 12px 24px;
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.search-no-results-actions .btn-primary {
    background-color: #FBC270;
    color: #fff;
    border: none;
}

.search-no-results-actions .btn-primary:hover {
    background-color: #f5b04d;
    transform: translateY(-1px);
}

.search-no-results-actions .btn-secondary {
    background-color: #fff;
    color: #666;
    border: 2px solid #e8e8e8;
}

.search-no-results-actions .btn-secondary:hover {
    border-color: #ddd;
    color: #333;
}

/* ============================================================
   19. 搜索加载状态
   ============================================================ */

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.search-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #FBC270;
    border-radius: 50%;
    animation: searchSpin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes searchSpin {
    to {
        transform: rotate(360deg);
    }
}

.search-loading-text {
    font-size: 14px;
    color: #888;
}

.search-loading-skeleton {
    padding: 12px 20px;
}

.search-skeleton-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

.search-skeleton-image {
    width: 56px;
    height: 56px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 12px;
}

.search-skeleton-content {
    flex: 1;
}

.search-skeleton-title {
    height: 16px;
    width: 60%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.search-skeleton-meta {
    height: 12px;
    width: 40%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeletonShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ============================================================
   20. 语音搜索
   ============================================================ */

.search-voice-btn {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-box.has-clear .search-voice-btn {
    right: 88px;
}

.search-voice-btn:hover {
    background-color: #f5f5f5;
}

.search-voice-btn svg {
    width: 18px;
    height: 18px;
    fill: #888;
    transition: fill 0.2s ease;
}

.search-voice-btn:hover svg {
    fill: #FBC270;
}

.search-voice-btn.listening {
    background-color: #ff6b6b;
    animation: voicePulse 1s infinite;
}

.search-voice-btn.listening svg {
    fill: #fff;
}

@keyframes voicePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
}

.search-voice-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-voice-modal.show {
    opacity: 1;
    visibility: visible;
}

.search-voice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.search-voice-indicator {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #ff6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
}

.search-voice-indicator::before,
.search-voice-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: voiceRipple 1.5s infinite;
}

.search-voice-indicator::before {
    width: 130px;
    height: 130px;
    animation-delay: 0s;
}

.search-voice-indicator::after {
    width: 160px;
    height: 160px;
    animation-delay: 0.3s;
}

@keyframes voiceRipple {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.search-voice-indicator svg {
    width: 40px;
    height: 40px;
    fill: #fff;
}

.search-voice-text {
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 18px;
    color: #fff;
    margin-bottom: 8px;
}

.search-voice-hint {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.search-voice-cancel {
    margin-top: 24px;
    padding: 10px 24px;
    font-family: 'Nunito', 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-voice-cancel:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   21. 响应式设计
   ============================================================ */

@media (max-width: 991px) {
    .search-box {
        max-width: 100%;
    }
    
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filter-group {
        flex-wrap: wrap;
    }
    
    .search-filter-actions {
        margin-left: 0;
        margin-top: 12px;
    }
    
    .search-sort {
        flex-wrap: wrap;
    }
    
    .search-sort-options {
        flex-wrap: wrap;
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 767px) {
    .search-input {
        padding: 12px 46px 12px 16px;
        font-size: 14px;
    }
    
    .search-button {
        width: 36px;
        height: 36px;
    }
    
    .search-suggestions,
    .search-results-preview {
        border-radius: 0;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: none;
        transform: none;
    }
    
    .search-suggestion-item,
    .search-result-item {
        padding: 12px 16px;
    }
    
    .search-result-image {
        width: 48px;
        height: 48px;
    }
    
    .search-fullscreen {
        padding: 16px;
    }
    
    .search-fullscreen-header {
        gap: 12px;
    }
    
    .search-fullscreen-input {
        font-size: 16px;
        padding: 14px 20px;
    }
    
    .search-filter-select {
        width: 100%;
    }
    
    .search-filter-range {
        width: 100%;
    }
    
    .search-filter-range input {
        flex: 1;
    }
}

@media (max-width: 575px) {
    .search-box.search-box-lg .search-input {
        padding: 14px 50px 14px 18px;
        font-size: 15px;
    }
    
    .search-box.search-box-lg .search-button {
        width: 40px;
        height: 40px;
    }
    
    .search-categories {
        padding: 12px 16px;
    }
    
    .search-category-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .search-history,
    .search-trending {
        padding: 14px 16px;
    }
    
    .search-history-item,
    .search-trending-item {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .search-no-results {
        padding: 40px 16px;
    }
    
    .search-no-results-icon {
        width: 80px;
        height: 80px;
    }
    
    .search-no-results h3 {
        font-size: 18px;
    }
    
    .search-no-results-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .search-no-results-actions .btn {
        width: 100%;
    }
}

/* ============================================================
   22. 深色模式支持
   ============================================================ */

[data-theme="dark"] .search-input,
.dark-mode .search-input {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    color: #e0e0e0;
}

[data-theme="dark"] .search-input::placeholder,
.dark-mode .search-input::placeholder {
    color: #888;
}

[data-theme="dark"] .search-input:focus,
.dark-mode .search-input:focus {
    border-color: #FBC270;
    background-color: #333;
}

[data-theme="dark"] .search-suggestions,
[data-theme="dark"] .search-results-preview,
.dark-mode .search-suggestions,
.dark-mode .search-results-preview {
    background-color: #2a2a2a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .search-suggestion-item:hover,
[data-theme="dark"] .search-result-item:hover,
.dark-mode .search-suggestion-item:hover,
.dark-mode .search-result-item:hover {
    background-color: #333;
}

[data-theme="dark"] .search-suggestion-text,
[data-theme="dark"] .search-result-name,
.dark-mode .search-suggestion-text,
.dark-mode .search-result-name {
    color: #e0e0e0;
}

[data-theme="dark"] .search-category-tag,
[data-theme="dark"] .search-history-item,
[data-theme="dark"] .search-trending-item,
.dark-mode .search-category-tag,
.dark-mode .search-history-item,
.dark-mode .search-trending-item {
    background-color: #333;
    color: #ccc;
}

[data-theme="dark"] .search-fullscreen,
.dark-mode .search-fullscreen {
    background-color: #1a1a1a;
}

[data-theme="dark"] .search-fullscreen-input,
.dark-mode .search-fullscreen-input {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

[data-theme="dark"] .search-filters,
.dark-mode .search-filters {
    background-color: #2a2a2a;
}

[data-theme="dark"] .search-filter-select,
.dark-mode .search-filter-select {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

/* ============================================================
   23. 打印样式
   ============================================================ */

@media print {
    .search-box,
    .search-suggestions,
    .search-results-preview,
    .search-fullscreen,
    .search-overlay,
    .search-voice-modal {
        display: none !important;
    }
}

/* ============================================================
   结束 - Search Styles
   ============================================================ */
