/**
 * BulkBuy Theme - Main Stylesheet
 * Version: 1.0.0
 * 
 * A modern, Wirecutter-inspired WordPress theme for deal curation
 * and listicle articles.
 */

/* Inter Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   CSS Variables / Design Tokens - Matching Lovable Design System
   ========================================================================== */

:root {
    /* Colors - Matching Lovable Design System */
    --bb-primary: hsl(222, 47%, 11%);      /* Deep Navy #1e293b */
    --bb-accent: hsl(24, 95%, 53%);         /* Action Orange #f97316 */
    --bb-accent-hover: hsl(24, 95%, 45%);   /* Darker orange on hover */
    --bb-background: hsl(0, 0%, 100%);      /* White */
    --bb-background-alt: hsl(220, 14%, 96%); /* Secondary/Muted bg */
    --bb-surface: hsl(220, 14%, 96%);       /* Same as secondary */
    --bb-text: hsl(222, 47%, 11%);          /* Foreground - same as primary */
    --bb-text-muted: hsl(220, 9%, 46%);     /* Muted foreground */
    --bb-border: hsl(220, 13%, 91%);        /* Light border */
    --bb-success: hsl(142, 71%, 45%);       /* Green */
    --bb-warning: hsl(45, 93%, 47%);        /* Yellow */
    --bb-error: hsl(0, 84%, 60%);           /* Red */

    /* Typography - Inter Font Stack */
    --bb-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --bb-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    --bb-base-font-size: 16px;
    --bb-line-height: 1.6;

    /* Spacing */
    --bb-spacing-xs: 0.25rem;
    --bb-spacing-sm: 0.5rem;
    --bb-spacing-md: 1rem;
    --bb-spacing-lg: 1.5rem;
    --bb-spacing-xl: 2rem;
    --bb-spacing-2xl: 3rem;
    --bb-spacing-3xl: 4rem;

    /* Border Radius */
    --bb-radius-sm: 0.375rem;
    --bb-radius-md: 0.5rem;
    --bb-radius-lg: 0.75rem;
    --bb-radius-xl: 1rem;
    --bb-radius-2xl: 1.25rem;
    --bb-radius-full: 9999px;

    /* Shadows */
    --bb-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --bb-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --bb-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Transitions */
    --bb-transition: all 0.2s ease-in-out;
    --bb-transition-fast: all 0.1s ease-in-out;

    /* Layout */
    --bb-content-width: 800px;
    --bb-wide-width: 1200px;
    --bb-header-height: 72px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: var(--bb-base-font-size);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: var(--bb-font-family);
    font-size: 1rem;
    line-height: var(--bb-line-height);
    color: var(--bb-text);
    background-color: var(--bb-background);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--bb-spacing-md);
    font-weight: 700;
    line-height: 1.3;
    color: var(--bb-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: var(--bb-spacing-md);
}

a {
    color: var(--bb-accent);
    text-decoration: none;
    transition: var(--bb-transition);
}

a:hover {
    color: var(--bb-accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lists */
ul, ol {
    margin: 0 0 var(--bb-spacing-md);
    padding-left: var(--bb-spacing-lg);
}

li {
    margin-bottom: var(--bb-spacing-xs);
}

/* Code */
code {
    font-family: var(--bb-font-mono);
    font-size: 0.875em;
    background-color: var(--bb-surface);
    padding: 0.125rem 0.375rem;
    border-radius: var(--bb-radius-sm);
}

pre {
    font-family: var(--bb-font-mono);
    font-size: 0.875rem;
    background-color: var(--bb-surface);
    padding: var(--bb-spacing-md);
    border-radius: var(--bb-radius-md);
    overflow-x: auto;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.site-main {
    min-height: calc(100vh - var(--bb-header-height));
}

/* Single post page mobile padding */
.single-post {
    padding: 0;
}

.single-post > .wp-block-group {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 768px) {
    .single-post {
        padding: 0 1rem;
    }
    
    .single-post > .wp-block-group {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Constrained content areas on mobile */
    .wp-block-group.is-layout-constrained > * {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .single-post {
        padding: 0 0.75rem;
    }
}

.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--bb-spacing-2xl);
}

@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar-area {
        display: none;
    }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: white;
    border-bottom: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.75rem 0;
    min-height: 64px;
    max-width: var(--bb-wide-width);
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-branding .custom-logo {
    height: 32px;
    width: auto;
}

/* Logo icon styling */
.site-branding .custom-logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--bb-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-title a:hover {
    color: var(--bb-primary);
}

/* Logo styling - Matches Lovable exactly */
.site-logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.site-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bb-accent);
    border-radius: 0.5rem;
    flex-shrink: 0;
    color: white;
}

.site-logo-icon svg {
    width: 20px;
    height: 20px;
}

.site-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bb-primary);
}

/* Footer logo */
.footer-logo-link .site-logo-text,
.site-footer .wp-block-site-title a {
    color: var(--bb-primary);
}

.footer-tagline {
    color: var(--bb-text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: 1rem;
    max-width: 280px;
}

/* Navigation - Matches Lovable Reference */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-navigation .nav-item,
.main-navigation a,
.wp-block-navigation-item__content {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
}

.main-navigation .nav-item:hover,
.main-navigation a:hover,
.wp-block-navigation-item__content:hover {
    color: var(--bb-primary);
}

/* Active nav item underline */
.main-navigation .nav-item--active,
.main-navigation .current-menu-item a,
.main-navigation a[aria-current="page"] {
    color: var(--bb-primary);
    font-weight: 600;
}

.main-navigation .nav-item--active::after,
.main-navigation .current-menu-item a::after,
.main-navigation a[aria-current="page"]::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bb-primary);
    border-radius: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Search icon button - Small icon like Lovable */
