/**
 * Maxt Offroad Theme — main.css
 * Base layout, component shells, and utility classes.
 * Design tokens are in tokens.css (loaded first).
 *
 * @package maxtoffroad
 */

/* ===================================================================
   1. RESET / BASE
=================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100dvh;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===================================================================
   2. ACCESSIBILITY
=================================================================== */
.mxo-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.mxo-skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    z-index: var(--z-toast);
}

/* ===================================================================
   3. LAYOUT UTILITIES
=================================================================== */
.mxo-container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

@media (min-width: 768px)  { .mxo-container { padding-inline: 2rem; } }
@media (min-width: 1440px) { .mxo-container { padding-inline: 2.5rem; } }

/* ===================================================================
   3b. BREADCRUMBS (global base styles)
=================================================================== */
.mxo-breadcrumbs {
    border-bottom: 1px solid var(--border);
    background: var(--muted);
}

.mxo-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0.75rem 0;
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 1.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

@media (min-width: 768px)  { .mxo-breadcrumbs__list { padding-inline: 2rem; } }
@media (min-width: 1440px) { .mxo-breadcrumbs__list { padding-inline: 2.5rem; } }

.mxo-breadcrumbs__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mxo-breadcrumbs__item:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.mxo-breadcrumbs__link {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 150ms ease;
}

.mxo-breadcrumbs__link:hover {
    color: var(--primary);
}

.mxo-breadcrumbs__current {
    color: var(--foreground);
}

/* ===================================================================
   4. HEADER  (two-row: top-bar + nav-bar)
   V0: bg-background (light) for BOTH rows, text-foreground (dark)
=================================================================== */
.mxo-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--background);
    color: var(--foreground);
}
/* Clear the WP admin bar so the sticky header doesn't slide under it and get
   cut off (logged-in only; guests have no admin bar). The mobile admin bar is
   position:absolute and scrolls away, so top:0 is correct there. */
.admin-bar .mxo-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar .mxo-header {
        top: 0;
    }
}
@media (min-width: 1024px) {
    .mxo-header { border-bottom: none; }
}

/* Sticky-header offset, for other sticky elements (e.g. the archive category
   sidebar) so they park BELOW the sticky header instead of sliding behind it.
   Measured, not summed: the header height is content-driven (logo row + nav row
   + borders), so keep these in sync if the header rows change.
     < 1024px : logo row only (nav bar is display:none)  -> ~65px
     ≥ 1024px : nav bar (row 2) appears                   -> ~126px
   The admin-bar term matches .admin-bar .mxo-header's own 32px offset (desktop
   only; the mobile admin bar is position:absolute and scrolls away). */
:root {
    --mxo-header-h: 65px;
    --mxo-admin-bar-h: 0px;
}
@media (min-width: 1024px) {
    :root { --mxo-header-h: 126px; }
}
.admin-bar { --mxo-admin-bar-h: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar { --mxo-admin-bar-h: 0px; }
}

/* Announcement bar */
.mxo-announcement-bar {
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    padding: 0.375rem 1rem;
}
.mxo-announcement-bar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.mxo-announcement-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.mxo-announcement-bar__link:hover,
.mxo-announcement-bar__link:focus {
    color: inherit;
    text-decoration: underline;
}
.mxo-announcement-bar__icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* ----- ROW 1: Top bar (logo + search) ----- */
.mxo-header__top-bar {
    border-bottom: 1px solid var(--border);
}

.mxo-header__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 4rem;          /* h-16 */
}
@media (min-width: 1024px) {
    .mxo-header__inner { height: 5rem; }   /* lg:h-20 */
}

/* Logo — wordmark stacked over the subtitle */
.mxo-header__logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}
.mxo-header__logo:hover { text-decoration: none; }
.mxo-header__logo img { height: 2rem; width: auto; }
.mxo-header__logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    letter-spacing: -0.025em;              /* V0: tracking-tight */
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.1;
}
@media (min-width: 1024px) {
    .mxo-header__logo-text { font-size: 1.875rem; }  /* V0: lg:text-3xl */
}

