/*
 * Hot Brick Deals brand theme — matched to wordpress-design-layout/ (the
 * WordPress theme's own sample pages): a plain system-font stack, navy/coral
 * palette, white cards on a light-gray page background. Deliberately close
 * to the WP reference rather than a from-scratch redesign — see the plan
 * notes for why (ship something LEGO-appropriate now, polish later).
 */

:root {
    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-sans: var(--font-display);
    --font-serif: var(--font-display);

    --color-page-bg: #F8F9FA;
    --color-bg: #ffffff;
    --color-surface: #F1F3F5;
    --color-border: #E5E8EB;
    --color-text: #2C3E50;
    --color-text-muted: #7F8C8D;

    --color-accent: #E74C3C;
    --color-accent-hover: #C0392B;
    --color-blue: #3498DB;
    --color-blue-hover: #186091;
    --color-green: #27AE60;
    --color-purple: #8E44AD;
    --color-lime: #F39C12;
    --color-ink: #2C3E50;

    --color-header-bg: linear-gradient(135deg, #2b2b2b, #2f2f2f);
    --color-footer-bg: #2C3E50;
    --color-brick: #F39C12;

    --badge-coupon-bg: var(--color-purple);
    --badge-coupon-text: #ffffff;
    --badge-sale-bg: var(--color-lime);
    --badge-sale-text: #ffffff;
    --badge-deal-bg: var(--color-accent);
    --badge-deal-text: #ffffff;

    --radius-sm: 0.5rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-pill: 999px;

    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-6: 3rem;
    --space-8: 4rem;
    --space-12: 6rem;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-display);
    color: var(--color-text);
    background: var(--color-page-bg);
    line-height: 1.5;
    font-size: 1rem;
}

a { color: inherit; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-1); color: var(--color-ink); }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 var(--space-2); color: var(--color-text-muted); }

.container {
    max-width: 86rem;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* ---------- Header / footer ---------- */

.site-header {
    background: var(--color-header-bg);
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header-actions {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.mobile-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mobile-icon-btn:hover { background: rgba(255, 255, 255, 0.2); }

.mobile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    z-index: 999;
    padding: var(--space-3) var(--space-4);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.mobile-dropdown.is-open { display: block; }

.mobile-search-form {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--color-surface);
    border-radius: var(--radius-pill);
    padding: 0.375rem;
}

.mobile-search-form input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: var(--font-display);
    color: var(--color-text);
}

.mobile-search-form input:focus { outline: none; }

.mobile-menu-links { display: flex; flex-direction: column; }

.mobile-menu-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu-links a:last-child { border-bottom: none; }

.mobile-menu-heading {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.mobile-country-list { display: flex; flex-direction: column; }

.mobile-country-list form { display: contents; }

.mobile-country-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    font-size: 1.25rem;
    font-family: var(--font-display);
    color: var(--color-text);
    cursor: pointer;
}

.mobile-country-list form:last-child .mobile-country-option { border-bottom: none; }

.mobile-country-option.is-current { font-weight: 700; }

@media (max-width: 40rem) {
    .site-nav-link, .site-nav .country-switcher {
        display: none;
    }
    .mobile-header-actions {
        display: flex;
    }
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.site-logo {
    font-weight: 800;
    font-size: 1.5rem;
    text-decoration: none;
    white-space: nowrap;
    color: #fff;
}

.site-logo-accent { color: var(--color-brick); }

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.site-nav-link {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 0.9375rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.site-nav-link:hover { opacity: 1; }

.site-search {
    flex: 1;
    max-width: 34rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--color-bg);
    border-radius: var(--radius-pill);
    padding: 0.375rem;
}

.site-search:focus-within {
    box-shadow: 0 0 0 3px var(--color-blue);
}

.site-search input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: var(--font-display);
    color: var(--color-text);
}

.site-search input:focus { outline: none; }

.site-search input::placeholder { color: var(--color-text-muted); }

.site-search-btn {
    flex-shrink: 0;
    font-size: 0.875rem;
    background: var(--color-blue);
    color: #fff;
    border-style: solid;
    border-color: transparent;
}

.site-search-btn:hover { background: var(--color-blue-hover); }

@media (max-width: 40rem) {
    .site-search { display: none; }
}

/* Country switcher — flag toggle + dropdown panel, see site.js for the open/close behavior */
.country-switcher {
    position: relative;
}

.country-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.country-toggle:hover { background: rgba(255, 255, 255, 0.2); }

.country-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    min-width: 12rem;
    display: none;
    z-index: 1000;
}