.header-search-btn,
.wp-block-search__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.header-search-btn:hover,
.wp-block-search__button:hover {
    background: #f3f4f6;
    color: var(--bb-primary);
}

/* Admin button in header - Matches Lovable */
.header-admin-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #374151;
    transition: all 0.2s ease;
    text-decoration: none;
}

.header-admin-btn:hover {
    background: #f3f4f6;
    color: var(--bb-primary);
}

.header-search .wp-block-search__input {
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-lg);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: 180px;
    transition: all 0.2s ease;
}

.header-search .wp-block-search__input:focus {
    outline: none;
    border-color: var(--bb-accent);
    width: 220px;
}

/* Mobile Navigation */
@media (max-width: 1200px) {
    .main-navigation {
        gap: 1.25rem;
    }
    
    .main-navigation .nav-item,
    .main-navigation a {
        font-size: 0.8125rem;
    }
}

@media (max-width: 1024px) {
    .main-navigation {
        gap: 0.75rem;
    }
    
    .main-navigation .nav-item,
    .main-navigation a {
        font-size: 0.75rem;
    }
}

@media (max-width: 900px) {
    .main-navigation {
        display: none;
    }
    
    .site-header__inner {
        padding: 0.75rem 1rem;
    }
    
    /* Show mobile menu button */
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--bb-text);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 99;
    padding: 1rem;
    overflow-y: auto;
}

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

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

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--bb-accent);
}

/* ==========================================================================
   Hero Section - Matches Lovable exactly
   ========================================================================== */

.hero-section {
    position: relative;
    padding: 4rem 1.5rem 6rem;
    text-align: center;
    /* Gradient: from-primary/5 via-background to-accent/5 */
    background: linear-gradient(135deg, 
        hsla(222, 47%, 11%, 0.05) 0%,
        hsl(0, 0%, 100%) 50%,
        hsla(24, 95%, 53%, 0.05) 100%
    );
    border-bottom: 1px solid var(--bb-border);
    margin-bottom: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    background: white;
    border: 1.5px solid var(--bb-accent);
    color: var(--bb-accent);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hero-badge::before {
    content: "✨";
    font-size: 0.875rem;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.15;
    color: var(--bb-primary);
}

.hero-title .text-accent {
    color: var(--bb-accent);
}

.hero-description {
    font-size: 1rem;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto 1.75rem;
    line-height: 1.6;
}

/* Hero Button - Matches Lovable action button */
.hero-cta {
    display: flex;
    justify-content: center;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    background: var(--bb-accent);
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-button:hover {
    background: var(--bb-accent-hover);
}

.hero-button svg {
    flex-shrink: 0;
}

.hero-section .wp-block-button__link {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    background: var(--bb-accent);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.hero-section .wp-block-button__link:hover {
    background: var(--bb-accent-hover);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-section {
        padding: 2rem 1rem 2.5rem;
    }
    
    .hero-description {
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Industry Navigation / Browse by Industry - Matches Lovable
   ========================================================================== */

.industry-section {
    text-align: center;
    padding: 2rem 1.5rem;
    margin-bottom: 0;
    /* bg-secondary/30 */
    background: hsla(220, 14%, 96%, 0.3);
    border-bottom: 1px solid var(--bb-border);
}

.industry-section h2,
.industry-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--bb-primary);
}

.industry-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.industry-buttons .wp-block-button__link,
.industry-buttons .wp-block-button.is-style-outline .wp-block-button__link {
    background: white;
    color: var(--bb-text);
    border: 1px solid var(--bb-border);
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: none;
    transition: all 0.15s ease;
}

.industry-buttons .wp-block-button__link:hover,
.industry-buttons .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--bb-surface);
    border-color: hsla(24, 95%, 53%, 0.3);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--bb-primary);
}

.section-header p {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
}

/* Section with subtitle */
.section-header--with-subtitle {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
}

.featured-badge,
.editors-pick-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--bb-radius-full);
    font-size: 0.625rem;
    font-weight: 600;
    background: transparent;
    border: 1.5px solid var(--bb-accent);
    color: var(--bb-accent);
    text-transform: capitalize;
}

/* Featured Section */
.featured-section {
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Rankings Section */
.rankings-section {
    padding: 1.5rem 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* More Guides Section */
.more-guides-section {
    padding: 1.5rem 1.5rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.more-guides-section h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Article Cards
   ========================================================================== */

.cards-grid {
    display: grid;
    gap: 1.5rem;
}

.cards-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.cards-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.cards-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1024px) {
    .cards-grid--4,
    .cards-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .cards-grid--4,
    .cards-grid--3,
    .cards-grid--2 {
        grid-template-columns: 1fr;
    }
}

.article-card {
    background: var(--bb-background);
    border: 1px solid var(--bb-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.article-card__header {
    background: #f9fafb;
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-height: 130px;
}

.article-card__icon-wrap {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.article-card__icon-wrap p {
    margin: 0;
}

/* SVG icon */
.card-icon {
    margin-bottom: 0.25rem;
}

/* Count number */
.article-card__count {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bb-primary);
    line-height: 1;
}

/* Count label */
.article-card__count-label {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-top: 0.125rem;
}

.article-card__body {
    padding: 1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Fix WordPress block elements inside article cards */
.article-card .wp-block-post-title {
    padding: 0;
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
}

.article-card .wp-block-post-excerpt {
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--bb-text-muted);
}

.article-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.5rem;
    padding: 0;
}

.article-card__title a {
    color: var(--bb-primary);
}

.article-card__title a:hover {
    color: var(--bb-accent);
}

.article-card__excerpt {
    font-size: 0.8125rem;
    color: var(--bb-text-muted);
    margin: 0;
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    flex: 1;
}

.article-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    margin-top: auto;
    gap: 0.5rem;
    border-top: 1px solid #f1f5f9;
    background: white;
}

.article-card__meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.6875rem;
    color: #64748b;
}

.meta-author,
.meta-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: #64748b;
}

