/* MarketBeat All Access — Fall Lock-In Sale theme (warm cream-to-amber, rust accents, drifting leaves). */
:root {
    --fall-rust: #C4511B;
    --fall-rust-dark: #9C3A0F;
    --fall-brown: #4A2412;
    --fall-gold: #E08A1E;
    --fall-line: #E3A45C;
}

/* Landing-page reskin headings use Arbutus Slab. */
@font-face {
    font-family: 'Arbutus Slab';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(https://www.marketbeat.com/Style/fonts/ArbutusSlab-Regular.woff2) format('woff2');
}

/* ============ Top discount strip ============ */
.d-print-none.py-1.bg-blue.text-center.d-minimal-none {
    background-color: var(--fall-rust);
}

/* ============ Banner / Hello Bar background ============ */
.bg-promo {
    position: relative;
    inset: 0;
    background: linear-gradient(110deg, #FFF9EE 0%, #FCE8C8 60%, #F6CE93 100%);
    background-size: cover;
    background-position: center;
}

/* Same leaf art as the landing page hero: a leaf pile along the bottom edge and falling leaves on the right. */
.bg-promo::before,
.bg-promo::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    background-repeat: no-repeat;
}

.bg-promo::before {
    left: 0;
    top: auto;
    width: 100%;
    height: min(11.54vw, 100%);
    background-image: url(https://www.marketbeat.com/images/all-access/fall-leaves-hero-pile.png);
    background-position: bottom center;
    background-size: 100% auto;
}

.bg-promo::after {
    right: 20px;
    width: min(25%, 220px);
    background-image: url(https://www.marketbeat.com/images/all-access/fall-leaves-hero.png);
    background-position: right center;
    background-size: auto 100%;
}

/* Hello bar: big falling leaves cropped in at each edge and faded toward the copy so it stays readable. */
.hello-bar .bg-promo::before,
.hello-bar .bg-promo::after {
    display: block;
    top: 0;
    bottom: 0;
    height: auto;
    width: clamp(160px, 20%, 380px);
    opacity: 0.18;
    background-image: url(https://www.marketbeat.com/images/all-access/fall-leaves-hero.png);
    background-repeat: no-repeat;
    background-size: auto 400%;
}

.hello-bar .bg-promo::before {
    left: 0;
    right: auto;
    background-position: 100% 12%;
    -webkit-mask-image: linear-gradient(to right, #000 30%, transparent);
    mask-image: linear-gradient(to right, #000 30%, transparent);
}

.hello-bar .bg-promo::after {
    left: auto;
    right: 0;
    background-position: 62% 70%;
    -webkit-mask-image: linear-gradient(to left, #000 30%, transparent);
    mask-image: linear-gradient(to left, #000 30%, transparent);
}

/* ============ HP Banner: drifting leaves ============ */
/* promo-starfield.js fills this container with .promo-star elements holding a star character;
   the theme hides the character and paints a leaf in its place. */
.promo-starfield {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.promo-star {
    position: absolute;
    font-size: 0;
    line-height: 1;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    will-change: transform, opacity;
}

.promo-star-near {
    width: 30px;
    height: 30px;
    background-image: url(https://www.marketbeat.com/images/all-access/aap-fall-leaf-maple.svg);
    animation: promo-fall-near 12s ease-in-out infinite;
}

.promo-star-mid {
    width: 22px;
    height: 22px;
    background-image: url(https://www.marketbeat.com/images/all-access/aap-fall-leaf-oak.svg);
    animation: promo-fall-mid 16s ease-in-out infinite;
}

.promo-star-far {
    width: 14px;
    height: 14px;
    background-image: url(https://www.marketbeat.com/images/all-access/aap-fall-leaf-gold.svg);
    animation: promo-fall-far 22s ease-in-out infinite;
}

/* The script starts leaves off the left edge; spread them across the top instead. */
.promo-starfield .promo-star:nth-child(1)  { left: 6% !important; }
.promo-starfield .promo-star:nth-child(2)  { left: 48% !important; }
.promo-starfield .promo-star:nth-child(3)  { left: 88% !important; }
.promo-starfield .promo-star:nth-child(4)  { left: 18% !important; }
.promo-starfield .promo-star:nth-child(5)  { left: 36% !important; }
.promo-starfield .promo-star:nth-child(6)  { left: 62% !important; }
.promo-starfield .promo-star:nth-child(7)  { left: 78% !important; }
.promo-starfield .promo-star:nth-child(8)  { left: 94% !important; }
.promo-starfield .promo-star:nth-child(9)  { left: 2% !important; }
.promo-starfield .promo-star:nth-child(10) { left: 12% !important; }
.promo-starfield .promo-star:nth-child(11) { left: 28% !important; }
.promo-starfield .promo-star:nth-child(12) { left: 42% !important; }
.promo-starfield .promo-star:nth-child(13) { left: 56% !important; }
.promo-starfield .promo-star:nth-child(14) { left: 70% !important; }
.promo-starfield .promo-star:nth-child(15) { left: 84% !important; }

@keyframes promo-fall-near {
    0%   { top: -40px; transform: translateX(0) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.95; }
    25%  { transform: translateX(18px) rotate(40deg); }
    50%  { transform: translateX(-14px) rotate(-20deg); }
    75%  { transform: translateX(16px) rotate(50deg); }
    92%  { opacity: 0.95; }
    100% { top: 100%; transform: translateX(0) rotate(10deg); opacity: 0; }
}

@keyframes promo-fall-mid {
    0%   { top: -30px; transform: translateX(0) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.7; }
    25%  { transform: translateX(-14px) rotate(-35deg); }
    50%  { transform: translateX(12px) rotate(15deg); }
    75%  { transform: translateX(-12px) rotate(-40deg); }
    92%  { opacity: 0.7; }
    100% { top: 100%; transform: translateX(0) rotate(-10deg); opacity: 0; }
}

@keyframes promo-fall-far {
    0%   { top: -20px; transform: translateX(0) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.5; }
    25%  { transform: translateX(10px) rotate(30deg); }
    50%  { transform: translateX(-8px) rotate(-10deg); }
    75%  { transform: translateX(10px) rotate(35deg); }
    92%  { opacity: 0.5; }
    100% { top: 100%; transform: translateX(0) rotate(5deg); opacity: 0; }
}

/* Content stacks above the decoration (pseudos at z-index 1, leaves at 10).
   `.container` needs position:relative explicit — Bootstrap doesn't set it. */
.bg-promo > .position-relative.overflow-hidden,
.bg-promo > .container {
    position: relative;
    z-index: 20;
}

@media (prefers-reduced-motion: reduce) {
    .promo-starfield { display: none; }
    .promo-star { animation: none; }
}

/* ============ Home page banner (#pnlFeaturedAd): cream-to-amber field with leaf clusters in the top-left and bottom-right corners ============ */
#cphPrimaryContent_pnlFeaturedAd .bg-promo {
    overflow: hidden;
    background: linear-gradient(100deg, #FFF8EA 0%, #FEEFD3 45%, #FBDDA6 100%);
}

#cphPrimaryContent_pnlFeaturedAd .bg-promo::before,
#cphPrimaryContent_pnlFeaturedAd .bg-promo::after {
    width: clamp(150px, 24%, 340px);
    height: auto;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 1;
}

#cphPrimaryContent_pnlFeaturedAd .bg-promo::before {
    left: 0;
    top: 0;
    bottom: 0;
    width: auto;
    height: 100%;
    aspect-ratio: 480 / 1000;
    background-image: url(https://www.marketbeat.com/images/all-access/aap-fall-corner-left.png);
    background-position: left top;
}

#cphPrimaryContent_pnlFeaturedAd .bg-promo::after {
    right: 0;
    bottom: 0;
    top: auto;
    aspect-ratio: 470 / 360;
    background-image: url(https://www.marketbeat.com/images/all-access/aap-fall-corner-br.png);
    background-position: right bottom;
}

/* Home page banner: the divider under the title is one solid line (no center leaf). */
#cphPrimaryContent_pnlFeaturedAd .bg-promo .sale-pretitle::after {
    background: linear-gradient(var(--fall-line), var(--fall-line)) center / 100% 2px no-repeat;
}

@media (max-width: 767.9px) {
    #cphPrimaryContent_pnlFeaturedAd .bg-promo::before,
    #cphPrimaryContent_pnlFeaturedAd .bg-promo::after {
        opacity: 0.6;
    }
}

/* ============ Typography ============ */
.sale-pretitle {
    font-size: clamp(40px, 8vw, 88px);
    font-family: 'Barlow', sans-serif;
    font-weight: 800;
    color: var(--fall-rust);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
    text-shadow: 0 1px 2px rgba(74, 36, 18, 0.12);
    max-width:900px;
    margin:0 auto;
}

/* Two background gradients form the left + right rules; a maple leaf sits
   centered between them. */
.bg-promo .sale-pretitle::after {
    content: '';
    display: block;
    font-size: clamp(14px, 1.5vw, 20px);
    height: 1.3em;
    margin: 1.5em auto 1.25em;
    width: min(440px, 75%);
    background:
        url(https://www.marketbeat.com/images/all-access/aap-fall-leaf-maple.svg) center / contain no-repeat,
        linear-gradient(to right, var(--fall-line), var(--fall-line)) left center / calc(50% - 22px) 2px no-repeat,
        linear-gradient(to right, var(--fall-line), var(--fall-line)) right center / calc(50% - 22px) 2px no-repeat;
}

.sale-title {
    font-size: clamp(20px, 3vw, 32px);
    font-family: var(--font-family);
    font-weight: 600;
    color: var(--fall-brown);
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.hello-bar .sale-title {
    margin: 0;
    font-size: clamp(14px, 1vw, 20px);
    text-transform: none;
    letter-spacing: 0;
    color: var(--fall-brown);
    text-shadow: none;
}

.hello-bar .sale-title span {
    font-size: 1.5em;
    font-family: 'Barlow', sans-serif;
    color: var(--fall-rust);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-right: 4px;
}

/* ============ CTA button ============ */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fall-rust);
    color: #ffffff;
    font-family: 'Barlow', sans-serif;
    font-size: clamp(15px, 1.1vw, 20px);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 16px 36px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 36, 18, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    z-index: 4;
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-2px);
    background: var(--fall-rust-dark);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(74, 36, 18, 0.35);
}

/* Markup still ships an arrow <img>; campaign design hides it. */
.button-arrow {
    display: none;
}

/* ============ Countdown ============ */
.countdown {
    z-index: 2;
}

.countdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    text-align: center;
}

.countdown li {
    background: transparent;
    color: var(--fall-brown);
    padding: 0.5em;
    border-radius: 8px;
    min-width: 100px;
    margin: 0 5px;
    font-size: 0.6em;
    text-transform: uppercase;
    position: relative;
}

.countdown li span {
    display: block;
    font-size: 5em;
    font-weight: 800;
    color: var(--fall-brown);
    font-family: 'Barlow', sans-serif;
    line-height: 1;
}

.countdown li:not(:first-child)::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 50%;
    transform: translateY(-50%);
    width: 21px;
    height: 21px;
    background: url(https://www.marketbeat.com/images/all-access/aap-fall-leaf-gold.svg) center / contain no-repeat;
}

/* ============ Close button ============ */
/* z-index sits above the content wrapper (20), which holds the full-bar link. */
button[title="Close Ad"].clear-button {
    box-sizing: border-box;
    margin-left: 10px;
    font-weight: 600;
    color: var(--fall-brown);
    font-size: 20px;
    opacity: 0.7;
    text-align: right;
    display: inline-block;
    vertical-align: middle;
    line-height: .9;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;
    height: 40px;
    background: transparent;
    width: 40px;
    z-index: 30;
}

/* ============ AAP Landing Hello Bar overrides ============ */
#pnlHelloBarAAPromo .savings-hero {
    display: inline-flex;
    align-items: center;
    gap: 1em;
}

#pnlHelloBarAAPromo .savings-stack {
    display: inline-flex;
    flex-direction: column;
    text-align: center;
    line-height: 1;
}

/* The leaf-star row above the eyebrow is dropped; the leaf band already carries the theme. */
#pnlHelloBarAAPromo .savings-stars {
    display: none;
}

#pnlHelloBarAAPromo .savings-eyebrow {
    font-family: 'Barlow', sans-serif;
    color: var(--fall-brown);
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1;
}

#pnlHelloBarAAPromo .savings-headline {
    font-family: 'Barlow', sans-serif;
    color: var(--fall-brown);
    font-size: 2em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-top: 1px;
}

#pnlHelloBarAAPromo .price-callout {
    font-family: 'Barlow', sans-serif;
    color: var(--fall-rust);
    font-size: 3.8em;
    font-weight: 800;
    line-height: 1;
}

/* Drop the price below the savings stack when the row gets too tight. */
@media (max-width: 380px) {
    #pnlHelloBarAAPromo .savings-hero {
        flex-direction: column;
        gap: 0.2em;
    }
}