.country-dropdown.is-open { display: block; }

.country-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.9375rem;
    font-family: var(--font-display);
    cursor: pointer;
}

.country-option:hover { background: var(--color-page-bg); }

.country-option.is-current { font-weight: 700; }

.site-footer {
    margin-top: var(--space-8);
    padding: var(--space-6) 0 var(--space-4);
    font-size: 0.9375rem;
    background: var(--color-footer-bg);
    color: rgba(255, 255, 255, 0.7);
}

.site-footer a { text-decoration: none; color: rgba(255, 255, 255, 0.7); }
.site-footer a:hover { color: #fff; }

.footer-columns {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: var(--space-3);
}

@media (max-width: 48rem) {
    .footer-columns { grid-template-columns: repeat(2, 1fr); }
}

.footer-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-brick);
}

.footer-tagline {
    margin-top: var(--space-1);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-link-col h4 {
    color: #fff;
    font-size: 0.9375rem;
    margin: 0 0 var(--space-1);
}

.footer-link-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-bottom {
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p { margin: 0 0 0.25rem; color: inherit; }

/* ---------- Sections ---------- */

.section {
    padding: var(--space-4) 0;
}

.container > .section:first-child {
    padding-top: var(--space-4);
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.section-header .link-more {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
}

.breadcrumb {
    margin-bottom: var(--space-4);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.breadcrumb a { color: var(--color-blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.page-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-ink);
}

.page-subtitle {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    font-size: 1.1rem;
}

/* ---------- Theme grid (Sets landing page) ---------- */

.theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

@media (max-width: 64rem) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 48rem) { .theme-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 30rem) { .theme-grid { grid-template-columns: 1fr; } }

.theme-card {
    display: block;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.theme-card-image {
    width: 100%;
    height: 11rem;
    object-fit: contain;
    padding: var(--space-2);
    background: var(--color-bg);
    display: block;
}

.theme-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: var(--space-2) var(--space-3) var(--space-3);
}

.theme-card-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-ink);
}

.theme-card-count {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* ---------- Product grid (theme page) ---------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-6);
}

@media (max-width: 64rem) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 48rem) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 30rem) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card-image {
    width: 100%;
    height: 13rem;
    object-fit: contain;
    padding: 1rem;
    background: var(--color-bg);
    display: block;
}

.product-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 var(--space-3) var(--space-3);
}

.product-card-theme {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.product-card-name {
    margin: 0 0 0.5rem;
    color: var(--color-ink);
    font-size: 1.2rem;
    line-height: 1.25;
}

.product-card-msrp {
    margin: 0 0 0.25rem;
    color: var(--color-ink);
    font-size: 0.9rem;
    font-weight: 600;
}

.product-card-meta {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-bottom: var(--space-2);
}

.product-card-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    background: #fdecea;
    color: var(--color-accent);
    margin-bottom: var(--space-2);
}

.product-card-cta {
    margin-top: auto;
    display: block;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    background: var(--color-blue);
    color: #fff;
}

.product-card:hover .product-card-cta { background: var(--color-blue-hover); }

/* ---------- Deal cards ---------- */

.deal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: var(--space-3);
}

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

/* ---------- Homepage ---------- */

.home-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4);
    align-items: start;
}

@media (max-width: 56rem) {
    .home-layout { grid-template-columns: 1fr; }
    .home-aside { display: none; }
}

.home-main { min-width: 0; }

.sidebar-widget { position: static; }

.sidebar-widget h4 { margin-bottom: var(--space-2); font-size: 1rem; }

.sidebar-theme-list {
    list-style: none;
    margin: 0 0 var(--space-2);
    padding: 0;
}

.sidebar-theme-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 0.5rem 0;
    text-decoration: none;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.sidebar-theme-list li:last-child a { border-bottom: none; }

.sidebar-theme-list a:hover { color: var(--color-blue); }

.sidebar-theme-count {
    flex-shrink: 0;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
}

.home-aside .sidebar-widget + .sidebar-widget { margin-top: var(--space-4); }

.sidebar-product-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-product-list a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.5rem 0;
    text-decoration: none;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.sidebar-product-list li:last-child a { border-bottom: none; }