/* Logo subtitle — sits under the wordmark: smaller, wide-tracked, muted */
.mxo-header__logo-subtitle {
    display: block;
    font-family: var(--font-display);
    font-size: 0.625rem;                   /* 10px */
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    line-height: 1;
    margin-top: 0.25rem;
    white-space: nowrap;
}

/* Inline search bar (desktop, centred) */
.mxo-header__search {
    flex: 1;
    display: none;                     /* hidden on mobile */
    justify-content: center;
    padding-inline: 2rem;
    min-width: 0;
}
@media (min-width: 1024px) {
    .mxo-header__search { display: flex; }
}

.mxo-header__search-form {
    position: relative;
    width: 100%;
    max-width: 32rem;                  /* max-w-lg */
}

.mxo-header__search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    pointer-events: none;
}

.mxo-header__search-input {
    width: 100%;
    height: 2.5rem;                    /* h-10 */
    padding: 0 0.75rem 0 2.5rem;      /* pl-10 equivalent */
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--foreground);
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.mxo-header__search-input::placeholder {
    color: var(--muted-foreground);
}
.mxo-header__search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 204,85,0), .25);
}

/* Mobile search toggle */
.mxo-header__search-toggle { display: flex; }
@media (min-width: 1024px) { .mxo-header__search-toggle { display: none !important; } }

/* Mobile search modal (header.php; toggled by main.js via the `hidden` attr).
   No `display` on the base rule, so the UA `[hidden]{display:none}` hides it —
   same overlay pattern as .mxo-mobile-menu. */
.mxo-search-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
}

.mxo-search-modal__panel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 40rem;
    margin: 4rem auto 0;              /* clears the header row */
    padding: 0.5rem 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.mxo-search-modal__form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.mxo-search-modal__icon { flex-shrink: 0; color: var(--muted-foreground); }

.mxo-search-modal__input {
    flex: 1;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.5rem 0.25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--foreground);
    background: transparent;
    border: none;
    outline: none;
}

.mxo-search-modal__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;      /* full-height tap target */
    padding: 0 0.5rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
}

.mxo-search-modal__close:hover { text-decoration: underline; }

/* Header icon button base (hamburger, search toggle) */
.mxo-header__action {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 150ms ease, color 150ms ease;
    flex-shrink: 0;
}
.mxo-header__action:hover { background: var(--muted); color: var(--primary); }

/* Hamburger (mobile only) */
.mxo-header__menu-toggle { display: flex; }
@media (min-width: 1024px) { .mxo-header__menu-toggle { display: none; } }

.mxo-hamburger,
.mxo-hamburger::before,
.mxo-hamburger::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
    transition: transform 200ms ease;
}
.mxo-hamburger::before,
.mxo-hamburger::after { content: ''; position: absolute; left: 0; }
.mxo-hamburger::before { top: -5px; }
.mxo-hamburger::after  { top: 5px; }

/* ----- ROW 2: Nav bar ----- */
.mxo-header__nav-bar {
    display: none;                     /* hidden on mobile */
    border-bottom: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
}
@media (min-width: 1024px) {
    .mxo-header__nav-bar { display: block; }
}

.mxo-header__nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 2.75rem;                   /* h-11 */
}

/* Nav links (left) */
.mxo-header__nav-links { display: flex; align-items: center; }

.mxo-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.25rem;
    margin-left: -0.75rem;   /* cancel first link's padding so text aligns with the container edge */
}

.mxo-nav__list a {
    display: block;
    padding: 0.375rem 0.75rem;
    color: var(--foreground);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;              /* V0: text-sm */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius);
    transition: color 150ms ease;
    white-space: nowrap;
}

.mxo-nav__list a:hover {
    color: var(--primary);
    text-decoration: none;
}

.mxo-nav__list .current-menu-item > a {
    color: var(--primary);
    text-decoration: none;
}

