/* 覆盖 common.css 中的 container 样式，使搜索栏和商品列表宽度一致 */
.container {
    padding: 0 !important;
}

/* 搜索栏样式 - 现代毛玻璃效果 */
.search-bar {
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%);
    border-radius: 25px;
    padding: 10px 20px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-wrapper:focus-within {
    background: #fff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.search-icon {
    font-size: 20px;
    margin-right: 10px;
    color: #999;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: #667eea;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: #333;
    font-weight: 400;
}

.search-input-wrapper input::placeholder {
    color: #999;
    font-weight: 400;
}

/* 商品网格布局（瀑布流） */
.shop-grid {
    position: relative;
    padding: 16px;
    padding-bottom: 80px;
    min-height: 100px;
}

.shop-grid::after {
    content: '';
    display: block;
    clear: both;
}

.shop-column {
    float: left;
    width: calc(50% - 3px);
    box-sizing: border-box;
}

.shop-column:first-child {
    padding-right: 3px;
}

.shop-column:last-child {
    padding-left: 3px;
}

/* 商品卡片 - 现代化设计 */
.product-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 6px;
}

.product-item:active {
    transform: scale(0.98);
}

.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.2);
}

.product-image {
    width: 100%;
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
    min-height: 120px;
    max-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    display: block;
}

.product-image .default-icon {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-info {
    padding: 14px;
}

.product-name {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.5;
    height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    font-weight: 500;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    border: none;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(238, 90, 111, 0.2);
}

.tag.promo {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.2);
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 6px;
    margin-top: 8px;
}

.price-symbol {
    font-size: 13px;
    color: #ff4757;
    font-weight: 600;
}

.price-value {
    font-size: 20px;
    color: #ff4757;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.price-decimal {
    font-size: 13px;
    color: #ff4757;
    font-weight: 600;
}

.product-stock {
    font-size: 11px;
    color: #52c41a;
    background: rgba(82, 196, 26, 0.08);
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
    font-weight: 500;
}

.product-stock.out-of-stock {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.08);
}



/* 加载状态 */
#loadingMore {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 360px) {
    .shop-grid {
        gap: 8px;
        padding: 8px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-name {
        font-size: 13px;
        height: 36px;
    }
    
    .price-value {
        font-size: 16px;
    }
}

/* 骨架屏加载效果 */
.skeleton-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    margin: 8px 12px;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
