/* ═══════════════════════════════════════════════════════════════════════════
   TitanCart Store Theme — theme.css
   Custom styles for the TitanCart storefront.
   Built on Bootstrap 5 + Inter font.

   Version 2.0 — full design-token system with dark/light support.
   Variables drive every color. Toggle via [data-theme="dark"] on <html>.
   Brand indigo stays constant in both modes (it's the brand anchor).
   ═══════════════════════════════════════════════════════════════════════════ */


/* ── Hide WP admin bar on mobile ──────────────────────────────────────────── */
@media (max-width: 782px) {
    #wpadminbar { display: none !important; }
    html { margin-top: 0 !important; }
    body.admin-bar .sticky-top { top: 0 !important; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — light mode (default)
   ═══════════════════════════════════════════════════════════════════════════ */

:root,
[data-theme="light"] {
    /* Typography */
    --tct-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    /* Brand — indigo. Constant in both modes (anchor color). */
    --tct-brand:       #6366F1;
    --tct-brand-hover: #4F46E5;
    --tct-brand-soft:  #EEF2FF;

    /* Surfaces */
    --tct-bg:           #ffffff;
    --tct-bg-secondary: #fafafa;
    --tct-bg-tertiary:  #f5f5f7;
    --tct-bg-elevated:  #ffffff;
    --tct-bg-inverse:   #0A0A0F;
    --tct-bg-overlay:   rgba(0, 0, 0, 0.55);

    /* Text */
    --tct-text:           #171717;
    --tct-text-secondary: #525252;
    --tct-text-tertiary:  #a3a3a3;
    --tct-text-on-brand:   #ffffff;
    --tct-text-on-inverse: #ffffff;

    /* Borders */
    --tct-border:        #e5e5e5;
    --tct-border-strong: #d4d4d4;
    --tct-border-subtle: #f0f0f0;

    /* Semantic */
    --tct-success:      #16a34a;
    --tct-success-bg:   #dcfce7;
    --tct-success-text: #166534;
    --tct-warning:      #d97706;
    --tct-warning-bg:   #fef3c7;
    --tct-warning-text: #92400e;
    --tct-error:        #dc2626;
    --tct-error-bg:     #fef2f2;
    --tct-error-text:   #991b1b;
    --tct-info:         #2563eb;
    --tct-info-bg:      #eff6ff;
    --tct-info-text:    #1d4ed8;

    /* Effects */
    --tct-shadow-sm:         0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --tct-shadow:            0 4px 16px rgba(0,0,0,0.08);
    --tct-shadow-lg:         0 20px 60px rgba(0,0,0,0.16);
    --tct-shadow-card-hover: 0 4px 20px rgba(0,0,0,0.08);

    /* Geometry */
    --tct-radius-sm:   6px;
    --tct-radius:      8px;
    --tct-radius-lg:   12px;
    --tct-radius-xl:   16px;
    --tct-radius-pill: 50rem;

    /* Motion */
    --tct-transition:      0.2s ease;
    --tct-transition-fast: 0.15s ease;

    /* ── Legacy aliases ─ keep older selectors and plugin CSS working ── */
    --tct-dark:   #0A0A0F;
    --tct-muted:  #737373;
    --tct-light:  #f5f5f7;
    --tct-accent: #6366F1;
}


/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — dark mode
   Same token names, different values. Brand stays. Surfaces, text, borders flip.
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] {
    /* Surfaces flip */
    --tct-bg:           #0A0A0F;
    --tct-bg-secondary: #14141C;
    --tct-bg-tertiary:  #1C1C26;
    --tct-bg-elevated:  #161620;
    --tct-bg-inverse:   #ffffff;
    --tct-bg-overlay:   rgba(0, 0, 0, 0.7);

    /* Text flips */
    --tct-text:           #FAFAFA;
    --tct-text-secondary: #A3A3A3;
    --tct-text-tertiary:  #6B6B6B;
    --tct-text-on-brand:   #ffffff;
    --tct-text-on-inverse: #0A0A0F;

    /* Borders flip */
    --tct-border:        #262626;
    --tct-border-strong: #404040;
    --tct-border-subtle: #1a1a1a;

    /* Brand-soft inverts to a tinted dark surface */
    --tct-brand-soft: rgba(99, 102, 241, 0.12);

    /* Semantic backgrounds become tinted dark surfaces; text gets brighter */
    --tct-success-bg:   rgba(22, 163, 74, 0.12);
    --tct-success-text: #4ade80;
    --tct-warning-bg:   rgba(217, 119, 6, 0.12);
    --tct-warning-text: #fbbf24;
    --tct-error-bg:     rgba(220, 38, 38, 0.12);
    --tct-error-text:   #f87171;
    --tct-info-bg:      rgba(37, 99, 235, 0.12);
    --tct-info-text:    #60a5fa;

    /* Shadows get heavier — dark surfaces eat shadows */
    --tct-shadow-sm:         0 1px 3px rgba(0,0,0,0.4);
    --tct-shadow:            0 4px 16px rgba(0,0,0,0.5);
    --tct-shadow-lg:         0 20px 60px rgba(0,0,0,0.6);
    --tct-shadow-card-hover: 0 4px 20px rgba(0,0,0,0.4);

    /* Legacy aliases adjusted for dark mode */
    --tct-dark:   #FAFAFA;
    --tct-muted:  #A3A3A3;
    --tct-light:  #1C1C26;
    --tct-accent: #6366F1;
}


/* ═══════════════════════════════════════════════════════════════════════════
   THEME TRANSITION — only animate on toggle, not on initial paint
   The .tc-theme-transitioning class is added by JS on toggle click and
   removed after the transition completes (~400ms).
   ═══════════════════════════════════════════════════════════════════════════ */

html.tc-theme-transitioning,
html.tc-theme-transitioning *,
html.tc-theme-transitioning *::before,
html.tc-theme-transitioning *::after {
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                color 0.25s ease,
                box-shadow 0.25s ease !important;
}


/* ── Base ─────────────────────────────────────────────────────────────────── */

body {
    font-family: var(--tct-font);
    background-color: var(--tct-bg);
    color: var(--tct-text);
    -webkit-font-smoothing: antialiased;
}
/* Dark mode body: replace the flat #0A0A0F bg with a subtle blue-toned
   gradient (deep navy → slate) per Sean's modern-SaaS refactor spec.
   `background` shorthand needed because gradients can't ride on bg-color.
   `min-height: 100vh` keeps the gradient covering the viewport even on
   short pages (otherwise white below the body on tall viewports). */
[data-theme="dark"] body {
    background: linear-gradient(180deg, #0B0F1A 0%, #0F172A 100%);
    min-height: 100vh;
}

/* Header bg in dark mode: match the body gradient's starting color so the
   sticky nav reads as part of the same surface — no visible seam between
   header and hero. The actual header markup in the theme (header.php) is
   `<nav class="navbar navbar-expand-xl border-bottom sticky-top bg-white">`
   so we target `.navbar.bg-white`. The plugin's separate `.tc-nav` is also
   patched in case it appears on cart/account pages. Border-bottom shifts
   to a subtle white-translucent so the line still reads but doesn't break
   the gradient illusion. */
[data-theme="dark"] .navbar.bg-white,
[data-theme="dark"] .tc-nav {
    background-color: #0B0F1A !important;
    background:       #0B0F1A !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}


/* ── Top Bar ──────────────────────────────────────────────────────────────── */

.top-header {
    background: var(--tct-bg-inverse);
    color: var(--tct-text-on-inverse);
    font-size: 0.8125rem;
}

.top-header .nav-link {
    color: rgba(255,255,255,0.7);
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
    transition: color var(--tct-transition);
}

.top-header .nav-link:hover {
    color: #fff;
}

[data-theme="dark"] .top-header .nav-link {
    color: rgba(10,10,15,0.6);
}
[data-theme="dark"] .top-header .nav-link:hover {
    color: var(--tct-text-on-inverse);
}

/* WordPress nav menu items in the top bar — match .nav-link styling */
.top-header .menu-item a {
    color: rgba(255,255,255,0.7);
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
    transition: color var(--tct-transition);
    text-decoration: none;
}
.top-header .menu-item a:hover {
    color: #fff;
}
[data-theme="dark"] .top-header .menu-item a {
    color: rgba(10,10,15,0.6);
}
[data-theme="dark"] .top-header .menu-item a:hover {
    color: var(--tct-text-on-inverse);
}

/* Remove default WP menu list styling */
.top-header .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.strip-promo-message {
    color: rgba(255,255,255,0.85);
}
[data-theme="dark"] .strip-promo-message {
    color: rgba(10,10,15,0.75);
}


/* ── Logo ─────────────────────────────────────────────────────────────────── */

.tc-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--tct-brand);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.30);
}

.tc-logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.3px;
    color: var(--tct-text);
}


/* ── Theme toggle button ──────────────────────────────────────────────────── */

.tc-theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--tct-border);
    background: var(--tct-bg);
    color: var(--tct-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color var(--tct-transition-fast),
                border-color var(--tct-transition-fast),
                color var(--tct-transition-fast);
}
.tc-theme-toggle:hover {
    background: var(--tct-bg-tertiary);
    color: var(--tct-brand);
    border-color: var(--tct-brand);
}
.tc-theme-toggle i {
    font-size: 16px;
    line-height: 1;
}
/* Show the right icon for the current mode */
[data-theme="light"] .tc-theme-toggle .tc-icon-light { display: none; }
[data-theme="dark"]  .tc-theme-toggle .tc-icon-dark  { display: none; }


/* ── Navigation ───────────────────────────────────────────────────────────── */

.navbar {
    background: var(--tct-bg);
    z-index: 1030;
    border-bottom-color: var(--tct-border) !important;
}

.navbar .nav-link {
    font-weight: 500;
    color: var(--tct-text);
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem;
    transition: color var(--tct-transition);
}

.navbar .nav-link:hover {
    color: var(--tct-brand);
}

.btn-menu-close {
    background: none;
    border: 1px solid var(--tct-border);
    border-radius: var(--tct-radius);
    padding: 0.375rem 0.625rem;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: var(--tct-text);
}

.nav-search-control {
    font-size: 0.875rem;
    background-color: var(--tct-bg);
    color: var(--tct-text);
    border-color: var(--tct-border) !important;
}
.nav-search-control::placeholder {
    color: var(--tct-text-tertiary);
}
.nav-search-control:focus {
    background-color: var(--tct-bg);
    color: var(--tct-text);
    border-color: var(--tct-brand) !important;
    box-shadow: 0 0 0 0.15rem rgba(99, 102, 241, 0.15);
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.25rem;
    color: var(--tct-text);
    transition: color var(--tct-transition);
    cursor: pointer;
    text-decoration: none;
}

.btn-icon:hover {
    color: var(--tct-brand);
}

/* Cart/wishlist counter badge */
.tc-cart-count,
.tc-wishlist-count {
    background-color: var(--tct-brand) !important;
    color: var(--tct-text-on-brand) !important;
}


/* ── Hero Banner ──────────────────────────────────────────────────────────── */

.hero-banner {
    min-height: 500px;
}

@media (max-width: 767.98px) {
    .hero-banner {
        min-height: 350px;
    }
    .hero-banner .display-4 {
        font-size: 2rem;
    }
}


/* ── Categories Carousel ──────────────────────────────────────────────────── */

.section-title {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.3px;
    color: var(--tct-text);
}

.categories-section {
    overflow: hidden;
}

.categories-slider {
    overflow: visible !important;
}
.categories-slider .swiper-wrapper {
    padding: 8px 0;
}

.cat-img,
.cat-img-placeholder {
    width: 100%;
    max-width: 238px;
    aspect-ratio: 1;
    object-fit: cover;
    border: 3px solid var(--tct-border);
    transition: border-color var(--tct-transition),
                transform var(--tct-transition),
                box-shadow var(--tct-transition);
}

.cat-img:hover,
.cat-img-placeholder:hover {
    border-color: var(--tct-brand);
    transform: scale(1.08);
    box-shadow: var(--tct-shadow);
}

.cat-img-placeholder {
    background: var(--tct-bg-tertiary);
    color: var(--tct-text-tertiary);
}

.cat-title {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--tct-text);
}

.cat-number {
    font-size: 0.8125rem;
    color: var(--tct-text-secondary);
}