.article-card__link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bb-accent);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    text-decoration: none;
}

.article-card__link:hover {
    text-decoration: underline;
}

/* Category Tags */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.category-tags a,
.category-tag,
.wp-block-post-terms a {
    display: inline-block;
    background: white;
    color: #374151;
    padding: 0.1875rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.15s ease;
}

.category-tags a:hover,
.category-tag:hover,
.wp-block-post-terms a:hover {
    border-color: #9ca3af;
    color: #111827;
    background: white;
}

/* ==========================================================================
   Featured Guide
   ========================================================================== */

.featured-guide {
    display: grid;
    grid-template-columns: 200px 1fr;
    background: var(--bb-background);
    border: 1px solid #e5e7eb;
    border-left: 3px solid var(--bb-accent);
    border-radius: 0.5rem;
    overflow: hidden;
}

.featured-guide__visual {
    background: #f9fafb;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.featured-guide__visual .category-tag,
.featured-guide__visual .category-tags a {
    align-self: flex-start;
    background: white;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--bb-border);
}

.featured-guide__icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    gap: 0.25rem;
    text-align: center;
}

.featured-guide__icon .card-icon {
    margin-bottom: 0.375rem;
}

/* Featured guide count display */
.featured-guide__count {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--bb-primary);
    line-height: 1;
}

.featured-guide__count-label {
    font-size: 0.6875rem;
    color: #9ca3af;
}

.featured-guide__content {
    padding: 1.25rem 1.5rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Prevent text overflow */
}

.featured-guide__title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.featured-guide__title a {
    color: var(--bb-primary);
    text-decoration: none;
}

.featured-guide__title a:hover {
    color: var(--bb-accent);
}

.featured-guide__excerpt {
    color: #64748b;
    margin-bottom: 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.featured-guide__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.6875rem;
    color: #64748b;
}

.featured-guide__meta .wp-block-post-author {
    font-size: 0.6875rem;
}

.featured-guide__link {
    color: var(--bb-accent);
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    text-decoration: none;
}

.featured-guide__link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .featured-guide {
        grid-template-columns: 1fr;
        border-left: none;
        border-top: 3px solid var(--bb-accent);
    }
    
    .featured-guide__visual {
        padding: 1rem;
        min-height: 100px;
        border-left: none;
        border-top: none;
    }
    
    .featured-guide__content {
        padding: 1rem 1.25rem 1.25rem;
    }
    
    .featured-guide__title {
        font-size: 1rem;
    }
    
    .featured-guide__excerpt {
        font-size: 0.8125rem;
        -webkit-line-clamp: 3;
    }
}

/* ==========================================================================
   Deal Card Component
   ========================================================================== */

.deal-card {
    position: relative;
    background: var(--bb-background);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-lg);
    overflow: hidden;
    transition: var(--bb-transition);
}

.deal-card:hover {
    box-shadow: var(--bb-shadow-lg);
}

.deal-card--expired {
    opacity: 0.7;
}

.deal-card--full {
    padding: var(--bb-spacing-xl);
    padding-left: calc(var(--bb-spacing-xl) + 2.5rem); /* Make room for rank badge */
    position: relative;
}

/* Deal Card Header */
.deal-card__rank {
    position: absolute;
    top: 1.25rem;
    left: 1rem;
    z-index: 10;
}

.deal-card__rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bb-accent);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--bb-radius-full);
}

.deal-card__header {
    display: flex;
    align-items: center;
    gap: var(--bb-spacing-sm);
    margin-bottom: var(--bb-spacing-md);
    flex-wrap: wrap;
}

.deal-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.deal-card__badge {
    display: inline-block;
    background: var(--bb-accent);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: var(--bb-radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Deal Card Meta */
.deal-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bb-spacing-md);
    margin-bottom: var(--bb-spacing-lg);
    font-size: 0.875rem;
    color: var(--bb-text-muted);
}

.deal-card__meta span {
    display: flex;
    align-items: center;
    gap: var(--bb-spacing-xs);
}

.deal-card__meta .icon {
    width: 16px;
    height: 16px;
}

/* Deal Card Content */
.deal-card__content {
    padding: var(--bb-spacing-lg);
}

.deal-card__merchant {
    font-size: 0.75rem;
    color: var(--bb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--bb-spacing-sm);
}

.deal-card__description {
    margin-bottom: var(--bb-spacing-lg);
}

/* Deal Card Pricing */
.deal-card__pricing {
    display: flex;
    align-items: baseline;
    gap: var(--bb-spacing-sm);
    margin-bottom: var(--bb-spacing-md);
}

.deal-card__current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bb-primary);
}

.deal-card__original-price {
    font-size: 0.875rem;
    color: var(--bb-text-muted);
    text-decoration: line-through;
}

