/* ──────────────────────────────────────────────────────────────────────
   Layout: header, footer, containers, page chrome
   ────────────────────────────────────────────────────────────────────── */

.tdm-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (min-width: 768px) {
    .tdm-container { padding: 0 40px; }
}

.tdm-post-narrow,
.tdm-post-hero-narrow {
    max-width: 740px;
}
.tdm-post-narrow { margin: 0 auto; }

/* ─── Site Header ─── */
.tdm-site-header {
    background: var(--tdm-offwhite);
    border-bottom: 1px solid var(--tdm-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.tdm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 24px;
    gap: 24px;
}
@media (min-width: 768px) {
    .tdm-header-inner { padding: 20px 40px; }
}

.tdm-branding { flex-shrink: 0; }
.tdm-site-title-link { text-decoration: none; }
.tdm-site-title {
    font-family: 'Roboto Slab', Georgia, serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--tdm-charcoal);
    letter-spacing: -0.01em;
}
.has-custom-logo .tdm-branding img {
    max-height: 48px;
    width: auto;
}

/* Nav */
.tdm-primary-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}
.tdm-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
}
.tdm-menu li { margin: 0; position: relative; }
.tdm-menu a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--tdm-charcoal);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 0;
    position: relative;
    display: inline-block;
}
.tdm-menu a:hover, .tdm-menu .current-menu-item > a {
    color: var(--tdm-gold);
}
.tdm-menu .current-menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--tdm-gold);
}

/* Submenus — hidden dropdowns that appear on hover/focus.
   Without these rules the browser falls back to a vertical bulleted list
   stacked under the parent item — which is where the stray "diamond"
   under the menu word comes from (the disc bullet of the first child). */
.tdm-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 200px;
    background: #fff;
    border: 1px solid rgba(26, 26, 26, 0.08);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.12);
    border-radius: 4px;
    display: none;
    z-index: 100;
}
.tdm-menu .sub-menu li { margin: 0; }
.tdm-menu .sub-menu a {
    display: block;
    padding: 8px 18px;
    text-transform: none;
    font-size: 0.9rem;
    letter-spacing: 0;
    font-weight: 400;
    white-space: nowrap;
}
.tdm-menu .sub-menu a:hover {
    background: #fff8e5;
    color: var(--tdm-gold);
}
/* Submenu items don't get the underline — would look weird in a dropdown */
.tdm-menu .sub-menu .current-menu-item > a::after { display: none; }
.tdm-menu .sub-menu .current-menu-item > a {
    color: var(--tdm-gold);
    font-weight: 600;
}

/* Reveal on hover OR keyboard focus (a11y) */
.tdm-menu .menu-item-has-children:hover > .sub-menu,
.tdm-menu .menu-item-has-children:focus-within > .sub-menu {
    display: block;
}

/* Visual cue that a menu item has a dropdown — small chevron after the text */
.tdm-menu .menu-item-has-children > a::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 6px;
    margin-bottom: 2px;
    vertical-align: middle;
    float: right;
    margin-top: 9px;
    opacity: 0.6;
}

/* Header actions */
.tdm-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.tdm-search-toggle, .tdm-cart-link {
    color: var(--tdm-charcoal);
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px;
}
.tdm-search-toggle:hover, .tdm-cart-link:hover { color: var(--tdm-gold); }
.tdm-cart-count {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--tdm-gold);
    color: var(--tdm-charcoal);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Account / login link (sits between search and cart) */
.tdm-account-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tdm-charcoal);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding: 4px 0;
    font-size: 0.95rem;
    line-height: 1;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.tdm-account-link:hover,
.tdm-account-link:focus-visible {
    color: var(--tdm-gold);
    border-bottom-color: var(--tdm-gold);
    outline: none;
}
.tdm-account-link svg {
    flex: 0 0 auto;
}
.tdm-account-greeting {
    font-weight: 500;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tdm-account-cta {
    font-weight: 600;
    letter-spacing: 0.2px;
}
/* Hide the greeting text on tighter desktop widths so the icon alone fits;
   the full name still appears on mobile (where the actions stack). */
@media (min-width: 901px) and (max-width: 1100px) {
    .tdm-account-greeting { display: none; }
}

/* Nav toggle (mobile) */
.tdm-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
}
.tdm-nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--tdm-charcoal);
    margin: 5px 0;
    transition: all 0.2s ease;
}