/* ── Product Card (same classes as plugin — loads on homepage where titancart.css may not) ── */
.product-card {
    background: var(--tct-bg-elevated);
    border: 1px solid var(--tct-border);
    border-radius: var(--tct-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    padding: 16px;
}
.product-card:hover {
    box-shadow: var(--tct-shadow-card-hover);
    transform: translateY(-2px);
}
.product-card__image-wrap { position: relative; overflow: hidden; border-radius: var(--tct-radius); }
.product-img { display: block; width: 100%; object-fit: cover; border-radius: var(--tct-radius); }
.product-img-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--tct-bg-tertiary);
    color: var(--tct-text-tertiary);
    border-radius: var(--tct-radius);
}
.product-card__badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    font-size: 12px; font-weight: 500;
    color: #fff;
    background: var(--tct-error);
    padding: 4px 14px; border-radius: 20px;
}
.product-title {
    font-size: 16px; font-weight: 500;
    color: var(--tct-text);
    text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.product-title:hover { color: var(--tct-brand); }
.product-card__body { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 0 0; }
.product-card__price-row { display: flex; align-items: center; gap: 8px; }
.product-price {
    font-size: 16px; font-weight: 500;
    color: var(--tct-text);
}
.product-original-price {
    font-size: 16px;
    color: var(--tct-text-tertiary);
    text-decoration: line-through;
    font-weight: 500;
}
.product-card__cart-btn {
    display: block; width: 100%;
    padding: 10px 0;
    font-size: 14px; font-weight: 500;
    text-align: center;
    background: var(--tct-bg-inverse);
    color: var(--tct-text-on-inverse);
    border: none; border-radius: 50px;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.product-card__cart-btn:hover {
    background: var(--tct-brand);
    color: var(--tct-text-on-brand);
}
.product-card__cart-btn--disabled {
    background: var(--tct-bg-tertiary) !important;
    color: var(--tct-text-tertiary) !important;
    cursor: not-allowed;
}

/* Out of stock badge */
.product-card__stock-badge {
    font-size: 12px; font-weight: 500;
    padding: 4px 12px; border-radius: 4px;
    display: inline-block; width: fit-content;
}
.product-card__stock-badge--out {
    background: var(--tct-error-bg);
    color: var(--tct-error-text);
}

/* Hover action circles (wishlist + quick view) */
.product-hover-actions {
    position: absolute; top: 12px; right: 12px; z-index: 5;
    display: flex; flex-direction: column; gap: 8px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0s linear 0.3s;
}
.product-card:hover .product-hover-actions {
    opacity: 1; visibility: visible;
    transition: opacity 0.3s, visibility 0s linear 0s;
}

/* Add to Cart overlay (inside image area, appears on hover) */
.product-card__cart-overlay {
    position: absolute; bottom: 12px; left: 12px; right: 12px; z-index: 5;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0s linear 0.3s;
}
.product-card:hover .product-card__cart-overlay {
    opacity: 1; visibility: visible;
    transition: opacity 0.3s, visibility 0s linear 0s;
}

/* Notify Me button — OOS products on homepage cards */
.product-card__cart-overlay--notify { opacity: 1 !important; visibility: visible !important; }
.product-card__notify-btn {
    background: var(--tct-bg-inverse) !important;
    color: var(--tct-text-on-inverse) !important;
    text-decoration: none !important;
    display: flex !important; width: 100%;
    align-items: center; justify-content: center; gap: 6px;
}
.product-card__notify-btn:hover {
    background: var(--tct-brand) !important;
    color: var(--tct-text-on-brand) !important;
}
.product-card__notify-btn i { font-size: 13px; }

.btn-action-circle {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    font-size: 15px; cursor: pointer;
    transition: background 0.15s;
    padding: 0; line-height: 1;
}
.btn-action-circle:hover { background: var(--tct-brand); }


/* ── Quick View Modal ─────────────────────────────────────────────────── */

.tc-qv-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--tct-bg-overlay);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity .25s, visibility 0s .25s;
}
.tc-qv-overlay--open {
    opacity: 1; visibility: visible;
    transition: opacity .25s, visibility 0s 0s;
}
.tc-qv-modal {
    background: var(--tct-bg-elevated);
    border-radius: var(--tct-radius-xl);
    max-width: 820px; width: 92%; max-height: 85vh; overflow-y: auto;
    box-shadow: var(--tct-shadow-lg);
    position: relative;
    transform: translateY(20px);
    transition: transform .25s ease;
}
.tc-qv-overlay--open .tc-qv-modal { transform: translateY(0); }
.tc-qv-close {
    position: absolute; top: 16px; right: 16px; z-index: 3;
    width: 36px; height: 36px; border-radius: 50%;
    border: none;
    background: var(--tct-bg-tertiary);
    color: var(--tct-text-secondary);
    font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
}
.tc-qv-close:hover {
    background: var(--tct-border);
    color: var(--tct-text);
}
.tc-qv-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.tc-qv-gallery {
    padding: 32px;
    display: flex; align-items: center; justify-content: center;
    background: var(--tct-bg-tertiary);
    border-radius: var(--tct-radius-xl) 0 0 var(--tct-radius-xl);
    min-height: 300px;
}
.tc-qv-gallery img { max-width: 100%; max-height: 400px; object-fit: contain; border-radius: var(--tct-radius); }
.tc-qv-gallery-placeholder { font-size: 48px; color: var(--tct-text-tertiary); }
.tc-qv-info { padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.tc-qv-info .tc-qv-category {
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--tct-text-secondary);
}
.tc-qv-info .tc-qv-title { font-size: 22px; font-weight: 600; color: var(--tct-text); margin: 0; }
.tc-qv-info .tc-qv-price {
    font-size: 20px; font-weight: 600; color: var(--tct-text);
    display: flex; align-items: center; gap: 10px;
}
.tc-qv-info .tc-qv-price-was {
    font-size: 16px;
    color: var(--tct-text-tertiary);
    text-decoration: line-through;
    font-weight: 400;
}
.tc-qv-info .tc-qv-stock { font-size: 13px; font-weight: 500; }
.tc-qv-info .tc-qv-stock--in { color: var(--tct-success); }
.tc-qv-info .tc-qv-stock--out { color: var(--tct-error); }
.tc-qv-info .tc-qv-desc {
    font-size: 14px;
    color: var(--tct-text-secondary);
    line-height: 1.6;
    max-height: 100px; overflow-y: auto;
}
.tc-qv-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.tc-qv-actions .tc-qv-qty {
    width: 70px; padding: 10px 8px;
    border: 1px solid var(--tct-border);
    background: var(--tct-bg);
    color: var(--tct-text);
    border-radius: var(--tct-radius);
    text-align: center; font-size: 14px;
}
.tc-qv-actions .tc-qv-add-btn {
    flex: 1; padding: 12px 24px;
    background: var(--tct-bg-inverse);
    color: var(--tct-text-on-inverse);
    border: none; border-radius: 50px;
    font-size: 14px; font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}
.tc-qv-actions .tc-qv-add-btn:hover {
    background: var(--tct-brand);
    color: var(--tct-text-on-brand);
}
.tc-qv-actions .tc-qv-add-btn:disabled { opacity: .5; cursor: not-allowed; }
.tc-qv-view-full {
    display: inline-block;
    font-size: 13px;
    color: var(--tct-brand);
    text-decoration: underline;
}
.tc-qv-loading {
    display: flex; align-items: center; justify-content: center;
    padding: 60px;
    font-size: 14px;
    color: var(--tct-text-secondary);
}
@media (max-width: 767.98px) {
    .tc-qv-body { grid-template-columns: 1fr; }
    .tc-qv-gallery {
        border-radius: var(--tct-radius-xl) var(--tct-radius-xl) 0 0;
        min-height: 200px; padding: 24px;
    }
    .tc-qv-info { padding: 24px; }
}

.slide-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--tct-border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--tct-transition);
    background: var(--tct-bg-elevated);
    color: var(--tct-text);
}

.slide-icon:hover {
    background: var(--tct-brand);
    color: var(--tct-text-on-brand);
    border-color: var(--tct-brand);
}


/* ── Product Tab Pills ────────────────────────────────────────────────────── */

#productTabs .nav-link {
    color: var(--tct-text-secondary);
    font-weight: 400;
    font-size: 16px;
    padding: 10px 48px;
}

#productTabs .nav-link.active {
    background: var(--tct-bg-inverse);
    color: var(--tct-text-on-inverse);
}


/* ── Just For You ─────────────────────────────────────────────────────────── */

.jfy-section {
    padding: 56px 0;
    background: var(--tct-bg);
}

.jfy-section__heading {
    font-size: 32px;
    font-weight: 500;
    color: var(--tct-text);
    margin: 0;
    letter-spacing: -0.5px;
}

/* 2-column grid: deal left, side cards right */
.jfy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

/* ── LEFT: Deal of the Day card ── */
.jfy-deal__card {
    background: var(--tct-bg-elevated);
    border: 1px solid var(--tct-border);
    border-radius: var(--tct-radius-lg);
    padding: 24px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Carousel slides */
.jfy-deal__carousel { position: relative; }

.jfy-deal__slide {
    display: none;
    animation: jfyFadeIn 0.4s ease;
}

.jfy-deal__slide--active { display: block; }

@keyframes jfyFadeIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Carousel navigation arrows */
.jfy-deal__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.jfy-deal__arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--tct-border);
    background: var(--tct-bg-elevated);
    color: var(--tct-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s;
}

.jfy-deal__arrow:hover {
    background: var(--tct-bg-inverse);
    color: var(--tct-text-on-inverse);
    border-color: var(--tct-bg-inverse);
}

.jfy-deal__image-wrap {
    position: relative;
    margin-bottom: 16px;
}

.jfy-deal__discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--tct-error);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--tct-radius-sm);
    z-index: 1;
}

.jfy-deal__img {
    max-height: 380px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--tct-radius);
}

.jfy-deal__img-placeholder {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tct-bg-tertiary);
    color: var(--tct-text-tertiary);
    border-radius: var(--tct-radius);
}

.jfy-deal__name {
    font-size: 16px;
    font-weight: 600;
    color: var(--tct-text);
    margin: 0 0 12px;
}

.jfy-deal__prices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.jfy-deal__price-old {
    font-size: 18px;
    font-weight: 600;
    color: var(--tct-error);
    text-decoration: line-through;
}

.jfy-deal__price {
    font-size: 20px;
    font-weight: 700;
    color: var(--tct-text);
}

.jfy-deal__btn {
    display: inline-block;
    background: var(--tct-bg-inverse);
    color: var(--tct-text-on-inverse);
    padding: 10px 32px;
    border-radius: var(--tct-radius-sm);
    border: none;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 4px;
}
.jfy-deal__btn:hover {
    background: var(--tct-brand);
    color: var(--tct-text-on-brand);
}

/* Countdown timer */
.jfy-deal__countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.jfy-cd__unit {
    background: var(--tct-bg-tertiary);
    border-radius: var(--tct-radius);
    padding: 8px 14px;
    min-width: 56px;
    text-align: center;
}

.jfy-cd__num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--tct-text);
    line-height: 1.2;
}

.jfy-cd__label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--tct-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ── RIGHT: Side promo banner cards ── */
.jfy-sides {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.jfy-side {
    background: var(--tct-bg-tertiary);
    border-radius: var(--tct-radius);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    min-height: 0;
    border-left: 4px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.jfy-side:hover {
    transform: translateY(-2px);
    box-shadow: var(--tct-shadow);
}

/* ── Card accent themes — semantic-tinted backgrounds ── */
.jfy-side--members  { background: var(--tct-info-bg);    border-left-color: var(--tct-info); }
.jfy-side--mystery  { background: var(--tct-warning-bg); border-left-color: var(--tct-warning); }
.jfy-side--savings  { background: var(--tct-success-bg); border-left-color: var(--tct-success); }

/* Alternate: image on left for even cards */
.jfy-side--img-left { flex-direction: row-reverse; }

.jfy-side__text {
    flex: 1;
    min-width: 0;
}

.jfy-side__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.jfy-side__label i { font-size: 13px; }

/* Label color themes */
.jfy-side--members .jfy-side__label {
    background: var(--tct-info-bg);
    color: var(--tct-info-text);
}
.jfy-side--mystery .jfy-side__label {
    background: var(--tct-warning-bg);
    color: var(--tct-warning-text);
}
.jfy-side--savings .jfy-side__label {
    background: var(--tct-success-bg);
    color: var(--tct-success-text);
}

.jfy-side__tagline {
    font-size: 18px;
    font-weight: 600;
    color: var(--tct-text);
    margin: 0 0 20px;
    line-height: 1.4;
}

.jfy-side__btn {
    display: inline-block;
    background: var(--tct-bg-inverse);
    color: var(--tct-text-on-inverse);
    padding: 10px 28px;
    border-radius: var(--tct-radius-sm);
    border: none;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.jfy-side__btn:hover {
    background: var(--tct-brand);
    color: var(--tct-text-on-brand);
}

.jfy-side__image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.jfy-side__image img {
    width: 236px;
    height: 158px;
    object-fit: contain;
    border-radius: var(--tct-radius);
}

.jfy-side__img-placeholder {
    width: 236px;
    height: 158px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--tct-radius);
    font-size: 28px;
}
/* Placeholder color themes — semantic tints with mid-stop icon */
.jfy-side--members .jfy-side__img-placeholder { background: var(--tct-info-bg);    color: var(--tct-info); }
.jfy-side--mystery .jfy-side__img-placeholder { background: var(--tct-warning-bg); color: var(--tct-warning); }
.jfy-side--savings .jfy-side__img-placeholder { background: var(--tct-success-bg); color: var(--tct-success); }

/* ── JFY Responsive ── */
@media (max-width: 991px) {
    .jfy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
    .jfy-side {
        flex-direction: column !important;
        text-align: center;
        border-left: none;
        border-top: 4px solid transparent;
    }
    .jfy-side--members { border-top-color: var(--tct-info); }
    .jfy-side--mystery { border-top-color: var(--tct-warning); }
    .jfy-side--savings { border-top-color: var(--tct-success); }
    .jfy-side__image img { width: 180px; height: 120px; }
    .jfy-side__img-placeholder { width: 180px; height: 120px; }
    .jfy-cd__unit { padding: 8px 10px; min-width: 50px; }
    .jfy-cd__num { font-size: 18px; }
}


/* ── Trust Badges ─────────────────────────────────────────────────────────── */

.trust-badges {
    background: var(--tct-bg);
    border-bottom: 1px solid var(--tct-border);
    padding: 48px 0;
}

.trust-badge {
    padding: 16px 12px;
}

.trust-badge__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--tct-bg-elevated);
    box-shadow: var(--tct-shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--tct-text);
    font-size: 24px;
    border: 1px solid var(--tct-border-subtle);
}

.trust-badge__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--tct-text);
    margin: 0 0 4px;
    letter-spacing: -0.2px;
}

.trust-badge__sub {
    font-size: 13px;
    color: var(--tct-text-secondary);
    margin: 0;
}


