/* Flash sale — featured "Best offers" section */

.ahlmall-flash-sale.section {
    padding: 18px 0 28px;
}

.ahlmall-flash-sale--featured {
    --fs-accent: var(--color-1st, #fd6a00);
    --fs-gold-1: #c9a227;
    --fs-gold-2: #ffd700;
    --fs-gold-3: #fff9c4;
}

.ahlmall-flash-sale__shell {
    position: relative;
    padding: 20px 18px 22px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 248, 235, .97) 0%, rgba(255, 255, 255, .92) 42%, rgba(255, 243, 220, .88) 100%);
    box-shadow:
        0 4px 24px rgba(253, 106, 0, .08),
        0 18px 48px rgba(15, 23, 42, .06),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    overflow: hidden;
}

.ahlmall-flash-sale__shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(255, 215, 0, .18), transparent 55%),
        radial-gradient(ellipse 70% 50% at 0% 100%, rgba(253, 106, 0, .1), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.ahlmall-flash-sale__shell > * {
    position: relative;
    z-index: 1;
}

/* Header */
.ahlmall-flash-sale__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--fs-gold-2), var(--fs-accent), var(--fs-gold-2), transparent) 1;
}

.ahlmall-flash-sale__header-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ahlmall-flash-sale__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, var(--fs-accent) 0%, #e85d04 100%);
    box-shadow:
        0 8px 20px rgba(253, 106, 0, .35),
        inset 0 1px 0 rgba(255, 255, 255, .35);
    animation: ahlmall-flash-icon-pulse 2.4s ease-in-out infinite;
}

@keyframes ahlmall-flash-icon-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(253, 106, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
    50% { transform: scale(1.04); box-shadow: 0 10px 28px rgba(253, 106, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .4); }
}

.ahlmall-flash-sale__titles {
    min-width: 0;
}

.ahlmall-flash-sale__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--fs-gold-1);
    margin-bottom: 2px;
}

