/* ==========================================================================
   DTFPrinting.com — site-specific overrides layered on top of iNews theme.
   Kept small on purpose; phase-specific stylesheets will import from here.
   ========================================================================== */

:root {
    --dtf-brand-primary: #dc2626;
    --dtf-brand-accent: #f59e0b;
    --dtf-bg: #ffffff;
    --dtf-bg-elevated: #f8fafc;
    --dtf-text: #111827;
    --dtf-text-muted: #6b7280;
    --dtf-border: #e5e7eb;
}

[data-theme="dark"] {
    --dtf-bg: #0f172a;
    --dtf-bg-elevated: #1e293b;
    --dtf-text: #f1f5f9;
    --dtf-text-muted: #94a3b8;
    --dtf-border: #334155;
    color-scheme: dark;
}

[data-theme="dark"] body {
    background: var(--dtf-bg);
    color: var(--dtf-text);
}

[data-theme="dark"] .header-top,
[data-theme="dark"] .header-mid,
[data-theme="dark"] .custom-navbar,
[data-theme="dark"] .sub-footer {
    background: var(--dtf-bg-elevated);
    color: var(--dtf-text);
}

[data-theme="dark"] .card,
[data-theme="dark"] .dropdown-menu {
    background: var(--dtf-bg-elevated);
    color: var(--dtf-text);
    border-color: var(--dtf-border);
}

[data-theme="dark"] .nav-link,
[data-theme="dark"] .dropdown-item {
    color: var(--dtf-text) !important;
}

/* Brand wordmark (used in place of the iNews logo image until a real one is supplied) */
.brand-text {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    text-decoration: none !important;
}
.brand-text .brand-dtf  { color: var(--dtf-brand-primary); }
.brand-text .brand-printing { color: var(--dtf-text); }
.brand-text .brand-tld  { color: var(--dtf-text-muted); font-weight: 600; }
.brand-text--footer .brand-printing { color: #fff; }
.brand-text--footer .brand-tld { color: rgba(255,255,255,0.6); }
.brand-tagline {
    color: var(--dtf-text-muted);
    font-size: 0.8125rem;
    line-height: 1.2;
    margin-top: 0.15rem;
    letter-spacing: 0;
}

/* Tools-forward hero (Phase 2 will populate) */
.tools-hero {
    background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%);
    padding: 3rem 0;
    border-bottom: 1px solid var(--dtf-border);
}
[data-theme="dark"] .tools-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.tool-card {
    background: var(--dtf-bg);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.tool-card__icon {
    font-size: 2rem;
    color: var(--dtf-brand-primary);
    margin-bottom: 0.75rem;
}
.tool-card__title { font-weight: 700; margin-bottom: 0.5rem; }
.tool-card__desc  { color: var(--dtf-text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 1.5rem; }
.cta-row .btn { min-width: 180px; }

/* Free calculators ------------------------------------------------------- */
.calc-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.calc-fieldset[disabled] { opacity: 0.55; pointer-events: none; }

.calc-card {
    background: var(--dtf-bg);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    padding: 1.25rem 1.25rem 0.75rem;
    height: 100%;
}
.calc-card__title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dtf-text-muted);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}
@media (max-width: 575.98px) {
    .calc-grid { grid-template-columns: 1fr; gap: 0; }
}

.calc-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.9rem;
}
.calc-grid .calc-field { margin-bottom: 0.5rem; }
.calc-field__label {
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--dtf-text);
    min-height: 1.25rem;
}
.calc-field__hint {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--dtf-text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin-top: 0.1rem;
}
.calc-field--check {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--dtf-border);
    border-radius: 8px;
    background: var(--dtf-bg-elevated);
    font-weight: 600;
    cursor: pointer;
}
.calc-field--check input {
    width: 1.05rem;
    height: 1.05rem;
    cursor: pointer;
    accent-color: var(--dtf-brand-primary);
    margin: 0;
}
.calc-field--muted { opacity: 0.5; }
.calc-field--muted .calc-input-group { background: var(--dtf-bg-elevated); }