/* Utilities (right) */
.mxo-header__utilities {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.mxo-header__utility {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0;
    white-space: nowrap;
    transition: color 150ms ease;
    text-decoration: none;
    position: relative;
}
.mxo-header__utility:hover {
    color: var(--primary);
    text-decoration: none;
}

.mxo-header__utility svg { flex-shrink: 0; }

.mxo-header__utility-label {
    display: none;
}
@media (min-width: 1024px) {
    .mxo-header__utility-label { display: inline; }
}

/* Phone (desktop only) */
.mxo-header__phone { display: none; }
@media (min-width: 1024px) { .mxo-header__phone { display: inline-flex; } }

/* Divider */
.mxo-header__divider {
    display: none;
    width: 1px;
    height: 1.25rem;
    background: var(--border);
}
@media (min-width: 1024px) { .mxo-header__divider { display: block; } }

/* Cart count badge — its CENTER pins to the icon's top-right corner, so it
   clips only a sliver of the glyph and never reaches the Cart label (the
   wrapper's margin-right reserves the overhang). Ring = page background. */
.mxo-header__cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 0.45rem;
}
.mxo-header__cart-count {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 0 0 2px var(--background);
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ===================================================================
   5. MOBILE MENU
=================================================================== */
.mxo-mobile-menu {
    position: fixed;
    inset: 4rem 0 0;
    background: var(--background);
    z-index: calc(var(--z-header) - 1);
    overflow-y: auto;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.mxo-mobile-menu__list { list-style: none; }
.mxo-mobile-menu__list a {
    display: block;
    padding: 0.75rem 0;
    color: var(--foreground);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border);
}

/* Nested submenu items (Resources / Company children) */
.mxo-mobile-menu__list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.25rem;
}
.mxo-mobile-menu__list .sub-menu a {
    font-size: 0.95rem;
    color: var(--muted-foreground);
}

/* ===================================================================
   6. (reserved — search modal removed; search is now inline in header)
=================================================================== */

/* ===================================================================
   7. FOOTER  (matches V0 site-footer.tsx)
=================================================================== */
.mxo-footer {
    background: var(--secondary);
    color: var(--secondary-foreground);
}

/* --- 7a. Trail Partner CTA --- */
.mxo-footer__cta {
    position: relative;
    overflow: hidden;
    background: oklch(0.25 0 0 / 0.9);   /* secondary @ 90% */
    padding-block: 3rem;
}
.mxo-footer__cta-bg {
    position: absolute;
    inset: 0;
    /* No shipped photo asset: a CSS-only texture avoids a 404 on every
       page (/trail-bg.jpg never existed in the theme). Swap for a real
       image when brand photography lands. */
    background:
        radial-gradient(ellipse at 20% 80%, oklch(0.45 0.12 45 / 0.5), transparent 55%),
        radial-gradient(ellipse at 80% 20%, oklch(0.35 0.08 45 / 0.4), transparent 55%);
    opacity: 0.6;
}
.mxo-footer__cta-content {
    position: relative;
    text-align: center;
}
.mxo-footer__cta-heading {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
@media (min-width: 1024px) {
    .mxo-footer__cta-heading { font-size: 1.875rem; }
}
.mxo-footer__cta-text {
    margin-top: 0.5rem;
    color: oklch(0.98 0 0 / 0.8);
}
.mxo-footer__cta-btn {
    margin-top: 1rem;
}

/* --- 7b. Social Links --- */
.mxo-footer__social {
    border-bottom: 1px solid oklch(0.98 0 0 / 0.1);
    padding-block: 1.5rem;
}
.mxo-footer__social-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}
.mxo-footer__social-link {
    color: oklch(0.98 0 0 / 0.7);
    transition: color 150ms ease;
    display: flex;
}
.mxo-footer__social-link:hover {
    color: var(--primary);
    text-decoration: none;
}
.mxo-footer__social-link svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* --- 7c. Main Footer Content --- */
.mxo-footer__main {
    padding-block: 3rem;
}
.mxo-footer__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
    .mxo-footer__grid {
        grid-template-columns: 1fr 2fr;   /* newsletter | 3-col links (contact column removed) */
    }
}

