/**
 * TechnicianMarket Platform — Site Chrome
 *
 * Ticket:  TM-UI-01
 * Module Contract: 1.0.0-enterprise-shared-shell
 * CSS Revision: 1.0.1-enterprise-search-capsule
 * Deploy:  wp-content/plugins/technicianmarket-platform/assets/css/site-chrome.css
 *
 * Ownership:
 * - Shared header, brand, navigation, product search, mobile navigation, and footer.
 * - Full, compact, and sterile route variants.
 *
 * Design direction:
 * - Apple-level visual restraint.
 * - Google-level task clarity.
 * - Automotive-commerce confidence without visual noise.
 *
 * Safety:
 * - Presentation only.
 * - No page-content, WooCommerce form, payment iframe, or checkout-field overrides.
 * - No hidden commerce controls.
 * - No remote fonts, images, or external assets.
 */

/* ========================================================================
   1. DESIGN TOKENS
   ======================================================================== */

.tm-site-header,
.tm-site-footer,
.tm-site-search {
    --tm-site-bg: #080b10;
    --tm-site-bg-soft: #0c1118;
    --tm-site-surface: #111720;
    --tm-site-surface-raised: #161e29;
    --tm-site-surface-hover: #1a2431;

    --tm-site-text: #f6f8fb;
    --tm-site-text-soft: #d8e0eb;
    --tm-site-muted: #97a4b6;
    --tm-site-muted-strong: #b5c0ce;

    --tm-site-line: rgba(198, 214, 235, 0.14);
    --tm-site-line-strong: rgba(198, 214, 235, 0.24);

    --tm-site-accent: #ff651f;
    --tm-site-accent-hover: #ff7b3d;
    --tm-site-accent-soft: rgba(255, 101, 31, 0.12);
    --tm-site-accent-ring: rgba(255, 101, 31, 0.34);

    --tm-site-success: #1bc879;
    --tm-site-success-soft: rgba(27, 200, 121, 0.12);

    --tm-site-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.20);
    --tm-site-shadow-md: 0 18px 52px rgba(0, 0, 0, 0.28);
    --tm-site-shadow-lg: 0 32px 90px rgba(0, 0, 0, 0.36);

    --tm-site-radius-sm: 10px;
    --tm-site-radius-md: 14px;
    --tm-site-radius-lg: 20px;

    --tm-site-wrap: 1480px;
    --tm-site-pad: clamp(16px, 2.2vw, 32px);

    --tm-site-font:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-family: var(--tm-site-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ========================================================================
   2. SCOPED FOUNDATION
   ======================================================================== */

.tm-site-header,
.tm-site-footer,
.tm-site-search,
.tm-site-header *,
.tm-site-footer *,
.tm-site-search * {
    box-sizing: border-box;
}

.tm-site-header a,
.tm-site-footer a,
.tm-site-search a {
    color: inherit;
    text-decoration: none;
}

.tm-site-header button,
.tm-site-header input,
.tm-site-footer button,
.tm-site-footer input,
.tm-site-search button,
.tm-site-search input {
    font: inherit;
}

.tm-site-header button,
.tm-site-search button {
    -webkit-tap-highlight-color: transparent;
}

.tm-site-header [hidden],
.tm-site-footer [hidden],
.tm-site-search [hidden] {
    display: none !important;
}

.tm-site-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.tm-site-container {
    width: min(100%, var(--tm-site-wrap));
    margin-inline: auto;
    padding-inline: var(--tm-site-pad);
}

.tm-site-header :focus-visible,
.tm-site-footer :focus-visible,
.tm-site-search :focus-visible {
    outline: 3px solid var(--tm-site-accent);
    outline-offset: 3px;
}

/* ========================================================================
   3. SHARED BRAND
   ======================================================================== */

.tm-site-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: var(--tm-site-text);
    line-height: 1;
    white-space: nowrap;
}