@media (max-width: 900px) {
    .tdm-nav-toggle { display: block; }
    .tdm-primary-nav {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--tdm-offwhite);
        border-bottom: 1px solid var(--tdm-border);
        padding: 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding-top: 0; padding-bottom: 0;
    }
    .tdm-primary-nav.is-open {
        max-height: 80vh;
        padding-top: 24px;
        padding-bottom: 24px;
    }
    .tdm-menu {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    .tdm-menu a {
        padding: 8px 0;
        display: block;
        border-bottom: 1px solid var(--tdm-border);
    }
    /* On mobile, submenus drop the absolute positioning and just stack
       inline below the parent — the slide-down panel has plenty of room. */
    .tdm-menu .sub-menu {
        position: static;
        display: block;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 0 16px;
        margin: 4px 0 8px;
        min-width: 0;
    }
    .tdm-menu .sub-menu a {
        padding: 6px 0;
        font-size: 0.88rem;
        border-bottom: 1px dashed var(--tdm-border);
    }
    .tdm-menu .menu-item-has-children > a::before {
        display: none;
    }
    .tdm-header-actions {
        justify-content: flex-end;
        padding-top: 8px;
    }
}

/* ─── Site Footer ───
   Two-tone design:
   - Upper region (widget columns + nav band): LIGHT cream bg, charcoal text
   - Bottom copyright strip: DARK charcoal, cream text */
.tdm-site-footer {
    background: var(--tdm-offwhite);
    color: var(--tdm-charcoal);
    margin-top: 80px;
}
.tdm-site-footer a {
    color: var(--tdm-charcoal);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.tdm-site-footer a:hover {
    color: var(--tdm-gold);
    border-bottom-color: var(--tdm-gold);
}

.tdm-footer-widgets {
    padding: 64px 0 48px;
}
.tdm-footer-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
}
/* Each column scales proportionally — equal width across all four. */
@media (min-width: 600px) {
    .tdm-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
    .tdm-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tdm-footer-col {
    min-width: 0;
}
.tdm-footer-col .widget-title {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1rem;
    color: var(--tdm-gold);
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tdm-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tdm-footer-col li {
    margin: 0 0 8px;
}

.tdm-footer-band {
    padding: 40px 0 32px;
}
.tdm-footer-band-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
}
@media (min-width: 800px) {
    .tdm-footer-band-inner {
        grid-template-columns: 1fr auto auto;
    }
}
.tdm-footer-title {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tdm-charcoal);
}
.tdm-footer-logo-link {
    display: inline-block;
    line-height: 0;
}
.tdm-footer-logo-img {
    max-height: 60px;
    width: auto;
    display: block;
}
.tdm-footer-tagline {
    color: var(--tdm-charcoal);
    opacity: 0.7;
    font-size: 0.92rem;
    margin: 4px 0 0;
}
.tdm-footer-menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.tdm-footer-menu a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tdm-social-menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 16px;
}

.tdm-footer-signoff { display: none; }

/* Dark copyright strip — full-width, sits below everything else */
.tdm-footer-bottom {
    background: var(--tdm-charcoal);
    color: var(--tdm-cream);
    padding: 18px 0;
    text-align: center;
    font-size: 0.85rem;
}
.tdm-footer-bottom a {
    color: var(--tdm-cream);
    border-bottom-color: transparent;
}
.tdm-footer-bottom a:hover {
    color: var(--tdm-gold);
    border-bottom-color: var(--tdm-gold);
}
.tdm-footer-bottom p {
    margin: 0;
    opacity: 0.85;
}

/* ─── Sections ─── */
.tdm-section {
    padding: 80px 0;
}
.tdm-dark-band {
    background: var(--tdm-dark-band);
    color: var(--tdm-cream);
}
.tdm-dark-band h1, .tdm-dark-band h2, .tdm-dark-band h3 {
    color: var(--tdm-cream);
}

