/*
 * Big Lots brand overrides on top of the MorningSave platform CSS.
 *
 * Loads AFTER the morningsave.com platform stylesheet so these rules win
 * the specificity tie. Targets the real MS classnames present in our forked
 * index.html (see scripts/build-index.py output).
 *
 * Palette and type values verified from the pre-bankruptcy biglots.com CSS
 * (assets/raw/wayback/prebankruptcy-main.css) — see BRAND.md.
 *
 * Mockup-phase fonts: Jost (Futura PT near-match) + Inter (Azo Sans near-match).
 * Production: swap to Adobe Fonts kit serving real Futura PT + Azo Sans Web.
 */

/* ===== 1. Big Lots brand tokens =========================================
   Sourced from the actual Big Lots weekly-ad PDF (assets/raw/USE-5.14-
   Digital.pdf). See BRAND.md "Color Palette" for source provenance. */
:root {
    /* MorningSave platform variables — overwrite with Big Lots values */
    --background-color: #ffffff;
    --background-color-rgb: 255, 255, 255;
    --accent-color: #FF5A00;
    --accent-color-rgb: 255, 90, 0;
    --foreground-color: #2F3030;

    /* Big Lots core palette */
    --bl-dark: #2F3030;
    --bl-orange: #FF5A00;
    --bl-orange-deep: #E77504;
    --bl-orange-mid: #F78E1E;
    --bl-orange-light: #FFE7D6;
    --bl-yellow: #FFCC00;           /* THE sale-price/savings color */
    --bl-yellow-deep: #E5B400;      /* darker yellow for ribbon shadows */
    --bl-powder: #7CCBE3;           /* secondary section band */
    --bl-cream: #F4D9B8;            /* secondary section band */
    --bl-red: #C80016;              /* RARE ribbon accent only */
    --bl-blcc-blue: #006AB9;
    --bl-green: #0A8033;
    --bl-gray-bg: #F2F2F2;
    --bl-gray-bg-alt: #F0F0F0;
    --bl-gray-border: #D2D0D0;
    --bl-gray-text: #727272;
    --bl-white: #ffffff;

    /* Typography stacks — flyer-flavored. Four tiers:
       1. price — Modak (chunky orange prices with drop shadow)
       2. headline — Bangers (loud all-caps section/event headlines)
       3. title — Permanent Marker (hand-lettered product/offer titles)
       4. display — Bowlby One (kept for "THEIR PRICE" label + nav chrome)
       5. body — Inter (clean body, secondary text)
    */
    --bl-font-price:    'Modak', 'Bagel Fat One', 'Cooper Black', 'Bowlby One', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --bl-font-headline: 'Bangers', 'Bowlby One', 'Impact', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --bl-font-title:    'Permanent Marker', 'Bangers', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --bl-font-display:  'Bowlby One', 'Futura PT', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --bl-font-body:     'Inter', 'Azo Sans', 'azo-sans-web', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ===== 2. Base typography ================================================ */
html, body,
input, button, select, textarea {
    font-family: var(--bl-font-body);
    color: var(--bl-dark);
}

body { background: var(--bl-white); }

h1, h2, h3, h4, h5 {
    font-family: var(--bl-font-display);
    color: var(--bl-dark);
    font-weight: 700;
    letter-spacing: -0.005em;
}

/* ===== 3. Header (.dark#header) ========================================== */
header#header.dark {
    background: var(--bl-white) !important;
    border-bottom: none;
    color: var(--bl-dark);
}

header#header nav {
    background: var(--bl-white);
}

header#header .branding {
    display: flex;
    align-items: center;
    gap: 1em;
}

.bl-logo-image {
    height: 76px;
    width: auto;
    display: block;
    margin: 8px 0;
}

