/* ============================================================
   顶部搜索栏（topbar组件）
   ============================================================ */

/* 顶部搜索栏 */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #ff6b35 0%, #f93b1d 100%);
    padding: 10px 16px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 12px rgba(249, 59, 29, 0.30);
}

.search-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 0 14px;
    height: 38px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-wrapper:focus-within {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.search-wrapper i {
    color: #999;
    font-size: 15px;
    margin-right: 8px;
}

.search-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #2d3436;
    height: 100%;
    padding: 0 4px;
}

.search-wrapper input::placeholder {
    color: #b2bec3;
    font-size: 13px;
}

.search-btn {
    background: #ff6b35;
    border: none;
    color: #fff;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
    height: 28px;
    line-height: 24px;
    margin-left: 6px;
}

.search-btn:active {
    transform: scale(0.92);
    background: #e85a2a;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.top-actions .action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    background: transparent;
    min-width: 44px;
    height: 38px;
    line-height: 1.2;
    border: none;
}

.top-actions .action-btn i {
    font-size: 18px;
    margin-bottom: 1px;
}

.top-actions .action-btn span {
    font-size: 10px;
    opacity: 0.9;
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-actions .action-btn:active {
    transform: scale(0.92);
}


        .drawer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0);
            visibility: hidden;
            z-index: 300;
            transition: background 0.3s ease, visibility 0.3s ease;
            display: flex;
            align-items: stretch;
            justify-content: flex-end;
        }

        .drawer-overlay.show {
            background: rgba(0, 0, 0, 0.45);
            visibility: visible;
        }

        .drawer-overlay .drawer-panel {
            background: #fff;
            width: 82%;
            max-width: 340px;
            height: 100%;
            overflow-y: auto;
            transform: translateX(100%);
            transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            padding: 24px 20px 32px;
            border-radius: 20px 0 0 20px;
            box-shadow: -6px 0 24px rgba(0, 0, 0, 0.10);
            display: flex;
            flex-direction: column;
        }

        .drawer-overlay.show .drawer-panel {
            transform: translateX(0);
        }

        /* 抽屉头部 */
        .drawer-panel .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            padding-bottom: 14px;
            border-bottom: 1px solid #f0f0f0;
            flex-shrink: 0;
        }

        .drawer-panel .panel-header h3 {
            font-size: 18px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .drawer-panel .panel-header .close-btn {
            font-size: 24px;
            color: #999;
            cursor: pointer;
            background: none;
            border: none;
            padding: 4px 8px;
            border-radius: 8px;
            transition: background 0.2s;
        }
        .drawer-panel .panel-header .close-btn:active {
            background: #f0f0f0;
        }

        /* 选项区域 */
        .drawer-panel .options-scroll {
            flex: 1;
            overflow-y: auto;
            margin-bottom: 16px;
        }

        /* 选项网格（默认） */
        .drawer-panel .option-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 4px;
        }

        .drawer-panel .option-grid .opt {
            padding: 10px 20px;
            border-radius: 24px;
            border: 1.5px solid #e0e0e0;
            font-size: 15px;
            cursor: pointer;
            transition: all 0.2s;
            background: #fff;
            color: #2d3436;
            flex: 0 0 auto;
        }

        .drawer-panel .option-grid .opt:active {
            transform: scale(0.94);
        }

        .drawer-panel .option-grid .opt.active {
            border-color: #ff6b35;
            background: #fff5f0;
            color: #ff6b35;
            font-weight: 500;
        }

        /* 价格区间专用：垂直列表 */
        .drawer-panel .option-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 4px;
        }

        .drawer-panel .option-list .opt {
            padding: 14px 20px;
            border-radius: 12px;
            border: 1.5px solid #e0e0e0;
            font-size: 15px;
            cursor: pointer;
            transition: all 0.2s;
            background: #fff;
            color: #2d3436;
            text-align: center;
        }

        .drawer-panel .option-list .opt:active {
            transform: scale(0.96);
        }

        .drawer-panel .option-list .opt.active {
            border-color: #ff6b35;
            background: #fff5f0;
            color: #ff6b35;
            font-weight: 500;
        }

        /* 抽屉底部按钮（城市专用） */
        .drawer-panel .drawer-footer {
            display: flex;
            gap: 12px;
            margin-top: 16px;
            flex-shrink: 0;
            border-top: 1px solid #f0f0f0;
            padding-top: 16px;
        }

        .drawer-panel .drawer-footer .btn {
            flex: 1;
            padding: 12px 0;
            border-radius: 30px;
            border: none;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s, transform 0.1s;
            text-align: center;
        }
        .drawer-panel .drawer-footer .btn:active {
            transform: scale(0.94);
        }
        .drawer-panel .drawer-footer .btn-primary {
            background: #ff6b35;
            color: #fff;
        }
        .drawer-panel .drawer-footer .btn-primary:active {
            background: #e85a2a;
        }
        .drawer-panel .drawer-footer .btn-secondary {
            background: #f0f0f0;
            color: #2d3436;
        }
        .drawer-panel .drawer-footer .btn-secondary:active {
            background: #e0e0e0;
        }

/* 响应式 */
@media (max-width: 420px) {
    .top-bar {
        padding: 8px 12px 10px;
    }
    .top-actions .action-btn {
        min-width: 36px;
        height: 34px;
    }
    .top-actions .action-btn i {
        font-size: 16px;
    }
    .search-btn {
        font-size: 12px;
        padding: 2px 10px;
        height: 26px;
        line-height: 22px;
    }
}