/* Scheduled special-sale block */
/* Keep the timed sale directly after the hero benefits bar without changing
   the structure or sizing of the other homepage sections. */
.home-page-main > .home-hero { order: 1 !important; }
.home-page-main > .taee-store-advantages { order: 2 !important; }
.home-page-main > .taee-special-sale { order: 3 !important; }
.home-page-main > .home-deal--primary { order: 4 !important; }
.home-page-main > .home-quad-banners { order: 5 !important; }
.home-page-main > .home-categories { order: 6 !important; }
.home-page-main > .home-new-products { order: 7 !important; }
.home-page-main > .pastel-full-banner { order: 8 !important; }
.home-page-main > .home-brands { order: 9 !important; }
.home-page-main > .pastel-banner-section { order: 10 !important; }
.home-page-main > .pastel-categories-wrapper { order: 11 !important; }
.home-page-main > .pastel-blog-section { order: 12 !important; }

.taee-special-sale,
.taee-special-sale *,
.taee-special-sale *::before,
.taee-special-sale *::after {
    box-sizing: border-box;
}

.taee-special-sale {
    width: 100%;
    padding: 14px 0 22px;
    background: #f5f6f7;
    direction: rtl;
}

.taee-special-sale > .container {
    width: 100%;
}

.taee-special-sale-shell {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
}

.taee-special-sale-header {
    width: 100%;
    min-height: 108px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: minmax(300px, 1.25fr) auto minmax(180px, .75fr);
    align-items: center;
    gap: 18px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(45deg, rgb(102, 0, 51), rgb(91, 0, 45), rgb(145, 0, 72));
    color: #fff;
}

.taee-special-sale-heading {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: visible;
}

.taee-special-sale-bolt {
    flex: 0 0 auto;
    width: 70px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.taee-special-sale-bolt img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.taee-special-sale-heading-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-block: 4px;
    overflow: visible;
}

.taee-special-sale-heading h2,
.taee-special-sale-subtitle {
    margin: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.taee-special-sale-heading h2 {
    font-weight: 900;
}

.taee-special-sale-subtitle {
    font-weight: 600;
    color: rgba(255, 255, 255, .88);
}

.taee-special-sale-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: rtl;
    white-space: nowrap;
}

.taee-special-sale-countdown-label {
    margin: 0 0 0 10px;
    font-weight: 800;
    color: rgba(255, 255, 255, .98);
}

.taee-special-sale-timeunit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.taee-special-sale-timebox {
    width: 56px;
    min-height: 52px;
    padding: 6px 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(128, 0, 23, .28) 0%, rgba(104, 0, 19, .48) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09);
}

.taee-special-sale-timebox h4 {
    margin: 0;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.taee-special-sale-unit-label {
    font-weight: 700;
    color: rgba(255, 255, 255, .9);
}

.taee-special-sale-separator {
    align-self: flex-start;
    margin-top: 13px;
    font-weight: 900;
    color: rgba(255, 255, 255, .96);
}

.taee-special-sale-all {
    justify-self: end;
    margin-right: auto;
    margin-left: 0;
    min-width: 126px; 
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff !important; 
    font-weight: 900;
    text-decoration: none !important;
    direction: rtl;
    transition: background .18s ease, transform .18s ease, border-color .18s ease;
}

.taee-special-sale-all > span:first-child {
    order: 1;
}

.taee-special-sale-all-icon {
    order: 2;
}

.taee-special-sale-all:hover {
    background: rgba(255, 255, 255, .12);
    transform: translateY(-1px);
}

.taee-special-sale-all-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
}

.taee-special-sale-all-icon i {
    position: static !important;
    display: block !important;
    margin: 0 !important;
    color: #fff !important;
    transform: none !important;
}

.taee-special-sale-products {
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    padding: 9px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.taee-special-sale-products > .product-outer {
    float: none !important;
    display: block !important;
    position: relative;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.taee-special-sale-products > .product-outer > .theme-product-card,
.taee-special-sale-products > .product-outer > .product {
    width: 100% !important;
    max-width: none !important;
}

.taee-special-sale-products .theme-product-card {
    height: 100%;
    margin: 0 !important;
    border: 1px solid #eceff1;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.taee-special-sale-products .theme-product-card:hover {
    z-index: 2;
    transform: translateY(-2px);
    border-color: #e4e7eb;
    box-shadow: 0 9px 25px rgba(15, 23, 42, .09);
}

.taee-special-sale-products .discount-badge {
    background: #660033 !important;
    border-radius: 7px !important;
}

.taee-special-sale-products .theme-price,
.taee-special-sale-products .text-secondary {
    color: #660033 !important;
}

.taee-special-sale.is-ended .taee-special-sale-header {
    background: #6b7280;
}

/* Defensive layout rules against legacy product/grid styles. */
.taee-special-sale-products .product__image,
.taee-special-sale-products .product__body {
    width: 100%;
}

@media (max-width: 1240px) {
    .taee-special-sale-header {
        grid-template-columns: minmax(260px, 1fr) auto minmax(150px, .6fr);
    }

    .taee-special-sale-products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .taee-special-sale-header {
        grid-template-columns: 1fr auto;
        justify-items: start;
    }

    .taee-special-sale-all {
        grid-column: 1 / -1;
        justify-self: center;
        min-width: 158px;
    }
}

@media (max-width: 991px) {
    .taee-special-sale-header {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
        padding-top: 16px;
        padding-bottom: 16px;
        text-align: center;
    }

    .taee-special-sale-heading {
        justify-content: center;
    }

    .taee-special-sale-all {
        grid-column: auto;
        justify-self: center;
    }

    .taee-special-sale-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .taee-special-sale {
        padding: 8px 0 12px;
    }

    .taee-special-sale-shell {
        border-radius: 12px;
    }

    .taee-special-sale-header {
        border-radius: 12px;
    }

    .taee-special-sale-header {
        gap: 10px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .taee-special-sale-bolt,
    .taee-special-sale-bolt img {
        width: 52px;
        height: 52px;
    }

    .taee-special-sale-countdown {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 10px;
    }

    .taee-special-sale-countdown-label {
        width: 100%;
        margin: 0;
    }

    .taee-special-sale-timebox {
        width: 50px;
        min-height: 48px;
    }

    .taee-special-sale-separator {
        margin-top: 11px;
    }

    .taee-special-sale-products {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 10px;
        scrollbar-width: none;
        padding: 8px 10px 12px;
    }

    .taee-special-sale-products::-webkit-scrollbar {
        display: none;
    }

    .taee-special-sale-products > .product-outer {
        flex: 0 0 calc((100% - 8px) / 2) !important;
        width: calc((100% - 8px) / 2) !important;
        max-width: calc((100% - 8px) / 2) !important;
        min-width: 0 !important;
        scroll-snap-align: start;
    }

    .taee-special-sale-products > .product-outer > .theme-product-card,
    .taee-special-sale-products > .product-outer > .product {
        min-width: 0 !important;
    }
}

/* The listing page uses the exact same shared timer/header component as home.
   Only the outer section context changes. */
.taee-special-sale--listing {
    order: initial !important;
    padding-top: 12px;
    background: transparent;
}