.tm-site-brand__mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 13px;
    background: linear-gradient(145deg, var(--tm-site-accent), #ff7f32);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(255, 101, 31, 0.20);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.tm-site-brand__mark--image {
    padding: 4px;
    background: #ffffff;
}

.tm-site-brand__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tm-site-brand__wordmark {
    overflow: hidden;
    color: var(--tm-site-text);
    font-size: 20px;
    font-weight: 850;
    letter-spacing: -0.045em;
    text-overflow: ellipsis;
}

.tm-site-brand__wordmark > span {
    color: var(--tm-site-accent);
}

.tm-site-brand:hover .tm-site-brand__wordmark > span {
    color: var(--tm-site-accent-hover);
}

/* ========================================================================
   4. FULL HEADER
   ======================================================================== */

.tm-site-header {
    position: relative;
    z-index: 9990;
    width: 100%;
    color: var(--tm-site-text);
    background: var(--tm-site-bg);
}

.tm-site-header--full {
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--tm-site-line);
    background: rgba(8, 11, 16, 0.94);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.20);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
}

body.admin-bar .tm-site-header--full {
    top: 32px;
}

.tm-site-utility {
    border-bottom: 1px solid rgba(198, 214, 235, 0.08);
    background: #06080c;
}

.tm-site-utility__inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--tm-site-muted);
    font-size: 12px;
    line-height: 1.35;
}

.tm-site-utility__message {
    font-weight: 700;
}

.tm-site-utility__links {
    min-width: 0;
}

.tm-site-mainbar {
    background: transparent;
}

.tm-site-mainbar__inner {
    min-height: 78px;
    display: grid;
    grid-template-columns: auto minmax(300px, 1fr) auto auto;
    grid-template-areas: "brand search nav actions";
    align-items: center;
    gap: 18px;
}

.tm-site-mainbar__inner > .tm-site-brand {
    grid-area: brand;
}

.tm-site-mainbar__search {
    grid-area: search;
    min-width: 0;
}

.tm-site-primary-nav {
    grid-area: nav;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
}

.tm-site-primary-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 11px;
    border: 1px solid transparent;
    border-radius: var(--tm-site-radius-sm);
    color: var(--tm-site-muted-strong);
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
    transition:
        color 140ms ease,
        background-color 140ms ease,
        border-color 140ms ease;
}

.tm-site-primary-nav a:hover,
.tm-site-primary-nav a[aria-current="page"] {
    border-color: var(--tm-site-line);
    background: rgba(255, 255, 255, 0.045);
    color: var(--tm-site-text);
}

.tm-site-primary-nav a[aria-current="page"] {
    border-color: rgba(255, 101, 31, 0.26);
    background: var(--tm-site-accent-soft);
}

.tm-site-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.tm-site-action,
.tm-site-compact__action,
.tm-site-sterile__return {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 15px;
    border: 1px solid var(--tm-site-line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--tm-site-text-soft);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition:
        transform 140ms ease,
        color 140ms ease,
        background-color 140ms ease,
        border-color 140ms ease,
        box-shadow 140ms ease;
}

.tm-site-action:hover,
.tm-site-compact__action:hover,
.tm-site-sterile__return:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 101, 31, 0.40);
    background: var(--tm-site-accent-soft);
    color: var(--tm-site-text);
}

.tm-site-action--primary {
    border-color: var(--tm-site-accent);
    background: var(--tm-site-accent);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(255, 101, 31, 0.22);
}

.tm-site-action--primary:hover {
    border-color: var(--tm-site-accent-hover);
    background: var(--tm-site-accent-hover);
    box-shadow: 0 14px 30px rgba(255, 101, 31, 0.28);
}

/* ========================================================================
   5. SHARED PRODUCT SEARCH — COMMAND CAPSULE
   ======================================================================== */

.tm-site-search {
    position: relative;
    width: 100%;
    min-width: 0;
}

