 :root {
            --primary-color: #ff4e50;
            --primary-hover: #e04547;
            --secondary-color: #6c757d;
            --border-radius: 8px;
            --shadow: 0 2px 6px rgba(0,0,0,0.1);
            --price-color: #ff4e50;
            --text-color: #333;
            --text-secondary: #666;
            --card-bg: #ffffff;
            --content-padding: 12px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background: #f5f5f5;
            color: var(--text-color);
            line-height: 1.5;
        }

        /* 搜索栏 */
        .search-header {
            background: white;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .back-btn {
            background: none;
            border: none;
            color: var(--text-color);
            font-size: 18px;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border-radius: 50%;
        }

        .search-container {
            flex: 1;
            position: relative;
        }

        .search-input {
            width: 100%;
            border: 1px solid #e0e0e0;
            background: #f8f8f8;
            border-radius: 18px;
            padding: 8px 15px 8px 35px;
            font-size: 14px;
            color: var(--text-color);
            outline: none;
        }

        .search-input::placeholder {
            color: #999;
        }

        .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
        }
.search-btn {
    background: #2563eb; /* 主蓝色 */
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

        /* 主要内容区域 */
        .main-content {
            padding: var(--content-padding);
        }

        /* 商品网格 - 自适应列数 */
        .goods-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
            gap: 10px;
        }

        /* 商品卡片 */
        .goods-item {
            display: flex;
            flex-direction: column;
            background: var(--card-bg);
            border-radius: var(--border-radius);
            text-decoration: none;
            color: var(--text-color);
            box-shadow: var(--shadow);
            overflow: hidden;
        }

        /* 图片容器 */
        .goods-image-container {
            width: 100%;
            padding-top: 100%;
            position: relative;
            overflow: hidden;
            background: #f9f9f9;
        }

        .goods-item-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* 商品内容 */
        .goods-item-content {
            padding: 10px;
        }

        /* 商品名称 */
        .goods-item-text {
            font-size: 13px;
            color: var(--text-color);
            margin-bottom: 8px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.4;
            min-height: 36px;
            font-weight: 500;
        }

        /* 底部信息 */
        .goods-item-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        /* 价格样式 */
        .goods-item-price {
            font-size: 14px;
            color: var(--price-color);
            font-weight: 700;
        }

        /* 销量样式 */
        .goods-item-sales {
            font-size: 11px;
            color: var(--text-secondary);
            background: #f5f5f5;
            padding: 2px 6px;
            border-radius: 8px;
        }

        /* 加载状态 */
        .loading {
            text-align: center;
            padding: 30px 0;
            color: var(--text-secondary);
            grid-column: 1 / -1;
            font-size: 14px;
        }

        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255, 78, 80, 0.2);
            border-radius: 50%;
            border-top-color: var(--primary-color);
            animation: spin 0.8s linear infinite;
            margin-right: 8px;
            vertical-align: middle;
        }

        .no-data {
            text-align: center;
            padding: 30px 0;
            color: var(--text-secondary);
            grid-column: 1 / -1;
            font-size: 14px;
        }

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

        /* 电脑端适配 */
        @media (min-width: 768px) {
            body {
                display: flex;
                flex-direction: column;
                align-items: center;
            }
            
            .search-header, .main-content {
                width: 100%;
                max-width: 500px;
            }
            
            .goods-grid {
                grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
                gap: 12px;
            }
        }

        /* 极小屏幕微调 */
        @media (max-width: 320px) {
            .goods-grid {
                grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
                gap: 8px;
            }
            
            .goods-item-text {
                font-size: 12px;
                min-height: 34px;
            }
        }