/* ==========================================================================
   editorial — Authoritative Editorial Review
   Serif headings, sharp corners, drop caps, score progress bars, magazine layout.
   Design language: premium, authoritative, review-focused. DM Sans body + Playfair Display headings.
   Optimized for in-depth review and comparison content across all categories.
   ========================================================================== */

/* NOTE: --primary/--primary-rgb/--primary-dark/--primary-light come from the
   inline color scheme in base_frontend.html. Do NOT override them here. */
:root {
    --bg: #faf9f6;
    --text: #2b2b2b;
    --text-light: #636363;
    --text-muted: #9c9c9c;
    --border: #e0ddd5;
    --card-bg: #fff;
    --accent: #c0392b;
    --ink: #1a1a1a;
    --gold: #d4a017;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .12);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
    --font-sans: 'DM Sans', 'Noto Sans SC', -apple-system, sans-serif;
    --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
    --glow-primary: none;
    --glow-accent: none;
    --hero-bg: linear-gradient(180deg, #1a1a1a 0%, #2b2b2b 100%);
    --hero-text: #faf9f6;
    --hero-subtext: rgba(250, 249, 246, .6);
    --footer-bg: #1a1a1a;
    --footer-text: rgba(250, 249, 246, .55);
    --footer-link: rgba(250, 249, 246, .45);
    --footer-heading: #faf9f6;
    --footer-border: rgba(250, 249, 246, .1);
    --footer-bottom-text: rgba(250, 249, 246, .3);
    --header-bg: color-mix(in srgb, var(--card-bg) 92%, transparent);
}

/* === Fluid Typography === */
.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
    font-style: italic;
}

.hero p {
    font-size: clamp(.88rem, 2vw, 1rem);
    line-height: 1.7;
    font-family: var(--font-sans);
}

.section-header h2 {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -.01em;
}

/* === Hero: editorial minimal === */
.hero::before {
    background: radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--gold) 8%, transparent) 0%, transparent 60%);
}

/* === Deal Cards: clean editorial style === */
.deal-card {
    border-radius: var(--radius-md);
    transition: box-shadow .3s var(--ease-out), border-color .3s var(--ease-out), transform .3s var(--ease-out);
    will-change: transform;
}
.deal-card:hover {
    border-color: var(--ink);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    transform: translateY(-3px);
}
.deal-card:active {
    transform: translateY(-1px);
    transition-duration: .1s;
}

/* === Deal card image: editorial frame === */
.deal-card-img {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--primary) 3%, var(--bg)));
}
.deal-card:hover .deal-card-img img {
    transform: scale(1.08);
}

/* === Hero CTA: solid editorial button === */
.hero-cta-btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    font-size: .82rem;
    box-shadow: none;
    transition: background .2s var(--ease-out), transform .2s var(--ease-out);
}
.hero-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: none;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.hero-cta-btn:active {
    transform: translateY(0);
    transition-duration: .1s;
}

/* === Section header: editorial rule + label === */
.section-header {
    position: relative;
    border-bottom: 2px solid var(--ink);
}
.section-header h2 {
    font-family: var(--font-heading);
}
.section-header h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.section-header::after {
    display: none;
}

/* === Category pills: editorial tag style === */
.cat-pill {
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .72rem;
    font-weight: 600;
    transition: all .25s var(--ease-out);
}
.cat-pill:hover,
.cat-pill.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
    box-shadow: none;
    transform: none;
}

/* === Pagination: editorial numbers === */
.pagination a,
.pagination span {
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    transition: all .2s var(--ease-out);
}
.pagination .active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
    box-shadow: none;
}
.pagination a:hover:not(.active) {
    border-color: var(--ink);
    color: var(--ink);
}
.pagination .prev,
.pagination .next {
    border-radius: var(--radius-sm);
}

/* === Deal CTA card: editorial solid bar === */
.deal-cta-card {
    border-radius: var(--radius-sm);
    background: var(--ink);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .7rem;
    font-weight: 600;
    transition: background .2s var(--ease-out), transform .2s var(--ease-out);
}
.deal-cta-card:hover {
    background: var(--primary);
    transform: scale(1.02);
    box-shadow: none;
}

/* === Deal badge: editorial accent === */
.deal-badge {
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .65rem;
    font-weight: 700;
}

/* === Hero stats: serif numbers === */
.hero-stat .num {
    font-family: var(--font-heading);
    font-weight: 700;
    font-style: italic;
    text-shadow: none;
}

/* === Sidebar: editorial card === */
.sidebar-card {
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    transition: border-color .25s var(--ease-out);
}
.sidebar-card:hover {
    border-left-color: var(--ink);
}
.sidebar-card h3 {
    font-family: var(--font-heading);
    font-style: italic;
}

/* === Article: drop cap + editorial typography === */
.article-content {
    font-family: var(--font-sans);
    line-height: 1.8;
    color: var(--text);
}
.article-content > p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 3.2em;
    font-weight: 700;
    float: left;
    line-height: .8;
    margin: 6px 8px 0 0;
    color: var(--ink);
}
.article-content h2,
.article-content h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}
.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent);
    text-underline-offset: 2px;
    transition: color .2s var(--ease-out);
}
.article-content a:hover {
    color: var(--ink);
    text-decoration-color: var(--ink);
}
.article-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 20px 0;
    padding: 12px 20px;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-light);
    background: color-mix(in srgb, var(--accent) 4%, transparent);
}

