html, body { overflow-x: hidden; max-width: 100vw; }
/* ============================================================
   LocalDeals Theme — Main Stylesheet
   Design system driven by CSS variables from admin settings.
   All variable values injected via functions.php at runtime.
   ============================================================ */

/* ── BASE RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
    /* Type Scale (1.25 ratio - Major Third) */
    --text-xs: 0.64rem;    /* 10px */
    --text-sm: 0.8rem;     /* 13px */
    --text-base: 1rem;     /* 16px */
    --text-md: 1.125rem;   /* 18px */
    --text-lg: 1.25rem;    /* 20px */
    --text-xl: 1.563rem;   /* 25px */
    --text-2xl: 1.953rem;  /* 31px */
    --text-3xl: 2.441rem;  /* 39px */
    
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Letter Spacing */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.05em;
    --tracking-wider: 0.1em;
    
    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.5rem;    /* 24px */
    --space-6: 2rem;      /* 32px */
    --space-7: 3rem;      /* 48px */
    --space-8: 4rem;      /* 64px */

    /* Gray Scale (Slate) */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Semantic Colors */
    --color-success: #22c55e;
    --color-warning: #eab308;
    --color-error: #ef4444;
    --color-info: #3b82f6;
}

/* ── BODY ───────────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
.ld-section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-sm);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
}

/* ── LAYOUT CONTAINERS ──────────────────────────────────── */
.ld-section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ld-section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── HEADER ─────────────────────────────────────────────── */
.ld-header {
    background: var(--ink);
    position: relative;
    top: 0;
    z-index: 9999;
    height: 60px;
}

.ld-header__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ld-logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--text-lg);
    color: #fff;
    letter-spacing: -0.02em;
}
.ld-logo-text span { color: var(--accent); }

.ld-header__nav { margin-left: auto; }