.tdm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 16px;
}
.tdm-section-header-light .tdm-section-title {
    color: var(--tdm-cream);
}
.tdm-section-title {
    margin: 0;
    line-height: 1.1;
}
.tdm-section-sub {
    color: var(--tdm-text-muted);
    font-size: 1.1rem;
    margin: 8px 0 0;
}
.tdm-dark-band .tdm-section-sub { color: rgba(245, 234, 211, 0.7); }

.tdm-section-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--tdm-charcoal);
}
.tdm-dark-band .tdm-section-link { color: var(--tdm-gold); }

/* ─── Breadcrumbs ─── */
.tdm-breadcrumbs ol {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--tdm-text-muted);
}
.tdm-breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    opacity: 0.5;
}
.tdm-breadcrumbs a {
    color: var(--tdm-text-muted);
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.2);
}
.tdm-breadcrumbs a:hover { color: var(--tdm-gold); text-decoration-color: var(--tdm-gold); }
.tdm-dark-band .tdm-breadcrumbs ol,
.tdm-trail-hero-content .tdm-breadcrumbs ol,
.tdm-archive-hero .tdm-breadcrumbs ol {
    color: rgba(245, 234, 211, 0.7);
}
.tdm-dark-band .tdm-breadcrumbs a,
.tdm-trail-hero-content .tdm-breadcrumbs a,
.tdm-archive-hero .tdm-breadcrumbs a {
    color: rgba(245, 234, 211, 0.7);
}

/* ─── Pagination ─── */
.tdm-pagination {
    margin-top: 64px;
    text-align: center;
}
.tdm-pagination .nav-links {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}
.tdm-pagination .page-numbers {
    padding: 10px 16px;
    border: 1px solid var(--tdm-border);
    color: var(--tdm-charcoal);
    text-decoration: none;
    font-weight: 500;
    border-radius: 3px;
    transition: all 0.15s ease;
}
.tdm-pagination .page-numbers:hover,
.tdm-pagination .page-numbers.current {
    background: var(--tdm-charcoal);
    color: var(--tdm-cream);
    border-color: var(--tdm-charcoal);
}

.tdm-empty {
    padding: 64px 0;
    text-align: center;
    color: var(--tdm-text-muted);
    font-size: 1.1rem;
}

/* ── Front page three-feature grid ──────────────────────────────────────── */
.tdm-features {
    padding: 64px 0;
    background: var(--tdm-cream, #fff8e5);
}
.tdm-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 900px) {
    .tdm-features-grid { grid-template-columns: 1fr; }
}
.tdm-feature-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 12px rgba(26, 26, 26, 0.06);
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
    border: 1px solid rgba(200, 168, 75, 0.15);
}
.tdm-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.12);
    border-color: rgba(200, 168, 75, 0.4);
}
.tdm-feature-card-media {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #1a1a1a;
}
.tdm-feature-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tdm-feature-card-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, #1a1a1a 0%, #3a2f1a 100%);
}
.tdm-feature-card-body {
    flex: 1;
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
}
.tdm-feature-card-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c8a84b;
    margin-bottom: 8px;
}
.tdm-feature-card-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px;
    color: #1a1a1a;
}
.tdm-feature-card-desc {
    flex: 1;
    margin: 0 0 16px;
    font-size: 14.5px;
    line-height: 1.55;
    color: #555;
}
.tdm-feature-card-cta {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    transition: color 0.12s;
}
.tdm-feature-card:hover .tdm-feature-card-cta {
    color: #b0933f;
}
.tdm-feature-card-cta span {
    display: inline-block;
    transition: transform 0.18s;
}
.tdm-feature-card:hover .tdm-feature-card-cta span {
    transform: translateX(4px);
}

/* ── Taxonomy archive header — eyebrow + back link ──────────────────────── */
.tdm-archive-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tdm-gold, #c8a84b);
    margin-bottom: 6px;
}
.tdm-archive-backlink {
    margin-top: 14px;
    font-size: 14px;
}
.tdm-archive-backlink a {
    color: var(--tdm-cream, #fff8e5);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.12s, color 0.12s;
}
.tdm-archive-backlink a:hover {
    color: var(--tdm-gold, #c8a84b);
    opacity: 1;
}