/* ── Footer ───────────────────────────────────────────────────────────────── */
/* Base styling lives in plugin's storefront-nav.css (.tc-footer__* classes).
   The theme's footer.php uses a 5-column layout (Brand + Shop + Categories +
   Company + Support) that doesn't match the plugin's default 4-col grid,
   so we override grid-template-columns scoped to the 5-col wrapper class.
   Tablet/mobile rules also need re-stating at the same specificity or the
   desktop 5-col would stick at smaller breakpoints (plugin's media-query
   rules use the lower-specificity bare `.tc-footer__inner` selector). */
.tct-footer-5col .tc-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
}
@media (max-width: 1024px) {
    .tct-footer-5col .tc-footer__inner {
        grid-template-columns: 1fr 1fr;
    }
    .tct-footer-5col .tc-footer__brand {
        grid-column: 1 / -1;
    }
}
@media (max-width: 768px) {
    .tct-footer-5col .tc-footer__inner {
        grid-template-columns: 1fr;
    }
}


/* ── Back to Top ──────────────────────────────────────────────────────────── */

.back-to-top {
    transition: opacity var(--tct-transition);
    text-decoration: none;
    background: var(--tct-bg-inverse);
    color: var(--tct-text-on-inverse);
}

.back-to-top.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}


/* ── WP Overrides ─────────────────────────────────────────────────────────── */

/* WordPress pagination — the_posts_pagination() output */
.navigation.pagination .nav-links {
    display: flex;
    gap: 0.375rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.navigation.pagination .nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--tct-border);
    border-radius: var(--tct-radius);
    color: var(--tct-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--tct-transition);
    background: var(--tct-bg-elevated);
}

.navigation.pagination .nav-links .page-numbers.current {
    background: var(--tct-home-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--tct-home-primary-glow);
}

.navigation.pagination .nav-links a.page-numbers:hover {
    background: var(--tct-bg-tertiary);
    border-color: var(--tct-border-strong);
    color: var(--tct-text);
}

/* Legacy list-based pagination (WooCommerce/shop pages) */
.page-numbers {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    justify-content: center;
}

.page-numbers li .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--tct-border);
    border-radius: var(--tct-radius);
    color: var(--tct-text);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--tct-transition);
}

.page-numbers li .page-numbers.current,
.page-numbers li .page-numbers:hover {
    background: var(--tct-bg-inverse);
    color: var(--tct-text-on-inverse);
    border-color: var(--tct-bg-inverse);
}

/* ── Blog archive cards ─────────────────────────────────────────────────── */
.main-content article.card {
    background: var(--tct-bg-elevated);
    border: 1px solid var(--tct-border);
    border-radius: var(--tct-radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.main-content article.card:hover {
    box-shadow: var(--tct-shadow-card-hover);
    transform: translateY(-2px);
}
.main-content article.card .card-body {
    padding: 1.25rem;
    background: var(--tct-bg-elevated);
}
.main-content article.card .card-title a {
    color: var(--tct-text);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--tct-transition);
}
.main-content article.card .card-title a:hover {
    color: var(--tct-brand);
}
.main-content article.card .card-text {
    color: var(--tct-text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.main-content article.card .btn-outline-dark {
    font-size: 0.8125rem;
    padding: 0.375rem 1rem;
    border-radius: 50rem;
    transition: all var(--tct-transition);
    border-color: var(--tct-border-strong);
    color: var(--tct-text);
}
.main-content article.card .btn-outline-dark:hover {
    background: var(--tct-brand);
    color: var(--tct-text-on-brand);
    border-color: var(--tct-brand);
}

/* Blog sidebar */
.main-content .col-lg-4 .widget {
    margin-bottom: 1.5rem;
}
.main-content .col-lg-4 .widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--tct-text);
}

/* Single blog post */
.single-post article .entry-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--tct-text);
}
.single-post article .entry-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--tct-text-secondary);
}
.single-post article .entry-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--tct-text);
}
.single-post article .entry-content p {
    margin-bottom: 1.25rem;
}

/* WordPress menu items in nav */
.navbar-nav .menu-item a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--tct-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
}

.navbar-nav .menu-item a:hover {
    color: var(--tct-brand);
}

/* Remove default WP menu list styling in navbar */
.navbar-nav.menu,
.navbar-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Remove default WP menu list styling in footer */
.tc-site-footer .menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tc-site-footer .menu-item a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 2;
    transition: color var(--tct-transition);
}
.tc-site-footer .menu-item a:hover {
    color: #fff;
}

/* WordPress custom logo */
.custom-logo-link {
    display: flex;
    align-items: center;
    /* Anchors elsewhere on the site have `text-decoration: underline` from
       global link styles. Without overriding it here, the site-name span
       injected next to the logo (when "Site Name Next to Logo" is enabled
       in Customizer) inherits the underline through the anchor. The
       fallback TC square uses .navbar-brand which already has Bootstrap's
       `text-decoration: none` — this rule provides the equivalent
       protection for the WP custom-logo path. */
    text-decoration: none;
}
.custom-logo-link:hover,
.custom-logo-link:focus {
    text-decoration: none;
}

.custom-logo {
    max-height: 50px;
    width: auto;
}


/* ── Bootstrap dark-mode patches ──────────────────────────────────────────── */
/* Some Bootstrap utility classes hardcode light colors. Patch them in dark mode.
   Note: `.navbar.bg-white` is patched earlier alongside the body gradient so
   the header bg matches the gradient's top stop exactly (#0B0F1A). */

[data-theme="dark"] .border-bottom {
    border-bottom-color: var(--tct-border) !important;
}
[data-theme="dark"] .text-muted {
    color: var(--tct-text-secondary) !important;
}
[data-theme="dark"] .bg-light {
    background-color: var(--tct-bg-secondary) !important;
}
[data-theme="dark"] .bg-dark {
    background-color: var(--tct-bg-elevated) !important;
}
[data-theme="dark"] .form-control {
    background-color: var(--tct-bg);
    color: var(--tct-text);
    border-color: var(--tct-border);
}
[data-theme="dark"] .form-control:focus {
    background-color: var(--tct-bg);
    color: var(--tct-text);
}
[data-theme="dark"] .form-control::placeholder {
    color: var(--tct-text-tertiary);
}
[data-theme="dark"] .offcanvas {
    background-color: var(--tct-bg);
    color: var(--tct-text);
}
[data-theme="dark"] .offcanvas .btn-close {
    filter: invert(1) brightness(0.9);
}
[data-theme="dark"] .alert {
    background-color: var(--tct-bg-tertiary);
    color: var(--tct-text);
    border-color: var(--tct-border);
}
[data-theme="dark"] .alert-warning {
    background-color: var(--tct-warning-bg);
    color: var(--tct-warning-text);
    border-color: rgba(217, 119, 6, 0.3);
}


/* ── Responsive ───────────────────────────────────────────────────────────── */

/* Tablet: cap category circle size */
@media (max-width: 991.98px) {
    .cat-img,
    .cat-img-placeholder { max-width: 160px; }

    #productTabs .nav-link {
        padding: 8px 28px;
        font-size: 14px;
    }
}

/* Mobile: small category circles, always-visible cart overlay, overflow fix */
@media (max-width: 575.98px) {
    .cat-img,
    .cat-img-placeholder { max-width: 120px; }

    .categories-section { overflow: hidden; }

    /* Mobile: always show overlays (no hover on touch) — compact sizing */
    .product-hover-actions {
        opacity: 1 !important;
        visibility: visible !important;
    }
    .product-hover-actions .btn-action-circle {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    .product-card__cart-overlay {
        opacity: 1 !important;
        visibility: visible !important;
        left: auto !important;
        right: 8px !important;
        bottom: 8px !important;
    }
    .product-card__cart-overlay .product-card__cart-btn {
        padding: 8px 20px !important;
        font-size: 12px !important;
    }

    /* Sale prices: allow wrap + shrink to fit narrow cards */
    .product-card__price-row {
        flex-wrap: wrap;
        gap: 2px 6px;
    }
    .product-price { font-size: 14px; }
    .product-original-price { font-size: 12px; }

    #productTabs .nav-link {
        padding: 8px 20px;
        font-size: 13px;
    }

    .tc-theme-toggle {
        width: 34px;
        height: 34px;
    }
    .tc-theme-toggle i { font-size: 14px; }
}

/* Medium-small: slightly smaller category circles */
@media (min-width: 576px) and (max-width: 767.98px) {
    .cat-img,
    .cat-img-placeholder { max-width: 140px; }
}

@media (max-width: 1199.98px) {
    .offcanvas-body .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--tct-border);
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Product Detail Page button overrides (S150)
   The plugin ships PDP action buttons as 50px pills with a flat black palette.
   Theme overrides them to match the homepage primary-button design language:
   10px radius, indigo gradient + glow on the primary action (Add to cart),
   outlined treatment on secondaries (Wishlist, Compare). Same shape across
   all three so they sit on the same shape language; fill differs to express
   primary-vs-secondary hierarchy.

   Specificity: `[data-theme]` attribute selector (matches any data-theme
   value, set on <html> by the no-FOUC inline JS in header.php) bumps these
   rules to 0,2,0, beating the plugin's bare-class 0,1,0 rules without
   locking the override to a single theme mode — gradient is intentionally
   identical in both light and dark, matching the homepage convention.

   Tokens: --tct-home-primary*, sourced from homepage.css :root which is
   enqueued site-wide per S146 architectural decision #4. A future cleanup
   will rename these to --tct-primary* — see docs/TODO.md "Architecture
   Improvements" → "Rename --tct-home-* token namespace to --tct-*".
   ═══════════════════════════════════════════════════════════════════════════ */

