/**
 * FLASH SALE MOBILE PROFESSIONAL REDESIGN V2
 * ===========================================
 * Professional layout with timer and corner badge
 * MOBILE ONLY (max-width: 768px) - No desktop changes
 */

@media (max-width: 768px) {

    /* ============================================
       FLASH SALE CONTAINER - Clean Background
       ============================================ */

    .flash-sale-container {
        padding: 40px 16px 60px !important;
        background: #fafafa !important;
        position: relative !important;
    }

    /* Remove background effects */
    .flash-sale-container::before,
    .flash-sale-container::after {
        display: none !important;
    }

    /* ============================================
       FLASH SALE HEADER - Horizontal Layout
       ============================================ */

    .flash-sale-header {
        margin-bottom: 24px !important;
        gap: 12px !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: white !important;
        padding: 14px !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        position: relative !important;
        overflow: visible !important;
        flex-wrap: nowrap !important;
        margin-top: 54px !important;
    }

    /* Animated "Flash Sale" title above the header */
    .flash-sale-header::before {
        content: '𝐅𝐋𝐀𝐒𝐇 𝐒𝐀𝐋𝐄' !important;
        display: block !important;
        position: absolute !important;
        top: -42px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 22px !important;
        font-weight: 900 !important;
        background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
        letter-spacing: 2px !important;
        animation: flashSalePulse 2s ease-in-out infinite !important;
        text-shadow: 0 2px 8px rgba(124, 58, 237, 0.2) !important;
        white-space: nowrap !important;
        width: auto !important;
    }

    @keyframes flashSalePulse {

        0%,
        100% {
            transform: translateX(-50%) scale(1);
            opacity: 1;
        }

        50% {
            transform: translateX(-50%) scale(1.05);
            opacity: 0.9;
        }
    }

    /* Remove shine effect */
    .flash-sale-header::after {
        display: none !important;
    }

    /* ============================================
       HIDE TITLE WRAPPER (No "Flash Sale" text)
       ============================================ */

    .flash-sale-title-wrapper {
        display: none !important;
    }

    .flash-sale-title {
        display: none !important;
    }

    .flash-sale-description {
        display: none !important;
    }

    /* ============================================
       FLASH SALE BADGE - Left Side
       ============================================ */

    .flash-sale-badge {
        padding: 7px 12px !important;
        border-radius: 8px !important;
        font-size: 10px !important;
        gap: 5px !important;
        background: #fef3c7 !important;
        backdrop-filter: none !important;
        border: 1px solid #fbbf24 !important;
        color: #92400e !important;
        box-shadow: none !important;
        display: inline-flex !important;
        margin: 0 !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
        flex-shrink: 0 !important;
        order: 1 !important;
    }

    .flash-sale-badge i {
        color: #f59e0b !important;
        font-size: 11px !important;
        animation: none !important;
    }

    /* ============================================
       COUNTDOWN TIMER - Center (Show & Style)
       ============================================ */

    .flash-sale-countdown {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        order: 2 !important;
        flex: 1 !important;
        justify-content: center !important;
        min-width: 0 !important;
    }

    .countdown-label {
        display: none !important;
    }

    .countdown-timer {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .time-unit {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        background: #f3e8ff !important;
        padding: 5px 6px !important;
        border-radius: 6px !important;
        min-width: 36px !important;
    }

    .time-value {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: #7c3aed !important;
        line-height: 1 !important;
    }

    .time-label {
        font-size: 8px !important;
        color: #9333ea !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        margin-top: 2px !important;
        letter-spacing: 0.3px !important;
    }

    .time-separator {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: #7c3aed !important;
        margin: 0 1px !important;
    }

    /* ============================================
       REFRESH BUTTON - Right Side
       ============================================ */

    .flash-sale-refresh {
        width: auto !important;
        max-width: none !important;
        position: relative !important;
        z-index: 1 !important;
        margin: 0 !important;
        order: 3 !important;
        flex-shrink: 0 !important;
    }

    .refresh-btn {
        width: auto !important;
        padding: 8px 16px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        gap: 6px !important;
        background: #7c3aed !important;
        backdrop-filter: none !important;
        border: none !important;
        color: white !important;
        box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25) !important;
        font-weight: 700 !important;
        letter-spacing: 0px !important;
        transition: all 0.3s ease !important;
        white-space: nowrap !important;
    }

    .refresh-btn:active {
        transform: scale(0.96) !important;
        background: #6d28d9 !important;
        box-shadow: 0 1px 4px rgba(124, 58, 237, 0.3) !important;
    }

    .refresh-btn i {
        font-size: 13px !important;
        color: white !important;
    }

    .refresh-btn span {
        color: white !important;
        font-size: 12px !important;
    }

    /* ============================================
       FLASH SALE DESCRIPTION - Hide
       ============================================ */

    .flash-sale-description {
        display: none !important;
    }

    /* ============================================
       FLASH SALE GRID - Clean Spacing
       ============================================ */

    .flash-sale-grid {
        gap: 12px !important;
        padding: 0 !important;
        margin-top: 20px !important;
    }

    /* Subtle fade-in animation */
    #flashSaleGridUltra .product {
        animation: subtleFadeIn 0.5s ease backwards !important;
    }

    #flashSaleGridUltra .product:nth-child(1) {
        animation-delay: 0.05s !important;
    }

    #flashSaleGridUltra .product:nth-child(2) {
        animation-delay: 0.1s !important;
    }

    #flashSaleGridUltra .product:nth-child(3) {
        animation-delay: 0.15s !important;
    }

    #flashSaleGridUltra .product:nth-child(4) {
        animation-delay: 0.2s !important;
    }

    @keyframes subtleFadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}