.tm-site-search__control {
    position: relative;
    isolation: isolate;
    min-height: 54px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    overflow: hidden;
    padding: 6px 6px 6px 17px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 999px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        0 8px 24px rgba(0, 0, 0, 0.16),
        0 1px 2px rgba(15, 23, 42, 0.10);
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.tm-site-search__control::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -45%;
    bottom: -45%;
    left: -38%;
    width: 34%;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 122, 26, 0.03) 24%,
            rgba(255, 122, 26, 0.18) 44%,
            rgba(255, 255, 255, 0.68) 52%,
            rgba(255, 122, 26, 0.16) 62%,
            transparent 100%
        );
    filter: blur(1px);
    opacity: 0.58;
    transform: translateX(-220%) rotate(7deg);
    animation: tm-site-search-sheen 8.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.tm-site-search__control > * {
    position: relative;
    z-index: 1;
}

@keyframes tm-site-search-sheen {
    0%,
    56% {
        transform: translateX(-220%) rotate(7deg);
        opacity: 0;
    }

    61% {
        opacity: 0.52;
    }

    77% {
        opacity: 0.34;
    }

    84%,
    100% {
        transform: translateX(520%) rotate(7deg);
        opacity: 0;
    }
}

.tm-site-search:hover .tm-site-search__control {
    border-color: rgba(255, 122, 26, 0.54);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        0 12px 30px rgba(0, 0, 0, 0.20),
        0 0 0 1px rgba(255, 122, 26, 0.08);
}

.tm-site-search:focus-within .tm-site-search__control {
    border-color: #ff7a1a;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(255, 122, 26, 0.24),
        0 18px 42px rgba(0, 0, 0, 0.24);
    transform: translateY(-1px);
}

.tm-site-search:focus-within .tm-site-search__control::before {
    animation-play-state: paused;
    opacity: 0;
}

.tm-site-search__icon {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    color: #5f6b7a;
}

.tm-site-search__icon svg {
    display: block;
    width: 19px;
    height: 19px;
}

.tm-site-search__input {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    caret-color: #d9480f;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
}

.tm-site-search__input::placeholder {
    color: #667085;
    opacity: 1;
}

.tm-site-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.tm-site-search__submit {
    min-width: 100px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 19px;
    border: 1px solid rgba(17, 24, 39, 0.10);
    border-radius: 999px;
    background: #ff7a1a;
    color: #111827;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.01em;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        0 8px 20px rgba(255, 101, 31, 0.24);
    transition:
        transform 140ms ease,
        background-color 140ms ease,
        box-shadow 140ms ease,
        border-color 140ms ease;
}

.tm-site-search__submit:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 24, 39, 0.16);
    background: #ff8a33;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        0 12px 26px rgba(255, 101, 31, 0.30);
}

.tm-site-search__submit:active {
    transform: translateY(0);
    background: #f56f12;
    box-shadow:
        inset 0 1px 2px rgba(17, 24, 39, 0.12),
        0 5px 14px rgba(255, 101, 31, 0.20);
}

.tm-site-search__submit:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    box-shadow:
        0 0 0 5px #d9480f,
        0 12px 26px rgba(255, 101, 31, 0.30);
}

.tm-site-search__results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 10020;
    max-height: min(460px, 64vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, 0.13);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.992);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.34),
        0 4px 14px rgba(15, 23, 42, 0.12);
    color: #111827;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.tm-site-search__results:empty {
    display: none;
}

.tm-site-search__results [role="option"],
.tm-site-search__results a,
.tm-site-search__results button {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: #111827;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 120ms ease,
        background-color 120ms ease,
        transform 120ms ease;
}

.tm-site-search__results [role="option"] > span:first-child,
.tm-site-search__results a > span:first-child,
.tm-site-search__results button > span:first-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.tm-site-search__results [role="option"]:hover,
.tm-site-search__results [role="option"][aria-selected="true"],
.tm-site-search__results a:hover,
.tm-site-search__results button:hover {
    border-color: rgba(255, 122, 26, 0.22);
    background: #fff5ee;
    transform: translateY(-1px);
}