/* Add to cart — primary CTA, gradient fill + glow */
[data-theme] .tc-pdp__add-btn {
    background: var(--tct-home-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: var(--tct-home-primary-glow);
    transition: background 0.2s ease, filter 0.2s ease,
                transform 0.15s ease, box-shadow 0.2s ease;
}
[data-theme] .tc-pdp__add-btn:hover {
    background: var(--tct-home-primary-hover);
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(79, 70, 229, 0.45);
}
[data-theme] .tc-pdp__add-btn:disabled,
[data-theme] .tc-pdp__add-btn[data-tc-agreement-pending="1"] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* Wishlist + Compare — outlined treatment preserved, adopt 10px radius
   so all three action buttons share the same shape language. The plugin's
   existing border / color rules pass through unchanged. */
[data-theme] .tc-pdp__wish-btn,
[data-theme] .tc-pdp__compare-btn {
    border-radius: 10px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Plugin token flip for dark-mode text readability (S150 R1)
   The plugin (titancart.css) defines its own --tc-* token system in :root
   but never extends it with a [data-theme="dark"] variant — meaning every
   plugin rule that consumes var(--tc-text) or var(--tc-text-muted) is
   locked to light-mode values. PDP info column, cart text, account labels,
   checkout right-column text all show as dark-on-dark in dark mode for
   exactly this reason.

   Fix: flip the plugin's text tokens in dark mode by chaining them to the
   theme's already-defined --tct-* dark values. Single source of truth —
   if --tct-text changes, the plugin tokens follow. Targeted at TEXT only
   (not surfaces / borders) because plugin surfaces are either already
   handled per-component in shop.css / S146 work, or carry hardcoded
   values that need per-component review before flipping wholesale.

   Selector specificity note: theme.css is enqueued at WP priority 5 in
   functions.php — explicitly BEFORE the plugin's titancart.css. A plain
   `[data-theme="dark"]` selector ties with the plugin's `:root` on
   specificity (both 0,1,0) and loses the tiebreak by source order
   because titancart.css is the later sheet. `:root[data-theme="dark"]`
   bumps specificity to 0,2,0, beating the plugin's `:root` definition
   unconditionally regardless of load order.
   ═══════════════════════════════════════════════════════════════════════════ */

:root[data-theme="dark"] {
    --tc-text:       var(--tct-text);
    --tc-text-muted: var(--tct-text-secondary);
}

/* Hardcoded mid-gray text colors in plugin rules (#4e5562, ~slate-600).
   These bypass --tc-text-muted and need per-rule overrides. Same dark-mode
   target as muted body text. */
[data-theme="dark"] .tc-pdp__short-desc,
[data-theme="dark"] .tc-pdp__tab-panel[data-panel="description"] li {
    color: var(--tct-text-secondary);
}

/* Sequential-options "Choose X first to enable this option" hint —
   color hardcoded as #6b7280 in a JS-injected <style> tag at
   sequential-options.js:396. Override here with higher specificity
   (attribute + class = 0,2,0 beats the JS-injected single-class rule). */
[data-theme="dark"] .tc-product-option__lock-hint {
    color: var(--tct-text-secondary);
}

/* Reward Points labels ("Price in points:" / "Reward points:") — color
   hardcoded as #525252 in titancart.css:2313 (.tc-pdp__points-label).
   The numeric values are bright green (#16A34A) and stay readable, but
   the label text was disappearing into the dark background. Promote to
   full white in dark mode for legibility — Sean's call: "should be more
   white, hard to see." Markup at RewardPointsModule.php:486-498. */
[data-theme="dark"] .tc-pdp__points-label {
    color: var(--tct-text);
}

/* Review body text — color hardcoded twice in titancart.css: #4e5562 at
   line 2558 and #404040 at line 3049, the latter wins on source-order
   tiebreak (both specificity 0,1,0). At #404040 (neutral-700) the text
   was nearly invisible against the dark card-gradient surface. Promote
   to full white for legibility — Sean's call: "review text is too light
   should be whiter." Author name + date are styled separately and stay
   at their intended treatments (white + muted-gray respectively). */
[data-theme="dark"] .tc-review__content {
    color: var(--tct-text);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Plugin surface flip for dark mode (S150 R2)
   Round 1 flipped --tc-text and --tc-text-muted, making text readable on
   the dark page background. Inverse problem appeared on components with
   hardcoded #fff surfaces: text flipped white but surface stayed white,
   creating white-on-white invisibility on Wishlist + Compare buttons,
   Test Bundle card, inactive tabs, qty stepper input, and form inputs.

   Surface treatment: chain --tc-bg to --tct-home-card-bg (the indigo card
   gradient `linear-gradient(145deg, #111827, #1F2937)` consumed by every
   card on the homepage — product cards, blog tiles, why-choose, trust
   bar, etc.). Same gradient on PDP / cart / account / checkout surfaces
   keeps the storefront visually unified rather than introducing a new
   flat dark surface tone. Available globally per S146 decision #4
   (homepage.css :root tokens enqueued site-wide).

   --tc-bg-subtle and --tc-bg-hover stay as flat dark tones — these are
   used for hover states + slight elevations where a gradient would feel
   busy. Borders flip to the theme dark border (--tct-border).

   Selector specificity: `:root[data-theme="dark"]` (0,2,0) beats the
   plugin's `:root` (0,1,0) regardless of source order — required because
   theme.css enqueues at WP priority 5 (before titancart.css).
   ═══════════════════════════════════════════════════════════════════════════ */

:root[data-theme="dark"] {
    --tc-bg:         var(--tct-home-card-bg);
    --tc-bg-subtle:  var(--tct-bg-secondary);
    --tc-bg-hover:   var(--tct-bg-tertiary);
    --tc-border:     var(--tct-border);
    --tc-lightBg:    var(--tct-home-card-bg);
    --tc-muted:      var(--tct-text-secondary);
}

/* PDP buttons / inputs / cards / tabs that hardcode #fff surfaces.
   Single shared rule — same gradient as the token-chained surfaces above. */
[data-theme="dark"] .tc-pdp__wish-btn,
[data-theme="dark"] .tc-pdp__compare-btn,
[data-theme="dark"] .tc-pdp__qty-input,
[data-theme="dark"] .tc-pdp__bundle-card,
[data-theme="dark"] .tc-pdp__tab-btn {
    background: var(--tct-home-card-bg);
}

/* Tab hover border — plugin uses hardcoded #0e1115 (near-black, invisible
   on dark surfaces). Flip to a light border accent. */
[data-theme="dark"] .tc-pdp__tab-btn:hover {
    border-color: var(--tct-border-strong);
}

/* PDP quantity stepper +/- icons — plugin sets `color: #0e1115 !important`
   on `.tc-pdp__qty-btn .bi`. Need !important here to beat that. */
[data-theme="dark"] .tc-pdp__qty-btn .bi {
    color: var(--tct-text) !important;
}

/* PDP gift-wrap select — plugin embeds the dropdown arrow as an inline
   SVG with stroke='%23555' (mid-gray). On dark surface that's invisible.
   Multi-background syntax: SVG arrow layer on top of gradient surface
   (CSS comma-separated backgrounds — first listed paints on top). The
   arrow stroke '%23A3A3A3' matches --tct-text-secondary. */
[data-theme="dark"] .tc-pdp__qty-select {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A3A3A3' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center,
        var(--tct-home-card-bg);
}

/* Hardcoded mid-grays on description body text + option modifier hint. */
[data-theme="dark"] .tc-pdp__tab-panel[data-panel="description"],
[data-theme="dark"] .tc-product-option__mod {
    color: var(--tct-text-secondary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — PDP gradient extension to remaining elements (S150 R2.1)
   Mockup-driven follow-up to R2. Apply the indigo card gradient to size
   pills (liquid-glass treatment), thumbnail nav arrows, recommended
   products carousel arrows, bulk-buys tier cards. Apply the primary
   BUTTON gradient (matches main Add to cart) to active description tab
   and Test Bundle "Add all to cart" so they read as primary CTAs.

   Mode scoping: surface treatments are dark-mode only because the visual
   target (translucent dark glass, dark surfaces) only makes sense against
   the dark page bg. Primary-CTA-style overrides (active tab, bundle btn)
   use `[data-theme]` no-value selector so they apply in both light and
   dark, matching the main Add to cart pattern locked in R0.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Size pills (Small / Medium / Large) — liquid glass effect: translucent
   indigo with backdrop blur creates the glass look, subtle white inset
   highlight gives the depth. backdrop-filter falls back gracefully on
   browsers without support (Safari and modern Chrome / Firefox have it).
   `!important` defensive — first deploy didn't take, suspecting the
   plugin's heavy `inset 0 1px 0 rgba(255,255,255,0.9)` box-shadow was
   visually dominating + possible cache or specificity edge case.

   Two selectors covered: .tc-pdp__var-pill (interactive size variants)
   and .tc-pdp__attr-pill (display-only size attributes — different
   plugin rule but identical light-mode styling). Plugin uses one or
   the other depending on whether the size is a selectable variant or
   a fixed attribute display. */
[data-theme="dark"] .tc-pdp__var-pill,
[data-theme="dark"] .tc-pdp__attr-pill {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.55), rgba(31, 41, 55, 0.55)) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--tct-text) !important;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] .tc-pdp__var-pill:hover {
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}
/* Active state — unified for all pill types (variant + attribute). Both
   .tc-pdp__var-pill--active (interactive size variants) and
   .tc-pdp__attr-pill + .tc-pdp__shared-btn--active (size attribute pills
   used as <button>, see single.php:944) render with the primary CTA
   gradient + glow when selected. Matches the "Add all to cart" button and
   the active description tab — Sean's call: pill types should look the
   same when active so the page reads as one consistent system.

   Applied in BOTH light and dark modes via [data-theme] (matches other
   primary CTA conventions on the page). !important defensively to beat
   plugin rules and inline styles regardless of source-order or
   specificity edge cases. */
[data-theme] .tc-pdp__var-pill--active,
[data-theme] .tc-pdp__attr-pill.tc-pdp__shared-btn--active {
    background: var(--tct-home-primary) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: var(--tct-home-primary-glow) !important;
}

/* Thumbnail gallery up/down arrows on the PDP main gallery thumb strip. */
[data-theme="dark"] .tc-pdp__thumbs-arrow {
    background: var(--tct-home-card-bg);
    color: var(--tct-text);
    border-color: var(--tct-border);
}
[data-theme="dark"] .tc-pdp__thumbs-arrow:hover {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border-strong);
    color: var(--tct-text);
    filter: brightness(1.15);
}

/* Recommended products carousel arrows (also any other .tc-carousel__arrow
   instances on the storefront — flips them site-wide). */
[data-theme="dark"] .tc-carousel__arrow {
    background: var(--tct-home-card-bg);
    color: var(--tct-text);
    border-color: var(--tct-border);
}
[data-theme="dark"] .tc-carousel__arrow:hover {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border-strong);
    color: var(--tct-text);
    filter: brightness(1.15);
}

/* Bulk buys ("Buy More, Save More") — outer container takes the gradient,
   inner tier cards get a translucent overlay so they read as nested cards
   without merging visually with the parent. Active tier keeps the success
   green tint as a state signal. */
[data-theme="dark"] .tc-pdp__tiers {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
}
[data-theme="dark"] .tc-pdp__tier {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .tc-pdp__tier--active {
    background: rgba(22, 163, 74, 0.12);
    border-color: var(--tct-success-text);
}

/* Test Bundle "Add all to cart" — promote to primary CTA gradient matching
   the main Add to cart on PDP. Applies in both modes. The plugin's default
   has an outlined accent button, this replaces with full gradient fill. */
[data-theme] .tc-pdp__bundle-btn {
    background: var(--tct-home-primary);
    border: none;
    color: #fff;
    box-shadow: var(--tct-home-primary-glow);
    transition: background 0.2s ease, filter 0.2s ease,
                transform 0.15s ease, box-shadow 0.2s ease;
}
[data-theme] .tc-pdp__bundle-btn:hover {
    background: var(--tct-home-primary-hover);
    color: #fff;
    filter: brightness(1.05);
    transform: translateY(-1px);
}
[data-theme] .tc-pdp__bundle-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* Active description tab — primary button gradient. Both modes, matches
   the visual hierarchy of homepage primary CTAs and the main Add to cart. */
[data-theme] .tc-pdp__tab-btn--active {
    background: var(--tct-home-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--tct-home-primary-glow);
}

/* Tab content panel surface — plugin sets only border + radius + padding,
   no background, so the page bg shows through. Apply the card gradient
   so the description / attributes / reviews body reads as a proper card
   matching the rest of the storefront. Dark mode only. */
[data-theme="dark"] .tc-pdp__tab-content {
    background: var(--tct-home-card-bg);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Cart drawer dark mode (S151)
   The plugin's cart drawer (.tc-drawer namespace, titancart.css:4097-4380)
   was authored before the token system landed and uses hardcoded #fff
   surfaces, #111 text, #eee/#f0f0f0 borders, etc throughout. None of the
   S150 token flips reach it because the rules consume literals, not tokens.

   Per-rule overrides matching the pattern locked in S150 R2 for the PDP:
   surface = --tct-home-card-bg gradient (matches every other card on the
   storefront), text = --tct-text / --tct-text-secondary, borders =
   --tct-border, primary CTA = --tct-home-primary gradient + glow.

   Sibling for the filters drawer (.tc-offcanvas namespace, titancart.css
   :3574-3655): that one already consumes var(--tc-bg) / var(--tc-text) /
   var(--tc-text-muted) / var(--tc-border), so the S150 R1+R2 token flips
   at :root[data-theme="dark"] cover it for free — no explicit overrides
   needed in this section. Confirmed via Chrome MCP DOM probe at S151
   open: panel bg-image rendered as the home card gradient, header
   border-bottom resolved to #262626 (--tct-border), title color to
   #FAFAFA (--tct-text), close icon to #A3A3A3 (--tct-text-secondary),
   clear button outline to dark border + white text. Single outlier was
   the Apply button (flat blue rgb(37, 99, 235) — plugin's primary CTA
   default), but that's intentional plugin styling not a dark-mode bug.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Drawer panel surface — gradient matches every card on the storefront.
   Subtle white edge highlight + heavier shadow give visual separation from
   the page gradient (the plugin's #fff/.08 shadow vanishes on dark bg). */
[data-theme="dark"] .tc-drawer {
    background: var(--tct-home-card-bg);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
}

/* Header / footer dividers — flip from light #eee to dark border. */
[data-theme="dark"] .tc-drawer__header {
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] .tc-drawer__footer {
    border-top-color: var(--tct-border);
}

/* Title + subtotal — primary white text. */
[data-theme="dark"] .tc-drawer__title,
[data-theme="dark"] .tc-drawer__subtotal {
    color: var(--tct-text);
}

/* Count badge + close icon — muted secondary text. */
[data-theme="dark"] .tc-drawer__count,
[data-theme="dark"] .tc-drawer__close {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-drawer__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--tct-text);
}

/* Body scrollbar thumb — flip from #ddd to dark border-strong. */
[data-theme="dark"] .tc-drawer__body::-webkit-scrollbar-thumb {
    background: var(--tct-border-strong);
}

/* Empty cart state — illustration tone + body text + "Continue shopping" link. */
[data-theme="dark"] .tc-drawer__empty {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-drawer__empty p {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-drawer__shop-link {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-drawer__shop-link:hover {
    color: var(--tct-text);
    filter: brightness(1.15);
}

/* Cart item row — divider, image placeholder, option chip. */
[data-theme="dark"] .tc-drawer-item {
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] .tc-drawer-item__img-wrap,
[data-theme="dark"] .tc-drawer-item__img-placeholder {
    background: var(--tct-bg-tertiary);
}
[data-theme="dark"] .tc-drawer-item__name,
[data-theme="dark"] .tc-drawer-item__price {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-drawer-item__qty {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-drawer-item__opt {
    color: var(--tct-text-secondary);
    background: rgba(255, 255, 255, 0.06);
}

/* Remove (×) button — preserve the red destructive accent on hover but
   replace the light pink bg with a dark-translucent red. Idle color
   bumped from #bbb to muted secondary. */
[data-theme="dark"] .tc-drawer-item__remove {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-drawer-item__remove:hover {
    background: rgba(220, 38, 38, 0.15);
    color: var(--tct-error-text);
}

/* Outline button (View cart) — flip white-on-light to dark gradient with
   white text + dark border, mirroring the PDP outline-button pattern from
   S150 R2 (.tc-pdp__wish-btn / .tc-pdp__compare-btn). Hover keeps the
   gradient and uses a brighter border + brightness filter. */
[data-theme="dark"] .tc-drawer__btn--outline {
    background: var(--tct-home-card-bg);
    color: var(--tct-text);
    border-color: var(--tct-border);
}
[data-theme="dark"] .tc-drawer__btn--outline:hover {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border-strong);
    color: var(--tct-text);
    filter: brightness(1.15);
}

/* Primary button (Checkout) — promote to home primary gradient + glow,
   matching the "Add to cart" / "Add all to cart" / active description tab
   pattern locked in S150. Applied in BOTH modes via [data-theme] (no
   value), same convention as the bundle button at line ~1808. */
[data-theme] .tc-drawer__btn--primary {
    background: var(--tct-home-primary);
    color: #fff;
    border: none;
    box-shadow: var(--tct-home-primary-glow);
    transition: background 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
[data-theme] .tc-drawer__btn--primary:hover {
    background: var(--tct-home-primary-hover);
    color: #fff;
    border: none;
    filter: brightness(1.05);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Filters drawer card surface dark mode (S151 follow-up)
   Initial S151 audit verified that the .tc-offcanvas panel + chrome (header
   border, title, close icon, body, footer, clear/apply buttons) all flip
   correctly via the S150 R1+R2 token chain. What the audit missed —
   because the filter content is AJAX-loaded after the panel opens and
   wasn't in the DOM during the probe — is that filter SECTIONS render as
   visually-grouped bordered cards (.tc-filter-card, titancart.css:3524)
   and the card surface is hardcoded `background: #fff`.

   None of S150's --tc-bg flips reach this literal. On dark mode the
   section titles + category list items + checkbox labels all correctly
   flipped to white via S150 R1 but the surface they sit on stayed white,
   producing white-on-white invisibility for every label inside every
   filter card. (Surfaced by Sean immediately on first S151 deploy.)

   Fix: flip the card surface to the same home gradient used by every
   other card on the storefront. Sibling classes inside the card (titles,
   category list items, checkbox labels, counts, slider value labels)
   all consume --tc-text / --tc-text-muted via tokens so they read
   correctly once the surface flips.
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .tc-filter-card {
    background: var(--tct-home-card-bg);
}

/* Active-filter chip hover (.tc-chip, titancart.css:3504) — chip itself
   is `background: transparent` with token border + token color so flips
   correctly, but the :hover state hardcodes `border-color: #0e1115`
   (near-black) which is invisible against the dark page bg. Flip to the
   lighter dark border for visible hover feedback. */
[data-theme="dark"] .tc-chip:hover {
    border-color: var(--tct-border-strong);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Filter size pills dark mode (S151 follow-up)
   `.tc-filter-size-pill` (titancart.css:4064) hardcodes a light gradient
   `linear-gradient(to bottom, #ffffff, #f5f5f5)` with #d4d4d4 border and
   a strong white inset highlight. Color uses var(--tc-text) which S150
   R1 flips to white in dark mode — so the result was white text on white
   pills, sitting on the now-correct dark filter card surface.

   Active state is just as broken: plugin sets `linear-gradient(to bottom,
   #2a2a2a, #171717)` (near-black) which is invisible against the dark
   surface in dark mode (no contrast).

   Fix mirrors the PDP size pill pattern locked in S150 R2.1 (lines 1724-
   1759): liquid-glass translucent indigo for the inactive state, primary
   CTA gradient + glow for the active state — keeps the visual language
   consistent across PDP and shop filters.
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .tc-filter-size-pill {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.55), rgba(31, 41, 55, 0.55));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--tct-text);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .tc-filter-size-pill:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Active state — primary CTA gradient + glow, applied in BOTH modes via
   [data-theme] (no value), matching the PDP pill active rule. */
[data-theme] .tc-filter-size-pill--active {
    background: var(--tct-home-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--tct-home-primary-glow);
}
[data-theme] .tc-filter-size-pill--active:hover {
    background: var(--tct-home-primary-hover);
    color: #fff;
    border-color: transparent;
    filter: brightness(1.05);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Account dashboard dark mode (S151 — page-by-page Phase 3)
   The plugin's My Account page (templates/account/dashboard.php) uses an
   isolated CSS file (assets/css/account.css) authored before the token
   system landed. Every rule is ID-scoped (#tc-account .X, specificity
   1,1,0) and the root container hardcodes `color: #1a1a1a !important`
   (account.css:18) — the !important is the dealbreaker, plain --tc-text
   token flips can't override it. My override pattern:

     - Match plugin specificity: [data-theme="dark"] #tc-account .X (1,2,0)
       beats plugin's #tc-account .X (1,1,0) for non-!important rules.
     - Use !important on the root color rule to beat plugin's !important.

   Surfaces flip to home-card-bg gradient (matching every other card on
   the storefront — same pattern locked in S150 R2 for PDP). Borders to
   --tct-border. Text inherits --tct-text via the root rule.

   Banner element on this page uses .tc-shop__banner so it picks up the
   shop.css rule from S146 R13 plus the Pattern #97 wiring just added
   to dashboard.php to read `tct_shop_banner_image_dark` (mirror of
   single.php and archive.php).

   Coverage in this section: dashboard surface (sidebar nav + welcome
   intro + 3 stat cards + 5 action cards + recent-orders table). Other
   account sections (orders / wishlist / addresses / profile / rewards /
   subscriptions / returns / downloads) live in the same account.css
   and will need similar overrides — those land in follow-up rounds as
   Sean walks each one.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Root container — beats plugin's `color: #1a1a1a !important` (account.css:18).
   Single root override flips body text + every heading that inherits, which
   covers "Hello, Sean!" (h2 with no own color) + "Recent Orders" (h3) + most
   table cell text in one rule. */
[data-theme="dark"] #tc-account {
    color: var(--tct-text) !important;
}

/* Welcome intro paragraph — plugin sets color: #666 (account.css:483). */
[data-theme="dark"] #tc-account .tc-dash__welcome p {
    color: var(--tct-text-secondary);
}

/* Sidebar nav container — plugin sets bg: #fff + border: #e5e5e5
   (account.css:354-358). Flip to card gradient + dark border. */
[data-theme="dark"] #tc-account .tc-account__nav {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
}

/* Sidebar nav items — color #444 → muted secondary (idle); active +
   hover state flips bg + color. */
[data-theme="dark"] #tc-account .tc-account__nav-item {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] #tc-account .tc-account__nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--tct-text);
}
[data-theme="dark"] #tc-account .tc-account__nav-item.tc-active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--tct-text);
}
[data-theme="dark"] #tc-account .tc-account__nav-item--logout {
    border-top-color: var(--tct-border);
    color: var(--tct-text-tertiary);
}
[data-theme="dark"] #tc-account .tc-account__nav-item--logout:hover {
    color: var(--tct-error-text);
}

/* Stats cards (Total Orders / Total Spent / Reward Points) — plugin sets
   bg: #f8f8f8 + border: #eee (account.css:493-501). Stat values are #111
   (line 505); flip to white. Stat label is already #888 (line 509),
   leave as-is — reads fine on dark gradient. */
[data-theme="dark"] #tc-account .tc-dash__stat {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-dash__stat-value {
    color: var(--tct-text);
}

/* Action cards (My Orders / Rewards / Addresses / Profile / Continue
   Shopping) — plugin sets bg: #fff + border: #e5e5e5 + color: #333 +
   icon color #111 (account.css:522-542). Flip card surface to gradient,
   text + icon to white, hover border to a brighter dark border. */
[data-theme="dark"] #tc-account .tc-dash__card {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
    color: var(--tct-text);
}
[data-theme="dark"] #tc-account .tc-dash__card:hover {
    border-color: var(--tct-border-strong);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] #tc-account .tc-dash__card i {
    color: var(--tct-text);
}

