/* 产品列表页样式 */

.products-page {
    min-height: 100vh;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    align-items: center;
    gap: 16rpx;
    padding: 16rpx 24rpx;
    background: #ffffff;
}

.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 32rpx;
    padding: 0 24rpx;
    height: 64rpx;
}

.search-icon {
    font-size: 28rpx;
    margin-right: 12rpx;
}

.search-input {
    flex: 1;
    font-size: 26rpx;
    color: #333;
}

.search-placeholder {
    color: #ccc;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 4rpx;
    padding: 0 16rpx;
}

.filter-icon {
    font-size: 28rpx;
    color: #666;
}

.filter-text {
    font-size: 24rpx;
    color: #666;
}

/* 国家选择条 */
.country-bar {
    white-space: nowrap;
    background: #ffffff;
    padding: 16rpx 24rpx;
    border-bottom: 1rpx solid #eee;
}

.country-item {
    display: inline-flex;
    align-items: center;
    gap: 6rpx;
    padding: 8rpx 20rpx;
    margin-right: 12rpx;
    border-radius: 24rpx;
    background: #f5f5f5;
}

.country-item.active {
    background: #fff0e5;
}

.country-flag {
    font-size: 28rpx;
}

.country-name {
    font-size: 22rpx;
    color: #666;
}

.country-item.active .country-name {
    color: #ff6800;
    font-weight: 500;
}

/* 已选筛选标签 */
.active-filters {
    display: flex;
    align-items: center;
    gap: 12rpx;
    padding: 12rpx 24rpx;
    background: #ffffff;
    overflow-x: auto;
    white-space: nowrap;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8rpx;
    background: #f2f2f2;
    border-radius: 8rpx;
    padding: 6rpx 16rpx;
    font-size: 22rpx;
    color: #666;
    flex-shrink: 0;
}

.filter-remove {
    font-size: 20rpx;
    color: #ccc;
}

.clear-all {
    font-size: 22rpx;
    color: #ff6800;
    flex-shrink: 0;
}

/* 主体内容 */
.content-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 左侧分类侧边栏 */
.sidebar {
    width: 180rpx;
    background: #ffffff;
    border-right: 1rpx solid #eee;
    height: 100%;
    flex-shrink: 0;
}

.sidebar-item {
    position: relative;
    padding: 28rpx 20rpx;
    font-size: 24rpx;
    color: #666;
    text-align: center;
}

.sidebar-item.active {
    background: #f5f5f5;
    color: #ff6800;
    font-weight: 600;
}

.sidebar-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6rpx;
    height: 32rpx;
    background: #ff6800;
    border-radius: 0 4rpx 4rpx 0;
}

.sidebar-promo {
    margin: 24rpx 16rpx;
    padding: 20rpx 12rpx;
    background: linear-gradient(135deg, #ff6800 0%, #ff8c40 100%);
    border-radius: 12rpx;
    text-align: center;
}

.promo-title {
    font-size: 24rpx;
    font-weight: 700;
    color: #fff;
    display: block;
}

.promo-desc {
    font-size: 20rpx;
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-top: 4rpx;
}

/* 右侧产品列表区 */
.product-list-area {
    flex: 1;
    height: 100%;
}

/* 子分类 */
.sub-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12rpx;
    padding: 16rpx 20rpx;
    background: #ffffff;
}

.sub-cat-item {
    font-size: 22rpx;
    padding: 8rpx 20rpx;
    border-radius: 24rpx;
    background: #f5f5f5;
    color: #666;
}

.sub-cat-item.active {
    background: #ff6800;
    color: #fff;
}

/* 产品网格 */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16rpx;
    padding: 16rpx 20rpx;
}

.product-card {
    width: calc(50% - 8rpx);
    background: #ffffff;
    border-radius: 12rpx;
    overflow: hidden;
    box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}

.product-img {
    width: 100%;
    height: 300rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #f5f5f5;
}

.product-image {
    width: 100%;
    height: 100%;
}

.product-badges {
    position: absolute;
    top: 12rpx;
    left: 12rpx;
    display: flex;
    flex-direction: column;
    gap: 4rpx;
}

.product-badge {
    font-size: 18rpx;
    padding: 2rpx 8rpx;
    border-radius: 4rpx;
}

.product-info {
    padding: 16rpx;
}

.product-name {
    font-size: 24rpx;
    color: #333;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-bottom {
    margin-top: 8rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 30rpx;
    font-weight: 700;
    color: #ff6800;
}

.product-price-unit {
    font-size: 20rpx;
    font-weight: 400;
    margin-left: 2rpx;
}

/* 分页 */
.pagination {
    padding: 24rpx 20rpx;
    text-align: center;
}

.page-info {
    font-size: 22rpx;
    color: #999;
    display: block;
    margin-bottom: 16rpx;
}

.page-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8rpx;
}

.page-btn {
    padding: 8rpx 20rpx;
    font-size: 22rpx;
    color: #666;
    background: #fff;
    border-radius: 8rpx;
    border: 1rpx solid #eee;
}

.page-btn.disabled {
    color: #ccc;
}

.page-num {
    min-width: 48rpx;
    height: 48rpx;
    line-height: 48rpx;
    text-align: center;
    font-size: 24rpx;
    color: #666;
    background: #fff;
    border-radius: 8rpx;
    border: 1rpx solid #eee;
}

.page-num.active {
    background: #ff6800;
    color: #fff;
    border-color: #ff6800;
}

.page-size {
    margin-top: 12rpx;
    font-size: 22rpx;
    color: #999;
}

.loading-more {
    padding: 24rpx;
    text-align: center;
    font-size: 24rpx;
    color: #999;
}

/* 筛选弹窗 */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

.filter-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    height: 100%;
    background: #ffffff;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

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

.filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32rpx 24rpx;
    border-bottom: 1rpx solid #eee;
}

.filter-drawer-title {
    font-size: 32rpx;
    font-weight: 600;
    color: #333;
}

.filter-drawer-close {
    font-size: 32rpx;
    color: #999;
}

.filter-drawer-body {
    flex: 1;
    padding: 24rpx;
}

.filter-group {
    margin-bottom: 32rpx;
}

.filter-group-title {
    font-size: 28rpx;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 16rpx;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12rpx;
}

.filter-option {
    padding: 12rpx 24rpx;
    font-size: 24rpx;
    color: #666;
    background: #f5f5f5;
    border-radius: 8rpx;
    border: 2rpx solid transparent;
}

.filter-option.selected {
    background: #fff0e5;
    color: #ff6800;
    border-color: #ff6800;
}

.filter-price-range {
    display: flex;
    align-items: center;
    gap: 16rpx;
}

.price-input {
    flex: 1;
    height: 64rpx;
    background: #f5f5f5;
    border-radius: 8rpx;
    padding: 0 20rpx;
    font-size: 24rpx;
}

.price-divider {
    color: #ccc;
}

.filter-drawer-footer {
    display: flex;
    gap: 16rpx;
    padding: 24rpx;
    border-top: 1rpx solid #eee;
}

.filter-reset {
    flex: 1;
    text-align: center;
    padding: 24rpx;
    font-size: 28rpx;
    color: #666;
    background: #f5f5f5;
    border-radius: 12rpx;
}

.filter-confirm {
    flex: 1;
    text-align: center;
    padding: 24rpx;
    font-size: 28rpx;
    color: #fff;
    background: #ff6800;
    border-radius: 12rpx;
}