.tm-site-search__results strong {
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tm-site-search__results small,
.tm-site-search__results span {
    color: #667085;
    font-size: 12px;
    line-height: 1.4;
}

.tm-site-search__results [role="option"] > small:last-child,
.tm-site-search__results a > small:last-child,
.tm-site-search__results button > small:last-child {
    color: #344054;
    font-weight: 800;
    white-space: nowrap;
}

.tm-site-search--hero .tm-site-search__control {
    min-height: 64px;
    padding: 7px 7px 7px 20px;
}

.tm-site-search--hero .tm-site-search__input {
    height: 48px;
    font-size: 17px;
}

.tm-site-search--hero .tm-site-search__submit {
    min-width: 124px;
    height: 50px;
    font-size: 15px;
}

/* Static WCAG contrast proof for the primary search action:
 * #111827 text on #ff7a1a background = approximately 6.8:1.
 */

/* ========================================================================
   6. COMMUNICATION LINKS
   ======================================================================== */

.tm-site-contact-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
}

.tm-site-contact-links a {
    color: var(--tm-site-muted-strong);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
    transition: color 140ms ease;
}

.tm-site-contact-links a:hover {
    color: var(--tm-site-text);
}

.tm-site-contact-links--stacked {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
}

.tm-site-contact-links--stacked a {
    font-size: 14px;
}

/* ========================================================================
   7. MOBILE MENU
   ======================================================================== */

.tm-site-menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    place-items: center;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--tm-site-line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--tm-site-text);
    cursor: pointer;
}

.tm-site-menu-toggle > span {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
    transition:
        transform 160ms ease,
        opacity 160ms ease;
}

.tm-site-menu-toggle[aria-expanded="true"] > span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.tm-site-menu-toggle[aria-expanded="true"] > span:nth-child(2) {
    opacity: 0;
}

.tm-site-menu-toggle[aria-expanded="true"] > span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.tm-site-mobile-menu {
    border-top: 1px solid var(--tm-site-line);
    background: rgba(8, 11, 16, 0.985);
    box-shadow: var(--tm-site-shadow-md);
}

.tm-site-mobile-menu__inner {
    display: grid;
    gap: 18px;
    padding-block: 16px 22px;
}

.tm-site-mobile-menu nav {
    display: grid;
    gap: 5px;
}

.tm-site-mobile-menu nav a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding-inline: 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--tm-site-text-soft);
    font-size: 15px;
    font-weight: 750;
}

.tm-site-mobile-menu nav a:hover,
.tm-site-mobile-menu nav a[aria-current="page"] {
    border-color: var(--tm-site-line);
    background: var(--tm-site-surface);
    color: var(--tm-site-text);
}

.tm-site-mobile-menu__support {
    padding-top: 16px;
    border-top: 1px solid var(--tm-site-line);
}

.tm-site-mobile-menu__support .tm-site-contact-links {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 9px;
}

body.tm-site-menu-open {
    overflow: hidden;
}

/* ========================================================================
   8. COMPACT HEADER — CART AND ACCOUNT
   ======================================================================== */

.tm-site-header--compact {
    border-bottom: 1px solid var(--tm-site-line);
    background: rgba(8, 11, 16, 0.97);
}

.tm-site-compact__inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
}

.tm-site-compact__title {
    color: var(--tm-site-text-soft);
    font-size: 15px;
    font-weight: 750;
    text-align: center;
}

.tm-site-compact__action {
    justify-self: end;
}

/* ========================================================================
   9. STERILE HEADER — CHECKOUT AND PAYMENT
   ======================================================================== */

.tm-site-header--sterile {
    border-bottom: 1px solid var(--tm-site-line);
    background: #080b10;
}

.tm-site-sterile__inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
}

.tm-site-sterile__state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--tm-site-text-soft);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.tm-site-sterile__state > span {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    color: var(--tm-site-success);
}

.tm-site-sterile__state svg {
    display: block;
    width: 17px;
    height: 17px;
}

