/* ==========================================================================
   DiscountRoof — homepage4 (header, page, footer, coupon modal)

   Everything is scoped under .h4 and written as `.h4 .h4-thing` on purpose.
   The legacy theme (style.css + Bootstrap) sets body{text-align:center},
   section{padding:40px 0}, a:focus{color:#333} and global button/h2/label
   styles; the extra specificity keeps those from leaking into this design.
   ========================================================================== */

.h4 {
    --h4-ink: #16181d;
    --h4-ink2: #4a5160;
    --h4-mute: #6b7382;
    --h4-line: #dde3ea;
    /* Cool mist base — depth comes from washes + grain, not flat fill */
    --h4-paper: #f2f5f8;
    --h4-red: #d0312d;
    --h4-red-d: #a8231f;
    --h4-red-t: #fceceb;
    --h4-sun: #ffd23f;
    --h4-sun-t: #fff5cf;
    --h4-green: #0b6b49;
    --h4-display: "Gabarito", "Trebuchet MS", system-ui, sans-serif;
    --h4-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --h4-shadow: 0 1px 2px rgba(29, 28, 33, .05), 0 12px 32px rgba(29, 28, 33, .08);
    /* Simple dots only — avoid nested url() inside data-URIs (breaks some CSS parsers). */
    --h4-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Ccircle cx='1.5' cy='1.5' r='1.1' fill='%2316181d' fill-opacity='.06'/%3E%3C/svg%3E");
    --h4-wash-hero:
        radial-gradient(ellipse 85% 70% at 8% 12%, rgba(208, 49, 45, .13), transparent 58%),
        radial-gradient(ellipse 70% 60% at 92% 6%, rgba(255, 210, 63, .34), transparent 52%),
        radial-gradient(ellipse 55% 45% at 78% 88%, rgba(11, 107, 73, .09), transparent 55%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(70, 110, 180, .07), transparent 60%),
        linear-gradient(168deg, #e8eef6 0%, #f2f5f8 42%, #eef1f6 100%);
    --h4-wash-paper:
        radial-gradient(ellipse 70% 55% at 100% 0%, rgba(255, 210, 63, .16), transparent 55%),
        radial-gradient(ellipse 55% 50% at 0% 100%, rgba(208, 49, 45, .06), transparent 55%),
        linear-gradient(180deg, #f0f3f7 0%, #f2f5f8 50%, #eef2f6 100%);

    font-family: var(--h4-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--h4-ink);
    text-align: left;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Reset (beats the legacy theme inside .h4) ---------- */
.h4 *, .h4 *::before, .h4 *::after { box-sizing: border-box; }
.h4 section { padding: 0; }
.h4 h1, .h4 h2, .h4 h3, .h4 p, .h4 ul, .h4 ol, .h4 dl, .h4 dd, .h4 dt { margin: 0; padding: 0; }
.h4 h1, .h4 h2, .h4 h3 { color: inherit; font-family: var(--h4-display); }
.h4 ul, .h4 ol { list-style: none; }
.h4 a { color: inherit; text-decoration: none; }
.h4 img { display: block; max-width: 100%; }
.h4 label { margin: 0; font-weight: inherit; }
.h4 button {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: normal;
    cursor: pointer;
    transition: none;
}
.h4 input { margin: 0; font-family: inherit; }
.h4 [hidden], .h4[hidden] { display: none !important; }
.h4 :focus-visible { outline: 3px solid var(--h4-ink); outline-offset: 2px; }
.h4 .h4-icon { display: block; flex: none; }

.h4 .h4-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.h4 .h4-wrap {
    width: min(1200px, 100% - 40px);
    margin-inline: auto;
}

html.h4-lock { overflow: hidden; }

/* ---------- Shared pieces ---------- */
.h4 h2 {
    font-weight: 700;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1.1;
    letter-spacing: -.01em;
}

.h4 .h4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font: 600 .95rem/1 var(--h4-body);
    white-space: nowrap;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.h4 .h4-btn--red { background: var(--h4-red); color: #fff; }
.h4 .h4-btn--red:hover { background: var(--h4-red-d); }
.h4 .h4-btn--ink { background: var(--h4-ink); color: #fff; }
.h4 .h4-btn--ink:hover { background: #000; }
.h4 .h4-btn--ghost { background: #fff; color: var(--h4-ink); box-shadow: inset 0 0 0 1.5px var(--h4-line); }
.h4 .h4-btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--h4-ink); }
.h4 .h4-btn--sm { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.h4 .h4-btn:disabled { opacity: .6; cursor: default; }

.h4 .h4-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: .95rem;
    color: var(--h4-ink);
    white-space: nowrap;
}
.h4 .h4-more .h4-icon { transition: transform .15s ease; }
.h4 .h4-more:hover { color: var(--h4-red); }
.h4 .h4-more:hover .h4-icon { transform: translateX(3px); }

.h4 .h4-logo {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border: 1px solid var(--h4-line);
    border-radius: 12px;
    background: #fff;
    font: 700 .85rem/1 var(--h4-display);
    color: var(--h4-ink);
}
.h4 .h4-logo img { width: 100%; height: 100%; padding: 5px; object-fit: contain; }
.h4 .h4-logo--lg { width: 64px; height: 64px; border-radius: 16px; font-size: 1.1rem; }
.h4 .h4-logo--sm { width: 40px; height: 40px; border-radius: 10px; font-size: .75rem; }
.h4 .h4-tint-0 { background: #fde6e4; border-color: transparent; }
.h4 .h4-tint-1 { background: #fff0bd; border-color: transparent; }
.h4 .h4-tint-2 { background: #dff1e8; border-color: transparent; }
.h4 .h4-tint-3 { background: #e4eafb; border-color: transparent; }
.h4 .h4-tint-4 { background: #f0e6fa; border-color: transparent; }

.h4 .h4-value {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 8px;
    background: var(--h4-sun);
    font: 700 .9rem/1.3 var(--h4-display);
    white-space: nowrap;
}

/* ---------- Disclosure strip ---------- */
.h4-note {
    border-bottom: 1px solid var(--h4-line);
    background:
        linear-gradient(90deg, rgba(208, 49, 45, .06), transparent 40%),
        var(--h4-paper);
    font-size: .8125rem;
    color: var(--h4-ink2);
}
.h4 .h4-note__in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 38px;
    padding-block: 7px;
}
.h4.h4-note p strong { margin-right: 6px; color: var(--h4-ink); }
.h4.h4-note p a {
    margin-left: 4px;
    color: var(--h4-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.h4 .h4-note__links { display: flex; flex: none; align-items: center; gap: 18px; }
.h4 .h4-note__links a:hover { color: var(--h4-ink); text-decoration: underline; }
.h4 .h4-note__uk { display: flex; align-items: center; gap: 6px; }
.h4 .h4-note__uk img { width: 20px; height: 13px; border-radius: 2px; }

/* ---------- Sticky bar ---------- */
.h4-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--h4-line);
    background: #fff;
}
.h4 .h4-bar__in {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    height: 76px;
}
.h4 .h4-bar__logo img { width: auto; height: 34px; }
.h4 .h4-bar__menu { display: none; }

.h4 .h4-search {
    position: relative;
    display: flex;
    align-items: center;
    justify-self: center;
    width: 100%;
    max-width: 640px;
    height: 50px;
    padding: 0 6px 0 16px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    background: var(--h4-paper);
    transition: border-color .15s ease, background-color .15s ease;
}
.h4 .h4-search:focus-within { border-color: var(--h4-ink); background: #fff; }
.h4 .h4-search__icon { display: flex; margin-right: 10px; color: var(--h4-mute); }
.h4 .h4-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: 500 1rem/1.2 var(--h4-body);
    color: var(--h4-ink);
}
.h4 .h4-search input::placeholder { color: var(--h4-mute); opacity: 1; }
.h4 .h4-search__go {
    height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--h4-ink);
    color: #fff;
    font: 600 .9rem/1 var(--h4-body);
    transition: background-color .15s ease;
}
.h4 .h4-search__go:hover { background: var(--h4-red); }

.h4 .h4-search__results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 5;
    max-height: 70vh;
    padding: 8px;
    overflow-y: auto;
    border: 1px solid var(--h4-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--h4-shadow);
}
.h4 .h4-result { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.h4 .h4-result:hover, .h4 .h4-result:focus-visible { background: var(--h4-paper); }
.h4 .h4-result__text { display: flex; flex-direction: column; min-width: 0; }
.h4 .h4-result__text strong { font-weight: 600; font-size: .95rem; }
.h4 .h4-result__text small { font-size: .8125rem; color: var(--h4-mute); }
.h4 .h4-result__all {
    display: block;
    margin-top: 4px;
    padding: 12px 8px 6px;
    border-top: 1px solid var(--h4-line);
    font-weight: 600;
    font-size: .9rem;
    color: var(--h4-red);
}
.h4 .h4-search__msg { padding: 12px 8px; font-size: .9rem; color: var(--h4-ink2); }

.h4 .h4-bar__nav { display: flex; align-items: center; gap: 24px; font-weight: 600; font-size: .95rem; }
.h4 .h4-bar__nav a { color: var(--h4-ink); transition: color .15s ease; }
.h4 .h4-bar__nav a:hover { color: var(--h4-red); }
.h4 .h4-bar__nav a.h4-bar__event {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--h4-sun);
    color: var(--h4-ink);
    transition: background-color .15s ease;
}
.h4 .h4-bar__nav a.h4-bar__event:hover { background: #ffc300; color: var(--h4-ink); }

/* ---------- Category strip ---------- */
.h4.h4-cats { margin: 0; border-bottom: 1px solid var(--h4-line); background: #fff; }
.h4 .h4-cats__in { display: flex; align-items: center; justify-content: space-between; gap: 28px; height: 46px; }
.h4.h4-cats ul {
    display: flex;
    gap: 26px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding-right: 28px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}
.h4.h4-cats ul::-webkit-scrollbar { display: none; }
.h4.h4-cats ul a { font-weight: 500; font-size: .9rem; color: var(--h4-ink2); }
.h4.h4-cats ul a:hover { color: var(--h4-ink); text-decoration: underline; text-underline-offset: 4px; }
.h4 .h4-cats__all {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--h4-ink);
}
.h4 .h4-cats__all:hover { color: var(--h4-red); }

/* ---------- Mobile drawer ---------- */
.h4-drawer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    justify-content: flex-end;
    background: rgba(29, 28, 33, .5);
}
.h4 .h4-drawer__panel {
    width: min(88vw, 360px);
    height: 100%;
    padding: 16px 22px 32px;
    overflow-y: auto;
    background: #fff;
}
.h4 .h4-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.h4 .h4-drawer__head strong { font: 700 1.25rem/1 var(--h4-display); }
.h4 .h4-drawer__head button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--h4-paper);
}
.h4 .h4-drawer__main a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--h4-line);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--h4-ink);
}
.h4 .h4-drawer__label {
    margin: 24px 0 6px;
    font-weight: 700;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--h4-mute);
}
.h4 .h4-drawer__cats a { display: block; padding: 10px 0; color: var(--h4-ink2); }
.h4 .h4-drawer__foot { display: flex; gap: 20px; margin-top: 22px; font-size: .9rem; color: var(--h4-ink2); }

/* ---------- Hero ---------- */
.h4-main {
    background:
        linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}
.h4 .h4-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 56px 0 44px;
    background: var(--h4-wash-hero);
}
.h4 .h4-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: var(--h4-dots);
    background-size: 18px 18px;
    opacity: .55;
}
.h4 .h4-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .85));
}
.h4 .h4-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: 64px;
}
.h4 .h4-eyebrow {
    margin-bottom: 14px;
    font-weight: 700;
    font-size: .8125rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--h4-red);
}
.h4 h1 {
    max-width: 16ch;
    font-weight: 800;
    font-size: clamp(2.2rem, 4.4vw, 3.5rem);
    line-height: 1.03;
    letter-spacing: -.02em;
}
.h4 .h4-hero__lede { max-width: 46ch; margin-top: 18px; font-size: 1.125rem; color: var(--h4-ink2); }

