/**
 * Main CSS for CouponsCodeDeal Theme
 * Styles for plugin-generated content
 */

/* ===================================
   STORE CARDS
   =================================== */

.cmc-store-grid,
.cmc-featured-stores {
    display: grid;
    gap: 24px;
    margin: 30px 0;
}

.cmc-store-grid.columns-2,
.cmc-featured-stores.columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.cmc-store-grid.columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.cmc-store-grid.columns-4,
.cmc-featured-stores.columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.cmc-store-card {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cmc-store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #2271b1;
}

.store-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.store-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.store-badge.featured {
    background: var(--accent-color);
    color: #000;
}

.store-badge.verified {
    background: var(--secondary-color);
    color: #fff;
    top: 40px;
}

.store-logo {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

.store-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.store-logo-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
}

.store-info {
    text-align: center;
}

.store-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #333;
}

.store-excerpt {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.store-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.store-rating {
    color: #ffa500;
}

.rating-stars {
    font-size: 14px;
    letter-spacing: 2px;
}

.rating-value {
    margin-left: 5px;
    color: #666;
    font-weight: 600;
}

.store-coupons,
.store-cashback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* ===================================
   COUPON CARDS
   =================================== */

.cmc-coupon-list {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.cmc-coupon-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cmc-coupon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-dark));
}

.cmc-coupon-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.cmc-coupon-card.expired {
    opacity: 0.6;
    background: #f5f5f5;
}

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.discount-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
}

.coupon-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.coupon-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.coupon-badge.verified {
    background: var(--secondary-color);
    color: #fff;
}

.coupon-badge.exclusive {
    background: var(--accent-color);
    color: #fff;
}

.coupon-badge.featured {
    background: var(--accent-color);
    color: #000;
}

.coupon-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
}

.coupon-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.coupon-minimum {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.coupon-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.coupon-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: #666;
}

.coupon-expiry,
.coupon-uses {
    display: flex;
    align-items: center;
    gap: 5px;
}

.coupon-expired-notice {
    color: var(--danger-color);
    font-weight: 600;
}

.coupon-reveal-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coupon-reveal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.coupon-reveal-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.coupon-reveal-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

/* ===================================
   COUPON REVEAL MODAL
   =================================== */