.tm-site-sterile__return {
    justify-self: end;
}

/* ========================================================================
   10. FULL FOOTER
   ======================================================================== */

.tm-site-footer {
    width: 100%;
    color: var(--tm-site-text);
    background: var(--tm-site-bg);
}

.tm-site-footer--full {
    margin-top: clamp(50px, 7vw, 90px);
    border-top: 1px solid var(--tm-site-line);
}

.tm-site-footer__grid {
    display: grid;
    grid-template-columns: minmax(250px, 1.45fr) repeat(4, minmax(140px, 1fr));
    gap: 34px;
    padding-block: 46px 34px;
}

.tm-site-footer__brand {
    min-width: 0;
}

.tm-site-footer__brand .tm-site-brand {
    margin-bottom: 15px;
}

.tm-site-footer__brand p {
    max-width: 42ch;
    margin: 0;
    color: var(--tm-site-muted);
    font-size: 14px;
    line-height: 1.7;
}

.tm-site-footer__column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.tm-site-footer__column h2 {
    margin: 0 0 11px;
    color: var(--tm-site-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.11em;
    line-height: 1.2;
    text-transform: uppercase;
}

.tm-site-footer__column > a {
    padding-block: 6px;
    color: var(--tm-site-text-soft);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    transition:
        color 140ms ease,
        transform 140ms ease;
}

.tm-site-footer__column > a:hover {
    transform: translateX(2px);
    color: var(--tm-site-accent-hover);
}

.tm-site-footer__base {
    border-top: 1px solid var(--tm-site-line);
    background: #06080c;
}

.tm-site-footer__base-inner {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    color: var(--tm-site-muted);
    font-size: 12px;
    line-height: 1.45;
}

/* ========================================================================
   11. COMPACT FOOTER — ACCOUNT ONLY
   ======================================================================== */

.tm-site-footer--compact {
    margin-top: 48px;
    border-top: 1px solid var(--tm-site-line);
    background: #080b10;
}

.tm-site-footer-compact__inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    color: var(--tm-site-muted);
    font-size: 12px;
}

.tm-site-footer-compact__inner nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tm-site-footer-compact__inner nav a {
    color: var(--tm-site-muted-strong);
    font-weight: 700;
}

.tm-site-footer-compact__inner nav a:hover {
    color: var(--tm-site-text);
}

/* ========================================================================
   12. ROUTE AND HOST-PAGE COMPATIBILITY
   ======================================================================== */

body.tm-site-chrome-active {
    --tm-site-page-bg: #080b10;
}

body.tm-site-chrome-active #tm-site-header,
body.tm-site-chrome-active #tm-site-footer {
    isolation: isolate;
}

body.tm-site-chrome-active .tm-site-header img,
body.tm-site-chrome-active .tm-site-footer img {
    max-width: 100%;
    height: auto;
}

body.tm-site-chrome-active .tm-site-header p,
body.tm-site-chrome-active .tm-site-footer p {
    margin-top: 0;
}

/*
 * Deliberately avoid styling WooCommerce forms, payment fields, notices,
 * products, prices, cart tables, or checkout containers here.
 */

/* ========================================================================
   13. RESPONSIVE — LARGE TABLET
   ======================================================================== */

@media (max-width: 1240px) {
    .tm-site-mainbar__inner {
        grid-template-columns: auto minmax(280px, 1fr) auto;
        grid-template-areas:
            "brand search actions"
            "nav nav nav";
        min-height: 0;
        padding-block: 12px;
        row-gap: 9px;
    }

    .tm-site-primary-nav {
        justify-content: center;
        padding-top: 3px;
    }

    .tm-site-footer__grid {
        grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(140px, 1fr));
    }

    .tm-site-footer__contact {
        grid-column: 2 / -1;
    }
}

/* ========================================================================
   14. RESPONSIVE — TABLET / MOBILE NAVIGATION
   ======================================================================== */

