/* Flash Sale Section - Complete Redesign */
.flash-sale-section {
    background: #ffffff;
    margin: 30px 0;
    padding: 0;
    border-radius: 0;
    overflow: visible;
    position: relative;
}

.flash-sale-section .container {
    position: relative;
    z-index: 2;
}

/* Flash Sale Header - ONLY this has red background */
.flash-sale-header {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border-radius: 15px;
    padding: 20px 25px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

/* Texture overlay for header only */
.flash-sale-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.flash-sale-header > * {
    position: relative;
    z-index: 2;
}

/* Desktop Layout: title left, timer right */
.flash-sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-sale-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.flash-sale-title .menu__header__title {
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-sale-icon {
    color: #ffed4e;
    animation: flash 1.5s infinite;
}

@keyframes flash {
    0%, 50% { opacity: 1; }
    25%, 75% { opacity: 0.5; }
}

.flash-sale-text {
    background: linear-gradient(45deg, #fff, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.flash-sale-fire {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.flash-sale-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Timer Styles */
.flash-sale-timer {
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.timer-item {
    text-align: center;
    color: #fff;
}

.timer-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
    color: #ffed4e;
    text-shadow: 0 0 10px rgba(255, 237, 78, 0.5);
}

.timer-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.8;
    font-weight: 600;
}

/* Product Grid */
.flash-sale-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(276px, 276px));
    gap: 20px;
    justify-content: center;
    padding: 0;
}

/* Individual Product Item - EXACT 276x200 */
.flash-sale-item {
    width: 276px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    animation: slideInUp 0.6s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-sale-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Product Image - EXACT 200px height */
.flash-sale-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.flash-sale-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.flash-sale-item:hover .flash-sale-image img {
    transform: scale(1.05);
}

/* Discount Badge */
.flash-sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
}

.discount-percent {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: #fff;
    padding: 6px 10px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(255, 65, 108, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Hover Overlay */
.flash-sale-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flash-sale-item:hover .flash-sale-overlay {
    opacity: 1;
}

.flash-sale-buy-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.flash-sale-buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(79, 172, 254, 0.4);
}

/* Product Content */
.flash-sale-content {
    padding: 15px;
}

.flash-sale-content .flash-sale-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Prices */
.flash-sale-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.85rem;
}

.sale-price {
    color: #ff416c;
    font-weight: 800;
    font-size: 1.2rem;
}

/* Progress Bar */
.flash-sale-progress {
    margin-bottom: 12px;
}

.progress-bar {
    background: #f0f0f0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
}

.remaining-qty {
    color: #ff416c;
    font-weight: 600;
}

/* Small Timer */
.flash-sale-timer-small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ff416c;
    font-weight: 600;
    font-size: 0.8rem;
}

.flash-sale-timer-small i {
    animation: tick 1s infinite;
}

@keyframes tick {
    0%, 50% { transform: scale(1); }
    25% { transform: scale(1.1); }
}

/* View All Button */
.flash-sale-view-all {
    text-align: center;
    margin-top: 30px;
}

.view-all-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: #fff;
}

/* ============= MOBILE RESPONSIVE ============= */

/* Tablet - Timer moves below title */
@media (max-width: 768px) {    
    .flash-sale-header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 20px;
    }
    
    .flash-sale-title {
        text-align: center;
        width: 100%;
    }
    
    .flash-sale-title .menu__header__title {
        font-size: 1.6rem;
        justify-content: center;
    }
    
    .flash-sale-timer {
        margin-top: 10px;
    }
    
    .flash-sale-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .flash-sale-item {
        width: 100%;
        max-width: 276px;
        margin: 0 auto;
    }
}

/* Mobile - Single column, compact */
@media (max-width: 480px) {
    .flash-sale-section {
        margin: 15px 0;
    }
    
    .flash-sale-header {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .flash-sale-title .menu__header__title {
        font-size: 1.4rem;
    }
    
    .flash-sale-fire {
        font-size: 1.2rem;
    }
    
    .flash-sale-timer {
        gap: 8px;
        padding: 10px 12px;
    }
    
    .timer-number {
        font-size: 1.3rem;
    }
    
    .timer-label {
        font-size: 0.6rem;
    }
    
    .flash-sale-list {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
    
    .flash-sale-item {
        width: 100%;
        max-width: 100%;
    }
    
    .flash-sale-image {
        height: 180px;
    }
    
    .flash-sale-content {
        padding: 12px;
    }
    
    .flash-sale-content .flash-sale-title {
        font-size: 0.9rem;
    }
    
    .sale-price {
        font-size: 1.1rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .flash-sale-timer {
        gap: 6px;
        padding: 8px 10px;
    }
    
    .timer-number {
        font-size: 1.2rem;
    }
    
    .flash-sale-image {
        height: 160px;
    }
}