.deal-card__discount-badge {
    position: absolute;
    top: var(--bb-spacing-md);
    right: var(--bb-spacing-md);
    background: var(--bb-accent);
    color: white;
    padding: var(--bb-spacing-xs) var(--bb-spacing-sm);
    border-radius: var(--bb-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Deal Card Coupon */
.deal-card__coupon {
    display: flex;
    align-items: center;
    gap: var(--bb-spacing-sm);
    margin-bottom: var(--bb-spacing-md);
}

.coupon-code {
    flex: 1;
    background: var(--bb-surface);
    border: 1px dashed var(--bb-border);
    padding: var(--bb-spacing-sm) var(--bb-spacing-md);
    border-radius: var(--bb-radius-sm);
    font-family: var(--bb-font-mono);
    font-size: 0.875rem;
    text-align: center;
}

.coupon-copy-btn {
    display: flex;
    align-items: center;
    gap: var(--bb-spacing-xs);
    background: var(--bb-surface);
    border: 1px solid var(--bb-border);
    padding: var(--bb-spacing-sm) var(--bb-spacing-md);
    border-radius: var(--bb-radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--bb-transition);
}

.coupon-copy-btn:hover {
    background: var(--bb-accent);
    border-color: var(--bb-accent);
    color: white;
}

.coupon-copy-btn.copied {
    background: var(--bb-success);
    border-color: var(--bb-success);
    color: white;
}

/* Deal Card Pros/Cons */
.deal-card__pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bb-spacing-lg);
    margin-bottom: var(--bb-spacing-xl);
}

@media (max-width: 640px) {
    .deal-card__pros-cons {
        grid-template-columns: 1fr;
    }
}

.deal-card__pros,
.deal-card__cons {
    background: var(--bb-surface);
    padding: var(--bb-spacing-lg);
    border-radius: var(--bb-radius-md);
}

.pros-cons__title {
    display: flex;
    align-items: center;
    gap: var(--bb-spacing-sm);
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 var(--bb-spacing-md);
}

.pros-cons__title--pros {
    color: var(--bb-success);
}

.pros-cons__title--cons {
    color: var(--bb-warning);
}

.pros-cons__list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.pros-cons__list li {
    position: relative;
    padding-left: var(--bb-spacing-lg);
    margin-bottom: var(--bb-spacing-sm);
}

.pros-cons__list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--bb-accent);
}

/* Deal Card Actions */
.deal-card__actions {
    display: flex;
    gap: var(--bb-spacing-sm);
}

/* Deal Card Expired State */
.deal-card__expired-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.deal-card__expired-label {
    background: var(--bb-error);
    color: white;
    padding: var(--bb-spacing-sm) var(--bb-spacing-lg);
    border-radius: var(--bb-radius-md);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Buttons - Lovable Design System
   ========================================================================== */

.btn,
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Primary Button - Accent Orange */
.btn--primary,
.wp-block-button__link,
.wp-block-button.btn--primary .wp-block-button__link,
.wp-block-button.is-style-fill .wp-block-button__link {
    background: var(--bb-accent);
    color: white;
}

.btn--primary:hover,
.wp-block-button__link:hover,
.wp-block-button.btn--primary .wp-block-button__link:hover,
.wp-block-button.is-style-fill .wp-block-button__link:hover {
    background: var(--bb-accent-hover);
    color: white;
}

/* Secondary/Outline Button */
.btn--secondary,
.is-style-outline .wp-block-button__link {
    background: white;
    color: var(--bb-text);
    border: 1px solid var(--bb-border);
}

.btn--secondary:hover,
.is-style-outline .wp-block-button__link:hover {
    background: var(--bb-surface);
    border-color: var(--bb-border);
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn--lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* ==========================================================================
   Lovable Design System Components
   ========================================================================== */

/* Badge Variants */
.badge-deal {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bb-accent);
    color: white;
}

.badge-expired {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bb-surface);
    color: var(--bb-text-muted);
}

.badge-savings {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bb-success);
    color: white;
}

.badge-category {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--bb-surface);
    color: var(--bb-text);
    transition: background 0.2s ease;
}

.badge-category:hover {
    background: hsl(220, 14%, 92%);
}

/* Card Variants */
.card-elevated {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--bb-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease;
}

.card-elevated:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

.card-deal {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--bb-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.card-deal:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    border-color: hsla(24, 95%, 53%, 0.3);
}

.card-featured {
    background: white;
    border-radius: 0.75rem;
    border: 2px solid var(--bb-accent);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* Filter Pills */
.filter-pill {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--bb-border);
    background: white;
    color: var(--bb-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    background: var(--bb-surface);
}

.filter-pill-active {
    background: var(--bb-primary);
    color: white;
    border-color: var(--bb-primary);
}

/* Affiliate Notice */
.affiliate-notice {
    font-size: 0.75rem;
    color: var(--bb-text-muted);
    background: hsla(220, 14%, 96%, 0.5);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--bb-border);
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */

.comparison-table-wrapper {
    margin: var(--bb-spacing-xl) 0;
}

.comparison-table__title {
    margin-bottom: var(--bb-spacing-lg);
}

.comparison-table {
    background: var(--bb-background);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-lg);
    overflow: hidden;
}

.comparison-table__header {
    display: grid;
    grid-template-columns: 80px 1fr 150px 150px;
    background: var(--bb-surface);
    padding: var(--bb-spacing-md) var(--bb-spacing-lg);
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--bb-border);
}

.comparison-table__row {
    display: grid;
    grid-template-columns: 80px 1fr 150px 150px;
    padding: var(--bb-spacing-md) var(--bb-spacing-lg);
    border-bottom: 1px solid var(--bb-border);
    align-items: center;
}

.comparison-table__row:last-child {
    border-bottom: none;
}

.comparison-table__rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bb-accent);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: var(--bb-radius-full);
}

.comparison-table__col--company a {
    font-weight: 600;
    color: var(--bb-primary);
}

.comparison-table__col--company a:hover {
    color: var(--bb-accent);
}

@media (max-width: 768px) {
    .comparison-table__header {
        display: none;
    }
    
    .comparison-table__row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--bb-spacing-sm);
    }
    
    .comparison-table__col::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: var(--bb-spacing-sm);
    }
}

