/* ========================================
   FLASH SALE SECTION
   ======================================== */
.flash-sale-section {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.flash-sale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.flash-sale-icon {
    color: #ffc107;
    animation: pulse 1.5s infinite;
}

.flash-sale-countdown {
    display: flex;
    gap: 15px;
}

.flash-sale-timer-large .flash-sale-countdown {
    /* Inherits flex from above */
}

.flash-sale-countdown .countdown-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 10px 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 80px;
}

.flash-sale-countdown .countdown-amount {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.flash-sale-countdown .countdown-period {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* Product Card Redesign */
.product-card-flash {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    position: relative;
}

.product-card-flash:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-media {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.3s ease;
}

.product-card-flash:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-sale {
    background: #ff3b30;
    color: #fff;
}

.product-action-vertical {
    position: absolute;
    top: 10px;
    right: -40px;
    transition: all 0.3s ease;
    opacity: 0;
}

.product-card-flash:hover .product-action-vertical {
    right: 10px;
    opacity: 1;
}

.btn-product-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
    transition: all 0.2s;
}

.btn-product-icon:hover {
    background: #0052CC;
    color: #fff;
}

.product-body {
    padding: 15px;
}

.product-cat {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 2.8em;
    /* Limit to 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover {
    color: #0052CC;
}

.product-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.new-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff3b30;
}

.old-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

/* Stock Progress Bar */
.stock-progress-container {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 6px;
}

.text-xs {
    font-size: 0.75rem;
}

.progress {
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.btn-cart-flash {
    border-radius: 6px;
    font-weight: 600;
    padding: 8px 0;
    background: #0052CC;
    border-color: #0052CC;
}

.btn-cart-flash:hover {
    background: #0043A8;
    border-color: #0043A8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .flash-sale-main-banner {
        height: 200px;
    }

    .flash-sale-title {
        font-size: 1.8rem;
    }

    .flash-sale-countdown .countdown-amount {
        font-size: 1.5rem;
    }

    .flash-sale-countdown .countdown-section {
        min-width: 60px;
        padding: 5px 10px;
    }

    .col-6 {
        padding-left: 5px;
        padding-right: 5px;
    }

    .product-card-flash {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    .product-body {
        padding: 10px;
    }

    .new-price {
        font-size: 1rem;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

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

.promo-content {
    text-align: center;
    color: #000;
}

.promo-badge {
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.promo-percentage {
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
}

.promo-percentage span {
    font-size: 4rem;
}

.promo-text {
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Flash Sale Badge */
.flash-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #FF4444;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

/* Flash Sale Product Card Specific Styles */
.flash-sale-section .product {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.flash-sale-section .product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.flash-sale-section .product-media {
    background: #f8f8f8;
    border-radius: 8px 8px 0 0;
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
}

.flash-sale-section .product-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flash-sale-section .product-body {
    padding: 12px;
}

.flash-sale-section .product-cat {
    font-size: 1rem;
    color: #666;
    margin-bottom: 5px;
}

.flash-sale-section .product-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    min-height: 38px;
    line-height: 1.3;
}

.flash-sale-section .product-title a {
    color: #333;
    font-weight: 600;
}

.flash-sale-section .product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.flash-sale-section .product-price .old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1.1rem;
    font-weight: 400;
    order: 2;
}

.flash-sale-section .product-price .new-price {
    color: #FF4444;
    font-size: 1.6rem;
    font-weight: 700;
    order: 1;
}

.flash-sale-section .product-price .discount-badge {
    background: #FF4444;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 1rem;
    font-weight: 600;
    order: 3;
}

.flash-sale-progress {
    margin-top: 8px;
}

.progress-bar-custom {
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.flash-sale-stock-text {
    font-size: 1rem;
    color: #666;
    display: block;
    text-align: left;
}

/* Home Page Flash Sale Slider Specifics */
.flash-sale-slider .product {
    width: 200px !important;
    height: 310px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    display: flex;
    flex-direction: column;
}

.flash-sale-slider .product-media {
    height: 160px;
    /* Reduced image height */
    padding-top: 0;
    flex-shrink: 0;
}

.flash-sale-slider .product-media img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    padding: 10px;
}

.flash-sale-slider .product-body {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.flash-sale-slider .product-cat {
    display: none;
    /* Hide category to save space */
}

.flash-sale-slider .product-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
    height: 2.4em;
    /* Limit to 2 lines */
    min-height: auto;
}

.flash-sale-slider .product-price {
    margin-bottom: 5px;
}

.flash-sale-slider .new-price {
    font-size: 1rem;
}

.flash-sale-slider .old-price {
    font-size: 0.8rem;
}

.flash-sale-slider .stock-progress-container {
    margin-top: 0;
    padding: 0;
    background: transparent;
}

.flash-sale-slider .progress {
    height: 4px;
    margin-bottom: 2px;
}

.flash-sale-slider .text-xs {
    font-size: 0.7rem;
    margin-bottom: 0 !important;
}

.flash-sale-slider .btn-cart-flash {
    padding: 4px 0;
    font-size: 0.8rem;
    margin-top: 5px;
}

.flash-sale-slider .product-action-vertical {
    top: 5px;
    right: -30px;
}

.flash-sale-slider .product:hover .product-action-vertical {
    right: 5px;
}

.flash-sale-slider .btn-product-icon {
    width: 28px;
    height: 28px;
}

/* Banner Promo Desktop Adjustments */
@media (min-width: 992px) {
    .flash-sale-banner-promo {
        height: 310px;
        /* Match product card height */
        min-height: 310px;
    }

    .default-promo-banner {
        height: 310px;
        min-height: 310px;
    }

    .flash-sale-banner-promo img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    .flash-sale-section .product-body {
        padding: 15px;
    }

    .flash-sale-section .product-title {
        font-size: 1.3rem;
        min-height: 42px;
    }

    .flash-sale-section .product-price .new-price {
        font-size: 1.8rem;
    }
}

/* Mobile Responsive Flash Sale */
@media (max-width: 767px) {
    .flash-sale-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .flash-sale-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }

    .flash-sale-title {
        font-size: 1.6rem;
        /* Slightly smaller for mobile */
        white-space: nowrap;
        /* Enforce single line */
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Handle overflow gracefully */
    }

    .flash-sale-icon {
        font-size: 1.8rem;
    }

    .flash-sale-timer {
        width: 100%;
        justify-content: center;
        /* Align timer to start */
        min-width: auto;
    }

    .countdown-box {
        width: 30px;
        height: 30px;
        font-size: 1.4rem;
    }

    .countdown-separator {
        font-size: 1.4rem;
    }

    .default-promo-banner {
        min-height: 200px;
    }

    .promo-percentage {
        font-size: 4rem;
    }

    .promo-percentage span {
        font-size: 3rem;
    }

    .flash-sale-section .product-price .new-price {
        font-size: 1.6rem;
    }

    .flash-sale-section .product-title {
        font-size: 1.2rem;
        min-height: 35px;
    }
}

/* Text Only Button for Flash Sale Header */
.flash-sale-header .btn-text-only {
    background: transparent;
    border: none;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.flash-sale-header .btn-text-only:hover {
    color: #FFD700;
    text-decoration: none;
    background: transparent;
}

/* Mobile Banner Slide */
.flash-sale-mobile-banner-slide {
    height: 310px;
    /* Match product card height */
    min-height: 310px;
    border-radius: 8px;
    overflow: hidden;
}

.flash-sale-mobile-banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 767px) {
    .flash-sale-mobile-banner-slide {
        min-height: 310px;
        /* Adjust for mobile */
    }
}