/* Newsletter column */
.mxo-footer__newsletter-heading {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.mxo-footer__newsletter-desc {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: oklch(0.98 0 0 / 0.7);
}
.mxo-footer__newsletter-email {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}
.mxo-footer__newsletter-email a {
    color: oklch(0.98 0 0 / 0.7);
    text-decoration: none;
    transition: color 150ms ease;
}
.mxo-footer__newsletter-email a:hover {
    color: var(--primary);
}
.mxo-footer__newsletter-form {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.mxo-footer__form-label {
    display: block;
    font-size: 0.75rem;
    color: oklch(0.98 0 0 / 0.7);
    margin-bottom: 0.25rem;
}
.mxo-footer__required { color: var(--primary); }

.mxo-footer__form-input {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--secondary-foreground);
    background: oklch(0.98 0 0 / 0.1);
    border: 1px solid oklch(0.98 0 0 / 0.2);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 150ms ease;
}
.mxo-footer__form-input::placeholder {
    color: oklch(0.98 0 0 / 0.5);
}
.mxo-footer__form-input:focus {
    border-color: var(--primary);
}
.mxo-footer__subscribe-btn {
    width: 100%;
}

/* Link columns sub-grid */
.mxo-footer__links-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
@media (max-width: 639px) {
    .mxo-footer__links-group {
        grid-template-columns: 1fr 1fr;
    }
}

.mxo-footer__col-title {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.mxo-footer__menu { list-style: none; }
.mxo-footer__menu li + li { margin-top: 0.5rem; }
.mxo-footer__menu a {
    color: oklch(0.98 0 0 / 0.7);
    font-size: 0.875rem;
    transition: color 150ms ease;
}
.mxo-footer__menu a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Contact column */
.mxo-footer__contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.mxo-footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: oklch(0.98 0 0 / 0.7);
    transition: color 150ms ease;
    text-decoration: none;
}
a.mxo-footer__contact-item:hover {
    color: var(--primary);
    text-decoration: none;
}
.mxo-footer__contact-icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Trust badges */
.mxo-footer__trust-badges {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.mxo-footer__badge {
    display: flex;
    align-items: center;
    justify-content: center;
}
.mxo-footer__badge--usa {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius);
    background: oklch(0.65 0.2 35 / 0.2);
}
.mxo-footer__badge--usa span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}
.mxo-footer__badge--guarantee {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    border: 2px solid oklch(0.65 0.2 35 / 0.3);
}
.mxo-footer__badge--guarantee span {
    font-size: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: oklch(0.98 0 0 / 0.8);
}

/* --- 7d. Shop by Brand --- */
.mxo-footer__brands {
    margin-top: 3rem;
    border-top: 1px solid oklch(0.98 0 0 / 0.1);
    padding-top: 2rem;
}
.mxo-footer__brands-heading {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: oklch(0.98 0 0 / 0.5);
}
.mxo-footer__brands-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}
@media (min-width: 1024px) {
    .mxo-footer__brands-list { gap: 2.5rem; }
}
.mxo-footer__brand-link {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    /* Matches --secondary-foreground on the #222 footer = 15:1.
       Was 40% white (3.6:1, AA fail). */
    color: var(--secondary-foreground);
    transition: color 150ms ease;
}
.mxo-footer__brand-link:hover {
    color: var(--primary);
    text-decoration: none;
}

/* --- 7e. Bottom Bar --- */
.mxo-footer__bottom {
    border-top: 1px solid oklch(0.98 0 0 / 0.1);
    padding-block: 1rem;
}
.mxo-footer__bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
@media (min-width: 1024px) {
    .mxo-footer__bottom-inner { flex-direction: row; }
}
.mxo-footer__payments {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.mxo-footer__payment-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.5rem;
    padding-inline: 0.5rem;
    border-radius: 0.25rem;
    background: oklch(0.98 0 0 / 0.1);
}
.mxo-footer__payment-badge span {
    font-size: 0.625rem;
    font-weight: 500;
    color: oklch(0.98 0 0 / 0.5);
}
.mxo-footer__copyright {
    font-size: 0.75rem;
    color: oklch(0.98 0 0 / 0.5);
}
.mxo-footer__dealer-credential {
    font-size: 0.75rem;
    color: oklch(0.98 0 0 / 0.5);
}

