/* Flash Sale Container - Premium Glassmorphic Design */
.flash-sale-container {
    padding: 100px 20px;
    background: linear-gradient(135deg,
            rgba(147, 51, 234, 0.05) 0%,
            rgba(168, 85, 247, 0.03) 50%,
            rgba(233, 213, 255, 0.08) 100%);
    position: relative;
    overflow: hidden;
}

.flash-sale-backdrop {
    position: relative;
    z-index: 1;
}

/* Background floating orbs for depth */
.flash-sale-container::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatOrb1 20s ease-in-out infinite;
}

.flash-sale-container::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatOrb2 25s ease-in-out infinite reverse;
}

@keyframes floatOrb1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes floatOrb2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-30px, 30px) scale(0.9);
    }

    66% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

/* Header Section */
.flash-sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
    gap: 30px;
}

.flash-sale-title-wrapper {
    flex: 1;
    min-width: 300px;
}

.flash-sale-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg,
            rgba(238, 232, 255, 0.8),
            rgba(233, 213, 255, 0.6));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(147, 51, 234, 0.2);
    padding: 8px 20px;
    border-radius: 25px;
    color: #7c3aed;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow:
        0 8px 32px rgba(147, 51, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.flash-sale-badge i {
    color: #9333ea;
    animation: pulseBolt 2s ease-in-out infinite;
}

@keyframes pulseBolt {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.flash-sale-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 20px 0 15px 0;
    color: #1f2937;
    letter-spacing: -2px;
}

.flash-sale-gradient {
    background: linear-gradient(135deg, #9333ea 0%, #a855f7 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.flash-sale-description {
    font-size: 1.25rem;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
    max-width: 500px;
    line-height: 1.6;
}

/* Refresh Button */
.flash-sale-refresh {
    flex-shrink: 0;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.9),
            rgba(248, 250, 252, 0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(147, 51, 234, 0.2);
    padding: 16px 28px;
    border-radius: 20px;
    color: #7c3aed;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 10px 40px rgba(147, 51, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(147, 51, 234, 0.1) 50%,
            transparent 100%);
    transition: left 0.6s ease;
}

.refresh-btn:hover::before {
    left: 100%;
}

.refresh-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 20px 60px rgba(147, 51, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: rgba(147, 51, 234, 0.3);
}

.refresh-btn:active {
    transform: translateY(-1px);
}

.refresh-btn i {
    transition: transform 0.3s ease;
}

.refresh-btn:hover i {
    transform: rotate(180deg);
}

/* Flash Sale Grid */
.flash-sale-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Flash Sale Card - Premium Glassmorphic Design */
.flash-sale-card {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.85),
            rgba(248, 250, 252, 0.75));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 20px 60px rgba(147, 51, 234, 0.08),
        0 8px 25px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    cursor: pointer;
}

.flash-sale-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #9333ea 0%, #a855f7 50%, #c084fc 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flash-sale-card:hover::before {
    opacity: 1;
}

.flash-sale-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 40px 80px rgba(147, 51, 234, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: rgba(147, 51, 234, 0.3);
}

/* Flash Sale Card Image */
.flash-sale-image {
    position: relative;
    height: 140px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.flash-sale-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.flash-sale-card:hover .flash-sale-image img {
    transform: scale(1.1);
}

.flash-sale-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flash-sale-card:hover .flash-sale-overlay {
    opacity: 1;
}

.flash-sale-discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
    z-index: 10;
}

/* Flash Sale Card Content */
.flash-sale-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    /* Ensure all cards have same height */
}

.flash-sale-category {
    display: inline-block;
    background: linear-gradient(135deg,
            rgba(238, 232, 255, 0.8),
            rgba(233, 213, 255, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #7c3aed;
    padding: 6px 16px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    border: 1px solid rgba(147, 51, 234, 0.1);
}

.flash-sale-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
    min-height: 2.6rem;
    /* Ensure consistent title height */
    display: flex;
    align-items: flex-start;
}

.flash-sale-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
    min-height: 32px;
    /* Ensure consistent features height */
    align-items: center;
}

.flash-sale-feature {
    background: linear-gradient(135deg,
            rgba(147, 51, 234, 0.05),
            rgba(168, 85, 247, 0.03));
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(147, 51, 234, 0.1);
}

/* Flash Sale Price Section */
.flash-sale-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
    margin-top: auto;
    /* Push price to bottom */
}

.flash-sale-current-price {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #9333ea, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.flash-sale-original-price {
    font-size: 0.95rem;
    color: #9ca3af;
    font-weight: 600;
    text-decoration: line-through;
}

/* Flash Sale Actions */
.flash-sale-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    /* Push actions to bottom */
}

.flash-sale-btn-cart,
.flash-sale-btn-whatsapp {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 44px;
    /* Ensure consistent button height */
    line-height: 1;
}

.flash-sale-btn-cart {
    background: linear-gradient(135deg, #9333ea 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.3);
}

.flash-sale-btn-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(147, 51, 234, 0.4);
}

.flash-sale-btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.flash-sale-btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.4);
}