.bl-tagline {
    /* MS platform CSS sets .logo and .tagline both to position:absolute at
       fixed left offsets sized for MS's tiny logo. Logo stays absolute (the
       nav layout depends on it), so we push the tagline past where our 76px-
       tall Big Lots wordmark ends instead of using flex flow. */
    position: absolute !important;
    left: 140px !important;
    top: 24px !important;
    font-family: var(--bl-font-display);
    font-weight: 700;
    color: var(--bl-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.95em;
    padding-left: 1em;
    border-left: none;
    line-height: 1.1;
    width: auto !important;
    height: auto !important;
}
@media screen and (max-width: 900px) {
    .bl-tagline { display: none; }
}

/* MS hides the original SVG tagline via its own .tagline — kill it so ours stands alone */
header#header .branding > .tagline:not(.bl-tagline) { display: none !important; }

/* Top trending bar — Big Lots-flavored */
header#header .trending dt,
header#header .trending dd a {
    color: var(--bl-dark);
}
header#header .trending dd a:hover { color: var(--bl-orange); }

/* Sub-nav (bar below logo with Best Sellers / Closeouts / Weekly Ad / etc.) */
header#header .sub-nav {
    background: var(--bl-dark);
    color: var(--bl-white);
    margin-left: 0 !important;
    padding-left: 18px;
}
header#header .sub-nav ul {
    background: var(--bl-dark);
}
header#header .sub-nav a,
header#header .sub-nav li > a {
    color: var(--bl-white) !important;
    font-family: var(--bl-font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.95em;
}
header#header .sub-nav a:hover { color: var(--bl-orange) !important; }

/* Hamburger trigger — match the dark sub-nav band it sits in front of.
   Negative right margin + extra padding overlaps the inter-element gap that
   MS's nav layout leaves between flex children, so the two dark areas read
   as one continuous band. */
header#header a.menu {
    background: var(--bl-dark);
    color: var(--bl-white) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 43px;
    box-sizing: border-box;
    margin-right: -6px;
    padding-right: 6px;
}
header#header a.menu i.fa { color: var(--bl-white); }
header#header a.menu:hover { background: var(--bl-orange); }
header#header a.menu:hover i.fa { color: var(--bl-white); }

/* Search input — keep light, add orange focus */
header#header .search input[type="search"] {
    border-color: var(--bl-gray-border);
}
header#header .search input[type="search"]:focus {
    border-color: var(--bl-orange);
    outline-color: var(--bl-orange);
}

/* ===== 4. Promos strip (3 callouts under header) ========================= */
.promos { background: var(--bl-white); }
.promos ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1em;
    list-style: none;
    margin: 1.5em auto;
    padding: 0 1em;
    max-width: 1024px;
}
.promos li {
    background: var(--bl-white);
    border: none;
    border-radius: 0;
    padding: 1.25em;
    transition: box-shadow 120ms ease;
}
.promos li:hover {
    box-shadow: 0 4px 16px rgba(255, 90, 0, 0.18);
}
.promos li .container {
    display: block;
    text-decoration: none;
    color: var(--bl-dark);
}
.promos li i.fa {
    color: var(--bl-orange);
    font-size: 1.6em;
    margin-bottom: 0.4em;
}
.promos li h3 {
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    color: var(--bl-dark);
    margin: 0.3em 0;
    font-size: 1.15em;
    letter-spacing: 0.02em;
}
.promos li p {
    color: var(--bl-gray-text);
    font-size: 0.92em;
    line-height: 1.4;
    margin: 0;
}
@media screen and (max-width: 720px) {
    .promos ul { grid-template-columns: 1fr; }
}

/* ===== 5. Superhero (top banner + 6-offer grid) ========================== */
#superhero {
    background: var(--bl-white) !important;
    border: none !important;
    padding: 0 !important;
}
#superhero .banner img {
    border-radius: 4px;
    display: block;
    width: 100%;
    height: auto;
}
#superhero .offers {
    background: transparent;
}
#superhero .offer {
    background: var(--bl-white);
    border: none;
}
#superhero .offer h2 a,
#superhero .offer h2 {
    color: var(--bl-dark);
    font-family: var(--bl-font-body);
    font-weight: 600;
}