.ld-nav__list {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.ld-nav__list a {
    font-size: 0.85rem;
    color: #bbb;
    transition: color 0.2s;
}
.ld-nav__list a:hover { color: #fff; }

.ld-header__right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.ld-header__date {
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ld-header__mobile-toggle {
    z-index: 1001;
    position: relative;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}
.ld-header__mobile-toggle span {
    background: var(--ink, #1a202c);
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink, #1a202c);
    border-radius: 2px;
    transition: all 0.2s;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.ld-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    text-decoration: none;
}

.ld-btn--advertise {
    background: var(--accent);
    color: #fff;
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    font-size: var(--text-sm);
}
.ld-btn--advertise:hover { opacity: 0.85; }

.ld-btn--cta {
    background: var(--accent);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
}
.ld-btn--cta:hover { transform: translateY(-1px); }

/* ── THEME STRIP ─────────────────────────────────────────── */
.ld-theme-strip {
    background: var(--accent2);
    padding: 0.55rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ld-theme-strip__label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
}

.ld-theme-strip__tag {
    background: var(--ink);
    color: var(--accent2);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.ld-theme-strip__slots {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--ink);
    opacity: 0.7;
}

.ld-theme-strip__cta {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    background: rgba(0,0,0,0.1);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.ld-theme-strip__cta:hover { background: rgba(0,0,0,0.2); }

/* ── SPONSOR CARD ────────────────────────────────────────── */
.ld-sponsor-wrap {
    padding: 1.5rem 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.ld-sponsor-card {
    background: var(--sponsor-bg);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.ld-sponsor-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: 220px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,77,28,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.ld-sponsor-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255,255,255,0.08);
    color: #888;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.ld-sponsor-card__eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ld-sponsor-card__headline {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.75rem;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.ld-sponsor-card__sub {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1.25rem;
    line-height: var(--leading-normal);
}

.ld-sponsor-card__logo-block {
    text-align: center;
    min-width: 140px;
}

.ld-sponsor-logo { max-width: 120px; margin: 0 auto 0.5rem; border-radius: 12px; }

.ld-sponsor-logo-placeholder {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.07);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: #555;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    margin: 0 auto 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.ld-sponsor-biz-name {
    font-size: 0.75rem;
    color: #666;
}

/* ── NEWS DIGEST ─────────────────────────────────────────── */
.ld-news-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.75rem 2rem 0;
}

.ld-news-strip {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ld-news-item {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.9rem;
    align-items: center;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.ld-news-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.ld-news-thumb {
    width: 72px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    text-decoration: none;
}

.ld-news-content {
    padding: 0.6rem 0.75rem 0.6rem 0;
    min-width: 0;
}

.ld-news-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.2rem;
}

.ld-news-source {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

.ld-news-age {
    font-size: 0.62rem;
    color: var(--muted);
}

.ld-news-headline-link { display: block; }

.ld-news-headline {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.3;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}
.ld-news-headline-link:hover .ld-news-headline { color: var(--accent); }

.ld-news-summary {
    font-size: 0.7rem;
    color: var(--muted);
    line-height: 1.45;
    margin-top: 0.12rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── DEALS SECTION ───────────────────────────────────────── */
.ld-deals-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
}

/* ── DEALS GRID ──────────────────────────────────────────── */
.ld-deals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    padding-bottom: 2rem;
}

/* ── DEAL CARD — BASE ────────────────────────────────────── */
.ld-deal-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    height: var(--card-height);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.ld-deal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

/* ── CARD IMAGE ──────────────────────────────────────────── */
.ld-card__image {
    height: var(--img-height);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warm);
}

.ld-card__image--badge::after {
    content: 'Deal';
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

.ld-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ld-card__image-placeholder {
    font-size: 2.5rem;
    line-height: 1;
}

/* ── CARD BODY ───────────────────────────────────────────── */
.ld-card__body {
    padding: var(--body-pad);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.ld-card__biz-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}

.ld-card__logo {
    width: var(--logo-size);
    height: var(--logo-size);
    border-radius: 5px;
    background: var(--warm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: calc(var(--logo-size) * 0.45);
    color: var(--muted);
    flex-shrink: 0;
}

.ld-card__biz-name {
    font-size: var(--biz-size);
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ld-card__headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.ld-card__desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

/* ── CARD CTA ────────────────────────────────────────────── */
.ld-card__cta {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--cta-size);
    letter-spacing: 0.04em;
    padding: 0.28rem 0.7rem;
    border-radius: var(--cta-radius);
    transition: all 0.15s;
    cursor: pointer;
    white-space: nowrap;
    align-self: flex-start;
}

.ld-cta-outline {
    border: 1.5px solid var(--ink);
    color: var(--ink);
    background: transparent;
}
.ld-cta-outline:hover { background: var(--ink); color: #fff; }

.ld-cta-filled {
    background: var(--accent);
    color: #fff;
    border: none;
}
.ld-cta-filled:hover { opacity: 0.85; }

.ld-cta-soft {
    background: var(--warm);
    color: var(--ink);
    border: 1px solid var(--border);
}
.ld-cta-soft:hover { background: var(--border); }

/* ── CTA + URL ROW ───────────────────────────────────────── */
.ld-card__cta-url-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* ── DISPLAY URL ─────────────────────────────────────────── */
.ld-card__display-url {
    font-size: 0.58rem;
    color: var(--muted);
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.75;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.ld-card__display-url::before {
    content: '🔗';
    font-size: 0.5rem;
    opacity: 0.6;
    flex-shrink: 0;
}

.ld-url--below { margin-top: 0.25rem; }
.ld-url--biz-row { margin-left: auto; }

.ld-card__url-footer {
    padding: 0.35rem var(--body-pad);
    border-top: 1px solid var(--border);
    background: var(--warm);
}
.ld-url--footer { font-size: 0.6rem; }

/* ── CARD STYLE VARIANTS ─────────────────────────────────── */

/* Style B: Horizontal */
.ld-card-style-b {
    flex-direction: row;
    height: 110px;
}
.ld-card-style-b .ld-card__image {
    width: 110px;
    height: 100%;
    flex-shrink: 0;
}

/* Style C: Minimal — no image */
.ld-card-style-c {
    padding: 1rem;
    height: auto;
    min-height: 180px;
}
.ld-card-style-c::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}
.ld-card-style-c .ld-card__image { display: none; }
.ld-card-style-c .ld-card__body {
    padding: 0;
    justify-content: space-between;
}

/* Style D: Editorial overlay */
.ld-card-style-d .ld-card__image {
    position: absolute;
    inset: 0;
    height: 100%;
    z-index: 0;
}
.ld-card-style-d .ld-card__body {
    position: absolute;
    inset: 0;
    z-index: 1;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
    padding: 1.25rem 1rem 1rem;
}
.ld-card-style-d .ld-card__biz-name { color: rgba(255,255,255,0.6); }
.ld-card-style-d .ld-card__headline { color: #fff; }
.ld-card-style-d .ld-card__cta { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); }

/* Style E: Accent stripe */
.ld-card-style-e {
    flex-direction: row;
}
.ld-card__stripe {
    width: 6px;
    background: var(--accent);
    flex-shrink: 0;
}
.ld-card-style-e .ld-card__image {
    width: 90px;
    height: 100%;
    flex-shrink: 0;
}

/* ── EMPTY SLOT CARD ─────────────────────────────────────── */
.ld-deal-card--empty {
    border-style: dashed;
    background: transparent;
    align-items: center;
    justify-content: center;
    height: var(--card-height);
    overflow: visible;
}
.ld-deal-card--empty:hover { border-color: var(--accent); }

.ld-empty-slot__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    width: 100%;
    height: 100%;
    padding: 1rem;
}

.ld-empty-slot__icon {
    font-size: 1.5rem;
    color: var(--border);
    transition: color 0.2s;
}
.ld-deal-card--empty:hover .ld-empty-slot__icon { color: var(--accent); }

.ld-empty-slot__label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ccc;
}

.ld-empty-slot__price {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

/* ── IMAGE TINTS ─────────────────────────────────────────── */
.ld-tint-orange { background: #fff4f0; }
.ld-tint-green  { background: #f0faf4; }
.ld-tint-blue   { background: #f0f4ff; }
.ld-tint-yellow { background: #fffbf0; }
.ld-tint-pink   { background: #fff0f5; }
.ld-tint-warm   { background: var(--warm); }

/* ── FOOTER ──────────────────────────────────────────────── */
.ld-footer {
    background: var(--ink);
    margin-top: 3rem;
}

.ld-footer__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.ld-footer__brand .ld-logo-text { font-size: 1rem; }

.ld-footer__tagline {
    font-size: 0.72rem;
    color: #666;
    margin-top: 0.3rem;
}

.ld-footer__nav-list {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ld-footer__nav-list a {
    font-size: 0.75rem;
    color: #666;
    transition: color 0.2s;
}
.ld-footer__nav-list a:hover { color: #fff; }

.ld-footer__meta {
    margin-left: auto;
    text-align: right;
}

.ld-footer__copyright,
.ld-footer__powered {
    font-size: 0.68rem;
    color: #555;
}

.ld-footer__powered a { color: #888; }
.ld-footer__powered a:hover { color: #fff; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1200px) {
    .ld-deals-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .ld-deals-grid { grid-template-columns: repeat(2, 1fr); }
    .ld-sponsor-card { grid-template-columns: 1fr; }
    .ld-sponsor-card__logo-block { display: none; }
    .ld-news-item { grid-template-columns: 60px 1fr; }
}

@media (max-width: 600px) {
    .ld-header__nav,
    .ld-header__date { display: none; }
    .ld-header__mobile-toggle {
    z-index: 1001;
    position: relative;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center; display: flex; }
    .ld-deals-grid { grid-template-columns: 1fr; }
    .ld-sponsor-wrap,
    .ld-news-section,
    .ld-deals-section { padding-left: 1rem; padding-right: 1rem; }
    .ld-header__inner { padding: 0 1rem; }
    .ld-theme-strip { padding: 0.55rem 1rem; }
    .ld-footer__meta { margin-left: 0; text-align: left; }
}

/* Mobile nav open state */
@media (max-width: 600px) {
    .ld-header__nav.ld-nav--open {
        display: flex;
        position: relative;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        z-index: 999;
        animation: slideIn 0.2s ease-out;
    }
    .ld-header__nav.ld-nav--open .ld-nav__list {
        flex-direction: column;
        gap: 0;
    }
    .ld-header__nav.ld-nav--open .ld-nav__list li {
        border-bottom: 1px solid #e2e8f0;
    }
    .ld-header__nav.ld-nav--open .ld-nav__list li a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
    }
    .ld-header__mobile-toggle[aria-expanded='true'] span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .ld-header__mobile-toggle[aria-expanded='true'] span:nth-child(2) {
        opacity: 0;
    }
    .ld-header__mobile-toggle[aria-expanded='true'] span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    @keyframes slideIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* Fix header overflow on mobile */
.ld-header__inner {
    max-width: 100%;
    overflow: hidden;
}
.ld-header__brand {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .ld-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }
    .ld-header__brand {
        max-width: calc(100% - 100px);
    }
    .ld-header__mobile-toggle {
        flex-shrink: 0;
    }
    .ld-header__actions {
        flex-shrink: 0;
    }
}

/* Narrow desktop fix */
@media (max-width: 800px) {
    .ld-header__inner {
        padding: 0 1rem;
        gap: 0.75rem;
    }
}
@media (max-width: 600px) {
    .ld-header__inner {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    .ld-logo-text {
        font-size: 1rem;
    }
    .ld-header__right {
        gap: 0.5rem;
        margin-left: 0;
    }
    .ld-btn--sm {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
    .ld-badge {
        padding: 0.15rem 0.4rem;
        font-size: 0.6rem;
    }
}

/* Mobile toggle - clean fix */
.ld-header__mobile-toggle {

/* ============================================================
   MOBILE RESPONSIVE — Consolidated & Cleaned
   ============================================================ */

/* Overflow control */
html, body { 
    overflow-x: hidden; 
    max-width: 100vw; 
}

/* Tablet adjustments */
@media (max-width: 800px) {
    .ld-header__inner {
        padding: 0 1rem;
        gap: 0.75rem;
    }
    
    .ld-sponsor-wrap,
    .ld-deals-section,
    .ld-news-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile layout */
@media (max-width: 600px) {
    /* Header: grid layout for logo + hamburger */
    .ld-header__inner {
        display: grid;
        grid-template-columns: 1fr auto;
        padding: 0 0.75rem;
        gap: 0.5rem;
        align-items: center;
    }
    
    .ld-logo-text {
        font-size: 1rem;
    }
    
    /* Hide these on mobile (accessible via hamburger menu) */
    .ld-header__nav:not(.ld-nav--open) {
        display: none;
    }
    .ld-header__right,
    .ld-header__date {
        display: none;
    }
    /* Hide inline BETA badge on mobile */
    .ld-header__inner > span[style*="background:#ecc94b"] {
        display: none;
    }
    
    /* Show hamburger */
    .ld-header__mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1001;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }
    
    .ld-header__mobile-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: all 0.2s;
    }
    
    /* Hamburger to X animation */
    .ld-header__mobile-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .ld-header__mobile-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }
    .ld-header__mobile-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Mobile menu open state */
    .ld-header__nav.ld-nav--open {
        display: flex;
        position: relative;
        left: 0;
        top: 60px;
        right: 0;
        bottom: 0;
        background: #1a202c;
        flex-direction: column;
        padding: 0;
        z-index: 9999;
    }
    
    .ld-header__nav.ld-nav--open .ld-nav__list {
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin: 0;
    }
    
    .ld-header__nav.ld-nav--open .ld-nav__list li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .ld-header__nav.ld-nav--open .ld-nav__list li a {
        display: block;
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
        color: #fff;
    }
    
    .ld-header__nav.ld-nav--open .ld-nav__list li a:hover {
        background: rgba(255,255,255,0.1);
    }
    
    /* Content sections */
    .ld-deals-grid {
        grid-template-columns: 1fr;
    }
    
    .ld-sponsor-wrap,
    .ld-news-section,
    .ld-deals-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .ld-theme-strip {
        padding: 0.55rem 1rem;
    }
    
    .ld-footer__meta {
        margin-left: 0;
        text-align: left;
    }
}

/* Animations */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── FOOTER POLISH ────────────────────────────────────────── */
.ld-footer {
    background: var(--ink);
    margin-top: var(--space-7);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.ld-footer__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-5);
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: var(--space-6);
    align-items: start;
}

.ld-footer__brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ld-footer__tagline {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin: 0;
}

.ld-footer__social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.ld-footer__social a {
    color: var(--gray-500);
    transition: color var(--transition-base, 0.2s);
}

.ld-footer__social a:hover {
    color: #fff;
}

.ld-footer__nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ld-footer__nav-list a {
    font-size: var(--text-sm);
    color: var(--gray-500);
    transition: color var(--transition-base, 0.2s);
}

.ld-footer__nav-list a:hover {
    color: #fff;
}

.ld-footer__meta {
    text-align: right;
}

.ld-footer__copyright {
    font-size: var(--text-xs);
    color: var(--gray-600);
    margin: 0;
}

.ld-footer__powered {
    font-size: var(--text-xs);
    color: var(--gray-700);
    margin: var(--space-1) 0 0;
}

.ld-footer__powered a {
    color: var(--gray-500);
}

.ld-footer__powered a:hover {
    color: #fff;
}

@media (max-width: 600px) {
    .ld-footer__inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-5);
    }
    
    .ld-footer__brand {
        align-items: center;
    }
    
    .ld-footer__social {
        justify-content: center;
    }
    
    .ld-footer__nav-list {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-3);
    }
    
    .ld-footer__meta {
        text-align: center;
    }
}

/* Mobile: Compact theme strip */
@media (max-width: 600px) {
    .ld-theme-strip {
        justify-content: center;
        gap: 0.5rem;
        padding: 0.4rem 1rem;
    }
    .ld-theme-strip__label {
        display: none;
    }
    .ld-theme-strip__slots {
        margin-left: 0;
        font-size: 0.7rem;
    }
    .ld-theme-strip__cta {
        padding: 0.3rem 0.75rem;
        font-size: 0.7rem;
    }
}


/* ── SPONSOR CARD THEMES ──────────────────────────────────── */
/* Green theme (garden/outdoor) via inline style override */
.ld-sponsor-card[style*="#22553"] .ld-sponsor-card__headline,
.ld-sponsor-card[style*="#22553"] .ld-sponsor-biz-name a {
    color: #fff;
}
.ld-sponsor-card[style*="#22553"] .ld-sponsor-card__sub {
    color: rgba(255, 255, 255, 0.85);
}
.ld-sponsor-card[style*="#22553"] .ld-sponsor-card__eyebrow {
    color: #9ae6b4;
}
.ld-sponsor-card[style*="#22553"] .ld-btn--cta {
    background: #48bb78;
    border-color: #48bb78;
}
.ld-sponsor-card[style*="#22553"] .ld-btn--cta:hover {
    background: #38a169;
}

/* ── HAMBURGER FIX ─────────────────────────────────────── */
@media (max-width: 768px) {
    .ld-header__mobile-toggle {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
    }
    .ld-header__mobile-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
    }
}