.cmc-coupon-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cmc-coupon-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cmc-coupon-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-close:hover {
    color: #333;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.modal-discount {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.coupon-code-box {
    background: #f9f9f9;
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.coupon-code {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.copy-code-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-code-btn:hover {
    background: var(--primary-dark);
}

.copy-code-btn.copied {
    background: var(--secondary-color);
}

.modal-instructions {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0 0 25px 0;
}

.visit-store-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    text-decoration: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.visit-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* ===================================
   BREADCRUMBS
   Styles handled globally via style.css
   using .footer-breadcrumbs classes.
   =================================== */

/* ===================================
   SEARCH
   =================================== */

.cmc-store-search {
    position: relative;
    max-width: 600px;
    margin: 30px auto;
}

.store-search-form {
    position: relative;
}

.store-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.store-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.store-search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.store-search-submit:hover {
    background: var(--primary-dark);
}

.store-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-result-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s ease;
}

.search-result-item a:hover {
    background: #f9f9f9;
}

.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.result-title {
    flex: 1;
    font-weight: 600;
}

.result-count {
    font-size: 12px;
    color: #999;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .cmc-store-grid,
    .cmc-featured-stores {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .coupon-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .coupon-reveal-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

/* ----------------------------------
   Front-page specific layout tweaks
   (moved from inline styles in front-page.php)
   ---------------------------------- */

:root {
    --spacing-xs: 6px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --radius-lg: 12px;
    --shadow-lg: 0 6px 18px rgba(15,23,42,0.12);
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --white: #ffffff;
    --text-color: #111827;
    --text-light: #6b7280;
    --border-color: #e6e6e6;
    --bg-light: #f9fafb;
}

/* Spacing utility classes used in templates */
.pt-lg { padding-top: var(--spacing-lg) !important; }
.pb-lg { padding-bottom: var(--spacing-lg) !important; }
.mt-lg { margin-top: var(--spacing-lg) !important; }
.mb-lg { margin-bottom: var(--spacing-lg) !important; }

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 64px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: calc(var(--spacing-md) - 4px);
    color: var(--white);
    line-height: 1.05;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.hero-search {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-title {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
}

/* Store Grid */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: calc(var(--spacing-md) / 2);
}

.store-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: calc(var(--spacing-sm) + 6px);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.store-card-link {
    display: block;
    color: var(--text-color);
}

.store-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin: 0 auto calc(var(--spacing-xs));
}

.store-name {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
}

.coupon-count {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.category-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: calc(var(--spacing-md) + 8px);
    text-align: center;
    transition: transform 0.25s ease, background 0.25s ease;
}

.category-card:hover {
    background: var(--primary-color);
    color: var(--white);
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Coupon Grid */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: calc(var(--spacing-md) / 1.5);
}

/* ===================================
   RATING SYSTEM
   =================================== */

.user-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.user-rating .star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ddd;
    font-size: 24px;
    line-height: 1;
}

.user-rating .star:hover,
.user-rating .star.hover,
.user-rating .star.active {
    color: #ffb400;
    transform: scale(1.1);
}

.user-rating.empty .star.active {
    color: #ffb400;
}

.user-rating.rated {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rate-box {
    background: var(--primary-color, #2271b1);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    min-width: 32px;
    text-align: center;
}

.votes {
    color: var(--text-light, #666);
    font-size: 14px;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .store-grid,
    .category-grid,
    .coupon-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}


/* ===================================
   TRENDING COUPON CARDS (homepage)
   =================================== */

.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.trending-coupon-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.trending-coupon-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.trending-coupon-card.is-expiring-soon {
    border-color: #f59e0b;
}

.trending-coupon-card.is-featured {
    border-color: #2563eb;
}

.tc-ribbon {
    position: absolute;
    top: -1px;
    right: 1rem;
    background: #2563eb;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.625rem;
    border-radius: 0 0 6px 6px;
}

.tc-discount {
    font-size: 1.375rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1.2;
}

.tc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tc-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
}

.tc-badge--verified  { background: #d1fae5; color: #065f46; }
.tc-badge--urgent    { background: #fef3c7; color: #92400e; }
.tc-badge--exclusive { background: #dbeafe; color: #1e40af; }

.tc-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.tc-store {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #6b7280;
    text-decoration: none;
}

.tc-store:hover { color: #2563eb; }

.tc-store-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.tc-expiry {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
}

.tc-expiry--urgent { color: #d97706; font-weight: 600; }

.tc-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tc-btn--code {
    background: #2563eb;
    color: #fff;
}

.tc-btn--code:hover { background: #1d4ed8; }

.tc-btn--deal {
    background: #10b981;
    color: #fff;
}

.tc-btn--deal:hover { background: #059669; }

.tc-btn--expired {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.tc-btn-preview {
    font-size: 0.875rem;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

@media (max-width: 640px) {
    .coupon-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 400px) {
    .coupon-grid {
        grid-template-columns: 1fr;
    }
}


/* ===================================
   SEASONAL BANNER
   =================================== */

.seasonal-banner {
    padding: 0.625rem 0;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
}

.seasonal-banner .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.sb-emoji { font-size: 1.25rem; }

.sb-cta {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.5);
    color: inherit;
    transition: background 0.2s ease;
}

.sb-cta:hover { background: rgba(255,255,255,0.4); }

/* Seasonal colour schemes */
.sb-black-friday  { background: #111; color: var(--accent-color); }
.sb-christmas     { background: #b91c1c; color: #fff; }
.sb-valentines    { background: #be185d; color: #fff; }
.sb-halloween     { background: #c2410c; color: #fde68a; }
.sb-summer        { background: #0369a1; color: #fff; }
.sb-back-to-school{ background: #7c3aed; color: #fff; }


/* ===================================
   TRUST BAR
   =================================== */

.trust-bar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.875rem 0;
}

.trust-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.trust-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.375rem 2rem;
}

.trust-stat-value {
    font-size: 1.375rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
}

.trust-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    white-space: nowrap;
}

.trust-divider {
    width: 1px;
    height: 2.5rem;
    background: #e5e7eb;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .trust-bar-inner { gap: 0; }
    .trust-stat      { padding: 0.375rem 1rem; }
    .trust-divider   { height: 1.75rem; }
}


/* ===================================
   STAFF PICKS
   =================================== */

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.mb-0 { margin-bottom: 0 !important; }

.section-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
}


/* ===================================
   INSIGHT BADGES (single-store.php)
   =================================== */

.insights {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.insight-type {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.insight-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.badge-verified      { background: #d1fae5; color: #065f46; }
.badge-urgent        { background: #fef3c7; color: #92400e; }
.badge-verified-time { background: #eff6ff; color: #1e40af; }

/* Success rate bar (single-store.php) */
.insight-success-rate {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: #374151;
}

.sr-label { font-weight: 600; white-space: nowrap; }

.sr-bar {
    display: inline-block;
    width: 60px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    vertical-align: middle;
}

.sr-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 9999px;
}


/* ===================================
   SUCCESS RATE (homepage coupon card)
   =================================== */

.tc-success-rate {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.tc-sr-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.tc-sr-bar {
    flex: 1;
    display: block;
    height: 6px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.tc-sr-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 9999px;
}

.tc-verified-time {
    font-size: 0.6875rem;
    color: #6b7280;
    margin: 0;
}


/* ===================================
   HOMEPAGE — HERO SECTION
   =================================== */

.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #0369a1 100%);
    padding: 4.5rem 0 5.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* subtle pattern overlay */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.06) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}

.hero-content h1 {
    color: #fff;
    font-size: clamp(1.875rem, 4vw, 2.875rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.875rem;
    letter-spacing: -0.02em;
}

.hero-content > p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.0625rem;
    margin-bottom: 0;
    line-height: 1.6;
}

.hero-search {
    margin-top: 2rem;
}

@media (max-width: 640px) {
    .hero-section {
        padding: 3rem 0 4rem;
    }
}


/* ===================================
   HOMEPAGE — FEATURED STORES GRID
   =================================== */

.featured-stores-section {
    background: #fff;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .store-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.25rem;
    }
}

/* Override archive-page .store-card-link width for homepage grid context */
.featured-stores-section .store-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-stores-section .store-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
}

.featured-stores-section .store-card .store-card-link {
    width: auto;
    padding: 1.25rem 1rem;
    gap: 0.75rem;
    text-align: center;
    color: var(--text-color);
}

.featured-stores-section .store-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto;
}

.featured-stores-section .store-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0.375rem 0 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coupon-count {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
    text-align: center;
}

.featured-stores-section .badge-verified {
    display: inline-block;
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 9999px;
    font-weight: 600;
}


/* ===================================
   HOMEPAGE — CATEGORY GRID
   =================================== */

.categories-section {
    background: #f9fafb;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}

@media (min-width: 480px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .category-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}

@media (min-width: 1024px) {
    .category-grid { grid-template-columns: repeat(8, 1fr); }
}

.category-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.category-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 0.75rem;
    text-decoration: none;
    color: #1f2937;
    text-align: center;
    gap: 0.375rem;
}

.category-card h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: #1f2937;
    font-family: var(--font-primary);
}

.category-card p {
    font-size: 0.6875rem;
    color: #6b7280;
    margin: 0;
}

.category-card:hover h3 {
    color: #2563eb;
}


/* ===================================
   SECTION UTILITIES
   =================================== */

.section-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-family: var(--font-primary);
}

.text-center { text-align: center; }
.mb-lg { margin-bottom: 2rem; }
.mt-lg { margin-top: 2rem; }
.pt-lg { padding-top: 3rem; }
.pb-lg { padding-bottom: 3rem; }

/* ===================================
   COUPON POPUP — code reveal modal
   =================================== */

/* Code display + copy button row */
.popup-code-wrap {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: #f0fdf4;
    border: 2px dashed #16a34a;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

.popup-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #15803d;
    word-break: break-all;
}

.popup-copy-btn {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.popup-copy-btn:hover {
    background: #15803d;
}

.popup-copy-btn.copied {
    background: #0d9488;
}

/* "No code needed" message */
.popup-no-code {
    text-align: center;
    color: #6b7280;
    font-size: 0.9375rem;
    margin: 1rem 0;
    font-style: italic;
}

/* Paste-at-checkout hint (shown after auto-copy) */
.popup-hint {
    font-size: 0.8125rem;
    color: #6b7280;
    text-align: center;
    margin: 0.5rem 0 1rem;
}

/* Continue button inside popup */
.modal.offer-modal .link-button-primary {
    display: block;
    text-align: center;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 0.75rem;
    transition: background 0.2s ease;
}

.modal.offer-modal .link-button-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

/* ===================================
   HEADER CONTAINER FIX
   site-header uses display:flex + align-items:center which collapses
   flex children to content-width without an explicit width. Force the
   inner .container to fill full width so nav/logo align with page content.
   =================================== */

.site-header > .container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

/* ===================================
   SKIP TO CONTENT (Accessibility)
   =================================== */

.skip-to-content {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* ===================================
   GLOBAL FOCUS RING
   =================================== */

:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===================================
   HEADER ENHANCEMENTS
   =================================== */

/* Rainbow accent line at very top */
.site-header::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 50%, #10b981 100%);
}

/* Shadow added by JS when user scrolls */
.site-header.is-scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.3s ease;
}

/* Text logo when no custom logo uploaded */
.site-logo {
    font-size: 1.375rem;
    font-weight: 800;
    color: #1f2937;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

.site-logo:hover {
    color: #2563eb;
}

/* Nav link hover underline effect */
.primary-menu > li > a {
    position: relative;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.primary-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    border-radius: 2px;
    transition: width 0.25s ease;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
    color: #2563eb;
}

.primary-menu > li > a:hover::after,
.primary-menu > li.current-menu-item > a::after {
    width: 100%;
}

/* Search and menu toggle buttons */
.header-search-toggle,
.mobile-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 0.375rem;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
}

.header-search-toggle:hover,
.mobile-search-toggle:hover {
    color: #2563eb;
    background: #eff6ff;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: #f3f4f6;
}

/* Search overlay */
.search-overlay {
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(4px);
}

.search-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    max-width: 640px;
    margin: 0 auto;
}

.search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    font-size: 1rem;
    background: #fff;
    color: #1f2937;
    min-width: 0;
    transition: border-color 0.2s ease;
}

.search-field:focus {
    border-color: #2563eb;
    outline: none;
}

.search-submit {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.search-submit:hover {
    background: #1d4ed8;
}

.search-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease;
}

.search-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.search-suggestions {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}

.search-suggestions a {
    color: #93c5fd;
    text-decoration: none;
    margin-left: 0.5rem;
    transition: color 0.2s ease;
}

.search-suggestions a:hover {
    color: #fff;
}

/* ===================================
   HERO SECTION IMPROVEMENTS
   =================================== */

.hero-content > p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: rgba(255, 255, 255, 0.85);
    margin: 0.75rem 0 2rem;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .hero-section {
        padding: 3rem 0 4rem;
    }
}

/* ===================================
   FOOTER ENHANCEMENTS
   =================================== */

.site-footer {
    border-top: 3px solid #2563eb;
}

.footer-site-title a {
    color: #f9fafb;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    transition: color 0.2s ease;
}

.footer-site-title a:hover {
    color: #60a5fa;
}

.footer-description {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #9ca3af;
    margin-top: 0.5rem;
}

.footer-widget-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #d1d5db;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu-list li {
    margin-bottom: 0.5rem;
}

.footer-menu-list a {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.footer-menu-list a:hover {
    color: #60a5fa;
    padding-left: 0.25rem;
}

/* Footer bottom bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.footer-copyright {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
}

/* ===================================
   BUTTON UTILITIES
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
    line-height: 1;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border-color: #2563eb;
}

.btn-outline:hover {
    background: #eff6ff;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    border-radius: 10px;
}

/* ===================================
   COUPON GRID (homepage sections)
   =================================== */

.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 480px) {
    .coupon-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   STAFF PICKS SECTION
   =================================== */

.staff-picks-section .section-header {
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
}

/* ===================================
   RESPONSIVE — MOBILE
   =================================== */

@media (max-width: 767px) {
    .trust-bar-inner {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }

    .trust-divider {
        display: none;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ===================================
   BLOG — SHARED / HERO
   =================================== */

.blog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0 2.5rem;
    text-align: center;
}

.blog-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--white);
}

.blog-hero-subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* ===================================
   BLOG — LAYOUT (list + sidebar)
   =================================== */

/* 
.blog-layout,
.single-post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 1023px) {
    .blog-layout,
    .single-post-layout {
        grid-template-columns: 1fr;
    }
} 
*/

/* ===================================
   BLOG — CARD GRID
   =================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.blog-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 767px) {
    .blog-grid--3col {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   BLOG — CARD
   =================================== */

.blog-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.blog-card-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.04);
}

.blog-card-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #9ca3af;
}

.blog-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

.blog-card-cat {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2563eb;
    text-decoration: none;
}

.blog-card-cat:hover { text-decoration: underline; }

.blog-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    color: #1f2937;
}

.blog-card-title--sm {
    font-size: 0.9375rem;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-title a:hover { color: #2563eb; }

.blog-card-excerpt {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    flex: 1;
    line-height: 1.6;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.blog-meta-author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
    color: #374151;
}

.blog-meta-avatar {
    border-radius: 50%;
    width: 24px !important;
    height: 24px !important;
    object-fit: cover;
}

.blog-meta-sep { opacity: 0.5; }

.blog-meta-date,
.blog-meta-updated { color: #6b7280; }

.blog-card-read-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    margin-top: 0.25rem;
}

.blog-card-read-more:hover { text-decoration: underline; }

/* ===================================
   BLOG — PAGINATION
   =================================== */

.blog-pagination {
    margin-top: 2rem;
}

.blog-pagination ul {
    display: flex;
    gap: 0.375rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.blog-pagination ul li a,
.blog-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.blog-pagination ul li a:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.blog-pagination ul li span.current {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}

.blog-no-posts {
    padding: 3rem;
    text-align: center;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
}

/* ===================================
   BLOG — SIDEBAR
   =================================== */

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
}

.sidebar-widget-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid #eff6ff;
}

/* Sidebar Search */
.sidebar-search-form {
    display: flex;
    gap: 0.5rem;
}

.sidebar-search-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #1f2937;
    outline: none;
    transition: border-color 0.15s;
}

.sidebar-search-input:focus { border-color: #2563eb; }

.sidebar-search-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.15s;
}

.sidebar-search-btn:hover { background: #1d4ed8; }

/* Sidebar Categories */
.sidebar-categories {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.sidebar-categories li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4375rem 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.sidebar-categories li a:hover {
    background: #eff6ff;
    color: #2563eb;
}

.cat-count {
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    color: #6b7280;
}

/* Sidebar Recent Posts */
.sidebar-recent-posts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.sidebar-recent-post {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.srp-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
    display: block;
}

.srp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.srp-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.srp-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.srp-title:hover { color: #2563eb; }

.srp-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Sidebar Tags */
.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.sidebar-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 0.75rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.sidebar-tag:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* ===================================
   SINGLE POST — HERO
   =================================== */

.single-post-hero {
    position: relative;
    max-height: 420px;
    overflow: hidden;
}

.single-post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.single-post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
}

/* ===================================
   SINGLE POST — HEADER
   =================================== */

.single-post-header {
    margin-bottom: 1.75rem;
}

.single-post-cats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.post-cat-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: background 0.15s;
}

.post-cat-badge:hover { background: #dbeafe; }

.single-post-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin: 0 0 1rem;
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #6b7280;
}

.spm-author {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
}

.spm-author:hover { color: #2563eb; }

.spm-avatar {
    border-radius: 50%;
    width: 36px !important;
    height: 36px !important;
    object-fit: cover;
}

.spm-sep { opacity: 0.4; }

/* ===================================
   SINGLE POST — CONTENT
   =================================== */

.single-post-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    color: #111827;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.single-post-content p { margin-bottom: 1.25rem; }

.single-post-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.single-post-content ul,
.single-post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.single-post-content li { margin-bottom: 0.375rem; }

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.single-post-content blockquote {
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: #1e40af;
}

.single-post-content code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #be185d;
}

.single-post-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.single-post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ===================================
   SINGLE POST — TAGS
   =================================== */

.single-post-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.post-tags-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 0.8125rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.post-tag:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* ===================================
   SINGLE POST — SHARE
   =================================== */

.single-post-share {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.share-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}

.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.share-btn--twitter  { background: #000; color: #fff; }
.share-btn--facebook { background: #1877f2; color: #fff; }
.share-btn--linkedin { background: #0a66c2; color: #fff; }
.share-btn--copy     { background: #6b7280; color: #fff; }

/* ===================================
   SINGLE POST — AUTHOR BIO
   =================================== */

.single-post-author-bio {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.author-bio-avatar { flex-shrink: 0; }

.author-avatar-img {
    border-radius: 50%;
    width: 72px !important;
    height: 72px !important;
    object-fit: cover;
}

.author-bio-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin: 0 0 0.25rem;
}

.author-bio-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.author-bio-name:hover { color: #2563eb; }

.author-bio-desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   SINGLE POST — PREV / NEXT NAV
   =================================== */

.single-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.post-nav-link:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.post-nav-link--next { text-align: right; }

.post-nav-link--empty {
    background: transparent;
    border-color: transparent;
}

.post-nav-dir {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    font-weight: 600;
}

.post-nav-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===================================
   RELATED POSTS SECTION
   =================================== */

.related-posts-section {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

/* ===================================
   BLOG RESPONSIVE
   =================================== */

@media (max-width: 767px) {
    .blog-hero { padding: 2rem 0 1.75rem; }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .single-post-nav {
        grid-template-columns: 1fr;
    }

    .single-post-author-bio {
        flex-direction: column;
    }

    .share-btn span { display: none; }

    .single-post-nav .post-nav-link--next { text-align: left; }
}