/* Recent Orders table — plugin sets thead bg: #fafafa, color: #888,
   border-bottom: #eee (account.css:592-602). Body td border-bottom:
   #f5f5f5 (line 605). Hover bg: #fafafa (line 612). Order number
   color: #111 (line 616). Flip surfaces + borders, keep header text
   muted, keep order-num bright white. */
[data-theme="dark"] #tc-account .tc-orders-table thead th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--tct-text-secondary);
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-orders-table tbody td {
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-orders-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] #tc-account .tc-order-num {
    color: var(--tct-text);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Account sub-pages dark mode (S151 follow-up)
   Coverage for the 4 sub-pages Sean reported still showing white cards
   after the dashboard fix landed: My Subscriptions, Reward Points, My
   Addresses, My Profile. Plus shared classes used across multiple pages
   (buttons, modal, form fields).

   Selector specificity strategy: account.css rules are #tc-account .X
   (1,1,0), so [data-theme="dark"] #tc-account .X (1,2,0) wins. The
   subscriptions extension stylesheet is just .X (0,1,0) so plain
   [data-theme="dark"] .X (0,2,0) wins for that page.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared: buttons used across all account pages ────────────────────── */

/* Primary button — promote to home primary gradient + glow matching the
   storefront-wide CTA pattern locked in S150 (Add to cart, Bundle btn,
   Drawer Checkout). Applied in BOTH modes via [data-theme]. */
[data-theme] #tc-account .tc-btn--primary {
    background: var(--tct-home-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--tct-home-primary-glow);
}
[data-theme] #tc-account .tc-btn--primary:hover {
    background: var(--tct-home-primary-hover);
    color: #fff;
    border-color: transparent;
    filter: brightness(1.05);
}

/* Outline button — flip white-on-light to dark gradient + white text. */
[data-theme="dark"] #tc-account .tc-btn--outline {
    background: var(--tct-home-card-bg);
    color: var(--tct-text);
    border-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-btn--outline:hover {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border-strong);
    filter: brightness(1.15);
}

/* Danger button — keep red destructive accent, swap pink hover bg. */
[data-theme="dark"] #tc-account .tc-btn--danger {
    color: var(--tct-error-text);
    border-color: rgba(220, 38, 38, 0.3);
    background: transparent;
}
[data-theme="dark"] #tc-account .tc-btn--danger:hover {
    background: rgba(220, 38, 38, 0.12);
    border-color: var(--tct-error-text);
}

/* ── Shared: form fields used by profile + address modal + auth ─────────── */

[data-theme="dark"] #tc-account .tc-field label {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] #tc-account .tc-field input,
[data-theme="dark"] #tc-account .tc-field select,
[data-theme="dark"] #tc-account .tc-field textarea {
    background: var(--tct-bg-tertiary);
    color: var(--tct-text);
    border-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-field input:focus,
[data-theme="dark"] #tc-account .tc-field select:focus,
[data-theme="dark"] #tc-account .tc-field textarea:focus {
    border-color: var(--tct-text-secondary);
}
[data-theme="dark"] #tc-account .tc-pw-toggle {
    color: var(--tct-text-secondary);
}

/* ── Shared: address-editor modal (used from addresses + checkout) ──────── */

[data-theme="dark"] #tc-account .tc-modal {
    background: var(--tct-home-card-bg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] #tc-account .tc-modal__head {
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-modal__close {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] #tc-account .tc-modal__close:hover {
    color: var(--tct-text);
}

/* ── Addresses page ─────────────────────────────────────────────────────── */

[data-theme="dark"] #tc-account .tc-address-card {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
}
/* "Default" badge — plugin sets bg: #111 + color: #fff, fine in light mode
   but blends into dark gradient. Promote to home-primary indigo for
   visibility + brand consistency. */
[data-theme="dark"] #tc-account .tc-address-card__badge {
    background: var(--tct-home-primary);
    color: #fff;
}
[data-theme="dark"] #tc-account .tc-address-card__body {
    color: var(--tct-text-secondary);
}

/* ── Profile page ───────────────────────────────────────────────────────── */

[data-theme="dark"] #tc-account .tc-profile__card {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
}

/* ── Reward Points page ─────────────────────────────────────────────────── */

/* Standard balance card (Lifetime Earned, etc.) — flip surface + border. */
[data-theme="dark"] #tc-account .tc-rewards__balance-card {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
}
/* Primary balance card (Available Points) — keep the amber warm-tone signal
   but use a dark amber tint so it still reads as "this is your balance"
   without being a glaring light card. */
[data-theme="dark"] #tc-account .tc-rewards__balance-card--primary {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.18), rgba(251, 191, 36, 0.12));
    border-color: rgba(251, 191, 36, 0.35);
}
/* Icon tile — small white-on-light tile that reads as a circular badge.
   Flip to dark surface; the colored icons inside stay correct. */
[data-theme="dark"] #tc-account .tc-rewards__balance-icon {
    background: var(--tct-bg-tertiary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] #tc-account .tc-rewards__balance-card--primary .tc-rewards__balance-icon {
    background: var(--tct-bg-tertiary);
}
[data-theme="dark"] #tc-account .tc-rewards__balance-value {
    color: var(--tct-text);
}

/* "How it works" info card — flat off-white surface in light, flip to
   gradient in dark. Body text colors are mid-grays that #tc-account root
   color override already handles via inheritance — sub-overrides for the
   per-element hardcoded #374151 / #4B5563. */
[data-theme="dark"] #tc-account .tc-rewards__info-card {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-rewards__info-card h4 {
    color: var(--tct-text);
}
[data-theme="dark"] #tc-account .tc-rewards__info-card h4 i,
[data-theme="dark"] #tc-account .tc-rewards__info-item i {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] #tc-account .tc-rewards__info-item {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] #tc-account .tc-rewards__info-item strong {
    color: var(--tct-text);
}

/* History table — table-wrap wrapper has a border; thead bg + colors;
   tbody borders + reason text. Same structure as the orders table. */
[data-theme="dark"] #tc-account .tc-rewards__table-wrap {
    border-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-rewards__table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--tct-text-secondary);
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-rewards__table td {
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] #tc-account .tc-rewards__reason {
    color: var(--tct-text-secondary);
}

/* ── My Subscriptions page (extension stylesheet — class-scoped 0,1,0) ──── */

/* Subscription card surface — bg #fff → gradient. */
[data-theme="dark"] .tc-my-subs__card {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
}
/* Detail row borders + label/name/price colors. The card-price
   stays brand blue (already #2563EB) — flip to home-primary indigo
   for storefront brand consistency. */