.h4 .h4-stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 28px; }
.h4 .h4-stats dt { font: 800 1.9rem/1 var(--h4-display); letter-spacing: -.01em; }
.h4 .h4-stats dd { margin-top: 6px; font-size: .875rem; color: var(--h4-ink2); }
.h4 .h4-hero__fresh { margin-top: 16px; font-size: .875rem; color: var(--h4-ink2); }

.h4 .h4-hero__popular { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 12px; margin-top: 28px; }
.h4 .h4-hero__popular > span {
    font-weight: 700;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--h4-mute);
}
.h4 .h4-hero__popular ul { display: flex; flex-wrap: wrap; gap: 8px; }
.h4 .h4-hero__popular a {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid var(--h4-line);
    border-radius: 999px;
    background: #fff;
    font-weight: 600;
    font-size: .875rem;
    color: var(--h4-ink);
    transition: border-color .15s ease;
}
.h4 .h4-hero__popular a:hover { border-color: var(--h4-ink); }

.h4 .h4-board {
    margin-right: 12px;
    padding: 22px 22px 6px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 12px 12px 0 var(--h4-sun);
}
.h4 .h4-board__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.h4 .h4-board__head h2 { font-size: 1.3rem; letter-spacing: 0; }
.h4 .h4-board__head a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: .875rem;
    color: var(--h4-ink2);
}
.h4 .h4-board__head a:hover { color: var(--h4-red); }
.h4 .h4-board__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--h4-line);
}
.h4 .h4-board__text a { font-weight: 700; font-size: .95rem; color: var(--h4-ink); }
.h4 .h4-board__text a:hover { color: var(--h4-red); }
.h4 .h4-board__text p {
    display: -webkit-box;
    margin-top: 2px;
    overflow: hidden;
    font-size: .875rem;
    line-height: 1.4;
    color: var(--h4-ink2);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.h4 .h4-board__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.h4 .h4-event {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin-top: 48px;
    padding: 16px 22px;
    border-radius: 16px;
    background: var(--h4-ink);
    color: #fff;
}
.h4 .h4-event__when {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--h4-sun);
    font: 700 .85rem/1.2 var(--h4-display);
    color: var(--h4-ink);
    white-space: nowrap;
}
.h4 .h4-event__text { font-size: .95rem; color: rgba(255, 255, 255, .8); }
.h4 .h4-event__text strong { color: #fff; }
.h4 .h4-event__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--h4-sun);
    white-space: nowrap;
}
.h4 .h4-event__cta .h4-icon { transition: transform .15s ease; }
.h4 .h4-event:hover .h4-event__cta .h4-icon { transform: translateX(4px); }
.h4 .h4-event:focus-visible { outline-color: var(--h4-red); }