/* MS pricing "button": .button.buy-it.primary contains list-price + sale-price
   + discount. We strip the orange rectangle treatment so prices float on
   the product card's white background like the weekly-ad flyer (drop shadow
   does the visual work, no boxed CTA). The whole card link is the click
   target. */
.button.buy-it.primary,
a.button.buy-it.primary {
    background: transparent !important;
    color: var(--bl-dark) !important;
    border: none !important;
    padding: 8px 4px 0 !important;
    box-shadow: none !important;
    font-family: var(--bl-font-body);
    text-transform: none;
    letter-spacing: 0;
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6em;
    line-height: 1;
}
.button.buy-it.primary:hover,
a.button.buy-it.primary:hover {
    background: transparent !important;
    border: none !important;
}

/* "THEIR PRICE / $XXX" — flyer-style stacked label. Heavy chunky display
   type, all caps, slight forward italic. No strikethrough, no colon.
   !important throughout because MS platform CSS sets a light Futura PT
   weight on .list-price with higher specificity. */
.button.buy-it .list-price {
    color: #000 !important;
    text-decoration: none !important;
    font-weight: 400 !important;
    font-size: 20px !important;
    font-family: 'Bowlby One', var(--bl-font-display) !important;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 0.9 !important;
    order: 2;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    transform: skewX(-4deg);
}
.button.buy-it .list-price::before {
    content: "Their Price";
    font-size: 0.6em;
    line-height: 1;
    margin-bottom: 0.12em;
    letter-spacing: 0.02em;
}
/* Sale price floats on the white card: ORANGE with dark drop shadow,
   superscript $ and cents, slightly overlapping digits — matches the
   "$69⁹⁹ Pop-Up Gazebo" callout in the flyer. */
.button.buy-it .sale-price,
.button.buy-it .sale-price.formatted {
    color: var(--bl-orange) !important;
    font-family: var(--bl-font-price) !important;
    font-weight: 400 !important;
    font-size: 56px !important;
    /* 1px dark outline (4 nudges) + 3px offset drop shadow */
    text-shadow:
        -1px -1px 0 var(--bl-dark),
         1px -1px 0 var(--bl-dark),
        -1px  1px 0 var(--bl-dark),
         1px  1px 0 var(--bl-dark),
         3px  3px 0 var(--bl-dark) !important;
    letter-spacing: -0.09em !important;
    line-height: 0.85 !important;
    order: 1;
    display: inline-block !important;
    transform: skewX(-6deg);
    transform-origin: left bottom;
    padding-right: 0.3em;
}
.button.buy-it .sale-price .symbol,
.button.buy-it .sale-price .fraction {
    font-size: 0.5em;
    vertical-align: 0.85em;
    letter-spacing: 0;
}
.button.buy-it .sale-price .separator { display: none; }
.button.buy-it .sale-price .quantifier {
    font-size: 0.35em;
    vertical-align: 0.6em;
    color: var(--bl-dark);
    text-shadow: none;
}
.button.buy-it .discount {
    background: transparent;
    color: var(--bl-dark);
    font-family: var(--bl-font-body);
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0;
    padding: 0;
    font-size: 0.85em;
    text-shadow: none;
    order: 3;
    width: 100%;
}

a.see-all.button.primary {
    background: var(--bl-dark) !important;
    color: var(--bl-white) !important;
    border-color: var(--bl-dark) !important;
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}
a.see-all.button.primary:hover {
    background: var(--bl-orange) !important;
    border-color: var(--bl-orange) !important;
}

/* "X+ Sold" replacement — social-proof badge, not a sale callout, so it
   stays out of the Big Lots red (red is reserved for actual discount /
   clearance % off). Subtle dark text on light gray with an orange left
   stripe ties it back to the brand without competing with the CTAs. */