/* ===================================================================
   8. BUTTONS
=================================================================== */
.mxo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
    line-height: 1;
    text-decoration: none;
}

.mxo-btn--primary {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}
.mxo-btn--primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-foreground);
    text-decoration: none;
}

.mxo-btn--secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.mxo-btn--secondary:hover {
    background: var(--primary);
    color: var(--primary-foreground);
    text-decoration: none;
}

.mxo-btn--ghost {
    background: transparent;
    color: var(--secondary-foreground);
    border-color: rgba(255,255,255,.3);
}
.mxo-btn--ghost:hover {
    background: rgba(255,255,255,.1);
    text-decoration: none;
}

.mxo-btn--outline {
    background: transparent;
    color: var(--secondary-foreground);
    border-color: var(--secondary-foreground);
}
.mxo-btn--outline:hover {
    background: var(--secondary-foreground);
    color: var(--secondary);
    text-decoration: none;
}

.mxo-btn--lg { padding: 0.75rem 2rem; font-size: 0.875rem; }  /* shadcn h-10 px-8 = 2.5rem height */
.mxo-btn--sm { padding: 0.375rem 1rem; font-size: 0.8rem; }

/* ===================================================================
   9. WooCommerce — minimal resets (mxo-woocommerce.css has full styles)
=================================================================== */
/* .mxo-wc-main wrapper removed (duplicate-main fix); page padding lives on
   .mxo-main--archive / .mxo-main--single-product in woocommerce.css. */

.woocommerce-notices-wrapper { margin-bottom: 1.5rem; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    position: relative;
    padding: 0.875rem 1.25rem;
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    list-style: none;
    color: var(--foreground);
}

/* WooCommerce positions an icon-font glyph via ::before with a large
   padding-left. The theme uses a left-border accent instead (no icon), so
   that glyph overlapped the text. Drop it. */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    content: none;
    display: none;
}

/* Positive + informational notices use the brand "fits your vehicle" green
   (was a generic muted/orange that read dated). */
.woocommerce-message,
.woocommerce-info {
    background: oklch(0.65 0.2 145 / 0.1);
    border-left-color: oklch(0.55 0.15 145);
}

.woocommerce-error {
    background: oklch(0.62 0.22 25 / 0.08);
    border-left-color: var(--destructive);
}

/* ===================================================================
   10. BREADCRUMB
=================================================================== */
.mxo-breadcrumb { margin-bottom: 1.5rem; }
.mxo-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.mxo-breadcrumb li { font-size: 0.8rem; color: var(--muted-foreground); }
.mxo-breadcrumb a { color: var(--muted-foreground); }
.mxo-breadcrumb a:hover { color: var(--primary); text-decoration: none; }
.mxo-breadcrumb__sep { padding-inline: 0.25rem; }

/* ===================================================================
   11. VEHICLE BAR — empty/active states driven by the maxtdesign-ymm
   plugin's garage.js, which toggles .md-ymm-has-vehicle on the
   [data-md-ymm-garage] wrapper (template-parts/vehicle-bar.php)
=================================================================== */
.mxo-vehicle-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--muted);
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

.mxo-vehicle-bar__empty {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
    justify-content: center;
}

.mxo-vehicle-bar__icon { flex-shrink: 0; color: var(--primary); }