/* ==========================================================================
   Disclosure Box - Fully Rounded
   ========================================================================== */

.disclosure-box {
    display: flex;
    gap: 1rem;
    background: var(--bb-surface);
    border-left: 4px solid var(--bb-accent);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
}

.disclosure-box__icon {
    flex-shrink: 0;
    color: var(--bb-accent);
    width: 24px;
    height: 24px;
}

.disclosure-box__content {
    flex: 1;
}

.disclosure-box__title {
    font-weight: 600;
    color: var(--bb-text);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.disclosure-box__text {
    margin: 0;
    font-size: 0.875rem;
    color: var(--bb-text-muted);
    line-height: 1.6;
}

.disclosure-box--warning {
    border-left-color: var(--bb-warning);
}

.disclosure-box--warning .disclosure-box__icon {
    color: var(--bb-warning);
}

/* ==========================================================================
   Table of Contents
   ========================================================================== */

.toc-sidebar {
    position: sticky;
    top: calc(var(--bb-header-height) + 1.5rem);
    width: 220px;
    flex-shrink: 0;
    padding-right: 1rem;
}

/* Hide the static heading and placeholder when JS generates TOC */
.toc-sidebar > .wp-block-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bb-primary);
    margin: 0 0 1rem;
}

.toc-sidebar > p {
    font-size: 0.875rem;
    color: var(--bb-text-muted);
}

.toc {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.toc__title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bb-primary);
    margin: 0 0 1rem;
}

.toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--bb-border);
}

.toc__item {
    margin-bottom: 0;
}

.toc__item--level-3 {
    margin-left: 1rem;
}

.toc__link {
    font-size: 0.875rem;
    color: var(--bb-text-muted);
    display: block;
    padding: 0.5rem 0 0.5rem 1rem;
    margin-left: -2px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.toc__link:hover {
    color: var(--bb-text);
    border-left-color: var(--bb-text-muted);
}

.toc__link.active {
    color: var(--bb-accent);
    border-left-color: var(--bb-accent);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .toc-sidebar {
        display: none;
    }
}

/* ==========================================================================
   Article Content Wrapper
   ========================================================================== */

.article-content-wrapper,
.deal-content-wrapper {
    display: flex;
    gap: var(--bb-spacing-2xl);
}

.article-content,
.deal-content {
    flex: 1;
    max-width: var(--bb-content-width);
}

/* ==========================================================================
   Listicle Sections
   ========================================================================== */

.listicle-section {
    margin: var(--bb-spacing-2xl) 0;
    padding-bottom: var(--bb-spacing-2xl);
    border-bottom: 1px solid var(--bb-border);
}

.listicle-section:last-child {
    border-bottom: none;
}

.listicle-section__header {
    display: flex;
    align-items: center;
    gap: var(--bb-spacing-md);
    margin-bottom: var(--bb-spacing-lg);
}

.listicle-section__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bb-accent);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: var(--bb-radius-full);
    flex-shrink: 0;
}

.listicle-section__title {
    margin: 0;
}

.listicle-section__content {
    margin-bottom: var(--bb-spacing-xl);
}

/* Pros/Cons Grid in Content */
.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bb-spacing-lg);
    margin: var(--bb-spacing-lg) 0;
}

@media (max-width: 640px) {
    .pros-cons-grid {
        grid-template-columns: 1fr;
    }
}

.pros-box,
.cons-box {
    background: var(--bb-surface);
    padding: var(--bb-spacing-lg);
    border-radius: var(--bb-radius-md);
}

.pros-box h4 {
    color: var(--bb-success);
}

.cons-box h4 {
    color: var(--bb-warning);
}

/* Key Takeaways Box */
.key-takeaways-box {
    border-left: 4px solid var(--bb-accent);
    padding: var(--bb-spacing-lg);
    margin: var(--bb-spacing-xl) 0;
    border-radius: 0 var(--bb-radius-md) var(--bb-radius-md) 0;
}

.key-takeaways-box h4 {
    margin-top: 0;
}

.key-takeaways-box ol {
    margin-bottom: 0;
}

/* ==========================================================================
   Deal Filters
   ========================================================================== */

.deal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bb-spacing-md);
    padding: var(--bb-spacing-lg);
    background: var(--bb-surface);
    border-radius: var(--bb-radius-lg);
    margin-bottom: var(--bb-spacing-xl);
}

.deal-filters__group {
    display: flex;
    flex-direction: column;
    gap: var(--bb-spacing-xs);
}

.deal-filters__group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.deal-filters__group select {
    padding: var(--bb-spacing-sm) var(--bb-spacing-md);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-md);
    background: var(--bb-background);
    font-size: 0.875rem;
    min-width: 150px;
}

.deal-filters__actions {
    display: flex;
    align-items: flex-end;
    gap: var(--bb-spacing-sm);
    margin-left: auto;
}

@media (max-width: 768px) {
    .deal-filters {
        flex-direction: column;
    }
    
    .deal-filters__group select {
        width: 100%;
    }
    
    .deal-filters__actions {
        margin-left: 0;
        width: 100%;
    }
    
    .deal-filters__actions .btn {
        flex: 1;
    }
}

/* ==========================================================================
   Deals Grid
   ========================================================================== */

.deals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--bb-spacing-lg);
}

@media (max-width: 1024px) {
    .deals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .deals-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Industry Cards
   ========================================================================== */

.explore-industries {
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 1200px;
    background: var(--bb-surface);
    border-radius: 1rem;
}

.explore-industries h2 {
    margin-bottom: 1.5rem;
}

.industry-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .industry-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .explore-industries {
        padding: 1.5rem;
        margin: 1.5rem 1rem;
        border-radius: 0.75rem;
    }
    
    .industry-cards {
        grid-template-columns: 1fr;
    }
}