.sidebar-product-list a:hover .sidebar-product-name { color: var(--color-blue); }

.sidebar-product-list img,
.sidebar-product-thumb-empty {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: var(--color-surface);
}

.sidebar-product-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.sidebar-product-name {
    font-size: 0.875rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-product-date {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.deal-feed-loading[hidden] { display: none; }

.deal-feed-loading {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    padding: var(--space-3) 0;
}

.scroll-tools[hidden] { display: none; }

.scroll-tools {
    position: fixed;
    bottom: var(--space-3);
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    gap: var(--space-2);
    background: var(--color-ink);
    padding: 0.5rem;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.scroll-tools-btn {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
}

.scroll-tools-btn:hover { background: rgba(255, 255, 255, 0.15); }

.deal-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 54rem;
}

.deal-row {
    display: flex;
    align-items: stretch;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    overflow: hidden;
}

.deal-row:hover { box-shadow: 0 0 0 2px var(--color-accent) inset; }

.deal-row-visual {
    flex-shrink: 0;
    width: 6.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deal-row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
}

.deal-row-logo {
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-surface);
}

.deal-discount-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    padding: var(--space-2);
    background: var(--color-lime);
    color: var(--color-ink);
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.15;
}

.deal-row-main { flex: 1; min-width: 0; }

.deal-row-meta {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: 0.375rem;
}

.deal-row h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.deal-row-store {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    margin-top: 0.375rem;
}

.deal-row .deal-cta {
    flex-shrink: 0;
    width: auto;
    white-space: nowrap;
}

@media (max-width: 40rem) {
    .deal-row-content { flex-wrap: wrap; }
    .deal-row .deal-cta { width: 100%; }
}


.deal-card {
    position: relative;
    display: flex;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    background: var(--color-bg);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.deal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.deal-card h3 a,
.deal-row h3 a {
    color: inherit;
    text-decoration: none;
}

.deal-card-image-wrap {
    position: relative;
    flex: 0 0 clamp(13rem, 40%, 20rem);
    background: var(--color-bg);
    padding: var(--space-2);
}

.deal-card-image {
    width: 100%;
    height: 100%;
    min-height: 18rem;
    object-fit: contain;
    background: var(--color-bg);
    display: block;
}

.deal-card-body {
    flex: 1;
    min-width: 0;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
}

.deal-card-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

.deal-card-logo {
    width: 3.375rem;
    height: 3.375rem;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-surface);
}

.deal-card-store {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-ink);
}

.deal-card-time {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* Used by external-product-card.php (Amazon pick-list) only — the redesigned
   deal-card puts its discount badge in the header row instead (see below). */
.deal-card-image-discount {
    position: absolute;
    right: var(--space-2);
    bottom: var(--space-2);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    background: var(--color-ink);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.15;
}

.deal-card-discount {
    padding: 0 var(--space-3);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-green);
}

.deal-card-discount-badge {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--color-ink);
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.deal-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.375rem;
}

.deal-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}

.deal-card-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-green);
}

.deal-card-was-price {
    text-decoration: line-through;
    color: var(--color-text-muted);
    font-size: 1rem;
}

.discount-badge {
    background: var(--color-accent);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    font-weight: 700;
}

.deal-card-actions { margin-top: auto; padding-top: var(--space-2); }

.deal-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    background: var(--color-accent);
    color: #fff;
    padding: 0.7rem 1.5rem;
}

.deal-cta:hover { background: var(--color-accent-hover); }