/* Loading State */
.flash-sale-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px auto;
    border: 4px solid rgba(147, 51, 234, 0.1);
    border-top: 4px solid #9333ea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .flash-sale-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .flash-sale-container {
        padding: 50px 15px !important;
    }

    .flash-sale-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 25px !important;
        margin-bottom: 35px !important;
    }

    .flash-sale-title-wrapper {
        min-width: auto !important;
        width: 100% !important;
    }

    .flash-sale-title {
        font-size: 2.2rem !important;
        margin: 15px 0 10px 0 !important;
    }

    .flash-sale-description {
        font-size: 1rem !important;
        margin: 0 auto !important;
    }

    /* REDESIGN TIMER FOR MOBILE */
    .flash-sale-countdown {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        background: rgba(147, 51, 234, 0.03) !important;
        padding: 20px 15px !important;
        border-radius: 24px !important;
        border: 1px solid rgba(147, 51, 234, 0.08) !important;
    }

    .countdown-label {
        font-size: 0.8rem !important;
        font-weight: 800 !important;
        color: #9333ea !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
    }

    .countdown-timer {
        gap: 10px !important;
    }

    .time-unit {
        background: white !important;
        padding: 10px !important;
        border-radius: 14px !important;
        min-width: 65px !important;
        box-shadow: 0 4px 12px rgba(147, 51, 234, 0.06) !important;
        border: 1px solid rgba(147, 51, 234, 0.05) !important;
    }

    .time-value {
        font-size: 1.4rem !important;
        font-weight: 900 !important;
        color: #7c3aed !important;
        display: block !important;
        line-height: 1 !important;
        margin-bottom: 2px !important;
    }

    .time-label {
        font-size: 0.6rem !important;
        font-weight: 700 !important;
        color: #9ca3af !important;
        text-transform: uppercase !important;
    }

    .time-separator {
        font-size: 1.2rem !important;
        color: #e9d5ff !important;
        padding-top: 5px !important;
    }

    /* GRID LAYOUT - MINIMAL COMPACT SYNC */
    .flash-sale-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 0 8px !important;
        text-align: left !important;
    }

    /* CARD STYLE - SUPER COMPACT OFFICIAL CLONE */
    #flashSaleGridUltra .product {
        background: transparent !important;
        border-radius: 10px !important;
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        overflow: hidden !important;
        text-align: left !important;
    }

    /* 90px IMAGE (Absolute Minimum) */
    #flashSaleGridUltra .product .product-img {
        aspect-ratio: 16 / 10 !important;
        overflow: hidden !important;
        position: relative !important;
        background: transparent !important;
        height: 90px !important;
        min-height: 90px !important;
        max-height: 90px !important;
    }

    #flashSaleGridUltra .product .product-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* ULTRA-MINI 4px OFFSET BADGE */
    #flashSaleGridUltra .product .discount-badge {
        position: absolute !important;
        top: 4px !important;
        left: 4px !important;
        padding: 2px 4px !important;
        font-size: 9px !important;
        font-weight: 900 !important;
        background: #ff0000 !important;
        color: white !important;
        border-radius: 2px !important;
        z-index: 5 !important;
        display: inline-flex !important;
        width: fit-content !important;
        min-width: 0 !important;
        line-height: 1 !important;
        letter-spacing: 0 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }

    /* MINIMAL 26px WHATSAPP ICON */
    #flashSaleGridUltra .product .whatsapp-icon {
        position: absolute !important;
        top: 4px !important;
        right: 4px !important;
        width: 26px !important;
        height: 26px !important;
        background: #25D366 !important;
        color: white !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
        border: 1.5px solid white !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
        z-index: 10 !important;
    }

    #flashSaleGridUltra .product .product-info {
        padding: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        text-align: left !important;
        background: transparent !important;
    }

    /* 12px TITLE (Super Compact) */
    #flashSaleGridUltra .product .product-info h3 {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #111111 !important;
        margin: 0 0 4px 0 !important;
        line-height: 1.3 !important;
        height: 2.6em !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-transform: none !important;
        text-align: left !important;
    }

    #flashSaleGridUltra .product .product-info p {
        display: none !important;
    }

    #flashSaleGridUltra .product .rating {
        display: flex !important;
        gap: 1.5px !important;
        margin-bottom: 6px !important;
        height: 10px !important;
        min-height: 10px !important;
        justify-content: flex-start !important;
    }

    #flashSaleGridUltra .product .rating i {
        font-size: 7px !important;
        color: #FFC107 !important;
    }

    #flashSaleGridUltra .product .price {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        margin-bottom: 8px !important;
        margin-top: auto !important;
        text-align: left !important;
        align-items: flex-start !important;
    }

    /* 15px PRICE */
    #flashSaleGridUltra .product .price .discounted {
        font-size: 15px !important;
        font-weight: 900 !important;
        color: #111111 !important;
        line-height: 1 !important;
    }

    #flashSaleGridUltra .product .price .original {
        font-size: 10px !important;
        color: #aaa !important;
        text-decoration: line-through !important;
        margin: 0 !important;
    }

    #flashSaleGridUltra .product .duration {
        font-size: 9px !important;
        font-weight: 700 !important;
        color: #e11d48 !important;
        background: rgba(225, 29, 72, 0.05) !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        display: inline-block !important;
        margin-bottom: 8px !important;
        width: fit-content !important;
        text-align: left !important;
    }

    /* SMALL 34px "ADD TO CART" */
    #flashSaleGridUltra .product .add-to-cart-btn {
        width: 100% !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 !important;
        background: #ff0000 !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2) !important;
    }

    #flashSaleGridUltra .product .add-to-cart-btn i {
        font-size: 10px !important;
    }
}