[data-theme="dark"] .tc-my-subs__card-details {
    border-top-color: var(--tct-border);
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] .tc-my-subs__card-name,
[data-theme="dark"] .tc-my-subs__card-value,
[data-theme="dark"] .tc-my-subs__title {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-my-subs__card-label {
    color: var(--tct-text-secondary);
}

/* Action buttons — Pause / Cancel are outlined-with-color-accent in light,
   flip to dark surface keeping the colored border + text. Resume retains
   the green-tinted bg pattern via dark green. */
[data-theme="dark"] .tc-my-subs__action-btn {
    background: var(--tct-bg-tertiary);
    border-color: var(--tct-border);
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-my-subs__action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .tc-my-subs__action-btn--pause {
    border-color: rgba(37, 99, 235, 0.4);
    color: var(--tct-info-text);
}
[data-theme="dark"] .tc-my-subs__action-btn--pause:hover {
    background: rgba(37, 99, 235, 0.12);
}
[data-theme="dark"] .tc-my-subs__action-btn--resume {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.4);
    color: var(--tct-success-text);
}
[data-theme="dark"] .tc-my-subs__action-btn--resume:hover {
    background: rgba(22, 163, 74, 0.2);
}
[data-theme="dark"] .tc-my-subs__action-btn--cancel {
    border-color: rgba(220, 38, 38, 0.4);
    color: var(--tct-error-text);
}
[data-theme="dark"] .tc-my-subs__action-btn--cancel:hover {
    background: rgba(220, 38, 38, 0.12);
}

/* "Browse plans" CTA in empty state — promote to primary gradient. */
[data-theme] .tc-my-subs__browse-btn {
    background: var(--tct-home-primary);
    color: #fff;
    box-shadow: var(--tct-home-primary-glow);
}
[data-theme] .tc-my-subs__browse-btn:hover {
    background: var(--tct-home-primary-hover);
    color: #fff;
    filter: brightness(1.05);
}

/* Status pills (active / cancelled / expired) — tinted to match dark
   semantic backgrounds. Active stays green; cancelled/expired flip
   from light gray to translucent gray on dark. */
[data-theme="dark"] .tc-sub-status--active {
    background: var(--tct-success-bg);
    color: var(--tct-success-text);
}
[data-theme="dark"] .tc-sub-status--cancelled,
[data-theme="dark"] .tc-sub-status--expired {
    background: rgba(255, 255, 255, 0.06);
    color: var(--tct-text-secondary);
}

/* Action feedback messages — flip the success/error tints. */
[data-theme="dark"] .tc-my-subs__msg--success {
    background: var(--tct-success-bg);
    color: var(--tct-success-text);
}
[data-theme="dark"] .tc-my-subs__msg--error {
    background: var(--tct-error-bg);
    color: var(--tct-error-text);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — PDP subscription + download-agreement blocks dark mode (S151)
   Two PDP additions S150 missed because they only render conditionally:

   1. Subscription Plans selector (.tc-sub-plans*) — appears on PDPs for
      products with subscription plans configured. Lives in the extension
      stylesheet titancart-subscriptions/assets/css/subscriptions.css.
   2. Download Agreement gate (.tc-pdp__agreement*) — appears on PDPs for
      downloadable products with a required agreement. Lives in the main
      plugin titancart.css.

   Both use plain class selectors (0,1,0), so [data-theme="dark"] .X
   (0,2,0) wins without needing IDs. Surfaces flip to the home card
   gradient + dark borders; text + heading colors flip to tokens; blue
   accent colors (active pill border, link, agreement icon) stay as
   intentional UI signals.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── PDP subscription plan selector ─────────────────────────────────────── */

/* Outer wrapper — bg #fafafa, border #e5e5e5 → card gradient + dark border */
[data-theme="dark"] .tc-sub-plans {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
}
[data-theme="dark"] .tc-sub-plans__label {
    color: var(--tct-text);
}

/* Plan pill — bg #fff, border #e5e5e5. Inactive flips to flat dark surface
   so the pill reads as a sub-card inside the parent gradient. Hover + active
   states keep their blue accent for recognizability as a radio selection
   (lifted from --tct-info-text and home-primary). */
[data-theme="dark"] .tc-sub-plans__pill {
    background: var(--tct-bg-tertiary);
    border-color: var(--tct-border);
}
[data-theme="dark"] .tc-sub-plans__pill:hover {
    border-color: rgba(96, 165, 250, 0.4);
}
[data-theme="dark"] .tc-sub-plans__pill--active {
    border-color: var(--tct-info-text);
    box-shadow: 0 0 0 1px var(--tct-info-text);
}

/* Radio circle — gray border in light, dark border in dark. Active state
   (filled blue dot) inherits from the existing pill--active rule. */
[data-theme="dark"] .tc-sub-plans__pill-radio {
    border-color: var(--tct-border-strong);
}
[data-theme="dark"] .tc-sub-plans__pill--active .tc-sub-plans__pill-radio {
    border-color: var(--tct-info-text);
}
[data-theme="dark"] .tc-sub-plans__pill--active .tc-sub-plans__pill-radio::after {
    background: var(--tct-info-text);
}

/* Plan name + price text — token-flipped. Trial (green) + fee (amber)
   text colors are intentional semantic signals — leave as-is. */
[data-theme="dark"] .tc-sub-plans__pill-name {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-sub-plans__pill-price {
    color: var(--tct-text-secondary);
}

/* ── PDP download agreement gate ────────────────────────────────────────── */

/* Outer card — bg #fff + box-shadow rgba(0,0,0,.06) → card gradient +
   heavier shadow for dark visibility. */
[data-theme="dark"] .tc-pdp__agreement {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .tc-pdp__agreement-title {
    color: var(--tct-text);
}
/* Title icon stays blue (intentional UI signal, matches the agreement-link
   blue inside the content well). */

/* Scrollable content well — bg #fafafa, border #e5e5e5, color #333. Flips
   to flat dark surface (inner card pattern, distinct from outer gradient
   so the scrollable boundary is visually clear). Body color → muted
   secondary so reading the agreement text is comfortable. */
[data-theme="dark"] .tc-pdp__agreement-content {
    background: var(--tct-bg-tertiary);
    border-color: var(--tct-border);
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-pdp__agreement-content:focus {
    outline-color: var(--tct-info-text);
}
/* Links inside agreement content stay blue — intentional. */

/* Checkbox + label row — color #1c2430 → white. Checkbox accent stays
   blue per existing styling. */
[data-theme="dark"] .tc-pdp__agreement-check {
    color: var(--tct-text);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Cart page dark mode (S151)
   The 3 sidebar cards (Order Summary, Promo Code, Special Instructions)
   all consume var(--tc-lightBg, #f9fafb) for their surface — the token
   flip extension above (--tc-lightBg → --tct-home-card-bg) handles all
   three card surfaces in one line. No per-card surface override needed.

   This block covers the rest:
   1. Hardcoded #999 muted text (summary-row em "Calculated at checkout"
      placeholder, notes-label small "(optional)")
   2. The two primary CTAs ("Proceed to Checkout", "Apply") promoted to
      the home-primary gradient + glow in BOTH modes for storefront-wide
      brand consistency (matches Add to Cart, Drawer Checkout, Browse
      Plans, .tc-btn--primary on account pages)
   3. Form input/textarea bg #fff → flat dark surface; focus-border
      promoted from #111 (invisible in dark) to home-primary indigo
   4. Cart messages (success/error toast tints)
   5. Empty-state CTA button (matches main checkout CTA)

   All cart-page selectors use plain class names (0,1,0), so
   [data-theme="dark"] .X (0,2,0) wins.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Muted "Calculated at checkout" / "(optional)" labels — hardcoded #999
   in titancart.css, bypassing --tc-text-muted. */
[data-theme="dark"] .tc-cartpage__summary-row em,
[data-theme="dark"] .tc-cartpage__notes-label small,
[data-theme="dark"] .tc-cartpage__empty p {
    color: var(--tct-text-secondary);
}

/* "Proceed to Checkout" main CTA — promote to home-primary gradient + glow
   in both modes for visual consistency with the rest of the storefront's
   primary actions. */
[data-theme] .tc-cartpage__checkout-btn {
    background: var(--tct-home-primary);
    color: #fff;
    box-shadow: var(--tct-home-primary-glow);
}
[data-theme] .tc-cartpage__checkout-btn:hover {
    background: var(--tct-home-primary-hover);
    color: #fff;
    filter: brightness(1.05);
}

/* "Apply" promo button — same primary treatment, smaller in size due to
   parent CSS. Also promote in both modes for consistency. */
[data-theme] .tc-cartpage__promo-btn {
    background: var(--tct-home-primary);
    color: #fff;
    box-shadow: var(--tct-home-primary-glow);
}
[data-theme] .tc-cartpage__promo-btn:hover {
    background: var(--tct-home-primary-hover);
    filter: brightness(1.05);
}

/* Empty-state CTA — same primary treatment, applies if cart is empty. */
[data-theme] .tc-cartpage__empty-btn {
    background: var(--tct-home-primary);
    color: #fff;
    box-shadow: var(--tct-home-primary-glow);
}
[data-theme] .tc-cartpage__empty-btn:hover {
    background: var(--tct-home-primary-hover);
    color: #fff;
    filter: brightness(1.05);
}

/* Form fields — promo-input + notes-input have hardcoded background: #fff
   literals. Flip to flat tertiary surface (sub-card inside the gradient
   parent card pattern, matches the agreement content well + rewards
   info card structure). Focus border was #111 (invisible in dark) →
   home-primary indigo. */
[data-theme="dark"] .tc-cartpage__promo-input,
[data-theme="dark"] .tc-cartpage__notes-input {
    background: var(--tct-bg-tertiary);
    color: var(--tct-text);
    border-color: var(--tct-border);
}
[data-theme="dark"] .tc-cartpage__promo-input:focus,
[data-theme="dark"] .tc-cartpage__notes-input:focus {
    border-color: var(--tct-info-text);
}

/* Notes textarea placeholder — usually inherits but ensure muted. */
[data-theme="dark"] .tc-cartpage__notes-input::placeholder {
    color: var(--tct-text-secondary);
    opacity: 0.7;
}

/* Cart item unit price — hardcodes color: #555 in titancart.css line 4517,
   bypassing both --tc-text and --tc-muted tokens. Flip to muted secondary
   white so it reads cleanly against the dark page bg while still being
   visually subordinate to the bright item name + line-total on the right. */
[data-theme="dark"] .tc-cartpage__item-unit-price {
    color: var(--tct-text-secondary);
}

/* Cart action feedback messages — light tinted in plugin, flip to dark
   tinted matching the global success/error tokens. */
[data-theme="dark"] .tc-cart__msg--success {
    background: var(--tct-success-bg);
    color: var(--tct-success-text);
    border-color: rgba(22, 163, 74, 0.3);
}
[data-theme="dark"] .tc-cart__msg--error {
    background: var(--tct-error-bg);
    color: var(--tct-error-text);
    border-color: rgba(220, 38, 38, 0.3);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Checkout page dark mode (S151)
   The /checkout/ page uses checkout.css which is heavily !important-armored
   and uses NO tokens — every color/bg/border is hardcoded as a literal.
   None of S150/S151's token flips reach this page. Required strategy:
   per-rule overrides at higher specificity AND with !important.

   Specificity: plugin rules are #tc-checkout .X { ... !important } at
   (1,1,0) + !important. Theme overrides at [data-theme="dark"] #tc-checkout .X
   are (1,2,0) + !important — wins on specificity, source order doesn't
   matter. Same approach used for the rewards block (no #tc-checkout
   prefix, just .tc-checkout__rewards) but that one already works at
   (0,2,0) > (0,1,0).

   Coverage: container + title, error banner, step cards, login prompt,
   form labels + inputs + selects + textareas + select chevron SVG,
   checkboxes + radios, shipping methods, payment methods, place-order
   CTA (promoted to home-primary gradient both modes), legal text,
   product list card, order summary card, reward points card.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container + title — plugin sets color:#111 on root, color:#111 on h1.
   Flip both to bright white. Body text inherits from container. */
[data-theme="dark"] #tc-checkout {
    color: var(--tct-text) !important;
}
[data-theme="dark"] #tc-checkout h1.tc-checkout__title {
    color: var(--tct-text) !important;
}

/* Error banner — light pink in plugin, flip to dark error tint. */
[data-theme="dark"] #tc-checkout .tc-checkout__error-banner {
    background: var(--tct-error-bg) !important;
    border-color: rgba(220, 38, 38, 0.3) !important;
    color: var(--tct-error-text) !important;
}

/* Step cards — bg #fff + border #e5e5e5 → home card gradient + dark border. */
[data-theme="dark"] #tc-checkout section.tc-checkout__step {
    background: var(--tct-home-card-bg) !important;
    border-color: var(--tct-border) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__step-heading {
    color: var(--tct-text) !important;
}
/* Step number circle — bg #111 invisible on dark gradient. Promote to
   home-primary indigo for visibility + brand consistency with the
   storefront's primary-action color. */
[data-theme="dark"] #tc-checkout .tc-checkout__step-number {
    background: var(--tct-home-primary) !important;
    color: #fff !important;
}

/* Login prompt — light gray → dark sub-card surface inside step card. */
[data-theme="dark"] #tc-checkout .tc-checkout__login-prompt {
    background: var(--tct-bg-tertiary) !important;
    color: var(--tct-text-secondary) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__login-prompt a {
    color: var(--tct-text) !important;
}

/* Form fields — labels color #333, asterisk #dc2626 (keep). Inputs/selects/
   textareas: bg #fff + color #111 + border #ddd → dark sub-card surface.
   Focus border #111 (invisible) → home-primary indigo accent. */
[data-theme="dark"] #tc-checkout .tc-field > label {
    color: var(--tct-text-secondary) !important;
}
[data-theme="dark"] #tc-checkout input[type="text"],
[data-theme="dark"] #tc-checkout input[type="email"],
[data-theme="dark"] #tc-checkout input[type="tel"],
[data-theme="dark"] #tc-checkout input[type="number"],
[data-theme="dark"] #tc-checkout input[type="url"],
[data-theme="dark"] #tc-checkout input[type="search"],
[data-theme="dark"] #tc-checkout input[type="password"],
[data-theme="dark"] #tc-checkout select,
[data-theme="dark"] #tc-checkout textarea {
    background-color: var(--tct-bg-tertiary) !important;
    color: var(--tct-text) !important;
    border-color: var(--tct-border) !important;
}
[data-theme="dark"] #tc-checkout input:focus,
[data-theme="dark"] #tc-checkout select:focus,
[data-theme="dark"] #tc-checkout textarea:focus {
    border-color: var(--tct-info-text) !important;
}
/* Select chevron SVG — plugin embeds a #666 stroke data URL that
   disappears on dark surfaces. Replace with white-stroked SVG. */
[data-theme="dark"] #tc-checkout select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23cbd5e1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

/* Checkboxes + radios — labels color #333, accent-color #111 → bright
   white labels + indigo accent (visible on dark form fields). */