/* === Focus ring === */
:focus-visible {
    outline-color: var(--ink);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 25%, transparent);
}

/* === Scrollbar: minimal === */
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* === Mobile bottom nav: editorial === */
.mobile-bottom-nav .active {
    color: var(--primary);
    box-shadow: inset 0 -2px 0 var(--primary);
}

/* === Brand items: editorial frame === */
.brand-item {
    border-radius: var(--radius-md);
}
.brand-item:hover {
    border-color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.brand-item:hover img {
    transform: scale(1.06);
}

/* === Trust bar: editorial === */
.trust-bar {
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

/* === Breadcrumb === */
.breadcrumb a:hover {
    color: var(--primary);
}

/* ==========================================================================
   MOBILE RESPONSIVE — Editorial Theme
   ========================================================================== */

/* === Tablet (<= 768px) === */
@media (max-width: 768px) {
    .hero {
        padding: 28px 22px;
        border-radius: var(--radius-lg);
        margin-bottom: 24px;
    }
    .hero h1 {
        font-size: 1.45rem;
        font-style: italic;
        line-height: 1.25;
    }
    .hero p {
        font-size: .86rem;
        line-height: 1.6;
    }
    .hero-cta-btn {
        padding: 10px 24px;
        font-size: .78rem;
        letter-spacing: .03em;
    }
    .hero-stats {
        gap: 20px;
    }
    .hero-stat .num {
        font-size: 1.3rem;
    }
    .hero-stat .label {
        font-size: .72rem;
    }

    .section-header h2 {
        font-size: 1.15rem;
    }
    .section-header {
        border-bottom: 1.5px solid var(--ink);
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .deal-card {
        border-radius: var(--radius-md);
    }
    .deal-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
    }
    .deal-card-img {
        height: 100px;
        border-bottom: 1px solid var(--border);
    }
    .deal-card:hover .deal-card-img img {
        transform: scale(1.06);
    }

    .deal-cta-card {
        border-radius: var(--radius-sm);
        font-size: .68rem;
        padding: 8px 0;
        letter-spacing: .06em;
    }

    .cat-pill {
        padding: 6px 12px;
        font-size: .66rem;
        border-radius: var(--radius-sm);
        letter-spacing: .04em;
    }

    .pagination a,
    .pagination span {
        width: 36px;
        height: 36px;
        font-size: .78rem;
        border-radius: var(--radius-sm);
    }

    .sidebar-card {
        border-radius: var(--radius-md);
        border-left-width: 3px;
        padding: 14px;
    }

    .article-content > p:first-of-type::first-letter {
        font-size: 2.6em;
        margin: 4px 6px 0 0;
    }
    .article-content blockquote {
        font-size: .95rem;
        padding: 10px 16px;
        margin: 16px 0;
    }

    .brand-item {
        border-radius: var(--radius-md);
    }
}

/* === Phone (<= 480px) === */
@media (max-width: 480px) {
    .hero {
        padding: 22px 18px;
        border-radius: var(--radius-md);
    }
    .hero h1 {
        font-size: 1.25rem;
        line-height: 1.2;
    }
    .hero p {
        font-size: .82rem;
        line-height: 1.55;
    }
    .hero-cta-btn {
        padding: 10px 20px;
        font-size: .74rem;
        width: 100%;
        justify-content: center;
        letter-spacing: .02em;
    }
    .hero-stats {
        gap: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-stat .num {
        font-size: 1.1rem;
    }
    .hero-stat .label {
        font-size: .68rem;
    }

    .section-header h2 {
        font-size: 1rem;
    }
    .section-header h2::before {
        width: 5px;
        height: 5px;
    }
    .section-header a {
        font-size: .74rem;
    }

    .deal-card {
        border-radius: var(--radius-sm);
    }
    .deal-card-img {
        height: 88px;
    }
    .deal-card-body {
        padding: 12px 14px 10px;
    }
    .deal-cta-card {
        font-size: .64rem;
        padding: 7px 0;
        letter-spacing: .04em;
    }

    .cat-pill {
        padding: 4px 10px;
        font-size: .62rem;
    }

    .pagination a,
    .pagination span {
        width: 32px;
        height: 32px;
        font-size: .74rem;
    }
    .pagination .prev,
    .pagination .next {
        padding: 0 12px;
    }

    .trust-bar {
        gap: 14px;
        font-size: .74rem;
        padding: 10px 14px;
    }

    .sidebar-card {
        border-radius: var(--radius-sm);
        padding: 12px;
        border-left-width: 2px;
    }

    .article-content > p:first-of-type::first-letter {
        font-size: 2.2em;
    }
    .article-content {
        font-size: .9rem;
        line-height: 1.7;
    }
    .article-content blockquote {
        font-size: .88rem;
        padding: 8px 14px;
    }

    .brand-item {
        flex: 0 0 78px;
    }
    .brand-item img {
        width: 42px;
        height: 42px;
    }
}

/* === Small phone (<= 360px) === */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.1rem;
    }
    .hero-stats {
        gap: 10px;
    }
    .hero-stat .num {
        font-size: 1rem;
    }
    .deal-card-body {
        padding: 10px 12px 8px;
    }
    .article-content > p:first-of-type::first-letter {
        font-size: 1.8em;
    }
}