/* ---------- Sections ---------- */
.h4 .h4-sec { padding: 64px 0; }
.h4 .h4-sec--paper {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--h4-wash-paper);
}
.h4 .h4-sec--paper::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: var(--h4-dots);
    background-size: 18px 18px;
    opacity: .4;
}
.h4 .h4-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.h4 .h4-head p { margin-top: 6px; font-size: .95rem; color: var(--h4-ink2); }

/* ---------- Popular stores ---------- */
.h4 .h4-stores { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.h4 .h4-store {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    height: 100%;
    padding: 20px 12px 16px;
    border: 1px solid var(--h4-line);
    border-radius: 16px;
    background: #fff;
    text-align: center;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.h4 .h4-store:hover { border-color: var(--h4-ink); box-shadow: var(--h4-shadow); }
.h4 .h4-store strong { margin-top: 10px; font-weight: 600; font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; }
.h4 .h4-store small { font-size: .8125rem; color: var(--h4-mute); }

/* ---------- Offers ---------- */
.h4 .h4-tabs {
    display: inline-flex;
    flex: none;
    padding: 4px;
    border: 1px solid var(--h4-line);
    border-radius: 999px;
    background: #fff;
}
.h4 .h4-tabs button {
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    font: 600 .9rem/1 var(--h4-body);
    color: var(--h4-ink2);
}
.h4 .h4-tabs button:hover { color: var(--h4-ink); }
.h4 .h4-tabs button.is-active { background: var(--h4-ink); color: #fff; }

.h4 .h4-offers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.h4 .h4-offer {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid var(--h4-line);
    border-radius: 16px;
    background: #fff;
    transition: box-shadow .15s ease;
}
.h4 .h4-offer:hover { box-shadow: var(--h4-shadow); }
.h4 .h4-offer__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.h4 .h4-offer__store { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--h4-ink); }
.h4 .h4-offer__name { display: flex; flex-direction: column; min-width: 0; }
.h4 .h4-offer__name strong,
.h4 .h4-offer__name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h4 .h4-offer__name strong { font-weight: 600; font-size: .9rem; }
.h4 .h4-offer__name small { font-size: .78rem; color: var(--h4-mute); }
.h4 .h4-offer__store:hover strong { color: var(--h4-red); }

.h4 .h4-badge {
    flex: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: .68rem;
    line-height: 1.2;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.h4 .h4-badge--code { background: var(--h4-red-t); color: var(--h4-red-d); }
.h4 .h4-badge--deal { background: #eeebe6; color: var(--h4-ink2); }

.h4 .h4-offer__value {
    display: flex;
    align-items: baseline;
    min-height: 2.5rem;
    margin-top: 16px;
    font: 800 2.25rem/1 var(--h4-display);
    letter-spacing: -.02em;
}
.h4 .h4-offer__value span { margin-left: 6px; font-weight: 600; font-size: 1rem; letter-spacing: 0; color: var(--h4-ink2); }
.h4 .h4-offer__value--md { align-items: flex-end; font-size: 1.45rem; letter-spacing: -.01em; }
.h4 .h4-offer__title {
    display: -webkit-box;
    margin: 10px 0 16px;
    overflow: hidden;
    font: 500 .95rem/1.4 var(--h4-body);
    color: var(--h4-ink2);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.h4 .h4-offer .h4-btn { width: 100%; margin-top: auto; }

.h4 .h4-offers__empty { padding: 28px 0 4px; text-align: center; color: var(--h4-ink2); }
.h4 .h4-offers__more { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; margin-top: 30px; }

/* ---------- Categories ---------- */
.h4 .h4-catgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.h4 .h4-cat {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 16px;
    border-radius: 14px;
    background: var(--h4-paper);
    color: var(--h4-ink);
    transition: background-color .15s ease;
}
.h4 .h4-cat:hover { background: var(--h4-sun-t); }
.h4 .h4-cat__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    color: var(--h4-red);
}
.h4 .h4-cat__text { display: flex; flex-direction: column; min-width: 0; }
.h4 .h4-cat__text strong { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.h4 .h4-cat__text small { margin-top: 2px; font-size: .8125rem; color: var(--h4-mute); }

/* ---------- How it works ---------- */
.h4 .h4-how { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 56px; }
.h4 .h4-how ol { display: grid; gap: 24px; margin-top: 28px; }
.h4 .h4-how li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
.h4 .h4-how__n {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--h4-sun);
    font: 800 1.1rem/1 var(--h4-display);
}
.h4 .h4-how h3 { font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.h4 .h4-how li p { max-width: 58ch; margin-top: 4px; color: var(--h4-ink2); }

.h4 .h4-fund { padding: 26px; border: 1px solid var(--h4-line); border-radius: 20px; background: #fff; }
.h4 .h4-fund__icon { display: inline-flex; color: var(--h4-red); }
.h4 .h4-fund h2 { margin: 10px 0; font-size: 1.35rem; letter-spacing: 0; }
.h4 .h4-fund p { color: var(--h4-ink2); }
.h4 .h4-fund p + p { margin-top: 12px; }
.h4 .h4-fund p a {
    color: var(--h4-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--h4-red);
    text-underline-offset: 3px;
}

/* ---------- Popular searches ---------- */
.h4 .h4-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.h4 .h4-cloud a {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid var(--h4-line);
    border-radius: 999px;
    font-weight: 500;
    font-size: .9rem;
    color: var(--h4-ink);
    transition: border-color .15s ease, background-color .15s ease;
}
.h4 .h4-cloud a:hover { border-color: var(--h4-ink); background: var(--h4-paper); }

/* ---------- Guides ---------- */
.h4 .h4-guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.h4 .h4-guide {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--h4-line);
    border-radius: 16px;
    background: #fff;
    color: var(--h4-ink);
    transition: box-shadow .15s ease;
}
.h4 .h4-guide:hover { box-shadow: var(--h4-shadow); }
.h4 .h4-guide__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #ebe8e2; }
.h4 .h4-guide__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.h4 .h4-guide:hover .h4-guide__media img { transform: scale(1.03); }
.h4 .h4-guide__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.h4 .h4-guide__body strong { font: 700 1.1rem/1.25 var(--h4-display); }
.h4 .h4-guide__body time { font-size: .8125rem; color: var(--h4-mute); }

/* ---------- About + FAQ ---------- */
.h4 .h4-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: 64px; }
.h4 .h4-about__copy p { margin-top: 14px; color: var(--h4-ink2); }
.h4 .h4-about__copy p a:not(.h4-more) {
    color: var(--h4-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--h4-red);
    text-underline-offset: 3px;
}
.h4 .h4-faq h2 { margin-bottom: 8px; }
.h4 .h4-faq details { border-bottom: 1px solid var(--h4-line); }
.h4 .h4-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    font-weight: 600;
    font-size: 1.02rem;
    list-style: none;
    cursor: pointer;
}
.h4 .h4-faq summary::-webkit-details-marker { display: none; }
.h4 .h4-faq summary:hover { color: var(--h4-red); }
.h4 .h4-faq summary .h4-icon { transition: transform .2s ease; }
.h4 .h4-faq details[open] summary .h4-icon { transform: rotate(180deg); }
.h4 .h4-faq details p { max-width: 62ch; padding-bottom: 18px; color: var(--h4-ink2); }

/* ---------- Newsletter ---------- */
.h4-news {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 44px 0;
    background:
        radial-gradient(ellipse 60% 80% at 0% 50%, rgba(255, 255, 255, .35), transparent 55%),
        radial-gradient(ellipse 50% 70% at 100% 30%, rgba(208, 49, 45, .12), transparent 50%),
        linear-gradient(115deg, #ffe27a 0%, var(--h4-sun) 45%, #ffc84a 100%);
}
.h4-news::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: var(--h4-dots);
    background-size: 16px 16px;
    opacity: .35;
}
.h4 .h4-news__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; }
.h4 .h4-news__copy h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.h4 .h4-news__copy p { margin-top: 6px; color: var(--h4-ink); }
.h4 .h4-news__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.h4 .h4-news__form input {
    width: 100%;
    height: 50px;
    padding: 0 20px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    outline: 0;
    background: #fff;
    font: 500 1rem/1.2 var(--h4-body);
    color: var(--h4-ink);
}
.h4 .h4-news__form input::placeholder { color: var(--h4-mute); opacity: 1; }
.h4 .h4-news__form input:focus { border-color: var(--h4-ink); }
.h4 .h4-news__form .h4-btn { min-height: 50px; padding: 0 26px; }
.h4 .h4-news__msg { grid-column: 1 / -1; min-height: 1.3em; font-weight: 600; font-size: .875rem; }
.h4 .h4-news__msg.is-error { color: #8a1815; }
.h4 .h4-news__msg.is-ok { color: #0a5238; }

/* ---------- Footer ---------- */
.h4-foot { padding-top: 56px; border-top: 1px solid var(--h4-line); background: #fff; font-size: .9rem; }
.h4 .h4-foot__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); gap: 36px; }
.h4 .h4-foot__brand img { width: auto; height: 30px; }
.h4 .h4-foot__brand p { max-width: 38ch; margin-top: 14px; color: var(--h4-ink2); }
.h4 .h4-foot__brand .h4-foot__disclosure { font-size: .8125rem; }
.h4 .h4-foot__tp { margin-top: 18px; }

/* Trustpilot invite — logo + “Review us” only (never invent a score). */
.h4 .h4-tp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--h4-line);
    border-radius: 10px;
    background: #fff;
    color: var(--h4-ink);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.h4 .h4-tp:hover {
    border-color: #00b67a;
    box-shadow: 0 1px 0 rgba(0, 182, 122, .12);
    text-decoration: none;
}
.h4 .h4-tp:focus-visible { outline: 2px solid #00b67a; outline-offset: 2px; }
.h4 .h4-tp__mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #00b67a;
    color: #fff;
    flex-shrink: 0;
}
.h4 .h4-tp__copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
}
.h4 .h4-tp__label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--h4-mute);
}
.h4 .h4-tp__brand {
    font-size: .95rem;
    font-weight: 800;
    color: var(--h4-ink);
}
.h4 .h4-tp--compact { padding: 8px 12px; gap: 8px; }
.h4 .h4-tp--compact .h4-tp__mark { width: 30px; height: 30px; }
.h4 .h4-tp--compact .h4-tp__mark svg { width: 18px; height: 18px; }
.h4 .h4-foot__disclosure strong { color: var(--h4-ink); }
.h4 .h4-foot__col h3 { margin-bottom: 12px; font-weight: 700; font-size: 1rem; }
.h4 .h4-foot__col li + li { margin-top: 9px; }
.h4 .h4-foot__col a { color: var(--h4-ink2); }
.h4 .h4-foot__col a:hover { color: var(--h4-ink); text-decoration: underline; text-underline-offset: 3px; }

