/**
 * Desktop Section Module: 2-Row Grid Carousel for Flash Sale
 * Location: /assets/css/sections-desktop/desktop-flash-sale.css
 */

@media (min-width: 992px) {
    /* 1. Main Outer Section Frame */
    .front-flash-sale-section {
        background: #ffffff !important;
        border-radius: 20px !important;
        padding: 24px 30px !important;
        border: 1px solid rgba(211, 133, 170, 0.15) !important;
        margin-top: 2% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 2. Header Bar & Navigation Arrow Fixes */
    .front-flash-sale-section .section-header-bar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin-bottom: 20px !important;
    }

    .front-flash-sale-section .carousel-nav-arrows {
        display: flex !important;
        gap: 8px !important;
        z-index: 10 !important;
    }

    .front-flash-sale-section .nav-arrow {
        width: 36px !important;
        height: 36px !important;
        border-radius: 8px !important;
        border: 1px solid #e2e4e7 !important;
        background: #ffffff !important;
        color: #333333 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        transition: all 0.2s ease !important;
        user-select: none !important;
    }

    .front-flash-sale-section .nav-arrow:hover {
        background: #573035 !important;
        color: #ffffff !important;
        border-color: #573035 !important;
    }

    /* 3. 2-Row Horizontal Scrolling Track (Scaled to 5 Cards per View) */
    .front-flash-sale-section .flash-products-grid {
        display: grid !important;
        grid-template-columns: none !important;
        grid-template-rows: repeat(2, auto) !important; /* Locks layout to exactly 2 rows */
        grid-auto-columns: calc((100% - 64px) / 5) !important; /* Calculates exact 5-column width */
        grid-auto-flow: column !important; /* Flows extra cards horizontally to the right */
        gap: 16px !important;
        overflow-x: auto !important; /* Enables horizontal scrolling */
        overflow-y: hidden !important;
        scroll-behavior: smooth !important;
        scroll-snap-type: x mandatory !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        padding-bottom: 8px !important;
    }

    /* Hide Chrome/Safari Webkit Scrollbar */
    .front-flash-sale-section .flash-products-grid::-webkit-scrollbar {
        display: none !important;
    }

    /* 4. Product Card Sizing (Fills full 5-column width) */
    .front-flash-sale-section .flash-product-card {
        scroll-snap-align: start !important;
        width: 100% !important;
        min-width: 0 !important;
        background: #ffffff !important;
        border: 1px solid rgba(211, 133, 170, 0.15) !important;
        border-radius: 14px !important;
        padding: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
        box-sizing: border-box !important;
    }

    .front-flash-sale-section .flash-product-card:hover {
        transform: translateY(-4px) !important;
        box-shadow: 0 10px 25px rgba(211, 133, 170, 0.12) !important;
        border-color: #d385aa !important;
    }
}