.mxo-vehicle-bar__label {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mxo-vehicle-bar__vehicle {
    font-weight: 600;
    color: var(--foreground);
}

.mxo-vehicle-bar__change-btn,
.mxo-vehicle-bar__clear-btn {
    display: inline-flex;
    align-items: center;
    background: none;
    border: 0;
    padding: 0.125rem 0.375rem;
    font: inherit;
    font-size: 0.8125rem;
    color: var(--primary);
    cursor: pointer;
    border-radius: var(--radius);
}

.mxo-vehicle-bar__change-btn:hover { text-decoration: underline; }

.mxo-vehicle-bar__clear-btn { color: var(--muted-foreground); }
.mxo-vehicle-bar__clear-btn:hover { color: var(--destructive); }

.mxo-vehicle-bar__active { display: none; }
.mxo-vehicle-bar.md-ymm-has-vehicle .mxo-vehicle-bar__active { display: flex; align-items: center; gap: 0.5rem; }
.mxo-vehicle-bar.md-ymm-has-vehicle .mxo-vehicle-bar__empty { display: none; }

/* ===================================================================
   PRODUCT CARD (mxo-product-card) - global component
   Rendered by woocommerce/content-product.php (shop + related loops)
   and template-parts/product-card.php (homepage, vehicle hubs).
   Moved here from homepage.css so every surface shares one definition.
=================================================================== */
.mxo-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms, box-shadow 200ms;
}

.mxo-product-card:hover {
  border-color: oklch(0.65 0.2 35 / 0.5);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

/* Badges area */
.mxo-product-card__badges {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.mxo-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.2;
}

.mxo-badge--sale {
  background: var(--primary);
  color: var(--primary-foreground);
}

.mxo-badge--featured {
  background: var(--accent, #f59e0b);
  color: #fff;
}

.mxo-badge--backorder,
.mxo-badge--out-of-stock,
.mxo-badge--oos {
  background: var(--muted);
  color: var(--muted-foreground);
}

/* Image link — fixed 3:2 box (the catalog's native ratio). Files are
   SOFT-resized (uncropped) and object-contain so the full product is
   always visible: minority square/16:9 sources letterbox on the muted
   background instead of losing edges. */
.mxo-product-card__image-link {
  display: grid;
  place-items: center;           /* dead-center both axes, no flex/aspect quirks */
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 0.375rem;
  background: var(--muted);
  padding: 0.5rem;               /* symmetric grey border on all four sides */
  margin-bottom: 0;
}

.mxo-product-card__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;                  /* intrinsic ratio, capped — grid centers it */
}

/* Body */
.mxo-product-card__body {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mxo-product-card__brand {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.mxo-product-card__title {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--card-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.mxo-product-card__title a {
  color: inherit;
  text-decoration: none;
}

.mxo-product-card:hover .mxo-product-card__title a {
  color: var(--primary);
}

.mxo-product-card__sku {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin: 0.25rem 0 0;
}

.mxo-product-card__rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.mxo-product-card__review-count {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-left: 0.25rem;
}

/* Footer */
.mxo-product-card__footer {
  margin-top: auto;
  padding-top: 0.75rem;
}

.mxo-product-card__price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--card-foreground);
}

.mxo-product-card__price del {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted-foreground);
}

.mxo-product-card__price ins {
  text-decoration: none;
  color: var(--primary);
}

.mxo-product-card__actions {
  margin-top: 0.75rem;
}

.mxo-product-card__actions .mxo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms, color 200ms;
}

.mxo-product-card__actions .mxo-btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.mxo-product-card__actions .mxo-btn--primary:hover {
  background: var(--accent, oklch(0.55 0.2 35));
}

.mxo-product-card__actions .mxo-btn--sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.mxo-product-card__unavailable {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  font-style: italic;
}

/* Out-of-stock card dim */
.mxo-product-card--out-of-stock {
  opacity: 0.6;
}

.mxo-product-card--out-of-stock:hover {
  opacity: 0.8;
}

/* Backorder card subtle indicator */
.mxo-product-card--backorder {
  border-color: oklch(0.7 0.15 80 / 0.4);
}

/* ===================================================================
   PAGE TITLES — WooCommerce surfaces that lack a template h1
   (/shop/ + product archives, My Account). Mirrors .mxo-static__title.
   =================================================================== */
.mxo-wc-page-title {
    margin: 1.5rem 0 1rem;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