.h4 .h4-foot__az {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 44px;
    padding: 20px 0;
    border-top: 1px solid var(--h4-line);
}
.h4 .h4-foot__az h3 { flex: none; font-weight: 700; font-size: 1rem; }
.h4 .h4-foot__az ul { display: flex; flex-wrap: wrap; gap: 4px; }
.h4 .h4-foot__az a {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--h4-ink2);
    transition: background-color .15s ease, color .15s ease;
}
.h4 .h4-foot__az a:hover { background: var(--h4-ink); color: #fff; }

.h4 .h4-foot__base { background: var(--h4-ink); font-size: .8125rem; color: rgba(255, 255, 255, .72); }
.h4 .h4-foot__base-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 16px; }
.h4 .h4-foot__base a { color: #fff; }
.h4 .h4-foot__base a:hover { text-decoration: underline; text-underline-offset: 3px; }
.h4 .h4-foot__base :focus-visible { outline-color: var(--h4-sun); }
.h4 .h4-foot__social { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- Coupon modal (ids/classes are shared with the site-wide modal script) ---------- */
.h4-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    background: rgba(29, 28, 33, .62);
}
.h4 .h4-modal__card {
    position: relative;
    width: min(100%, 440px);
    margin: auto;
    padding: 30px 26px 22px;
    border-radius: 22px;
    background: #fff;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
}
.h4 .h4-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--h4-paper);
}
.h4 .h4-modal__close:hover { background: var(--h4-line); }
.h4 .h4-modal__logo {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 14px;
    overflow: hidden;
    border: 1px solid var(--h4-line);
    border-radius: 18px;
    background: #fff;
}
.h4 .h4-modal__logo img { max-width: 100%; max-height: 100%; padding: 8px; object-fit: contain; }
.h4 .h4-modal__logo .brand_info_text { padding: 6px; font: 800 .85rem/1.1 var(--h4-display); overflow-wrap: anywhere; }
.h4 .h4-modal__title { font-weight: 600; font-size: 1.05rem; line-height: 1.35; }
.h4.h4-modal i.material-icons-sharp { display: none; }