.ahlmall-flash-sale__title {
    margin: 0;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 800;
    line-height: 1.25;
    color: #1a1a2e;
    background: linear-gradient(90deg, #1a1a2e 0%, var(--fs-accent) 120%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@supports not ((-webkit-background-clip: text)) {
    .ahlmall-flash-sale__title {
        -webkit-text-fill-color: inherit;
        color: #1a1a2e;
    }
}

.ahlmall-flash-sale__badge {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    letter-spacing: .02em;
    background: linear-gradient(90deg, #dc2626, #f97316);
    box-shadow: 0 4px 14px rgba(220, 38, 38, .35);
    animation: ahlmall-flash-badge-glow 2s ease-in-out infinite;
}

@keyframes ahlmall-flash-badge-glow {
    0%, 100% { box-shadow: 0 4px 14px rgba(220, 38, 38, .35); }
    50% { box-shadow: 0 6px 22px rgba(249, 115, 22, .55); }
}

/* Gold frame around carousel — static border (no animation) */
.ahlmall-flash-sale__frame {
    position: relative;
    border-radius: 17px;
    padding: 0;
    overflow: hidden;
    border: 3px solid #c9a227;
    box-shadow:
        0 10px 28px rgba(15, 23, 42, .12),
        0 0 0 1px rgba(180, 140, 40, .25);
}

.ahlmall-flash-sale__frame::before,
.ahlmall-flash-sale__frame::after {
    display: none;
}

.ahlmall-flash-sale__frame-inner {
    position: relative;
    border-radius: 14px;
    padding: 14px 8px 10px;
    background: rgba(255, 255, 255, .98);
}

.ahlmall-flash-sale .product_slider .item {
    padding: 0 4px;
}

.ahlmall-flash-sale .owl-nav {
    display: none;
}

/* Deal cards */
.ahlmall-flash-deal {
    position: relative;
    background: #fff;
    border: 2px solid var(--fs-accent);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    box-shadow:
        0 6px 18px rgba(253, 106, 0, .12),
        0 2px 8px rgba(15, 23, 42, .06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.ahlmall-flash-sale .owl-item.active.center .ahlmall-flash-deal,
.ahlmall-flash-deal:hover {
    transform: translateY(-4px);
    border-color: var(--fs-gold-2);
    box-shadow:
        0 14px 32px rgba(253, 106, 0, .2),
        0 0 0 1px rgba(255, 215, 0, .4),
        0 8px 24px rgba(15, 23, 42, .1);
}

.ahlmall-flash-deal::after {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--fs-gold-2), var(--fs-accent));
    z-index: 4;
    opacity: .85;
}

.ahlmall-flash-deal__grid {
    display: flex;
    align-items: stretch;
    min-height: 0;
}

.ahlmall-flash-deal__media {
    position: relative;
    flex: 0 0 150px;
    width: 150px;
    max-width: 42%;
    align-self: stretch;
    min-height: 130px;
    background: linear-gradient(145deg, #f8f8f8, #eee);
    padding: 0;
    margin: 0;
    z-index: 2;
    overflow: hidden;
}

.ahlmall-flash-deal__media > a {
    position: absolute;
    inset: 0;
    display: block;
    line-height: 0;
}

.ahlmall-flash-deal__media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
    transition: transform .35s ease;
}

.ahlmall-flash-deal:hover .ahlmall-flash-deal__media img {
    transform: scale(1.04);
}

.ahlmall-flash-deal__badge {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 3;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.ahlmall-flash-deal__badge--sold {
    background: #64748b !important;
}

.ahlmall-flash-deal__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 10px 10px 8px;
    z-index: 2;
}

.ahlmall-flash-deal__body .product_title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.35;
}

.ahlmall-flash-deal__body .product_title a {
    color: #1e293b;
}

.ahlmall-flash-deal__body .product_title a:hover {
    color: var(--fs-accent);
}

.ahlmall-flash-deal__body .product_price {
    margin-bottom: 4px;
}

.ahlmall-flash-deal__body .product_price .price {
    font-size: 16px;
    font-weight: 800;
    color: var(--fs-accent);
}

.ahlmall-flash-deal__body .product_price del {
    font-size: 12px;
}

.ahlmall-flash-deal__body .on_sale span {
    background: linear-gradient(90deg, #dc2626, #f97316);
    border-radius: 4px;
    font-weight: 700;
}

.ahlmall-flash-deal__body .rating_wrap {
    margin-bottom: 4px;
    font-size: 12px;
}

.ahlmall-flash-deal__stock-meta {
    font-size: 11px;
    margin-bottom: 4px;
    color: #64748b;
}

.ahlmall-flash-deal__stock-meta strong {
    color: #1e293b;
}

.ahlmall-flash-deal__progress.progress {
    height: 6px;
    margin: 0 0 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.ahlmall-flash-deal__progress .progress-bar {
    background: linear-gradient(90deg, var(--fs-accent), #fbbf24);
    border-radius: 999px;
}

/* Countdown — override theme countdown_style4 (light gray boxes) */
.ahlmall-flash-deal__countdown.countdown_time.countdown_style4 {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    margin: 0;
}

.ahlmall-flash-deal__countdown.countdown_style4 .countdown_box {
    float: none !important;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    width: auto !important;
    padding: 0 !important;
}

.ahlmall-flash-deal__countdown.countdown_style4 .countdown_box .countdown-wrap {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100% !important;
    min-height: 52px;
    padding: 8px 4px 6px !important;
    border-radius: 10px;
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%) !important;
    border: 2px solid #f59e0b;
    box-shadow:
        0 3px 10px rgba(15, 23, 42, .35),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

.ahlmall-flash-deal__countdown.countdown_style4 .countdown_box .countdown,
.ahlmall-flash-deal__countdown.countdown_style4 .countdown_box .countdown.days,
.ahlmall-flash-deal__countdown.countdown_style4 .countdown_box .countdown.hours,
.ahlmall-flash-deal__countdown.countdown_style4 .countdown_box .countdown.minutes,
.ahlmall-flash-deal__countdown.countdown_style4 .countdown_box .countdown.seconds {
    display: block;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    color: #fef08a !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

.ahlmall-flash-deal__countdown.countdown_style4 .countdown_box .cd_text {
    display: block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #fff !important;
    opacity: 1 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    letter-spacing: 0;
}

/* Carousel nav inside section */
.ahlmall-flash-sale .ahlmall-carousel-nav__wrap {
    position: relative;
}

.ahlmall-flash-sale .ahlmall-carousel-nav__arrow {
    background: linear-gradient(145deg, #fff, #fff8eb);
    border: 2px solid var(--fs-gold-1);
    color: var(--fs-accent);
    box-shadow: 0 4px 14px rgba(201, 162, 39, .25);
}

.ahlmall-flash-sale .ahlmall-carousel-nav__arrow:hover {
    background: linear-gradient(145deg, var(--fs-accent), #e85d04);
    border-color: var(--fs-accent);
    color: #fff;
}

.rtl .ahlmall-flash-deal__body,
.rtl .ahlmall-flash-sale__header {
    text-align: right;
}

.rtl .ahlmall-flash-sale__header-main {
    flex-direction: row-reverse;
}

@media (max-width: 767px) {
    .ahlmall-flash-sale__shell {
        padding: 14px 12px 16px;
        border-radius: 16px;
    }

    .ahlmall-flash-sale__icon {
        width: 42px;
        height: 42px;
    }

    .ahlmall-flash-sale__badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    .ahlmall-flash-deal__grid {
        flex-direction: column;
    }

    .ahlmall-flash-deal__media {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-height: 160px;
    }

    .ahlmall-flash-deal::after {
        width: 100%;
        height: 4px;
        inset-inline-end: auto;
        bottom: auto;
        top: auto;
        inset-block-start: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ahlmall-flash-sale__icon,
    .ahlmall-flash-sale__badge {
        animation: none;
    }
}