[data-theme="dark"] #tc-checkout .tc-checkbox-label {
    color: var(--tct-text-secondary) !important;
}
[data-theme="dark"] #tc-checkout input[type="checkbox"],
[data-theme="dark"] #tc-checkout input[type="radio"] {
    accent-color: var(--tct-info-text) !important;
}

/* Shipping method cards — borders + text. Hover #999 → brighter border. */
[data-theme="dark"] #tc-checkout .tc-shipping-method {
    background: var(--tct-bg-tertiary) !important;
    border-color: var(--tct-border) !important;
}
[data-theme="dark"] #tc-checkout .tc-shipping-method:hover {
    border-color: var(--tct-border-strong) !important;
}
[data-theme="dark"] #tc-checkout .tc-shipping-method__name,
[data-theme="dark"] #tc-checkout .tc-shipping-method__price {
    color: var(--tct-text) !important;
}

/* Payment method cards — same treatment. Desc color #888 → muted. */
[data-theme="dark"] #tc-checkout .tc-payment-method {
    background: var(--tct-bg-tertiary) !important;
    border-color: var(--tct-border) !important;
}
[data-theme="dark"] #tc-checkout .tc-payment-method:hover {
    border-color: var(--tct-border-strong) !important;
}
[data-theme="dark"] #tc-checkout .tc-payment-method__name {
    color: var(--tct-text) !important;
}
[data-theme="dark"] #tc-checkout .tc-payment-method__desc,
[data-theme="dark"] #tc-checkout .tc-checkout__no-payment {
    color: var(--tct-text-secondary) !important;
}

/* Place Order + .tc-btn--primary CTAs (Apply Points, etc.) — plugin
   #111 → home-primary gradient + glow in BOTH modes for storefront-wide
   brand consistency (Add to Cart / Drawer Checkout / Browse Plans /
   .tc-btn--primary on account / cart's Proceed to Checkout). */
[data-theme] #tc-checkout .tc-btn--primary {
    background: var(--tct-home-primary) !important;
    color: #fff !important;
    box-shadow: var(--tct-home-primary-glow);
}
[data-theme] #tc-checkout .tc-btn--primary:hover {
    background: var(--tct-home-primary-hover) !important;
    color: #fff !important;
    filter: brightness(1.05);
}

/* Outline button (Remove Points) — flip to dark surface + indigo border. */
[data-theme="dark"] #tc-checkout .tc-btn--outline {
    background: var(--tct-bg-tertiary) !important;
    color: var(--tct-text) !important;
    border: 1.5px solid var(--tct-border) !important;
}
[data-theme="dark"] #tc-checkout .tc-btn--outline:hover {
    border-color: var(--tct-border-strong) !important;
}

/* Legal text "By placing your order…" — color #999 → muted. */
[data-theme="dark"] #tc-checkout .tc-checkout__legal {
    color: var(--tct-text-secondary) !important;
}

/* Product list card (right sidebar top) — bg #fff → gradient. Separator,
   placeholder bg, and text colors flipped. */