.h4 .h4-modal__box {
    margin-top: 18px;
    padding: 14px;
    border: 1.5px dashed #dcae00;
    border-radius: 16px;
    background: var(--h4-sun-t);
}
.h4 .h4-modal__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: .68rem;
    letter-spacing: .08em;
    color: var(--h4-ink2);
}
.h4 .h4-modal__meta .code-verified { color: var(--h4-green); }
.h4 .h4-modal__code { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.h4 .h4-modal__code .code-value-wrapper {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 12px;
    background: #fff;
}
.h4 .h4-modal__code #coupon__input {
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: 700 1.1rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: .06em;
    text-align: center;
    color: var(--h4-ink);
}
/* The shared script recolours this button inline after a copy; keep it on-brand. */
.h4 .h4-modal__code .copy-code-btn {
    min-width: 92px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--h4-ink) !important;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .04em;
}
.h4 .h4-modal__code .smart-robot-copy {
    padding: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font: inherit;
}
.h4.h4-modal .go-store-btn {
    width: 100%;
    min-height: 52px;
    margin-top: 14px;
    border-radius: 999px;
    background: var(--h4-red);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color .15s ease;
}
.h4.h4-modal .go-store-btn:hover { background: var(--h4-red-d); }
.h4.h4-modal .go-store-btn:disabled,
.h4.h4-modal .go-store-btn.is-expired { background: #b8b5ae; cursor: not-allowed; }
.h4.h4-modal .savings-hint { margin-top: 10px; font-size: .8125rem; color: var(--h4-ink2); }
.h4.h4-modal .savings-hint span { font-weight: 700; color: var(--h4-green); }
.h4 .h4-modal__expiry { margin-top: 8px; font-size: .8125rem; color: var(--h4-ink2); }
.h4 .h4-modal__ad {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--h4-line);
    font-size: .75rem;
    color: var(--h4-mute);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .h4 .h4-offers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .h4 .h4-stores { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .h4 .h4-catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .h4 .h4-hero__grid { gap: 40px; }
    .h4 .h4-bar__in { gap: 20px; }
    .h4 .h4-bar__nav { gap: 18px; }
    .h4 .h4-foot__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .h4 .h4-foot__brand { grid-column: 1 / -1; }
    .h4 .h4-foot__brand p { max-width: 70ch; }
}

@media (max-width: 900px) {
    /* Header: logo row scrolls away, the search row stays pinned. */
    .h4-bar { top: -56px; }
    .h4 .h4-bar__in {
        grid-template-columns: minmax(0, 1fr) auto 46px;
        grid-template-rows: 56px auto;
        grid-template-areas: "logo nav nav" "search search menu";
        gap: 0 10px;
        height: auto;
    }
    .h4 .h4-bar__logo { grid-area: logo; }
    .h4 .h4-bar__logo img { height: 28px; }
    .h4 .h4-bar__nav { grid-area: nav; gap: 14px; font-size: .9rem; }
    .h4 .h4-bar__nav a:not(.h4-bar__event):not(:first-child) { display: none; }
    .h4 .h4-search { grid-area: search; max-width: none; height: 46px; margin-bottom: 10px; }
    .h4 .h4-bar__menu {
        display: grid;
        grid-area: menu;
        place-items: center;
        width: 46px;
        height: 46px;
        margin-bottom: 10px;
        border-radius: 50%;
        background: var(--h4-paper);
    }
    .h4 .h4-note__links { display: none; }
    .h4 .h4-cats__all { display: none; }

    .h4 .h4-hero { padding: 36px 0 32px; }
    .h4 .h4-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .h4 h1 { max-width: 18ch; }
    .h4 .h4-event { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 40px; padding: 18px; }
    .h4 .h4-event__when { justify-self: start; }

    .h4 .h4-sec { padding: 48px 0; }
    .h4 .h4-how, .h4 .h4-about, .h4 .h4-news__in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .h4 .h4-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .h4 .h4-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .h4 .h4-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .h4 .h4-foot__az { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 600px) {
    .h4 .h4-wrap { width: min(1200px, 100% - 32px); }
    .h4 .h4-note__in { padding-block: 8px; }
    .h4 .h4-search { padding-left: 18px; }
    .h4 .h4-search__icon { display: none; }
    .h4 .h4-search__go { padding: 0 14px; }

    .h4 .h4-hero__lede { font-size: 1.05rem; }
    .h4 .h4-stats { gap: 14px 28px; }
    .h4 .h4-stats dt { font-size: 1.6rem; }
    .h4 .h4-board { margin-right: 8px; padding: 18px 16px 4px; box-shadow: 8px 8px 0 var(--h4-sun); }
    .h4 .h4-board__row { grid-template-columns: auto minmax(0, 1fr); }
    .h4 .h4-board__side {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .h4 .h4-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .h4 .h4-stores { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .h4 .h4-store { padding: 14px 8px 12px; }
    .h4 .h4-store strong { font-size: .85rem; }
    .h4 .h4-logo--lg { width: 52px; height: 52px; border-radius: 14px; font-size: .95rem; }

    /* Offer cards become compact rows: store, then value + button, then the title. */
    .h4 .h4-offers { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .h4 .h4-offer {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "top top" "value btn" "title title";
        align-items: center;
        gap: 12px;
    }
    .h4 .h4-offer__top { grid-area: top; }
    .h4 .h4-offer__value { grid-area: value; min-height: 0; margin: 0; font-size: 2rem; }
    .h4 .h4-offer__value--md { font-size: 1.3rem; }
    .h4 .h4-offer__title { grid-area: title; margin: 0; -webkit-line-clamp: 2; }
    .h4 .h4-offer .h4-btn { grid-area: btn; width: auto; margin: 0; }

    .h4 .h4-catgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .h4 .h4-cat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .h4 .h4-guides { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .h4 .h4-guide { flex-direction: row; }
    .h4 .h4-guide__media { flex: none; width: 112px; aspect-ratio: auto; }
    .h4 .h4-guide__body { justify-content: center; padding: 14px; }
    .h4 .h4-guide__body strong { font-size: 1rem; }
    .h4 .h4-cloud { gap: 8px; }
    .h4 .h4-cloud a { padding: 8px 13px; font-size: .85rem; }
    .h4 .h4-cloud li:nth-child(n+15) { display: none; }
    .h4 .h4-news__form { grid-template-columns: minmax(0, 1fr); }
    .h4 .h4-foot__grid { gap: 28px 20px; }
    .h4 .h4-foot__base-in { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .h4 *, .h4 *::before, .h4 *::after { transition: none !important; }
}