.industry-card {
    background: white;
    border: 1px solid var(--bb-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.industry-card:hover {
    border-color: hsla(24, 95%, 53%, 0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.industry-card h4 {
    margin: 0 0 0.25rem;
    color: var(--bb-accent);
    font-size: 1rem;
    font-weight: 600;
}

.industry-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--bb-text-muted);
}

/* ==========================================================================
   Newsletter Section
   ========================================================================== */

.newsletter-section {
    text-align: center;
    padding: 3.5rem 1.5rem;
    margin: 0;
    border-radius: 0;
    background: var(--bb-primary) !important;
}

.newsletter-section h2 {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.newsletter-section p {
    color: #94a3b8 !important;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input[type="email"],
.newsletter-form .wp-block-search__input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #334155;
    color: white;
}

.newsletter-form input[type="email"]::placeholder {
    color: #64748b;
}

.newsletter-form .btn,
.newsletter-form button,
.newsletter-form .wp-block-button__link {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #334155;
    color: white;
    min-width: 200px;
}

.newsletter-input::placeholder {
    color: #64748b;
}

.newsletter-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    background: var(--bb-accent);
    color: white;
    cursor: pointer;
    transition: background 0.15s ease;
}

.newsletter-btn:hover {
    background: #ea580c;
}

/* Section subtitle */
.section-subtitle {
    color: #64748b;
    font-size: 0.8125rem;
    margin: 0;
}

.newsletter-input:focus {
    outline: none;
    background: #3f4f63;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: hsla(220, 14%, 96%, 0.3);
    border-top: 1px solid var(--bb-border);
    padding: 3rem 1.5rem 0;
    color: var(--bb-text-muted);
}

.site-footer .wp-block-site-title {
    margin: 0;
}

.site-footer .wp-block-site-title a {
    color: var(--bb-primary);
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 3rem;
    padding: 0 1.5rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

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

@media (max-width: 640px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.footer-brand {
    padding-right: 2rem;
}

.footer-brand p {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #64748b;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
}

.footer-logo::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--bb-accent) 0%, #f43f5e 100%);
    border-radius: 5px;
    transform: rotate(-5deg);
}

.footer-col h4 {
    color: var(--bb-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav a {
    color: var(--bb-text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-nav a:hover {
    color: var(--bb-text);
}

.footer-divider {
    border-color: var(--bb-border);
    margin: 0;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--bb-border);
    font-size: 0.875rem;
    color: var(--bb-text-muted);
    margin-top: 3rem;
}

.footer-bottom p {
    margin: 0;
}

/* ==========================================================================
   Article Header
   ========================================================================== */

.article-header,
.deal-header,
.archive-header {
    padding: var(--bb-spacing-2xl) var(--bb-spacing-xl);
    margin-bottom: var(--bb-spacing-xl);
}

/* Make article header full width on mobile/tablet */
@media (max-width: 1024px) {
    .article-header,
    .deal-header,
    .archive-header {
        margin-left: calc(-1 * var(--bb-spacing-lg));
        margin-right: calc(-1 * var(--bb-spacing-lg));
        width: calc(100% + 2 * var(--bb-spacing-lg));
        padding: 1.5rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .article-header,
    .deal-header,
    .archive-header {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        padding: 1.5rem 1.25rem;
    }
}

.breadcrumbs-wrapper {
    margin-bottom: var(--bb-spacing-md);
}

.breadcrumbs-wrapper a {
    color: var(--bb-text-muted);
}

.article-title,
.deal-title,
.archive-title {
    margin-bottom: var(--bb-spacing-md);
}

.article-intro,
.deal-intro {
    font-size: 1.125rem;
    color: var(--bb-text-muted);
    margin-bottom: var(--bb-spacing-lg);
    max-width: 600px;
}

.article-meta,
.deal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bb-spacing-sm);
    font-size: 0.875rem;
    color: var(--bb-text-muted);
}

/* ==========================================================================
   About Guide Box
   ========================================================================== */

.about-guide-box {
    margin: var(--bb-spacing-2xl) 0;
    padding: var(--bb-spacing-xl);
    border-radius: var(--bb-radius-lg);
}

/* ==========================================================================
   Related Section - Cards with proper padding
   ========================================================================== */

.related-section {
    padding: 3rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--bb-border);
}

.related-section h2 {
    margin-bottom: 1.5rem;
}

/* Ensure article cards in related section have good padding */
.related-section .article-card,
.archive .article-card,
.category .article-card {
    background: white;
    border: 1px solid var(--bb-border);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
}

.related-section .article-card__header,
.archive .article-card__header,
.category .article-card__header {
    padding: 1rem 1.25rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Title and excerpt directly in article card (not wrapped in body) */
.related-section .article-card .wp-block-post-title,
.related-section .article-card .article-card__title {
    padding: 0 1rem;
    margin: 0.5rem 0 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
}

.related-section .article-card .wp-block-post-excerpt,
.related-section .article-card .article-card__excerpt {
    padding: 0 1rem;
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    color: var(--bb-text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smaller cards need less padding */
.related-section .article-card__header {
    padding: 0.75rem;
    min-height: 80px;
}

.related-section .article-card__body {
    padding: 0.75rem 1rem;
}

.related-section .article-card__footer {
    padding: 0.5rem 1rem;
}

.related-section .article-card__body,
.archive .article-card__body,
.category .article-card__body {
    padding: 1rem 1.25rem;
    flex: 1;
}

.related-section .article-card__footer,
.archive .article-card__footer,
.category .article-card__footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

/* Fix the cards grid in related section */
.related-section .cards-grid,
.related-section .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
}

/* Large Desktop - 5 per row */
@media (min-width: 1200px) {
    .related-section .cards-grid,
    .related-section .wp-block-post-template {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Desktop - 4 per row */
@media (max-width: 1199px) and (min-width: 1025px) {
    .related-section .cards-grid,
    .related-section .wp-block-post-template {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet - 3 per row */
@media (max-width: 1024px) and (min-width: 769px) {
    .related-section .cards-grid,
    .related-section .wp-block-post-template {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* Small Tablet - 2 per row */
@media (max-width: 768px) and (min-width: 481px) {
    .related-section .cards-grid,
    .related-section .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Mobile - 1 per row */
@media (max-width: 480px) {
    .related-section .cards-grid,
    .related-section .wp-block-post-template {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ==========================================================================
   Error 404
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: var(--bb-spacing-3xl) var(--bb-spacing-md);
}

.error-content {
    margin-bottom: var(--bb-spacing-3xl);
}

.error-404 .has-6-xl-font-size {
    font-size: 6rem;
    line-height: 1;
    color: var(--bb-accent);
    margin-bottom: var(--bb-spacing-md);
}

.error-search {
    max-width: 400px;
    margin: var(--bb-spacing-xl) auto;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */

.sidebar-widget {
    background: var(--bb-background);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-lg);
    padding: var(--bb-spacing-lg);
    margin-bottom: var(--bb-spacing-lg);
}

.sidebar-widget h3 {
    margin-bottom: var(--bb-spacing-md);
}

.newsletter-widget {
    border: none;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination,
.wp-block-query-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--bb-spacing-xs);
    margin: var(--bb-spacing-2xl) 0;
}

.pagination a,
.pagination span,
.wp-block-query-pagination-numbers a,
.wp-block-query-pagination-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--bb-spacing-sm);
    background: var(--bb-background);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-md);
    font-size: 0.875rem;
    color: var(--bb-text);
    transition: var(--bb-transition);
}

.pagination a:hover,
.wp-block-query-pagination-numbers a:hover {
    border-color: var(--bb-accent);
    color: var(--bb-accent);
}

.pagination .current,
.wp-block-query-pagination-numbers .current {
    background: var(--bb-accent);
    border-color: var(--bb-accent);
    color: white;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumbs {
    font-size: 0.875rem;
    margin-bottom: var(--bb-spacing-md);
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bb-spacing-xs);
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumbs__item {
    display: flex;
    align-items: center;
    gap: var(--bb-spacing-xs);
}

.breadcrumbs__link {
    color: var(--bb-text-muted);
    text-decoration: none;
    transition: var(--bb-transition);
}

.breadcrumbs__link:hover {
    color: var(--bb-accent);
}

.breadcrumbs__separator {
    color: var(--bb-border);
    margin: 0 var(--bb-spacing-xs);
}

.breadcrumbs__current {
    color: var(--bb-text);
    font-weight: 500;
}

/* Back link style (for headers) */
.breadcrumbs-wrapper {
    margin-bottom: var(--bb-spacing-md);
}

.breadcrumbs-wrapper a {
    display: inline-flex;
    align-items: center;
    gap: var(--bb-spacing-xs);
    color: var(--bb-text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--bb-transition);
}

.breadcrumbs-wrapper a:hover {
    color: var(--bb-accent);
}

.breadcrumbs-wrapper a::before {
    content: "←";
}

/* ==========================================================================
   Post Meta
   ========================================================================== */

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bb-spacing-md);
    font-size: 0.875rem;
    color: var(--bb-text-muted);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: var(--bb-spacing-xs);
}

.post-meta .icon {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Share Buttons
   ========================================================================== */

.share-buttons {
    display: flex;
    align-items: center;
    gap: var(--bb-spacing-sm);
}

.share-buttons__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bb-text-muted);
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bb-surface);
    border-radius: var(--bb-radius-full);
    color: var(--bb-text);
    transition: var(--bb-transition);
}

.share-button:hover {
    background: var(--bb-accent);
    color: white;
}

/* ==========================================================================
   Forms (Gravity Forms Compatibility)
   ========================================================================== */

.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"],
.gform_wrapper input[type="number"],
.gform_wrapper textarea,
.gform_wrapper select {
    width: 100%;
    padding: var(--bb-spacing-sm) var(--bb-spacing-md);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--bb-transition);
}

.gform_wrapper input:focus,
.gform_wrapper textarea:focus,
.gform_wrapper select:focus {
    outline: none;
    border-color: var(--bb-accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.gform_wrapper .gfield_label {
    font-weight: 600;
    margin-bottom: var(--bb-spacing-xs);
}

.gform_wrapper .gform_button {
    background: var(--bb-accent);
    color: white;
    border: none;
    padding: var(--bb-spacing-sm) var(--bb-spacing-xl);
    border-radius: var(--bb-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--bb-transition);
}

.gform_wrapper .gform_button:hover {
    background: var(--bb-accent-hover);
}

/* ==========================================================================
   Search Page Styles
   ========================================================================== */

.search-results {
    padding: 2rem 1.5rem;
}

.search-header {
    text-align: center;
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, 
        hsla(222, 47%, 11%, 0.05) 0%,
        hsl(0, 0%, 100%) 50%,
        hsla(24, 95%, 53%, 0.05) 100%
    );
    margin: -2rem -1.5rem 2rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.search-header h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.search-form-large {
    max-width: 500px;
    margin: 0 auto;
}

.search-form-large .wp-block-search__inside-wrapper {
    border: 1px solid var(--bb-border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.search-form-large .wp-block-search__input {
    padding: 1rem 1.25rem;
    border: none;
    font-size: 1rem;
}

.search-form-large .wp-block-search__button {
    background: var(--bb-accent);
    border: none;
    padding: 0 1.25rem;
}

.search-form-large .wp-block-search__button:hover {
    background: var(--bb-accent-hover);
}

.search-query-title {
    font-size: 1rem;
    color: var(--bb-text-muted);
    margin-bottom: 2rem;
}

/* ==========================================================================
   Search Icon Style
   ========================================================================== */

.header-search-icon .wp-block-search__button {
    background: transparent;
    border: none;
    padding: 0.5rem;
    color: var(--bb-text);
    box-shadow: none;
}

.header-search-icon .wp-block-search__button:hover {
    background: var(--bb-surface);
    color: var(--bb-accent);
    box-shadow: none;
    transform: none;
}

.header-search-icon .wp-block-search__inside-wrapper {
    border: none;
    padding: 0;
}

.header-search-icon .wp-block-search__input {
    display: none;
}

/* ==========================================================================
   WordPress Block Overrides
   ========================================================================== */

/* Navigation block */
.wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--bb-text);
    padding: 0.5rem 0;
}

.wp-block-navigation__responsive-container-content .wp-block-navigation-item__content:hover {
    color: var(--bb-accent);
}

/* Query block grid */
.wp-block-post-template.is-flex-container.is-flex-container.columns-4 {
    gap: 1.5rem;
}

/* Site title in header */
.site-header .wp-block-site-title {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
}

.site-header .wp-block-site-title a {
    color: var(--bb-primary);
    text-decoration: none;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-accent {
    color: var(--bb-accent);
}

.text-muted {
    color: var(--bb-text-muted);
}

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

/* Icons */
.icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    flex-shrink: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--bb-spacing-3xl) 0;
}

/* ==========================================================================
   Mobile & Tablet Responsive Styles
   ========================================================================== */

/* Tablet - 768px to 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
    .cards-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-section {
        padding: 3rem 1.5rem;
    }
    
    /* Single Article Page - Tablet */
    .single-post {
        padding: 0 1.5rem;
    }
    
    .article-title,
    .single-post .wp-block-post-title {
        font-size: 1.75rem;
    }
    
    .disclosure-wrapper {
        padding: 0 1.5rem;
    }
    
    .article-content-wrapper {
        padding: 0 1.5rem;
    }
    
    .related-section {
        padding: 2rem 1.5rem;
    }
}

/* Mobile - Under 768px */
@media (max-width: 768px) {
    /* Typography */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 0.9375rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 2rem 1rem 3rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .hero-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    /* Industry Section */
    .industry-section {
        padding: 1.5rem 1rem;
    }
    
    .industry-buttons {
        gap: 0.5rem;
    }
    
    .industry-buttons .wp-block-button__link {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    /* =============================================
       Single Article Page - Mobile Padding
       ============================================= */
    
    /* Content inside header needs proper spacing */
    .article-header > .wp-block-group,
    .article-header .wp-block-post-title,
    .article-header .wp-block-post-excerpt,
    .article-header .wp-block-post-terms,
    .article-header .article-meta,
    .article-header .breadcrumbs-wrapper {
        padding-left: 0;
        padding-right: 0;
    }
    
    .article-title,
    .single-post .wp-block-post-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .article-intro,
    .single-post .wp-block-post-excerpt {
        font-size: 0.9375rem;
    }
    
    /* Disclosure wrapper padding */
    .disclosure-wrapper {
        padding: 0 1.25rem;
    }
    
    .disclosure-box {
        padding: 1rem 1.25rem;
        margin: 1rem 0;
    }
    
    /* Article content wrapper */
    .article-content-wrapper {
        padding: 0 1.25rem;
        flex-direction: column;
    }
    
    .article-content {
        padding: 0;
        width: 100%;
    }
    
    /* Deal card full - mobile padding */
    .deal-card--full {
        padding: 1rem;
        padding-left: 3rem;
    }
    
    .deal-card__rank {
        left: 0.75rem;
        top: 1rem;
    }
    
    .deal-card__title {
        font-size: 1rem;
    }
    
    /* Related section */
    .related-section {
        padding: 1.5rem 1.25rem;
    }
    
    /* Cards Grid */
    .cards-grid--4,
    .cards-grid--3,
    .cards-grid--2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Section Headers */
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    /* Featured Guide */
    .featured-guide {
        grid-template-columns: 1fr;
    }
    
    .featured-guide__visual {
        min-height: 120px;
        border-left: none;
        border-top: 3px solid var(--bb-accent);
    }
    
    /* Article Cards */
    .article-card__header {
        min-height: 100px;
    }
    
    .article-card__title {
        font-size: 0.9375rem;
    }
    
    /* Newsletter Section */
    .newsletter-section {
        padding: 2.5rem 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input,
    .newsletter-btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .site-footer {
        padding: 2rem 1rem 0;
    }
    
    .footer-bottom {
        padding: 1.5rem 1rem;
    }
    
    /* Disclosure Box */
    .disclosure-box {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Explore Industries */
    .explore-industries {
        padding: 1.5rem;
        margin: 1rem;
        border-radius: 0.75rem;
    }
    
    /* Related Section */
    .related-section {
        padding: 2rem 0;
    }
}

/* Small Mobile - Under 480px */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .editors-pick-badge {
        font-size: 0.625rem;
    }
    
    .article-card__footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .article-card__meta {
        width: 100%;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .toc-sidebar,
    .sidebar-area,
    .share-buttons,
    .deal-filters,
    .pagination {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    a {
        color: inherit;
        text-decoration: underline;
    }
    
    .deal-card,
    .article-card {
        break-inside: avoid;
    }
}