.calc-input-group {
    display: grid;
    grid-template-columns: 2.25rem 1fr 3rem;
    align-items: stretch;
    border: 1px solid var(--dtf-border);
    border-radius: 8px;
    background: var(--dtf-bg);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.calc-input-group:focus-within {
    border-color: var(--dtf-brand-primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.calc-input-group input,
.calc-input-group select {
    grid-column: 2;
    border: 0;
    padding: 0.55rem 0.75rem;
    font-size: 1rem;
    line-height: 1.4;
    background: transparent;
    color: var(--dtf-text);
    min-width: 0;
    width: 100%;
    height: 2.5rem;
    outline: none;
    box-shadow: none;
    appearance: none;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.calc-input-group select { text-align: left; font-variant-numeric: normal; }
.calc-input-group input:disabled {
    background: transparent;
    color: var(--dtf-text-muted);
}
.calc-input-group--select { position: relative; }
.calc-input-group--select::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--dtf-text-muted);
    border-bottom: 2px solid var(--dtf-text-muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.calc-input-group--select select { cursor: pointer; }
.calc-input-group__prefix,
.calc-input-group__suffix {
    background: var(--dtf-bg-elevated);
    color: var(--dtf-text-muted);
    padding: 0 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.calc-input-group__prefix { grid-column: 1; border-right: 1px solid var(--dtf-border); }
.calc-input-group__suffix { grid-column: 3; border-left:  1px solid var(--dtf-border); }

.calc-results { padding-top: 0.5rem; }

.kpi {
    background: var(--dtf-bg);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    height: 100%;
}
.kpi__label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dtf-text-muted);
    margin-bottom: 0.35rem;
}
.kpi__value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--dtf-text);
}
.kpi__value--negative { color: var(--dtf-brand-primary); }
.kpi__hint {
    font-size: 0.75rem;
    color: var(--dtf-text-muted);
    margin-top: 0.25rem;
}
.kpi--accent {
    background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%);
    border-color: rgba(220, 38, 38, 0.25);
}
[data-theme="dark"] .kpi--accent {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(245, 158, 11, 0.35);
}

.calc-breakdown th { font-weight: 500; color: var(--dtf-text-muted); }
.calc-breakdown td { text-align: right; font-variant-numeric: tabular-nums; }
.calc-breakdown__sub th, .calc-breakdown__sub td { font-weight: 700; color: var(--dtf-text); }
.calc-breakdown__total th, .calc-breakdown__total td {
    font-weight: 800;
    color: var(--dtf-brand-primary);
    border-top: 2px solid var(--dtf-border);
}