@media (max-width: 920px) {
    .tm-site-utility__inner {
        justify-content: center;
    }

    .tm-site-utility__message {
        display: none;
    }

    .tm-site-mainbar__inner {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "brand search actions";
        min-height: 72px;
        padding-block: 10px;
    }

    .tm-site-primary-nav {
        display: none;
    }

    .tm-site-actions .tm-site-action {
        display: none;
    }

    .tm-site-menu-toggle {
        display: grid;
    }

    .tm-site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tm-site-footer__brand {
        grid-column: 1 / -1;
    }

    .tm-site-footer__contact {
        grid-column: auto;
    }
}

/* ========================================================================
   15. RESPONSIVE — PHONE
   ======================================================================== */

@media (max-width: 680px) {
    body.admin-bar .tm-site-header--full {
        top: 46px;
    }

    .tm-site-utility {
        display: none;
    }

    .tm-site-mainbar__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "search search";
        gap: 10px;
        padding-block: 10px 12px;
    }

    .tm-site-brand__mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
    }

    .tm-site-brand__wordmark {
        font-size: 18px;
    }

    .tm-site-search__control {
        min-height: 52px;
        padding-left: 15px;
        border-radius: 999px;
    }

    .tm-site-search__input {
        font-size: 16px;
    }

    .tm-site-search__submit {
        min-width: 82px;
        padding-inline: 15px;
        border-radius: 999px;
    }

    .tm-site-search__results {
        position: fixed;
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        max-height: min(62vh, 520px);
    }

    .tm-site-compact__inner,
    .tm-site-sterile__inner {
        min-height: 68px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .tm-site-compact__title,
    .tm-site-sterile__state {
        display: none;
    }

    .tm-site-compact__action,
    .tm-site-sterile__return {
        padding-inline: 13px;
    }

    .tm-site-footer__grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-block: 38px 30px;
    }

    .tm-site-footer__brand,
    .tm-site-footer__contact {
        grid-column: auto;
    }

    .tm-site-footer__base-inner,
    .tm-site-footer-compact__inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding-block: 16px;
    }
}

/* ========================================================================
   16. RESPONSIVE — SMALL PHONE
   ======================================================================== */

@media (max-width: 430px) {
    .tm-site-brand__wordmark {
        max-width: 154px;
    }

    .tm-site-search__icon {
        display: none;
    }

    .tm-site-search__control {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-left: 12px;
    }

    .tm-site-search__submit {
        min-width: 72px;
        padding-inline: 12px;
        font-size: 13px;
    }

    .tm-site-action,
    .tm-site-compact__action,
    .tm-site-sterile__return {
        font-size: 12px;
    }
}

/* ========================================================================
   17. ACCESSIBILITY AND SYSTEM PREFERENCES
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
    .tm-site-header *,
    .tm-site-header *::before,
    .tm-site-header *::after,
    .tm-site-footer *,
    .tm-site-footer *::before,
    .tm-site-footer *::after,
    .tm-site-search *,
    .tm-site-search *::before,
    .tm-site-search *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

@media (prefers-contrast: more) {
    .tm-site-header,
    .tm-site-footer,
    .tm-site-search {
        --tm-site-line: rgba(255, 255, 255, 0.28);
        --tm-site-line-strong: rgba(255, 255, 255, 0.48);
        --tm-site-muted: #c3ccd8;
    }

    .tm-site-search__control,
    .tm-site-action,
    .tm-site-menu-toggle {
        border-width: 2px;
    }
}

@media (forced-colors: active) {
    .tm-site-header,
    .tm-site-footer,
    .tm-site-search {
        forced-color-adjust: auto;
    }

    .tm-site-brand__mark,
    .tm-site-action--primary,
    .tm-site-search__submit {
        border: 1px solid ButtonText;
    }
}

/* ========================================================================
   18. PRINT
   ======================================================================== */

@media print {
    .tm-site-header,
    .tm-site-footer,
    .tm-site-search {
        display: none !important;
    }
}