@media (max-width: 40rem) {
    .deal-card { flex-direction: column; }
    .deal-card-image-wrap { flex: none; }
    .deal-card-image { height: 12rem; min-height: 0; }
    .deal-card-body { padding: var(--space-3); }
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3125rem 0.8125rem;
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.coupon { background: var(--badge-coupon-bg); color: var(--badge-coupon-text); }
.badge.sale { background: var(--badge-sale-bg); color: var(--badge-sale-text); }
.badge.deal { background: var(--badge-deal-bg); color: var(--badge-deal-text); }

.deal-expiry {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.deal-expiry.is-expired { color: var(--color-purple); }

/* ---------- Single deal page ---------- */

.deal-page-header {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.deal-page-image-wrap {
    flex: 0 0 18rem;
    max-width: 100%;
}

.deal-page-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.deal-page-body { flex: 1; min-width: 0; }

.deal-page-meta-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.deal-card-save {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.price-watch {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-2);
}

.price-watch-good { background: #e8f5e9; color: #1e7d32; }
.price-watch-neutral { background: var(--color-surface); color: var(--color-text); }

.retired-note {
    background: #fdf6e3;
    border-left: 3px solid var(--color-lime);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.cta-button-deal {
    background: var(--color-accent);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.cta-button-deal:hover { background: var(--color-accent-hover); }

@media (max-width: 40rem) {
    .deal-page-header { flex-direction: column; }
    .deal-page-image-wrap { flex: none; width: 100%; }
}

/* ---------- Single set page ---------- */

.set-page-grid {
    display: grid;
    grid-template-columns: 1fr 22rem;
    gap: var(--space-3);
    align-items: start;
    margin-bottom: var(--space-3);
}

@media (max-width: 56rem) {
    .set-page-grid { grid-template-columns: 1fr; }
    .set-sidebar-card { position: static; }
}

.set-page-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
}

.set-page-main .card { margin: 0; }

.set-image-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.set-image {
    width: 100%;
    max-height: 40rem;
    object-fit: contain;
    background: var(--color-bg);
    display: block;
}

.set-image + .set-image { border-top: 1px solid var(--color-border); }

.set-sidebar-card { position: sticky; top: 6rem; }

.buy-box h1 { font-size: 1.5rem; margin-bottom: var(--space-3); }

.buy-box-prices {
    margin-bottom: var(--space-3);
}

.buy-box-prices-label {
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.buy-box-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-ink);
    border-bottom: 1px solid var(--color-border);
}

.buy-box-price-row:last-child { border-bottom: none; }

.buy-box-price-row a { color: var(--color-blue); text-decoration: none; font-weight: 600; }
.buy-box-price-row a:hover { text-decoration: underline; }

.buy-box-other-prices {
    margin-top: var(--space-3);
    font-size: 0.875rem;
    color: var(--color-text);
}

.cta-button.full-width {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 1rem 1.5rem;
    font-size: 1.0625rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: var(--space-2);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-value {
    font-weight: 600;
    color: var(--color-ink);
}

.detail-value a { color: var(--color-blue); text-decoration: none; }
.detail-value a:hover { text-decoration: underline; }

/* ---------- Data tables (product pricing) ---------- */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    margin-bottom: var(--space-3);
}

.data-table th {
    text-align: left;
    font-weight: 700;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0 var(--space-2) var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

.data-table td {
    padding: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

.data-table tr:last-child td { border-bottom: none; }

/* ---------- Store cards / listing ---------- */

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: var(--space-2);
}

.store-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    text-align: center;
    padding: var(--space-3);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    font-size: 1rem;
}

.store-card:hover { box-shadow: 0 0 0 2px var(--color-accent) inset; }

.store-card span {
    font-size: 1rem;
    font-weight: 600;
}

.store-logo-placeholder {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.store-banner {
    width: 100%;
    height: 16rem;
    overflow: hidden;
    background: var(--color-surface);
}

.store-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 40rem) {
    .store-banner { height: 9rem; }
}

.store-hero {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    margin-bottom: var(--space-4);
}

.store-hero .store-logo-placeholder {
    width: 4rem;
    height: 4rem;
}

.store-banner-hero {
    position: relative;
    width: 100%;
    height: 20rem;
    overflow: hidden;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
}

.store-banner-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-banner-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.15) 65%, rgba(0, 0, 0, 0) 100%);
    border-radius: var(--radius-lg);
}

.store-hero-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: #fff;
}

.store-hero-info h1 { color: #fff; margin: 0; }

.store-hero-info .store-logo-placeholder {
    background: #fff;
    border: 2px solid #fff;
}

.store-hero-visit { flex-shrink: 0; }

@media (max-width: 40rem) {
    .store-banner-hero { height: 13rem; }
}

.store-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4);
    align-items: start;
}

@media (max-width: 56rem) {
    .store-layout-grid { grid-template-columns: 1fr; }
}

.store-main-col {
    display: flex;
    flex-direction: column;
}

.store-aside-col .card,
.store-editorial-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
}

.store-aside-col .card h3,
.store-editorial-card .prose h2 {
    margin-top: 0;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-display);
    text-decoration: none;
    background: var(--color-accent);
    color: #fff;
}

.btn:hover { background: var(--color-accent-hover); }

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid currentColor;
}