/* Tool card variant: free calculators */
.tool-card--calc { position: relative; }
.tool-card--calc::before {
    content: 'FREE';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #16a34a;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

/* Ad slot placeholder */
.ad-slot--placeholder {
    border: 1px dashed var(--dtf-border);
    border-radius: 8px;
    background: var(--dtf-bg-elevated);
}

/* Account / auth forms */
.auth-card {
    max-width: 480px;
    margin: 3rem auto;
    background: var(--dtf-bg);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    padding: 2rem;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 1.5rem; font-weight: 700; }

.dashboard-stat {
    background: var(--dtf-bg);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}
.dashboard-stat__value { font-size: 2rem; font-weight: 700; color: var(--dtf-brand-primary); }
.dashboard-stat__label { color: var(--dtf-text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Theme toggle button */
.theme-toggle { color: inherit; border: 0; background: transparent; }
.theme-toggle:hover { color: var(--dtf-brand-primary); }

/* Admin layout */
.admin-body { background: var(--dtf-bg-elevated); min-height: 100vh; }
.admin-sidebar {
    background: #1e293b;
    color: #e2e8f0;
    min-height: 100vh;
    padding: 1.25rem 0;
}
.admin-sidebar a { color: #cbd5e1; text-decoration: none; display: block; padding: 0.5rem 1.25rem; }
.admin-sidebar a:hover,
.admin-sidebar a.active { background: #334155; color: #fff; }
.admin-sidebar .section-label { color: #64748b; font-size: 0.75rem; text-transform: uppercase; padding: 1rem 1.25rem 0.25rem; letter-spacing: 0.06em; }
.admin-topbar {
    background: var(--dtf-bg);
    border-bottom: 1px solid var(--dtf-border);
    padding: 0.75rem 1.5rem;
}
.admin-content { padding: 1.5rem; }

/* ==========================================================================
   Phase 2 — article cards, trending ticker, tabbed blocks, sidebar, tags
   ========================================================================== */

.section-title { font-size: 1.5rem; font-weight: 700; margin: 0; }

/* Article cards (shared) */
.article-card { margin-bottom: 1rem; }
.article-card__thumb { display: block; margin-bottom: 0.75rem; overflow: hidden; border-radius: 8px; aspect-ratio: 3 / 2; }
.article-card__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.article-card__thumb:hover img { transform: scale(1.03); }
.article-card__thumb-placeholder {
    aspect-ratio: 3 / 2;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    width: 100%;
}
.article-card__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cat-color, var(--dtf-brand-primary)) !important;
    text-decoration: none;
    margin-bottom: 0.5rem;
}
.article-card__category:hover { text-decoration: underline; }
.article-card__title { font-weight: 700; line-height: 1.3; }
.article-card__title a { color: var(--dtf-text); text-decoration: none; }
.article-card__title a:hover { color: var(--dtf-brand-primary); }
.article-card__excerpt { margin-bottom: 0.5rem; }

.article-card--large .article-card__title { font-size: 1.5rem; margin-top: 0.5rem; margin-bottom: 0.5rem; }
.article-card--small .article-card__title { font-size: 0.95rem; margin-bottom: 0.25rem; }
.article-card--grid {
    background: var(--dtf-bg);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.article-card--grid .article-card__thumb { margin: 0; border-radius: 0; }
.article-card--grid .article-card__body { padding: 1rem; flex-grow: 1; }
.article-card--grid .article-card__title { font-size: 1.05rem; margin-bottom: 0.4rem; }

/* Article page body styling */
.article-title { font-size: 2.5rem; font-weight: 800; line-height: 1.2; }
.article-hero {
    aspect-ratio: 3 / 2;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.article-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--dtf-text);
}
.article-body h2 { font-size: 1.75rem; font-weight: 700; margin: 2rem 0 1rem; }
.article-body h3 { font-size: 1.35rem; font-weight: 700; margin: 1.5rem 0 0.75rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body a { color: var(--dtf-brand-primary); text-decoration: underline; }
.article-body ul, .article-body ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }
.article-body blockquote {
    border-left: 4px solid var(--dtf-brand-primary);
    padding-left: 1rem;
    color: var(--dtf-text-muted);
    font-style: italic;
    margin: 1.5rem 0;
}

/* Trending ticker */
.trending-ticker {
    background: var(--dtf-bg-elevated);
    border-top: 1px solid var(--dtf-border);
    border-bottom: 1px solid var(--dtf-border);
    padding: 0.6rem 0;
    font-size: 0.9rem;
    overflow: hidden;
}
.trending-ticker__label {
    background: var(--dtf-brand-primary);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
}
.trending-ticker__track { overflow: hidden; white-space: nowrap; }
.trending-ticker__list { white-space: nowrap; animation: ticker 45s linear infinite; }
.trending-ticker__list:hover { animation-play-state: paused; }
.trending-ticker__list a { color: var(--dtf-text); text-decoration: none; font-weight: 500; }
.trending-ticker__list a:hover { color: var(--dtf-brand-primary); }
@keyframes ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Sidebar widgets */
.sidebar-widget { }
.sidebar-widget__title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--dtf-brand-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Tag pills */
.tag-pill {
    display: inline-block;
    background: var(--dtf-bg-elevated);
    color: var(--dtf-text);
    border: 1px solid var(--dtf-border);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    text-decoration: none;
    margin: 0.125rem;
    transition: all 0.15s ease;
}
.tag-pill:hover {
    background: var(--dtf-brand-primary);
    color: #fff;
    border-color: var(--dtf-brand-primary);
}

/* Tool CTA card */
.tool-cta__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #f59e0b);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Category tab block */
.category-tab-block .nav-tabs .nav-link {
    color: var(--dtf-text-muted);
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 0.5rem 1rem;
    font-weight: 600;
    background: transparent;
}
.category-tab-block .nav-tabs .nav-link.active {
    color: var(--dtf-brand-primary);
    border-bottom-color: var(--dtf-brand-primary);
    background: transparent;
}

/* Dark-mode adjustments for the new components */
[data-theme="dark"] .article-card__thumb-placeholder {
    background: linear-gradient(135deg, #334155, #1e293b);
}
[data-theme="dark"] .article-card__title a { color: var(--dtf-text); }
[data-theme="dark"] .article-card--grid { background: var(--dtf-bg-elevated); }
[data-theme="dark"] .trending-ticker,
[data-theme="dark"] .tag-pill { background: var(--dtf-bg-elevated); color: var(--dtf-text); }

/* ==========================================================================
   Phase 3 — comment thread
   ========================================================================== */

.comment-form__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.comment-form { position: relative; }
.comment-form--reply { margin-top: 0.75rem; background: var(--dtf-bg-elevated); padding: 0.75rem; border-radius: 8px; }

.comment-list { padding-left: 0; margin: 1rem 0 0; }
.comment-list .comment-list {
    margin-top: 0.75rem;
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--dtf-border);
}

.comment {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--dtf-border);
}
.comment:last-child { border-bottom: 0; }

.comment__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dtf-brand-primary), var(--dtf-brand-accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.comment__body { flex-grow: 1; min-width: 0; }
.comment__author { color: var(--dtf-text); font-weight: 600; }
.comment__text {
    color: var(--dtf-text);
    line-height: 1.55;
    word-wrap: break-word;
}
.comment__actions .btn-link { text-decoration: none; font-weight: 500; }
.comment__actions .btn-link:hover { text-decoration: underline; }

.comment-login-prompt a { color: var(--dtf-brand-primary); font-weight: 600; }

/* ==========================================================================
   Phase 4 — tools, pricing, credits, usage meters, credit badge
   ========================================================================== */

/* Credit balance badge in nav */
.credit-balance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    color: #fff !important;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
}
.credit-balance-badge:hover { opacity: 0.9; color: #fff !important; }

/* Tool upload zone */
.tool-upload__zone {
    display: block;
    border: 2px dashed var(--dtf-border);
    border-radius: 12px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    background: var(--dtf-bg);
    transition: background 0.15s, border-color 0.15s;
}
.tool-upload__zone:hover,
.tool-upload__zone.is-dragover {
    background: var(--dtf-bg-elevated);
    border-color: var(--dtf-brand-primary);
}
.tool-upload__zone-inner i { color: var(--dtf-brand-primary); }

.tool-job-status {
    background: var(--dtf-bg-elevated);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

/* Pricing card */
.pricing-card {
    border: 2px solid var(--dtf-border);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pricing-card--highlight {
    border-color: var(--dtf-brand-primary);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.15);
}
.pricing-card__name { font-size: 1.5rem; font-weight: 700; }
.pricing-card__features li { padding: 0.35rem 0; }

/* Credit pack cards */
.credit-pack-card {
    background: var(--dtf-bg);
    border: 2px solid var(--dtf-border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: border-color 0.15s, transform 0.15s;
    cursor: pointer;
}
.credit-pack-card:hover {
    border-color: var(--dtf-brand-primary);
    transform: translateY(-2px);
}
.credit-pack-card__price { font-size: 1.6rem; font-weight: 800; color: var(--dtf-text); }
.credit-pack-card__amount { font-size: 0.9rem; color: var(--dtf-text-muted); }
.credit-pack-card__bonus { font-size: 0.85rem; color: var(--dtf-brand-primary); font-weight: 600; }

/* Usage meter */
.usage-meter { padding: 0.4rem 0; }

/* Dark mode adjustments */
[data-theme="dark"] .pricing-card { background: var(--dtf-bg-elevated); }
[data-theme="dark"] .credit-pack-card { background: var(--dtf-bg-elevated); }
[data-theme="dark"] .tool-upload__zone { background: var(--dtf-bg-elevated); border-color: var(--dtf-border); }

/* ==========================================================================
   Phase 5 — Directory
   ========================================================================== */

.directory-map {
    height: calc(100vh - 280px);
    min-height: 500px;
    width: 100%;
    border-top: 1px solid var(--dtf-border);
    border-bottom: 1px solid var(--dtf-border);
    z-index: 0;
}

.map-popup__category {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dtf-text-muted);
    margin-bottom: 0.25rem;
}
.map-popup__title { font-size: 1rem; margin: 0 0 0.25rem; }
.map-popup__title a { color: var(--dtf-brand-primary); text-decoration: none; font-weight: 700; }
.map-popup__loc { font-size: 0.85rem; color: var(--dtf-text-muted); }
.map-popup__featured { font-size: 0.8rem; color: #d97706; margin-top: 0.25rem; }

/* Directory card (shared between list and highlights) */
.directory-card {
    background: var(--dtf-bg);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.directory-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.directory-card--featured { border-color: var(--dtf-brand-accent); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.12); }
.directory-card__featured-badge {
    position: absolute; top: 0.5rem; right: 0.5rem;
    background: var(--dtf-brand-accent); color: #fff;
    padding: 0.15rem 0.5rem; border-radius: 4px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
}

.directory-card__logo {
    aspect-ratio: 3 / 2;
    background: var(--dtf-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.directory-card__logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}
.directory-card__logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dtf-text-muted);
    font-size: 3rem;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.directory-card__body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.directory-card__title { font-size: 1.05rem; margin-bottom: 0.4rem; font-weight: 700; }
.directory-card__title a { color: var(--dtf-text); text-decoration: none; }
.directory-card__title a:hover { color: var(--dtf-brand-primary); }
.directory-card__desc { font-size: 0.88rem; color: var(--dtf-text-muted); margin-bottom: 0.75rem; flex-grow: 1; }

.directory-show__logo {
    width: 96px; height: 96px;
    border-radius: 12px;
    object-fit: contain;
    background: var(--dtf-bg-elevated);
    padding: 0.5rem;
}

/* Dark mode */
[data-theme="dark"] .directory-card { background: var(--dtf-bg-elevated); }
[data-theme="dark"] .directory-card__logo-placeholder { background: linear-gradient(135deg, #334155, #1e293b); }
[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip { background: var(--dtf-bg-elevated); color: var(--dtf-text); }

/* ==========================================================================
   Phase 6 — Classifieds
   ========================================================================== */

.classified-card {
    background: var(--dtf-bg);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.classified-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.classified-card__thumb {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--dtf-bg-elevated);
    overflow: hidden;
    position: relative;
}
.classified-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.classified-card__thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--dtf-text-muted); font-size: 3rem;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.classified-card__sold-ribbon {
    position: absolute; top: 12px; left: -40px;
    background: var(--dtf-brand-primary); color: #fff;
    padding: 0.35rem 3rem;
    font-weight: 700; letter-spacing: 0.1em;
    transform: rotate(-30deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.classified-card__body { padding: 1rem; flex-grow: 1; }
.classified-card__category { text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; }
.classified-card__title { font-size: 1.05rem; margin: 0.35rem 0 0.4rem; font-weight: 700; }
.classified-card__title a { color: var(--dtf-text); text-decoration: none; }
.classified-card__title a:hover { color: var(--dtf-brand-primary); }
.classified-card__price { font-size: 1.1rem; font-weight: 700; color: var(--dtf-brand-primary); }

/* Detail-page gallery */
.classified-gallery__main {
    background: var(--dtf-bg-elevated);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.classified-gallery__main img {
    width: 100%; height: 100%;
    object-fit: contain;
}
.classified-gallery__thumbs {
    display: flex; gap: 0.5rem;
    overflow-x: auto;
}
.classified-gallery__thumb {
    flex-shrink: 0;
    width: 80px; height: 60px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: none;
    cursor: pointer;
}
.classified-gallery__thumb.active { border-color: var(--dtf-brand-primary); }
.classified-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.classified-show__price { font-size: 1.4rem; font-weight: 800; color: var(--dtf-brand-primary); }
.classified-show__description { line-height: 1.6; color: var(--dtf-text); }

/* Account/admin listing thumb */
.account-classified-thumb {
    width: 80px; height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--dtf-bg-elevated);
    flex-shrink: 0;
}
.account-classified-thumb img { width: 100%; height: 100%; object-fit: cover; }
.account-classified-thumb .classified-card__thumb-placeholder { font-size: 1.2rem; }

/* Multi-image editor in account/classifieds _form */
.classified-images-editor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}
.image-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--dtf-bg-elevated);
    border: 2px solid transparent;
    cursor: grab;
}
.image-tile img { width: 100%; height: 100%; object-fit: cover; }
.image-tile--staged { cursor: default; border-color: var(--dtf-brand-accent); border-style: dashed; }
.image-tile.is-dragging { opacity: 0.4; cursor: grabbing; }
.image-tile.is-drag-over { border-color: var(--dtf-brand-primary); }
.image-tile__delete {
    position: absolute; top: 4px; right: 4px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff;
    border: 0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.image-tile__delete:hover { background: var(--dtf-brand-primary); }
.image-tile__handle {
    position: absolute; bottom: 4px; left: 4px;
    width: 24px; height: 24px;
    border-radius: 4px;
    background: rgba(0,0,0,0.5); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
    pointer-events: none;
}

/* Dark mode */
[data-theme="dark"] .classified-card { background: var(--dtf-bg-elevated); }
[data-theme="dark"] .classified-card__thumb-placeholder { background: linear-gradient(135deg, #334155, #1e293b); }

/* Navbar hover dropdown (desktop only; tap-to-toggle on touch stays via Bootstrap) */
@media (hover: hover) and (min-width: 992px) {
    .custom-navbar .nav-item-hover:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
    .custom-navbar .nav-item-hover > .dropdown-toggle::after {
        transition: transform 0.15s ease;
    }
    .custom-navbar .nav-item-hover:hover > .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

/* ==========================================================================
   On-page Stripe Elements checkout
   ========================================================================== */

.payment-form {
    background: var(--dtf-bg);
    border: 1px solid var(--dtf-border);
    border-radius: 12px;
    padding: 1.5rem;
}
.payment-form__element {
    border: 1px solid var(--dtf-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: var(--dtf-bg);
    min-height: 48px;
}
.payment-form__placeholder {
    padding: 0.5rem 0;
    cursor: text;
    color: var(--dtf-text-muted);
}
.payment-form__alert { margin: 0; }
.payment-form__submit { font-weight: 600; }
.payment-form__submit:disabled { opacity: 0.7; cursor: wait; }

[data-theme="dark"] .payment-form { background: var(--dtf-bg-elevated); }
[data-theme="dark"] .payment-form__element { background: var(--dtf-bg-elevated); }
