/* ============================================
   主页商品展示区域样式 (TASK004)
   ============================================ */

/* 轮播图缩小样式 */
.home-banner-compact {
    padding: 1.5rem 0;
    min-height: auto;
}

.home-banner-compact .swiper-slide {
    min-height: auto;
}

/* 分类标签容器 */
.home-category-tabs {
    position: relative;
    padding-bottom: 1rem;
    margin-top: 1rem;
}

/* 移动端响应式调整 */
@media (max-width: 767.98px) {
    .home-banner-compact {
        padding: 1rem 0;
    }
    
    .home-banner-compact .swiper-slide h2 {
        font-size: 1.25rem;
    }
    
    .home-banner-compact .swiper-slide p {
        font-size: 0.75rem;
    }
    
    .home-category-tabs .nav-pills {
        justify-content: flex-start;
        padding-left: 1rem;
        padding-right: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .home-category-tabs .nav-pills::-webkit-scrollbar {
        display: none;
    }
    
    .home-category-tabs .nav-item {
        flex-shrink: 0;
    }
}

/* 搜索框容器 */
.home-search-container {
    position: relative;
    margin-bottom: 2rem;
}

.home-search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.home-search-input {
    padding-left: 3rem;
    padding-right: 3rem;
    border-radius: 0.75rem;
    border: 2px solid var(--bs-border-color, #e5e7eb);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    height: 3rem;
}

.home-search-input:focus {
    border-color: var(--bs-primary, #4b5563);
    box-shadow: 0 0 0 3px rgba(75, 85, 99, 0.1);
    outline: none;
}

[data-bs-theme="dark"] .home-search-input {
    border-color: var(--bs-border-color, #4b5563);
    background: var(--bs-secondary-bg, #1f2937);
}

[data-bs-theme="dark"] .home-search-input:focus {
    border-color: var(--bs-primary, #6b7280);
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

/* 搜索图标 */
.home-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary-color, #6b7280);
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 1;
}

/* 清除按钮 */
.home-search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--bs-secondary-color, #6b7280);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    z-index: 1;
}

.home-search-clear.visible {
    opacity: 1;
    visibility: visible;
}

.home-search-clear:hover {
    background: var(--bs-secondary-bg, #f3f4f6);
    color: var(--bs-emphasis-color, #1f2937);
}

[data-bs-theme="dark"] .home-search-clear:hover {
    background: var(--bs-secondary-bg, #374151);
    color: var(--bs-emphasis-color, #e5e7eb);
}

.home-search-clear svg {
    width: 1rem;
    height: 1rem;
}

/* 商品列表容器 */
.home-products-container {
    position: relative;
    min-height: 400px;
}

.home-products-grid {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.home-products-grid.fade-out {
    opacity: 0;
}

.home-products-grid.fade-in {
    opacity: 1;
}

/* 空状态提示 */
.home-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    display: none;
    background: var(--global-bg-tertiary, var(--bs-body-tertiary-bg, #f5f5f5));
    border-radius: var(--global-border-radius, 1.5rem);
}

.home-empty-state.visible {
    display: block;
}

.home-empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    opacity: 0.5;
    color: var(--bs-secondary-color, #6b7280);
}

.home-empty-state-icon svg {
    width: 100%;
    height: 100%;
}

.home-empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--global-text-emphasis, var(--bs-emphasis-color, #1f2937));
}

.home-empty-state-description {
    font-size: 1rem;
    color: var(--global-text-secondary, var(--bs-secondary-color, #6b7280));
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.home-empty-state-action {
    margin-top: 1.5rem;
}

[data-bs-theme="dark"] .home-empty-state-title {
    color: var(--bs-emphasis-color, #e5e7eb);
}

[data-bs-theme="dark"] .home-empty-state-icon {
    color: var(--bs-secondary-color, #9ca3af);
}

/* 响应式调整 */
@media (max-width: 575.98px) {
    .home-empty-state {
        padding: 3rem 1.5rem;
    }
    
    .home-empty-state-icon {
        width: 100px;
        height: 100px;
    }
    
    .home-empty-state-title {
        font-size: 1.25rem;
    }
    
    .home-empty-state-description {
        font-size: 0.875rem;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-products-grid .product-item {
    animation: fadeIn 0.3s ease-out;
}


