* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-repeat: no-repeat;
    background-position: top;
    background-size: 100% auto;
    background-color: #F0F0F0;

    padding: 0;
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    /*background: linear-gradient(to bottom, #1C62EC 0%, #e0e0e0 70%);*/
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 搜索栏样式 */
.search-bar {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 8px;
    background: transparent;
    flex-shrink: 0;
    z-index: 10;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 22px;
    padding: 10px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.search-icon {
    font-size: 16px;
    margin-right: 8px;
    color: #999;
    line-height: 1;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
    line-height: 1.5;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background-color: #2196F3;
    color: #ffffff;
    border: none;
    border-radius: 18px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.25);
    transition: background-color 0.2s;
    font-weight: 500;
}

.search-btn:active {
    background-color: #1976D2;
}

/* 列表滚动容器 */
.list-scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* 筛选区域 */
.filter-section {
    background: #fff;
    padding: 12px 15px;
    margin: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.category-btn {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 40%;
}

.category-btn:active {
    background: #f5f5f5;
    border-color: #2196F3;
}

.category-btn span {
    flex: 1;
    text-align: left;
    margin-left: 10px;
}

.category-btn i {
    font-size: 12px;
    color: #999;
    transition: transform 0.3s;
    flex-shrink: 0;
}

/* 类别选择弹窗 */
.category-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.category-modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.modal-content {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    max-height: 50vh;
}

.category-list {
    padding: 0 20px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:hover {
    background: #f5f5f5;
}

.category-item.active {
    background: #e3f2fd;
}

.category-item.active .category-name {
    color: #2196F3;
    font-weight: bold;
}

.category-name {
    font-size: 16px;
    color: #333;
}

.check-icon {
    font-size: 16px;
    color: #2196F3;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* 只有选中状态才显示对钩图标 */
.category-item.active .check-icon {
    display: inline-block;
    opacity: 1;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.modal-btn-primary {
    background: #2196F3;
    color: #fff;
}

.modal-btn-primary:active {
    background: #1976D2;
}

.modal-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.modal-btn-secondary:active {
    background: #e0e0e0;
}

.goods-count {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
    white-space: nowrap;
}

.goods-count span {
    color: #2196F3;
    font-weight: bold;
    margin: 0 3px;
}

/* 商品列表 */
.goods-list {
    padding: 0 15px 15px;
}

.goods-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.goods-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 35%;
    width: 4px;
    height: 30%;
    background: #1C62EC;
    border-radius: 10px 0 0 0;
}

.goods-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.goods-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goods-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goods-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.goods-name {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.goods-store {
    font-size: 13px;
    color: #999;
}

.goods-price {
    font-size: 16px;
    font-weight: bold;
    color: #f44336;
}

.view-detail-btn {
    position: absolute;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    z-index: 1;
    padding: 2px 10px;
    font-size: 11px;
    bottom: 12px;
    right: 12px;

}

.view-detail-btn:hover {
    background: #1976D2;
    transform: scale(1.05);
}

.view-detail-btn:active {
    background: #1565C0;
    transform: scale(0.98);
}


.goods-star {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffc107;
    font-size: 20px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s;
}

.goods-star:hover {
    transform: scale(1.2);
}

.goods-star.active {
    color: #ffc107;
}

.goods-star:not(.active) {
    color: #e0e0e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-section {
        margin: 15px 10px;
        padding: 12px;
    }

    .filter-left {
        width: 100%;
    }

    .goods-list {
        padding: 0 10px;
    }

    .goods-item {
        padding: 12px;
        gap: 12px;
    }

    .goods-image {
        width: 70px;
        height: 70px;
    }

    .goods-name {
        font-size: 14px;
    }

    .goods-store {
        font-size: 12px;
    }

    .goods-price {
        font-size: 15px;
    }

    .view-detail-btn {
        padding: 2px 10px;
        font-size: 11px;
        bottom: 12px;
        right: 12px;
    }

    .goods-star {
        width: 25px;
        height: 25px;
        font-size: 18px;
    }
}