[data-theme="dark"] #tc-checkout .tc-checkout__products {
    background: var(--tct-home-card-bg) !important;
    border-color: var(--tct-border) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__products-sep {
    background: var(--tct-border) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__product-img-wrap,
[data-theme="dark"] #tc-checkout .tc-checkout__product-img--placeholder {
    background: var(--tct-bg-tertiary) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__product-name {
    color: var(--tct-text) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__product-opts {
    color: var(--tct-text-secondary) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__product-price {
    color: var(--tct-text) !important;
}

/* Order Summary card — bg #f9fafb hardcoded directly (NOT --tc-lightBg),
   so my cart-page token flip doesn't reach. Explicit override. */
[data-theme="dark"] #tc-checkout .tc-checkout__summary {
    background: var(--tct-home-card-bg) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-heading {
    color: var(--tct-text) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-item {
    border-bottom-color: var(--tct-border) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-item-name {
    color: var(--tct-text-secondary) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-item-qty {
    color: var(--tct-text-secondary) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-item-total {
    color: var(--tct-text) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-totals {
    border-top-color: var(--tct-border) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-totals th {
    color: var(--tct-text-secondary) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-totals td {
    color: var(--tct-text) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-totals td em {
    color: var(--tct-text-secondary) !important;
}
[data-theme="dark"] #tc-checkout .tc-checkout__summary-total-row th,
[data-theme="dark"] #tc-checkout .tc-checkout__summary-total-row td {
    border-top-color: var(--tct-border) !important;
    color: var(--tct-text) !important;
}

/* Reward Points card — keep amber theme but flip to dark amber tint
   (same approach as rewards balance--primary card on /my-account/rewards/).
   Plugin doesn't use #tc-checkout prefix on this one — just bare class. */
[data-theme="dark"] .tc-checkout__rewards {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.18), rgba(251, 191, 36, 0.12));
    border-color: rgba(251, 191, 36, 0.35);
}
[data-theme="dark"] .tc-checkout__rewards-header {
    color: var(--tct-text);
    border-bottom-color: rgba(251, 191, 36, 0.25);
}
/* Header icon stays amber (intentional). */
[data-theme="dark"] .tc-checkout__rewards-balance {
    background: rgba(251, 191, 36, 0.18);
    color: var(--tct-text);
}
[data-theme="dark"] .tc-checkout__rewards-row label {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-checkout__rewards-input-wrap input {
    background: var(--tct-bg-tertiary);
    color: var(--tct-text);
    border-color: rgba(251, 191, 36, 0.35);
}
[data-theme="dark"] .tc-checkout__rewards-value {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-checkout__rewards-hint {
    color: var(--tct-text-secondary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Checkout payment-gateway wrapper cards (S151 follow-up)
   When a customer selects Stripe / Authorize.net / Square, the matching
   inner card wrapper appears below the payment-method radios. These
   wrappers (.tc-stripe-card, .tc-authnet-card, .tc-square-card) are
   styled with INLINE style="background:#fff;border:1px solid #E8ECF1;"
   in checkout.php — NOT in checkout.css. None of S151's first checkout
   block reached them because:
     - inline styles have specificity (1,0,0,0) which beats regular CSS
     - they bypass --tc-lightBg / --tc-bg tokens entirely

   To beat inline non-!important, my CSS overrides use !important. The
   labels inside these wrappers also have inline color:#1C2430 — same fix.

   The Stripe Card Number / Expiry / CVC fields render inside Stripe
   Elements iframes (whose internals are controlled by JS appearance
   config — handled separately in initStripe). The Square card details
   row is also an iframe (Square SDK appearance — handled in mountCard).
   This block only handles the OUTER wrappers + labels + legal text.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Outer gateway wrapper cards — bg #fff + border #E8ECF1 → home card
   gradient + dark border. Shown when matching payment method selected. */
[data-theme="dark"] .tc-stripe-card,
[data-theme="dark"] .tc-authnet-card,
[data-theme="dark"] .tc-square-card {
    background: var(--tct-home-card-bg) !important;
    border-color: var(--tct-border) !important;
}

/* Stripe input field wrappers (Card number / Expiry / CVC) — these wrap
   the Stripe Elements iframes. Inline bg #fff + border #E8ECF1. Flip to
   flat dark sub-card surface so the iframe content (still light by
   default) sits inside a dark frame. The iframe internal theme is set
   in initStripe() based on data-theme. */
[data-theme="dark"] .tc-stripe-input {
    background: var(--tct-bg-tertiary) !important;
    border-color: var(--tct-border) !important;
}

/* Inline-styled labels in all 3 gateway cards — color:#1C2430 inline. */
[data-theme="dark"] .tc-stripe-card label,
[data-theme="dark"] .tc-authnet-card label,
[data-theme="dark"] .tc-square-card label {
    color: var(--tct-text) !important;
}

/* Legal text "Payments are processed securely by …" — color:#71797E
   inline (mid-gray, readable but dim on dark). Flip to muted token. */
[data-theme="dark"] .tc-stripe-legal,
[data-theme="dark"] .tc-authnet-legal,
[data-theme="dark"] .tc-square-legal {
    color: var(--tct-text-secondary) !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Search Results page dark mode (S152 R1)

   Search page DOM: tc-shop__banner (Pattern #97 ✓ wired in S151) + #tc-search
   container with .tc-search__content holding inline form, count text, product
   grid OR empty state, optional pages section, pagination.

   Token flips at :root[data-theme="dark"] (lines 1581 + 1649) already cover:
     - .tc-search__input-wrap surface (consumes --tc-bg → home-card-bg gradient)
     - .tc-search__input-wrap border (consumes --tc-border)
     - .tc-search__input-wrap:focus-within border-color → --tc-accent indigo
     - .tc-search__input-wrap i icon → --tc-text-muted

   Per-rule overrides needed for:

   (1) .tc-search__input-wrap:focus-within { background: #fff } in
       titancart.css:5228 (first definition). The second definition at 5279
       only overrides border-color + box-shadow — its empty `background`
       leaves the first rule's #fff in place. Probed: focused wrap reports
       backgroundColor rgb(255,255,255) in dark mode. Flip back to home-card
       gradient.

   (2) .tc-search__input-wrap input { color: #111 } in titancart.css:5235
       (first definition). Beats .tc-search__input { color: var(--tc-text) }
       at line 5288 on specificity (0,1,1 vs 0,1,0). Probed: input reports
       color rgb(17,17,17) in dark mode despite token flip. Same issue on
       the placeholder rule at 5245.

   (3) .tc-search__count { color: #666 } — hardcoded mid-gray, bypasses any
       muted token. Flip to --tct-text-secondary (= #A3A3A3 in dark).

   (4) .tc-search__empty container/icon/h3/p — all hardcoded grays. Plus the
       .tc-btn nested inside (the "Browse All Products" CTA on no-results
       state) hardcodes background:#111 — promote to home-primary gradient
       matching the S151 .tc-btn--primary convention.

   (5) .tc-search__inline-form .tc-search__input-wrap .tc-btn (the Search
       submit button) — plugin's .tc-search__input-wrap .tc-btn rule at
       titancart.css:5253 hardcodes background:#111. Specificity 0,2,0 beats
       S151's global .tc-btn--primary rule (0,1,0). Override with matching
       0,3,0 selector + !important defensively.

   (6) .tc-search__pages h3 + p — pages-matching-search section is rendered
       with INLINE style="" attributes in templates/search/results.php:
         line 174: border-bottom:1px solid #e5e5e5 + color implicit dark
         line 183: color:#737373 (mid-gray) on the excerpt
       Pattern #98: inline styles need !important to override.
   ═══════════════════════════════════════════════════════════════════════════ */

/* (1) Focused input wrap — kill the white background flash on focus. */
[data-theme="dark"] .tc-search__input-wrap:focus-within {
    background: var(--tct-home-card-bg);
}

/* (2) Input text + placeholder — beat first-definition specificity. */
[data-theme="dark"] .tc-search__input-wrap input {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-search__input-wrap input::placeholder {
    color: var(--tct-text-secondary);
}

/* (3) Results count line. */
[data-theme="dark"] .tc-search__count {
    color: var(--tct-text-secondary);
}

/* (4) Empty state. The icon stays slightly more muted than the heading
   for hierarchy — secondary not tertiary, since tertiary in dark mode
   (#6B6B6B) is darker than secondary (#A3A3A3) and would disappear. */
[data-theme="dark"] .tc-search__empty {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-search__empty i {
    color: var(--tct-text-secondary);
    opacity: 0.55;
}
[data-theme="dark"] .tc-search__empty h3 {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-search__empty p {
    color: var(--tct-text-secondary);
}

/* (4b) + (5) Search submit button + Empty-state CTA — both promote to the
   home-primary gradient that S151 standardised for primary CTAs. The submit
   selector matches the plugin's specificity (.tc-search__inline-form
   .tc-search__input-wrap .tc-btn = 0,3,0); the [data-theme="dark"] prefix
   adds (0,1,0) → 0,4,0 plus !important defensively (covers focus/active
   states the plugin sets later in the cascade). */
[data-theme="dark"] .tc-search__inline-form .tc-search__input-wrap .tc-btn,
[data-theme="dark"] .tc-search__empty .tc-btn {
    background: var(--tct-home-primary) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: var(--tct-home-primary-glow) !important;
}
[data-theme="dark"] .tc-search__inline-form .tc-search__input-wrap .tc-btn:hover,
[data-theme="dark"] .tc-search__empty .tc-btn:hover {
    background: var(--tct-home-primary-hover) !important;
    color: #fff !important;
    filter: brightness(1.05);
}

/* (6) Pages-matching-search section — inline-styled in template (Pattern #98).
   The h3 has inline border-bottom:1px solid #e5e5e5 (light border); the
   excerpt p has inline color:#737373 (readable mid-gray, but lifting to
   secondary for consistency with the rest of the page). The page-link
   anchor uses inline color:#2563EB which is OK in both modes — left alone. */
[data-theme="dark"] .tc-search__pages h3 {
    border-bottom-color: var(--tct-border) !important;
    color: var(--tct-text) !important;
}
[data-theme="dark"] .tc-search__pages p {
    color: var(--tct-text-secondary) !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Pagination dark mode (S152 R1.1)

   .tc-pagination__item / __item--active are used on Search results, Shop
   archive, and Blog archive. titancart.css:991-1014 hardcodes:
     - background: #fff       (line 1004)
     - color:      #212529    (line 1001 + 1007)
     - active:     bg #212529, color #fff, border #212529 (lines 1010-1013)

   Dark mode treatment:
     - Idle items → home-card gradient surface, light text, dark border
     - Hover     → keep gradient surface, slight brighten via filter
     - Active    → home-primary gradient (matches the rest of the storefront's
                   selected/primary-state convention since S151)
     - Dots ellipsis → text-secondary (no background)
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .tc-pagination__item {
    background: var(--tct-home-card-bg);
    color: var(--tct-text);
    border-color: var(--tct-border);
}
[data-theme="dark"] .tc-pagination__item:hover {
    background: var(--tct-home-card-bg);
    color: var(--tct-text);
    border-color: var(--tct-border-strong);
    filter: brightness(1.15);
}
[data-theme="dark"] .tc-pagination__item--active,
[data-theme="dark"] .tc-pagination__item--active:hover {
    background: var(--tct-home-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--tct-home-primary-glow);
    filter: none;
}
[data-theme="dark"] .tc-pagination__dots {
    color: var(--tct-text-secondary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Blog archive page dark mode (S152 R3)

   Blog archive template: titancart-theme/index.php (WP routes /blog/ to
   index.php since there's no home.php). All blog styles are written as a
   single inline <style> block at index.php:50-193 — hardcoded color values
   for cards, meta, excerpts, placeholder image bg, empty state, and
   pagination. None token-aware.

   Selector specificity: inline <style> rules sit at the same source-order
   priority as theme.css, but their selectors are at most (0,1,0). Prefixing
   each override with [data-theme="dark"] gives (0,2,0) which wins on
   specificity alone — no !important needed. (Same approach used elsewhere
   in this file for plugin :root token wins.)

   Surfaces covered:

   (1) .tc-blog-card__img-wrap — bg #f0f0f0 placeholder (visible on every
       card without a featured image; all 10 posts in the demo currently
       lack thumbnails so this dominates the page). Flip to a flat dark
       sub-surface — neutral, doesn't compete with the post titles.

   (2) .tc-blog-card__title — color #191A1B, near-black serif heading.
       Invisible on dark bg. Lift to --tct-text.

   (3) .tc-blog-card__meta-text — color #505860 (mid-slate). Author byline
       + date. Promote to --tct-text-secondary for legibility.

   (4) .tc-blog-card__meta-text strong — color #191A1B on the author name.
       Same near-black issue as the title. Lift to --tct-text.

   (5) .tc-blog-card__excerpt — color #464A51 (dark slate). Two-line
       excerpt under each card. Promote to --tct-text-secondary.

   (6) .tc-blog-empty — color #737373, h3 implicit dark. The "No posts
       found" empty state. Preemptive cover (not currently rendering since
       there are 10 posts).

   (7) .tc-blog-pagination .page-numbers — idle item: color #505860,
       border #E5E5E5. The hover/current state already use indigo #2563EB
       which reads OK in both modes, but the idle state is an outlined
       light-border + dim-text combination that doesn't fit the dark
       page. Match the convention from S152 R1.1 .tc-pagination — flat
       dark surface, light text, dark border, current → home-primary
       gradient.
   ═══════════════════════════════════════════════════════════════════════════ */

/* (1) Featured image placeholder — when no thumbnail set. */
[data-theme="dark"] .tc-blog-card__img-wrap {
    background: var(--tct-bg-tertiary);
}

/* (2) Card title. */
[data-theme="dark"] .tc-blog-card__title {
    color: var(--tct-text);
}

/* (3) + (4) Meta line — author byline (strong) + date (text). */
[data-theme="dark"] .tc-blog-card__meta-text {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-blog-card__meta-text strong {
    color: var(--tct-text);
}

/* (5) Excerpt body. */
[data-theme="dark"] .tc-blog-card__excerpt {
    color: var(--tct-text-secondary);
}

/* (6) Empty state — preemptive. */
[data-theme="dark"] .tc-blog-empty {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-blog-empty h3 {
    color: var(--tct-text);
}

/* (6b) Category/tag/author archive description text — unique to archive.php
   (.tc-blog-desc, line 93 of archive.php inline <style>). Hardcoded #505860
   would be too dim for body text on the dark page bg. Preemptive cover —
   currently not rendering since the demo categories have no description set,
   but applies the moment Sean adds one in WP-Admin → Posts → Categories. */
[data-theme="dark"] .tc-blog-desc {
    color: var(--tct-text-secondary);
}

/* (7) Blog pagination — see WP pagination dark-mode override block below
   (line ~3270). The earlier R3 rules targeted `.tc-blog-pagination
   .page-numbers` directly but lost on specificity to the WP rule
   `.navigation.pagination .nav-links .page-numbers.current` (0,5,0)
   defined at line 1191. Probe confirmed: active "1" was rendering with
   `--tct-bg-inverse` (white in dark mode) instead of the home-primary
   gradient. Fix moved to the broader WP pagination rule edit at
   line 1191 (S152 R3.2) — the active state is now mode-agnostic and
   the dark-mode idle override below covers `--tct-home-card-bg`. */


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Blog archive card surface (S152 R3.1)

   R3 covered text colors but kept `.tc-blog-card` itself transparent — the
   posts read as flat content on the dark page bg. Sean's call: match the
   homepage's "From the Blog" cards which sit on the home-card gradient.

   Minimal change:
     - `.tc-blog-card` gets the gradient surface + dark border + radius
     - Padding around the article so content doesn't touch card edges
     - Existing `.tc-blog-card__img-wrap` (border-radius 8px + margin-bottom
       14px from index.php inline style) sits *inside* the card padding —
       reads as a framed image with content below, no markup restructure
       needed.

   Specificity: inline `<style>` block in index.php uses single-class
   selectors (0,1,0). [data-theme="dark"] prefix = 0,2,0, wins cleanly.
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .tc-blog-card {
    background: var(--tct-home-card-bg);
    border: 1px solid var(--tct-border);
    border-radius: 12px;
    padding: 14px 16px 18px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
[data-theme="dark"] .tc-blog-card:hover {
    border-color: var(--tct-border-strong);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — WordPress pagination dark-mode idle override (S152 R3.2)

   The WP pagination rule at line 1166 sets idle bg to var(--tct-bg-elevated)
   which resolves to #161620 in dark mode — flat dark surface. Sean's ask:
   match the home-card-bg gradient that R3.1 just applied to the blog cards.

   Active state is already correct in BOTH modes — handled by the unscoped
   `.navigation.pagination .nav-links .page-numbers.current` rule at line
   1191 which now uses var(--tct-home-primary) + glow + transparent border.
   That gradient looks correct on both light and dark backgrounds without
   needing per-mode overrides.

   This block only flips the IDLE bg in dark mode (gradient instead of flat).
   Selector specificity: 1 attr + 4 classes = 0,5,0. Source order tiebreaks
   the WP rule's 0,4,0 → wins, plus extra spec from [data-theme="dark"].

   Hover in dark mode also overridden — the unscoped hover rule sets bg to
   var(--tct-bg-tertiary) which is #1C1C26 (flat dark elevated). Lift to
   the same gradient with brightness filter for the hover affordance.
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .navigation.pagination .nav-links .page-numbers:not(.current) {
    background: var(--tct-home-card-bg);
}
[data-theme="dark"] .navigation.pagination .nav-links a.page-numbers:hover {
    background: var(--tct-home-card-bg);
    border-color: var(--tct-border-strong);
    color: var(--tct-text);
    filter: brightness(1.15);
}


/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — Single blog post page dark mode (S152 R4)

   Template: titancart-theme/single.php. All styles are inline in a <style>
   block at single.php:29-135, with hardcoded values throughout: #191A1B
   for headings/title/links, #464A51 for excerpts/blockquote text, #505860
   for breadcrumb/meta/share-btn icons, #E5E5E5 for divider borders,
   #F9FAFB for sidebar card bg + blockquote bg, #f0f0f0 for hero placeholder.

   Specificity: the inline <style> block uses single-class selectors (0,1,0)
   and a few descendant chains (0,2,0). [data-theme="dark"] prefix bumps to
   (0,2,0)–(0,3,0), wins cleanly without !important.

   Areas covered:
     1. Hero placeholder bg (no featured image case)
     2. Header — breadcrumb, title, excerpt, meta line, author name
     3. Article body — content text, h2/h3/h4 headings, blockquote
     4. Tags — border + label + tag chips
     5. Share box — border + label + share buttons
     6. Author bio — border + name + role + description
     7. Prev/Next nav — border + labels + links
     8. Sidebar cards — bg gradient + headings + recent posts links + dates
        + categories list + counts
     9. WordPress comment form — Leave a Reply title, logged-in-as note,
        comment-notes, field labels, the textarea (was bright white), and
        the Submit button (promoted to home-primary gradient + glow,
        matches the rest of the site's primary CTAs)

   The inline style at single.php:270 (comments wrapper border-top) was
   refactored to use var(--tct-border) directly — works in both modes
   without needing an override here.
   ═══════════════════════════════════════════════════════════════════════════ */

/* (1) Hero placeholder */
[data-theme="dark"] .tc-post-hero {
    background: var(--tct-bg-tertiary);
}

/* (2) Header */
[data-theme="dark"] .tc-post-header {
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] .tc-post-breadcrumb,
[data-theme="dark"] .tc-post-breadcrumb a {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-post-title {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-post-excerpt {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-post-meta {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-post-meta__author {
    color: var(--tct-text);
}

/* (3) Article body — full --tct-text contrast for long-form readability */
[data-theme="dark"] .tc-post-content {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-post-content h2,
[data-theme="dark"] .tc-post-content h3,
[data-theme="dark"] .tc-post-content h4 {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-post-content blockquote {
    background: var(--tct-bg-tertiary);
    color: var(--tct-text-secondary);
    border-left-color: var(--tct-brand);
}

/* (4) Tags */
[data-theme="dark"] .tc-post-tags {
    border-top-color: var(--tct-border);
}
[data-theme="dark"] .tc-post-tags__label {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-post-tag {
    color: var(--tct-text-secondary);
    border-color: var(--tct-border);
}

/* (5) Share box */
[data-theme="dark"] .tc-post-share {
    border-top-color: var(--tct-border);
}
[data-theme="dark"] .tc-post-share__label {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-post-share__btn {
    color: var(--tct-text-secondary);
    border-color: var(--tct-border);
}

/* (6) Author bio */
[data-theme="dark"] .tc-post-author-bio {
    border-top-color: var(--tct-border);
}
[data-theme="dark"] .tc-post-author-bio__name {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-post-author-bio__role,
[data-theme="dark"] .tc-post-author-bio__desc {
    color: var(--tct-text-secondary);
}

/* (7) Prev/Next nav */
[data-theme="dark"] .tc-post-nav {
    border-top-color: var(--tct-border);
}
[data-theme="dark"] .tc-post-nav__label {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .tc-post-nav__link {
    color: var(--tct-text);
}

/* (8) Sidebar cards — promote to home-card gradient surface, matching the
   blog archive cards (R3.1) and the rest of the storefront. */
[data-theme="dark"] .tc-post-sidebar__card {
    background: var(--tct-home-card-bg);
    border: 1px solid var(--tct-border);
}
[data-theme="dark"] .tc-post-sidebar__card h4 {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-post-sidebar__recent li,
[data-theme="dark"] .tc-post-sidebar__cats li {
    border-bottom-color: var(--tct-border);
}
[data-theme="dark"] .tc-post-sidebar__recent a,
[data-theme="dark"] .tc-post-sidebar__cats a {
    color: var(--tct-text);
}
[data-theme="dark"] .tc-post-sidebar__recent time,
[data-theme="dark"] .tc-post-sidebar__cats .count {
    color: var(--tct-text-secondary);
}

/* (9) WordPress comment form — comments_template() output. WP-core renders
   a default-styled textarea (bright white in dark mode) and a plain Submit
   button. No existing TitanCart styles touched these previously, so this is
   the first treatment for both light and dark modes.

   Light mode left as WP defaults (largely fine — white textarea on white page,
   default browser button). Dark mode needs explicit treatment:
     - Reply title + logged-in-as + comment-notes + field labels → readable text
     - Textarea + any text inputs → dark surface, light text, dark border
     - Submit button → promote to home-primary gradient + glow (matches the
       rest of the site's primary CTAs convention from S151 + S152) */

[data-theme="dark"] #reply-title,
[data-theme="dark"] .comment-reply-title {
    color: var(--tct-text);
}
[data-theme="dark"] .comment-form,
[data-theme="dark"] .comment-form .logged-in-as,
[data-theme="dark"] .comment-form .comment-notes,
[data-theme="dark"] .comment-form label {
    color: var(--tct-text-secondary);
}
[data-theme="dark"] .comment-form .logged-in-as a,
[data-theme="dark"] .comment-form a {
    color: var(--tct-brand);
}
[data-theme="dark"] .comment-form input[type="text"],
[data-theme="dark"] .comment-form input[type="email"],
[data-theme="dark"] .comment-form input[type="url"],
[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] #comment {
    background: var(--tct-home-card-bg);
    color: var(--tct-text);
    border: 1px solid var(--tct-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
}
[data-theme="dark"] .comment-form input[type="text"]:focus,
[data-theme="dark"] .comment-form input[type="email"]:focus,
[data-theme="dark"] .comment-form input[type="url"]:focus,
[data-theme="dark"] .comment-form textarea:focus,
[data-theme="dark"] #comment:focus {
    border-color: var(--tct-brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Submit button — applies in BOTH modes (mode-agnostic) so it matches the
   primary CTA convention used everywhere else. The selector is
   [data-theme] (matches both "light" and "dark" values) so it doesn't drop
   out in light mode. */
[data-theme] .comment-form input[type="submit"],
[data-theme] .comment-form .submit,
[data-theme] #submit {
    background: var(--tct-home-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: var(--tct-home-primary-glow);
    transition: filter 0.15s ease, transform 0.15s ease;
}
[data-theme] .comment-form input[type="submit"]:hover,
[data-theme] .comment-form .submit:hover,
[data-theme] #submit:hover {
    background: var(--tct-home-primary-hover);
    filter: brightness(1.05);
    transform: translateY(-1px);
}