/* Vertical divider between text and countdown — only when the Hello Bar is in
   horizontal layout, otherwise the left border lands on a stacked element. */
@media (min-width: 992px) {
    #divContentWrapper #pnlCountdownAAPromo {
        border-left: 2px solid var(--fall-line);
        padding-left: 20px;
    }
}
@media (min-width: 768px) {
    .d-md-flex #pnlCountdownAAPromo {
        border-left: 2px solid var(--fall-line);
        padding-left: 20px;
    }
}

#pnlHelloBarAAPromo .countdown::before {
    content: 'OFFER ENDS IN';
    display: block;
    text-align: center;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--fall-brown);
    margin-bottom: 4px;
    text-transform: uppercase;
}

#pnlHelloBarAAPromo .countdown ul {
    gap: 22px;
}

#pnlHelloBarAAPromo .countdown li {
    border-radius: 0;
    font-size: 0.5em;
    min-width: 0;
    box-shadow: none;
    padding: 0;
    color: var(--fall-brown);
    font-weight: 700;
    letter-spacing: 0.1em;
}

#pnlHelloBarAAPromo .countdown li span {
    display: block;
    font-size: 3.5em;
    margin: 0;
    color: var(--fall-brown);
    font-weight: 800;
    line-height: 1;
    font-family: 'Barlow', sans-serif;
}

#pnlHelloBarAAPromo .countdown li:not(:first-child)::before {
    content: ':';
    background: none;
    color: var(--fall-brown);
    left: -18px;
    top: 35%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    line-height: 1;
    font-size: 2.4em;
    font-weight: 800;
}

/* ============ Responsive ============ */
@media (max-width: 992px) {
    .button-arrow {
        width: 30px;
        height: auto;
        margin-top: 5px;
    }
}

@media (max-width: 768px) {
    .bg-promo .sale-pretitle::after {
        width: 90%;
    }
}

@media (max-width: 575.9px) {
    .countdown ul {
        gap: 5px;
    }

    .countdown li {
        min-width: 85px;
        font-size: 0.8em;
    }

    .countdown li span {
        font-size: 1.5em;
    }

    #pnlHelloBarAAPromo .countdown li {
        font-size: 0.4em;
    }
}

@media (max-width: 340px) {
    .button-arrow {
        display: none;
    }
}