/* ---------- Static / content pages ---------- */

.prose {
    font-family: var(--font-serif);
    font-size: 1.25rem;
}

.prose h1 { margin-bottom: var(--space-2); font-family: var(--font-display); }

.empty-state {
    color: var(--color-text-muted);
    padding: var(--space-4) 0;
}

.card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

/* ---------- Contact form ---------- */

.contact-success {
    background: var(--color-lime);
    color: var(--color-ink);
    font-family: var(--font-display);
    font-weight: 700;
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.contact-field label {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-page-bg);
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-text);
}

.contact-field textarea {
    min-height: 8rem;
    resize: vertical;
}

.contact-field input:focus,
.contact-field textarea:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
}

.contact-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Coupon modal ---------- */

.coupon-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: var(--space-3);
}

.coupon-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 18, 26, 0.6);
}

.coupon-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 26rem;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    padding: var(--space-4);
    text-align: center;
}

.coupon-modal-close {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 2rem;
    height: 2rem;
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-muted);
}

.coupon-modal-logo {
    max-height: 3.5rem;
    margin: 0 auto var(--space-2);
    display: block;
    border-radius: var(--radius-sm);
}

.coupon-modal-dialog h3 {
    font-family: var(--font-serif);
    margin: 0.375rem 0 var(--space-3);
}

.coupon-modal-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    padding: var(--space-2);
    border: 2px dashed var(--color-purple);
    border-radius: var(--radius-md);
    background: #F4EBFB;
    cursor: pointer;
    font-family: var(--font-display);
    margin-bottom: var(--space-3);
}

#coupon-modal-code-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--color-purple);
}

.coupon-modal-copy-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Special article styling classes */
.mt1 { margin-top: var(--space-1); }
.mt2 { margin-top: var(--space-2); }
.mt3 { margin-top: var(--space-4); }
.mt4 { margin-top: var(--space-6); }

.mb1 { margin-bottom: var(--space-1); }
.mb2 { margin-bottom: var(--space-2); }
.mb3 { margin-bottom: var(--space-4); }
.mb4 { margin-bottom: var(--space-6); }

.p1 { padding: var(--space-1); }
.p2 { padding: var(--space-2); }
.p3 { padding: var(--space-3); }

/* ---------- Content column (readable-width text pages) ---------- */

.content-column {
    max-width: 56rem;
    margin: 0 auto;
}

/* ---------- Curated pages ---------- */

.curated-hero-overlay h1 { color: #fff; margin: 0; }

.curated-page-blocks {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin: var(--space-4) 0;
}

.curated-block-image {
    margin: 0;
}

.curated-block-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.curated-block-image figcaption {
    margin-top: var(--space-1);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.curated-card-description {
    margin-top: 0.375rem;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.curated-card-badge {
    background: var(--color-purple);
    color: #fff;
    margin-bottom: var(--space-1);
}

/* Retailer (store) card: logo top-right in a fixed visual column, button flows under the copy. */
.curated-retailer-card {
    display: flex;
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    overflow: hidden;
}

.curated-retailer-visual {
    flex-shrink: 0;
    width: 12rem;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: var(--space-4);
}

.curated-retailer-logo {
    width: 10rem;
    height: 10rem;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
}

.curated-retailer-content {
    flex: 1;
    min-width: 0;
    padding: var(--space-4);
}

.curated-retailer-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.curated-retailer-content .deal-cta {
    margin-top: var(--space-3);
    display: inline-flex;
    width: auto;
}

/* Product card: a much larger visual column since the image is the sell. */
.curated-product-card {
    display: flex;
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    overflow: hidden;
}

.curated-product-visual {
    flex-shrink: 0;
    width: 24rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.curated-product-image {
    max-width: 20rem;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.curated-product-content {
    flex: 1;
    min-width: 0;
    padding: var(--space-4);
}

.curated-product-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.curated-product-price {
    font-weight: 700;
    font-size: 1.125rem;
    margin-top: 0.375rem;
}

.curated-product-content .deal-cta {
    margin-top: var(--space-3);
    display: inline-flex;
    width: auto;
}

@media (max-width: 40rem) {
    .curated-retailer-card, .curated-product-card { flex-direction: column; }
    .curated-retailer-visual, .curated-product-visual { width: 100%; justify-content: center; }
    .curated-product-visual { height: 16rem; }
}
.p4 { padding: var(--space-4); }