.bl-hot-buy {
    display: inline-block;
    background: var(--bl-gray-bg);
    color: var(--bl-dark);
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 0.74em;
    padding: 3px 10px;
    border-radius: 2px;
}

/* ===== 6. Section headings (best-sellers / new-arrivals / clearance) ===== */
.superlative-list > header {
    border-bottom: none;
    margin: 2em auto 1em;
    padding-bottom: 0.5em;
    max-width: 1024px;
}
.superlative-list > header h1,
.superlative-list > header h1 a {
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    color: var(--bl-dark);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
}
.superlative-list > header a.more {
    color: var(--bl-orange);
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.superlative-list > header a.more:hover { color: var(--bl-orange-deep); }

/* Product cards on the masonry/grid feeds */
.superlative-list .offer {
    background: var(--bl-white);
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: box-shadow 120ms ease;
}
.superlative-list .offer:hover {
    box-shadow: 0 4px 16px rgba(255, 90, 0, 0.15);
}
.superlative-list .offer h2 {
    font-family: var(--bl-font-body);
    color: var(--bl-dark);
    font-weight: 600;
}

/* Price block — flyer language. On WHITE product cards the prices are
   ORANGE with dark drop shadow (matches the flyer's gazebo callout). Yellow
   prices are reserved for orange-background contexts only. */
.superlative-list .offer h3 {
    --theme-accent-color: var(--bl-orange) !important;
    --theme-background-color: transparent !important;
    --theme-foreground-color: var(--bl-dark) !important;
    background: var(--bl-white);
    padding: 12px 14px 14px;
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 0.6em;
    flex-wrap: wrap;
    border-top: 2px solid var(--bl-gray-border);
}
.superlative-list .offer .list-price {
    color: #000 !important;
    text-decoration: none !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    font-family: 'Bowlby One', var(--bl-font-display) !important;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 0.9 !important;
    order: 2;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    transform: skewX(-4deg);
}
.superlative-list .offer .list-price::before {
    content: "Their Price";
    font-size: 0.6em;
    line-height: 1;
    margin-bottom: 0.12em;
    letter-spacing: 0.02em;
}
.superlative-list .offer .sale-price,
.superlative-list .offer .sale-price.formatted {
    color: var(--bl-orange) !important;
    font-family: var(--bl-font-price) !important;
    font-weight: 400 !important;
    font-size: 48px !important;
    /* 1px dark outline (4 nudges) + 3px offset drop shadow */
    text-shadow:
        -1px -1px 0 var(--bl-dark),
         1px -1px 0 var(--bl-dark),
        -1px  1px 0 var(--bl-dark),
         1px  1px 0 var(--bl-dark),
         3px  3px 0 var(--bl-dark) !important;
    letter-spacing: -0.09em !important;
    line-height: 0.85 !important;
    order: 1;
    display: inline-block !important;
    transform: skewX(-6deg);
    transform-origin: left bottom;
    padding-right: 0.3em;
}
.superlative-list .offer .sale-price .symbol,
.superlative-list .offer .sale-price .fraction {
    font-size: 0.5em;
    vertical-align: 0.85em;
    letter-spacing: 0;
}
.superlative-list .offer .sale-price .separator { display: none; }
.superlative-list .offer .sale-price .quantifier {
    font-size: 0.35em;
    vertical-align: 0.6em;
    text-shadow: 1px 1px 0 var(--bl-dark);
}
.superlative-list .offer .discount {
    background: transparent;
    color: var(--bl-dark);
    font-family: var(--bl-font-body);
    text-transform: lowercase;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0;
    font-size: 0.85em;
    order: 3;
    width: 100%;
    text-shadow: none;
}

/* ===== 7. Hamburger menu (overlay) ======================================= */
.hamburger-menu nav {
    background: var(--bl-white);
}
.hamburger-menu h1 {
    font-family: var(--bl-font-display);
    color: var(--bl-dark);
    text-transform: uppercase;
    border-bottom: none;
    padding-bottom: 0.3em;
}
.hamburger-menu a {
    color: var(--bl-dark);
}
.hamburger-menu a:hover { color: var(--bl-orange); }

/* ===== 8. Footer (#footer) =============================================== */
footer#footer {
    background: var(--bl-dark) !important;
    color: var(--bl-white);
}
footer#footer h1, footer#footer h2 {
    font-family: var(--bl-font-display);
    color: var(--bl-white);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
