/* Temu-Style Products Page CSS */

/* Breadcrumb */
.temu-breadcrumb {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.temu-breadcrumb a {
    color: var(--temu-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.temu-breadcrumb a:hover {
    color: var(--temu-orange);
}

.temu-breadcrumb i {
    font-size: 0.8rem;
    margin: 0 8px;
    color: #ccc;
}

.temu-breadcrumb span {
    color: var(--temu-dark);
}

/* Products Section */
.temu-products-section {
    padding: 30px 0 60px;
    background: #f8f9fa;
    min-height: 80vh;
}

.temu-products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
}

/* Left Sidebar */
.temu-filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.temu-filter-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.temu-filter-header h3 {
    font-size: 1.3rem;
    color: var(--temu-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.temu-clear-filters {
    background: none;
    border: none;
    color: var(--temu-orange);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.3s;
}

.temu-clear-filters:hover {
    transform: scale(1.05);
}

/* Filter Groups */
.temu-filter-group {
    border-bottom: 1px solid #f0f0f0;
}

.temu-filter-title {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s;
}

.temu-filter-title:hover {
    background: #f8f9fa;
}

.temu-filter-title span {
    font-weight: 600;
    color: var(--temu-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.temu-filter-title i.fa-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.3s;
    color: var(--temu-gray);
}

.temu-filter-group.active .temu-filter-title i.fa-chevron-down {
    transform: rotate(180deg);
}

.temu-filter-content {
    padding: 0 20px 20px;
    display: none;
}

.temu-filter-group.active .temu-filter-content {
    display: block;
}

/* Filter Options */
.temu-filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 6px;
    padding-left: 10px;
}

.temu-filter-option:hover {
    background: #fff5f0;
}

.temu-filter-option.active {
    background: linear-gradient(90deg, #fff5f0 0%, transparent 100%);
}

.temu-filter-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--temu-orange);
}

.temu-filter-option .option-text {
    flex: 1;
    font-size: 0.95rem;
}

.temu-filter-option .option-count {
    color: var(--temu-gray);
    font-size: 0.85rem;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Checkbox Option */
.temu-filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
}

.temu-filter-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--temu-orange);
}

/* Price Filter */
.temu-price-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.temu-price-inputs input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.temu-price-inputs input:focus {
    outline: none;
    border-color: var(--temu-orange);
}

.temu-apply-btn {
    width: 100%;
    padding: 12px;
    background: var(--temu-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.temu-apply-btn:hover {
    background: var(--temu-dark-orange);
    transform: translateY(-2px);
}

.temu-price-range-info {
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--temu-gray);
}

/* Sidebar Promo */
.temu-sidebar-promo {
    margin: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--temu-orange) 0%, var(--temu-dark-orange) 100%);
    border-radius: 12px;
    text-align: center;
    color: white;
}

.promo-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.temu-sidebar-promo h4 {
    margin: 10px 0;
    font-size: 1.1rem;
}

.temu-sidebar-promo p {
    font-size: 0.9rem;
    margin: 10px 0;
    opacity: 0.95;
}

.promo-btn {
    margin-top: 15px;
    padding: 10px 25px;
    background: white;
    color: var(--temu-orange);
    border: none;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s;
}

.promo-btn:hover {
    transform: scale(1.05);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Products Content */
.temu-products-content {
    background: transparent;
}

/* Toolbar */
.temu-products-toolbar {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.toolbar-info {
}

.toolbar-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--temu-dark);
    margin: 0 0 5px 0;
}

.toolbar-count {
    color: var(--temu-gray);
    font-size: 0.95rem;
    margin: 0;
}

.toolbar-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-sort label {
    font-weight: 600;
    color: var(--temu-dark);
}

.toolbar-sort select {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    background: white;
    min-width: 180px;
}

/* Active Filters */
.temu-active-filters {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.active-label {
    font-weight: 600;
    color: var(--temu-dark);
}

.active-tag {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe5d9 100%);
    color: var(--temu-orange);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.active-tag i {
    cursor: pointer;
    transition: transform 0.3s;
}

.active-tag i:hover {
    transform: scale(1.3);
}

/* Products Grid */
.temu-products-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* Product Card */
.temu-product-card-main {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.temu-product-card-main:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(255, 111, 0, 0.15);
}

/* Product Image */
.product-image-wrapper-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image-wrapper-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.temu-product-card-main:hover .product-image-wrapper-main img {
    transform: scale(1.15);
}

/* Product Badges */
.product-badge-main {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-badge-main.featured {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: var(--temu-dark);
}

.product-badge-main.out-stock {
    background: rgba(220, 53, 69, 0.95);
    color: white;
}

.product-badge-main.low-stock {
    background: rgba(255, 152, 0, 0.95);
    color: white;
    animation: pulse 2s infinite;
}

/* Product Actions Overlay */
.product-actions-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s;
}

.temu-product-card-main:hover .product-actions-overlay {
    opacity: 1;
    transform: translateX(0);
}

.action-btn-main {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--temu-orange);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.action-btn-main:hover {
    background: var(--temu-orange);
    color: white;
    transform: scale(1.1);
}

/* Product Info */
.product-info-wrapper-main {
    padding: 18px;
}

.product-category-main {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    color: var(--temu-gray);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-name-main {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--temu-dark);
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8em;
}

/* Rating */
.product-rating-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.product-rating-main .stars {
    display: flex;
    gap: 2px;
    color: var(--temu-yellow);
    font-size: 0.9rem;
}

.rating-text {
    font-size: 0.85rem;
    color: var(--temu-gray);
}

/* Price */
.product-price-wrapper-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.price-current {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--temu-red);
}

.price-original {
    font-size: 1rem;
    color: var(--temu-gray);
    text-decoration: line-through;
}

.price-discount {
    background: var(--temu-red);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Add to Cart Button */
.product-add-btn-main {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--temu-orange) 0%, var(--temu-dark-orange) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-add-btn-main:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 111, 0, 0.3);
}

.product-add-btn-main:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Empty State */
.temu-empty-state {
    background: white;
    padding: 80px 40px;
    border-radius: 12px;
    text-align: center;
}

.empty-icon {
    font-size: 5rem;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.temu-empty-state h3 {
    font-size: 2rem;
    color: var(--temu-dark);
    margin-bottom: 10px;
}

.temu-empty-state p {
    color: var(--temu-gray);
    margin-bottom: 25px;
}

/* Mobile Filter Button */
.mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--temu-orange);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 111, 0, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .temu-products-grid-main {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .temu-products-layout {
        grid-template-columns: 1fr;
    }
    
    .temu-filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 300px;
        z-index: 1000;
        transition: left 0.3s;
        overflow-y: auto;
        border-radius: 0;
    }
    
    .temu-filters-sidebar.mobile-open {
        left: 0;
    }
    
    .mobile-filter-btn {
        display: flex;
    }
    
    .temu-products-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .toolbar-sort {
        width: 100%;
    }
    
    .toolbar-sort select {
        flex: 1;
    }
    
    .temu-products-grid-main {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .toolbar-title {
        font-size: 1.4rem;
    }
    
    .product-name-main {
        font-size: 0.95rem;
    }
    
    .price-current {
        font-size: 1.3rem;
    }
}