footer#footer h2 a { color: var(--bl-white); }
footer#footer a { color: var(--bl-white); opacity: 0.85; }
footer#footer a:hover { color: var(--bl-orange); opacity: 1; }

footer#footer .page-nav a {
    color: var(--bl-orange);
    font-family: var(--bl-font-display);
    text-transform: uppercase;
}

footer#footer .social ul {
    display: flex;
    gap: 0.5em;
    list-style: none;
    padding: 0;
}
footer#footer .social li a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--bl-orange);
    color: var(--bl-white) !important;
    border-radius: 50%;
    opacity: 1;
}
footer#footer .social li a:hover { background: var(--bl-orange-deep); }

footer#footer .powered-by {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1em;
    color: rgba(255,255,255,0.6);
    font-size: 0.85em;
}
footer#footer .powered-by a { color: var(--bl-orange); }

/* ===== 9. Generic primary buttons / links ================================ */
a {
    color: var(--bl-orange);
    text-decoration: none;
}
a:hover { color: var(--bl-orange-deep); }

.button.primary,
button.primary {
    background: var(--bl-orange);
    color: var(--bl-white);
    border-color: var(--bl-orange);
    font-family: var(--bl-font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.button.primary:hover,
button.primary:hover {
    background: var(--bl-orange-deep);
    border-color: var(--bl-orange-deep);
}

/* ===== 11. Channel clarity ============================================== */
/* User feedback: the homepage must make it obvious which deals are IN STORE
   at the customer's local Big Lots vs ONLINE ONLY (warehouse-shipped). The
   3 channel colors are reused across:
     - the store strip at the top of <body>
     - the promos legend
     - section banner stripes (.bl-channel-section)
     - the .bl-channel-pill badges on cards and section titles                */
:root {
    --bl-ch-instore: var(--bl-orange);      /* visit your store */
    --bl-ch-online:  var(--bl-blcc-blue);   /* ships from warehouse */
    --bl-ch-both:    var(--bl-green);       /* either way */
}

/* --- Store strip at top of <body> --- */
.bl-store-strip {
    background: var(--bl-dark);
    color: var(--bl-white);
    font-family: var(--bl-font-body);
    padding: 10px 16px;
    font-size: 0.92em;
    border-bottom: none;
}
.bl-store-strip-inner {
    display: flex;
    align-items: center;
    gap: 1em;
    max-width: 1024px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.bl-store-strip-icon {
    background: var(--bl-orange);
    color: var(--bl-white);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.bl-store-strip-text { flex: 1; line-height: 1.3; min-width: 0; }
.bl-store-strip-text strong {
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bl-orange);
}
.bl-store-strip-status {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
}
.bl-store-strip-cta {
    color: var(--bl-white) !important;
    border: 1px solid var(--bl-orange);
    padding: 6px 12px;
    border-radius: 3px;
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.04em;
    font-weight: 700;
    text-decoration: none;
    background: var(--bl-orange);
}
.bl-store-strip-cta.secondary {
    background: transparent;
    color: var(--bl-orange) !important;
    border-color: var(--bl-orange);
}
.bl-store-strip-cta:hover { background: var(--bl-orange-deep); border-color: var(--bl-orange-deep); color: var(--bl-white) !important; }
.bl-store-strip-counts {
    max-width: 1024px;
    margin: 8px auto 0;
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}
.bl-store-strip-counts .bl-channel-pill { margin: 0 4px; }

/* --- Channel pills (reusable badge) --- */
.bl-channel-pill {
    display: inline-block;
    font-family: var(--bl-font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72em;
    padding: 3px 10px;
    border-radius: 2px;
    color: var(--bl-white);
    background: var(--bl-dark);
    line-height: 1.4;
    vertical-align: middle;
}
/* Pill color matches the channel it represents */
.bl-channel-instore .bl-channel-pill,
.promos .bl-channel-instore .bl-channel-pill,
.bl-store-strip-counts .bl-channel-pill:nth-of-type(1) {
    background: var(--bl-ch-instore);
}
.bl-channel-online .bl-channel-pill,
.promos .bl-channel-online .bl-channel-pill,
.bl-store-strip-counts .bl-channel-pill:nth-of-type(2) {
    background: var(--bl-ch-online);
}
.bl-channel-both .bl-channel-pill,
.promos .bl-channel-both .bl-channel-pill {
    background: var(--bl-ch-both);
}

/* --- Promo strip: left card carries the In-Store channel pill (the only
   channel framing below the header); cards 2 and 3 are e-commerce value
   props (Free Shipping, Brand Names). All three keep a consistent visual
   treatment so the row reads as a unit. */
.promos li.promo-1 .bl-channel-pill {
    display: inline-block;
    margin-bottom: 0.5em;
}
.promos li.promo-1 i.fa { display: none; }

/* ===== 12. Big Lots event tiles ========================================= */
/* Replaces the MS TV-show event grid. Modeled on Big Lots' circular layout:
   one wide weekly-ad lead, two tall side-by-side category events. */
.bl-events {
    max-width: 1024px;
    margin: 1.5em auto;
    padding: 0 1em;
}
.bl-events-header {
    text-align: center;
    margin-bottom: 1em;
}
.bl-events-header h2 {
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    font-size: 1.5em;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    flex-wrap: wrap;
    justify-content: center;
}
.bl-events-header p {
    color: var(--bl-gray-text);
    max-width: 620px;
    margin: 0.4em auto 0;
}

.bl-events-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1em;
}
.bl-event {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    text-decoration: none;
    display: block;
    color: var(--bl-white);
    background: var(--bl-dark);
    aspect-ratio: 16 / 7;
    border-top: 4px solid var(--bl-dark);
    transition: transform 160ms ease, box-shadow 160ms ease;
}
.bl-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.bl-event.bl-event-wide {
    grid-column: 1 / 3;
    aspect-ratio: 32 / 9;
}
.bl-event.bl-event-tall {
    aspect-ratio: 4 / 3;
}
.bl-event img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bl-event-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 100%);
    padding: 1em 1.25em;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--bl-white);
}
.bl-event-overlay h3 {
    color: var(--bl-white);
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    font-size: 1.6em;
    margin: 0.2em 0 0.1em;
    letter-spacing: 0.01em;
    line-height: 1.05;
}
.bl-event-overlay p {
    color: rgba(255,255,255,0.92);
    font-size: 0.92em;
    margin: 0 0 0.5em;
    max-width: 32em;
}
.bl-event-overlay .bl-event-cta {
    color: var(--bl-orange);
    font-family: var(--bl-font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.92em;
}
.bl-event-overlay .bl-channel-pill {
    align-self: flex-start;
}

/* Channel-colored top border per event */
.bl-event.bl-channel-instore { border-top-color: var(--bl-ch-instore); }
.bl-event.bl-channel-online  { border-top-color: var(--bl-ch-online); }
.bl-event.bl-channel-both    { border-top-color: var(--bl-ch-both); }

@media screen and (max-width: 720px) {
    .bl-events-grid { grid-template-columns: 1fr; }
    .bl-event.bl-event-wide { grid-column: 1; aspect-ratio: 16 / 9; }
}

/* --- Big Lots category strip (echoes the 8-tile homepage on biglots.com) -- */
.bl-events-categories .bl-cat-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.6em;
    list-style: none;
    padding: 0;
    margin: 0;
}
.bl-events-categories .bl-cat-grid li {
    background: var(--bl-white);
    border: none;
    border-radius: 0;
    text-align: center;
}
.bl-events-categories .bl-cat-grid li:hover {
    background: var(--bl-orange-light);
}
.bl-events-categories .bl-cat-grid a {
    display: block;
    padding: 0.9em 0.4em;
    text-decoration: none;
    color: var(--bl-dark);
}
.bl-events-categories .bl-cat-grid a strong {
    display: block;
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9em;
    letter-spacing: 0.02em;
    color: var(--bl-dark);
}
.bl-events-categories .bl-cat-grid a span {
    display: block;
    font-size: 0.78em;
    color: var(--bl-gray-text);
    margin-top: 0.2em;
}
@media screen and (max-width: 900px) {
    .bl-events-categories .bl-cat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media screen and (max-width: 480px) {
    .bl-events-categories .bl-cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 13. Flyer-aesthetic primitives ===================================
   Sunbursts, ribbons, and outlined display headings to bring the weekly-ad
   visual language into the page. */

/* Outlined display headline — like the flyer's "GET IT WHILE IT'S HOT!" */
.bl-outline-display {
    font-family: var(--bl-font-display);
    color: var(--bl-yellow);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    -webkit-text-stroke: 2px var(--bl-dark);
    text-shadow: 3px 3px 0 var(--bl-dark);
    line-height: 1;
}
.bl-outline-display.on-orange {
    color: var(--bl-white);
    text-shadow: 3px 3px 0 var(--bl-dark);
}

/* Sunburst sticker — for "WE SAVE YOU $X!" and "CUSHIONS INCLUDED" callouts.
   Pure CSS via clip-path polygon (16-point burst). */
.bl-sunburst {
    --bl-sb-size: 96px;
    --bl-sb-bg: var(--bl-yellow);
    --bl-sb-fg: var(--bl-red);
    width: var(--bl-sb-size);
    height: var(--bl-sb-size);
    background: var(--bl-sb-bg);
    color: var(--bl-sb-fg);
    clip-path: polygon(
        50% 0%, 58% 12%, 71% 6%, 71% 21%, 86% 18%, 80% 32%, 94% 36%, 82% 47%,
        100% 50%, 82% 53%, 94% 64%, 80% 68%, 86% 82%, 71% 79%, 71% 94%, 58% 88%,
        50% 100%, 42% 88%, 29% 94%, 29% 79%, 14% 82%, 20% 68%, 6% 64%, 18% 53%,
        0% 50%, 18% 47%, 6% 36%, 20% 32%, 14% 18%, 29% 21%, 29% 6%, 42% 12%
    );
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    line-height: 0.95;
    padding: 18% 10%;
    box-sizing: border-box;
    font-size: calc(var(--bl-sb-size) / 7);
    rotate: -8deg;
    flex: 0 0 auto;
}
.bl-sunburst strong {
    display: block;
    font-size: 1.6em;
    line-height: 1;
}

/* Torn-edge ribbon — for "BIG DEAL!" / "DON'T MISS OUT" */
.bl-ribbon {
    display: inline-block;
    background: var(--bl-yellow);
    color: var(--bl-dark);
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 18px;
    rotate: -3deg;
    box-shadow: 3px 3px 0 var(--bl-dark);
    border: 2px solid var(--bl-dark);
    font-size: 0.95em;
    line-height: 1.1;
}
.bl-ribbon.red {
    background: var(--bl-red);
    color: var(--bl-white);
}

/* Alternating section bands — break up the orange-dominant page */
.bl-band-cream  { background: var(--bl-cream); }
.bl-band-powder { background: var(--bl-powder); }
.bl-band-orange { background: var(--bl-orange); color: var(--bl-white); }

/* === Headline tier (Bangers): section/event titles, flyer-style.
   1. White letter fattened by a same-color stroke (Bangers ships only one
      weight, so the stroke fakes a heavier weight).
   2. Tight dark outline immediately around the white.
   3. Yellow band around the dark outline.
   4. NO drop shadow — the flyer headlines sit flat.
   paint-order keeps the white stroke entirely outside the letter path so
   it adds weight without eating into the form. */
.superlative-list > header h1,
.superlative-list > header h1 a,
.bl-events-header h2,
.bl-event-overlay h3 {
    font-family: var(--bl-font-headline) !important;
    font-weight: 400 !important;
    letter-spacing: 0.04em !important;
    color: var(--bl-white) !important;
    /* Dark stroke does the inner outline cleanly (one solid ring instead
       of stacked text-shadows that pile up inside letterforms at small
       sizes). paint-order keeps the stroke outside the white fill. Set
       width and color as longhands — the shorthand was being dropped. */
    -webkit-text-stroke-width: 5px !important;
    -webkit-text-stroke-color: var(--bl-dark) !important;
    paint-order: stroke fill;
    text-shadow:
        /* yellow band, 8 dirs at 6-7 px past the dark stroke */
         6px  6px 0 var(--bl-yellow), -6px  6px 0 var(--bl-yellow),
         6px -6px 0 var(--bl-yellow), -6px -6px 0 var(--bl-yellow),
         7px  0   0 var(--bl-yellow), -7px  0   0 var(--bl-yellow),
         0    7px 0 var(--bl-yellow),  0   -7px 0 var(--bl-yellow) !important;
}
.superlative-list > header h1,
.bl-events-header h2 {
    font-size: 3.2em !important;
    line-height: 1 !important;
}

/* === Title tier (Permanent Marker): individual product/offer titles. === */
.superlative-list .offer h2,
.superlative-list .offer h2 a,
#superhero .offer h2,
#superhero .offer h2 a {
    font-family: var(--bl-font-title) !important;
    font-weight: 400 !important;
    color: var(--bl-dark) !important;
    letter-spacing: 0 !important;
    line-height: 1.15 !important;
    font-size: 1.05em !important;
    text-decoration: none !important;
}

/* Add a sunburst "WE SAVE YOU!" sticker on the first superhero product card
   to demonstrate the pattern. Real implementation would attach per-product
   based on savings amount. */
#superhero .offer:first-child { position: relative; }
#superhero .offer:first-child::after {
    content: "WE SAVE YOU $450";
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    width: 110px;
    height: 110px;
    background: var(--bl-yellow);
    color: var(--bl-red);
    clip-path: polygon(
        50% 0%, 58% 12%, 71% 6%, 71% 21%, 86% 18%, 80% 32%, 94% 36%, 82% 47%,
        100% 50%, 82% 53%, 94% 64%, 80% 68%, 86% 82%, 71% 79%, 71% 94%, 58% 88%,
        50% 100%, 42% 88%, 29% 94%, 29% 79%, 14% 82%, 20% 68%, 6% 64%, 18% 53%,
        0% 50%, 18% 47%, 6% 36%, 20% 32%, 14% 18%, 29% 21%, 29% 6%, 42% 12%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--bl-font-display);
    text-transform: uppercase;
    font-size: 13px;
    line-height: 1;
    padding: 22px;
    box-sizing: border-box;
    rotate: -10deg;
    text-shadow: none;
    pointer-events: none;
}

/* ===== 10. Deal-page (product detail) overrides ========================== */
/* Selectors here are best-effort against an MS deal page — refined once we
   fork an actual /deals/<slug>.html from morningsave.com. */
.deal-page .product-title,
.deal-page h1.title {
    font-family: var(--bl-font-display);
    color: var(--bl-dark);
    text-transform: none;
}
.deal-page .price,
.deal-page .sale-price {
    color: var(--bl-orange);
    font-family: var(--bl-font-display);
    font-weight: 800;
}
