/* =============================================================
   The Machine Warehouse — Public Stylesheet
   assets/css/main.css

   Table of Contents
   ---------------------------------------------------------
    1.  Root Variables
    2.  Reset + Base
    3.  Typography + Utilities
    4.  Layout + Container
    5.  Buttons
    6.  Header + Desktop Navigation
    7.  Mobile Navigation
    8.  Page Banner (inner page headers) + Breadcrumbs
    9.  Section Helpers
   10.  Forms
   11.  Machine Cards — Vertical
   12.  Machine Cards — Horizontal
   13.  Condition Badges
   14.  Image Gallery
   15.  Image Lightbox
   16.  Inventory / Browse Page
   17.  Pagination
   18.  Machine Detail Page
   19.  CTA Banner
   20.  Homepage Sections
   21.  Inner Pages (Sell, Contact, About, Services, Resources)
   22.  Footer
   23.  Empty State + Shared Components
   24.  Responsive Breakpoints
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =============================================================
   1. Root Variables
   ============================================================= */
:root {
    --navy:       #1a3a5c;
    --navy-dark:  #0f2238;
    --blue:       #1e52c0;
    --blue-hover: #1540a0;
    --blue-light: #eff6ff;
    --blue-text:  #1e3a8a;
    --text:       #111827;
    --text-2:     #374151;
    --text-muted: #6b7280;
    --border:     #e5e7eb;
    --bg:         #f8f9fa;
    --white:      #ffffff;
    --radius:     8px;
    --radius-sm:  5px;
    --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:  0 4px 12px rgba(0,0,0,.1);
    --container:  1200px;
    --header-h:   68px;
}

/* =============================================================
   2. Reset + Base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img    { max-width: 100%; height: auto; display: block; }
a      { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Sticky footer layout ────────────────────────────────── */
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }
main       { flex: 1 0 auto; }
ul     { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* =============================================================
   3. Typography + Utilities
   ============================================================= */
h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.2; }
h2 { font-size: 1.6rem;  font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.1rem;  font-weight: 600; line-height: 1.4; }
h4 { font-size: .9rem;   font-weight: 600; }
p  { color: var(--text-2); line-height: 1.7; }

.lead { font-size: 1.05rem; color: var(--text-2); line-height: 1.7; margin-bottom: 16px; font-weight: 500; }

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-blue   { color: var(--blue); }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-24  { margin-bottom: 24px; }

/* =============================================================
   4. Layout + Container
   ============================================================= */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================================
   5. Buttons
   ============================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 22px;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
    border: 2px solid transparent;
    line-height: 1;
}
.btn-primary       { background: var(--blue);  color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: var(--white); text-decoration: none; }
.btn-outline       { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); text-decoration: none; }
.btn-white         { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-white:hover   { background: #f0f4f8; text-decoration: none; }
.btn-navy          { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover    { background: var(--navy-dark); text-decoration: none; }
/* Light outline used on dark backgrounds (sell-cta, hero) */
.btn-outline-light         { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover   { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); text-decoration: none; }
.btn-sm    { height: 36px; padding: 0 16px; font-size: .82rem; }
.btn-lg    { height: 52px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* =============================================================
   6. Header + Desktop Navigation
   ============================================================= */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.site-header-inner {
    display: flex;
    align-items: center;
    height: var(--header-h);
    gap: 20px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.header-logo     { flex-shrink: 0; }
.header-logo img { height: 44px; width: auto; }

/* Primary nav */
.header-nav { flex: 1; }
.header-nav-list { display: flex; align-items: center; gap: 2px; list-style: none; }
.header-nav-list > li { position: relative; }
.header-nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 11px;
    font-size: .84rem;
    font-weight: 500;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color .12s, background .12s;
    text-decoration: none;
}
.header-nav-link:hover { color: var(--blue); background: var(--blue-light); text-decoration: none; }
.dropdown-caret { opacity: .55; }

/* Mega dropdown — flush to trigger, gap is inside via padding-top */
.has-dropdown { position: relative; }
.has-dropdown > .nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 500px;
    z-index: 300;
    padding-top: 8px;
}
/* Keyboard (focus-within) + mouse (hover) both open the dropdown */
.has-dropdown:hover > .nav-dropdown,
.has-dropdown:focus-within > .nav-dropdown { display: block; }

.nav-dropdown-inner   { padding: 16px; }
.nav-dropdown-all {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: background .1s;
}
.nav-dropdown-all:hover  { background: var(--blue-light); text-decoration: none; }
.nav-dropdown-all strong { font-size: .9rem; color: var(--text); }
.nav-dropdown-all span   { font-size: .78rem; color: var(--text-muted); }
.nav-dropdown-cols    { display: flex; gap: 20px; }
.nav-dropdown-col     { flex: 1; min-width: 120px; }
.nav-dropdown-heading { display: block; font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.nav-dropdown-link    { display: block; font-size: .83rem; color: var(--text-2); padding: 4px 0; text-decoration: none; transition: color .1s; }
.nav-dropdown-link:hover { color: var(--blue); }
.nav-dropdown-more    { color: var(--blue); font-weight: 600; }

/* Header right-side actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
/* Phone link — hidden on desktop, shown on mobile via breakpoint */
.header-phone {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: .84rem;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}
.header-phone:hover     { color: var(--blue); text-decoration: none; }
.header-phone svg       { width: 15px; height: 15px; }

/* Call Us buttons — only shown on mobile (sidebar + mobile footer) */
.mobile-call-only { display: none; }

/* Plain phone note in detail sidebar — shown desktop, hidden mobile */
.desktop-phone-note { font-size: .8rem; color: var(--text-muted); text-align: center; margin-top: 6px; }
.desktop-phone-note a       { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.desktop-phone-note a:hover { color: var(--blue); }

/* Hamburger button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text);
}

/* =============================================================
   7. Mobile Navigation
   Drawer slides in from the right. JS toggles .open class.
   ============================================================= */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 490;
}
.mobile-nav-overlay.open,
#mobile-nav-overlay.open { display: block; }

.mobile-nav {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 300px;
    height: 100%;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(0,0,0,.15);
    z-index: 500;
    overflow-y: auto;
    flex-direction: column;
}
.mobile-nav.open { display: flex; }

.mobile-nav-header  { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.mobile-nav-logo img { height: 36px; }
.mobile-nav-close   { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; }
.mobile-nav-body    { flex: 1; padding: 8px 0; }
.mobile-nav-link    { display: block; padding: 11px 20px; font-size: .9rem; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--bg); text-decoration: none; }
.mobile-nav-link:hover { color: var(--blue); background: var(--blue-light); text-decoration: none; }
.mobile-nav-group   { padding: 6px 0; border-bottom: 1px solid var(--border); }
.mobile-nav-group-label { display: block; padding: 8px 20px 4px; font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.mobile-nav-sub     { display: block; padding: 8px 20px 8px 32px; font-size: .84rem; color: var(--text-2); text-decoration: none; }
.mobile-nav-sub:hover { color: var(--blue); text-decoration: none; }
.mobile-nav-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0; }
.mobile-nav-footer  { padding: 16px; border-top: 1px solid var(--border); }

/* =============================================================
   8. Page Banner + Breadcrumbs
   Dark banner used on all inner pages (inventory, detail, etc.)
   ============================================================= */
.page-banner {
    background: var(--navy-dark);
    color: var(--white);
    padding: 36px 0;
}
.page-banner-sm               { padding: 20px 0; }
.page-banner-title            { color: var(--white); font-size: 2rem; margin-bottom: 6px; }
.page-banner-sub              { color: rgba(255,255,255,.7); font-size: .95rem; margin: 0; }
.page-banner .breadcrumb      { padding: 0 0 12px; color: rgba(255,255,255,.55); }
.page-banner .breadcrumb a    { color: rgba(255,255,255,.55); }
.page-banner .breadcrumb-item.current span { color: rgba(255,255,255,.85); }
.page-banner .breadcrumb-sep  { color: rgba(255,255,255,.3); }

/* Breadcrumb nav rendered by tmw_breadcrumb() in components.php */
.breadcrumb-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; list-style: none; }
.breadcrumb-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.breadcrumb-item a       { color: inherit; text-decoration: none; }
.breadcrumb-item a:hover { color: var(--blue); }
.breadcrumb-sep          { color: #d1d5db; font-size: .7rem; }

/* Standalone breadcrumb bar — sits between page-banner and main content */
.breadcrumb-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}
.breadcrumb-bar .breadcrumb-item a       { color: var(--text-muted); }
.breadcrumb-bar .breadcrumb-item.current span { color: var(--text-2); }
.breadcrumb-bar .breadcrumb-sep          { color: var(--border); }

/* =============================================================
   9. Section Helpers
   ============================================================= */
.section     { padding: 56px 0; }
.section-alt { background: var(--bg); padding: 56px 0; }

/* Homepage tighter lower-page rhythm */
.page-home .section     { padding: 44px 0; }
.page-home .section-alt { padding: 44px 0; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}
.section-header h2 { margin: 0; }
.section-header a  { font-size: .875rem; font-weight: 600; color: var(--blue); white-space: nowrap; }
.section-header.center { text-align: center; justify-content: center; flex-direction: column; align-items: center; margin-bottom: 32px; }
.section-title    { margin-bottom: 0; }
.section-subtitle { color: var(--text-muted); font-size: .95rem; margin-top: 8px; }
.section-link     { font-size: .875rem; font-weight: 600; color: var(--blue); white-space: nowrap; text-decoration: none; }
.section-link:hover { text-decoration: underline; }

/* =============================================================
   10. Forms
   Shared across sell.php, contact.php, listing.php inquiry
   ============================================================= */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}
.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=tel],
.form-group input[type=number],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color .12s, box-shadow .12s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30,82,192,.1);
}
.form-group textarea { min-height: 110px; resize: vertical; }

.form-row-2      { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-divider    { border: none; border-top: 1px solid var(--border); margin: 20px 0 16px; }
.form-section-label { font-size: .78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.form-note       { font-size: .76rem; color: var(--text-muted); margin-top: 10px; text-align: center; }
.form-hint       { font-size: .76rem; color: var(--text-muted); margin-top: 4px; }

.form-errors   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.form-error    { font-size: .84rem; margin: 0; }
.form-success  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 14px 16px; border-radius: var(--radius-sm); font-size: .88rem; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.form-success-lg  { padding: 20px 22px; font-size: .92rem; }
.form-success strong { display: block; margin-bottom: 4px; }
.required      { color: #dc2626; }

/* =============================================================
   11. Machine Cards — Vertical
   Rendered by tmw_machine_card() in _inc/components.php
   ============================================================= */
.machine-grid   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.machine-grid-4 { grid-template-columns: repeat(4, 1fr); }

.machine-card-v {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .15s, transform .15s;
    display: flex;
    flex-direction: column;
}
.machine-card-v:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.machine-card-img-wrap {
    display: block;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--bg);
}
.machine-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.machine-card-v:hover .machine-card-img-wrap img { transform: scale(1.04); }

.machine-card-body   { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.machine-card-meta   { font-size: .75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.machine-card-title  { font-size: .95rem; font-weight: 700; color: var(--text); line-height: 1.3; flex: 1; }
.machine-card-title a       { color: var(--text); text-decoration: none; }
.machine-card-title a:hover { color: var(--blue); }
.machine-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; flex-wrap: wrap; }
.machine-card-price  { font-size: 1.05rem; font-weight: 800; color: var(--blue); }

/* =============================================================
   12. Machine Cards — Horizontal
   Rendered by tmw_machine_card_h() in _inc/components.php
   ============================================================= */
.machine-list { display: flex; flex-direction: column; gap: 16px; }

.machine-card-h {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .15s;
}
.machine-card-h:hover { box-shadow: var(--shadow-md); }

.machine-card-h-img {
    display: block;
    width: 230px;
    height: 230px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg);
}
.machine-card-h-img img { width: 100%; height: 100%; object-fit: cover; }
.machine-card-h-body     { flex: 1; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.machine-card-desc       { font-size: .84rem; color: var(--text-muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.machine-card-h-aside    { flex-shrink: 0; padding: 18px 20px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; min-width: 160px; border-left: 1px solid var(--bg); gap: 10px; }
.machine-card-h-aside .machine-card-price { font-size: 1.25rem; }
.machine-card-h-aside .btn { width: 100%; justify-content: center; }

/* =============================================================
   13. Condition Badges
   Used on machine cards and detail sidebar
   ============================================================= */
.condition-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    white-space: nowrap;
}
/* Good / Very Good / Reconditioned / Excellent */
.condition-5, .condition-6, .condition-7 { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
/* New, Never Used / Brand New */
.condition-8, .condition-9 { background: #eff6ff; color: var(--blue); border-color: #bfdbfe; }

/* =============================================================
   14. Image Gallery
   Main image + arrows + thumbnails on listing.php
   ============================================================= */
.gallery      { margin-bottom: 24px; }
.gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    aspect-ratio: 4/3;
    position: relative;
}
/* zoom-in cursor signals the image is clickable (opens lightbox) */
.gallery-main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }

/* Arrow navigation buttons — absolute inside .gallery-main */
.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    background: rgba(255,255,255,.85);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow);
    transition: background .12s;
    z-index: 2;
    pointer-events: all; /* never inherit pointer-events:none from a wrapper */
}
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-prev:hover,
.gallery-next:hover { background: var(--white); }

/* Thumbnails */
.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.gallery-thumb {
    width: 76px; height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .12s;
    background: var(--bg);
    padding: 0;
}
.gallery-thumb.active     { border-color: var(--blue); }
.gallery-thumb img        { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb-more {
    width: 76px; height: 56px;
    background: rgba(0,0,0,.6);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

/* =============================================================
   15. Image Lightbox
   Full-screen viewer opened by clicking main gallery image.
   JS adds/removes .open class.
   ============================================================= */
.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, .92);
    align-items: center;
    justify-content: center;
}
.gallery-lightbox.open { display: flex; }

.gallery-lightbox #lb-img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius);
    user-select: none;
    display: block;
}

.lb-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 44px; height: 44px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s;
    z-index: 1;
}
.lb-close:hover { background: rgba(255,255,255,.3); }

.lb-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s;
    z-index: 1;
}
.lb-nav:hover { background: rgba(255,255,255,.3); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* =============================================================
   16. Inventory / Browse Page
   inventory.php — sidebar filters + results grid
   ============================================================= */
.inventory-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
    padding-top: 28px;
    padding-bottom: 56px;
}

/* Filter sidebar */
.filter-sidebar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: sticky;
    top: calc(var(--header-h) + 16px);
}
.filter-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.filter-sidebar-header h2 { font-size: .88rem; color: var(--text); margin: 0; }
.filter-group             { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.filter-group:last-child  { border-bottom: none; }
.filter-group-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
}
.filter-select,
.filter-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    background: var(--white);
    color: var(--text);
    height: 38px;
}
.filter-select { cursor: pointer; }
.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30,82,192,.1);
}
.filter-range-row { display: flex; gap: 8px; align-items: center; }
.filter-range-sep { color: var(--text-muted); font-size: .8rem; flex-shrink: 0; }
.filter-submit    { margin: 14px 18px; width: calc(100% - 36px); }
.filter-clear {
    font-size: .8rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}
.filter-clear:hover { text-decoration: underline; }
.filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    color: var(--text-2);
    cursor: pointer;
    padding: 3px 0;
    user-select: none;
}
.filter-check input[type="radio"],
.filter-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: var(--blue);
    cursor: pointer;
    margin: 0;
}

/* Results area */
.inventory-results { min-width: 0; }
.results-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.filter-toggle-btn { display: none; } /* shown on mobile via breakpoint */
.sort-form   { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sort-label  { font-size: .84rem; color: var(--text-muted); }
.sort-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .84rem; background: var(--white); cursor: pointer; }
.inventory-search-bar   { display: flex; gap: 10px; margin-bottom: 20px; }
.inventory-search-input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; }
.results-count         { font-size: .9rem; color: var(--text-muted); }
.results-count strong  { color: var(--text); }

/* =============================================================
   17. Pagination
   Rendered by tmw_pagination() in _inc/components.php
   ============================================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px; height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    color: var(--text-2);
    background: var(--white);
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s;
}
.page-btn:hover       { background: var(--blue-light); color: var(--blue); border-color: var(--blue); text-decoration: none; }
.page-btn.active      { background: var(--blue); color: var(--white); border-color: var(--blue); font-weight: 700; pointer-events: none; }
.page-ellipsis        { display: inline-flex; align-items: center; padding: 0 6px; color: var(--text-muted); }
.page-prev, .page-next { } /* inherits .page-btn */

/* =============================================================
   18. Machine Detail Page
   listing.php — two-column layout, tabs, specs, sidebar
   ============================================================= */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
    padding-top: 28px;
    padding-bottom: 64px;
}
.detail-main { min-width: 0; }

/* ── Tabbed content card ──────────────────────────────────────
   One card: tab nav flush on top, content panel below.
   The nav's bottom border merges with the card border to make
   the active tab feel visually connected to its panel.
   ────────────────────────────────────────────────────────── */
.detail-content-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.detail-tab-nav {
    display: flex;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
    overflow-x: auto;
    scrollbar-width: none;
}
.detail-tab-nav::-webkit-scrollbar { display: none; }

.detail-tab-btn {
    flex-shrink: 0;
    padding: 14px 22px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, border-color .15s, background .15s;
    line-height: 1;
}
.detail-tab-btn:hover  { color: var(--blue); background: rgba(30,82,192,.04); }
.detail-tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); background: var(--white); }

.detail-tab-body  { padding: 28px 30px; }
.detail-tab-panel { display: none; }
.detail-tab-panel.active { display: block; }

/* Overview panel */
.machine-description { font-size: .92rem; line-height: 1.8; color: var(--text-2); }
.machine-description p          { margin-bottom: 12px; }
.machine-description p:last-child { margin-bottom: 0; }
.machine-description ul,
.machine-description ol         { padding-left: 20px; margin-bottom: 12px; }
.machine-description li         { margin-bottom: 6px; }
.detail-tab-empty               { color: var(--text-muted); font-size: .9rem; margin: 0; }

/* Quick-facts strip below description */
.detail-quick-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.detail-quick-fact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border-right: 1px solid var(--border);
}
.detail-quick-fact:last-child { border-right: none; }
.dqf-label { font-size: .7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.dqf-value { font-size: .92rem; font-weight: 600; color: var(--text); }

/* Specifications panel — HTML <table> */
.detail-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.detail-spec-table tr             { border-bottom: 1px solid var(--border); }
.detail-spec-table tr:last-child  { border-bottom: none; }
.detail-spec-table th {
    width: 38%;
    padding: 10px 14px;
    text-align: left;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    white-space: nowrap;
}
.detail-spec-table td             { padding: 10px 14px; color: var(--text); font-weight: 600; }
.detail-spec-table tr:nth-child(even) th,
.detail-spec-table tr:nth-child(even) td { background: #fafafa; }

/* No-specs fallback — renders inside the content body, never floats */
.detail-tab-no-specs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 20px;
    gap: 14px;
    color: var(--text-muted);
    min-height: 200px;
}
.detail-tab-no-specs svg { opacity: .35; }
.detail-tab-no-specs p   { margin: 0; font-size: .92rem; max-width: 320px; }

/* Video embed */
.video-embed-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius); }
.video-embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.machine-video { width: 100%; border-radius: var(--radius); }

/* Shipping panel */
.shipping-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}
.shipping-info-block         { display: flex; gap: 16px; align-items: flex-start; }
.shipping-info-block svg     { color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.shipping-info-block strong  { display: block; font-size: .9rem; color: var(--text); margin-bottom: 4px; }
.shipping-info-block p       { font-size: .85rem; color: var(--text-muted); margin: 0; line-height: 1.6; }
.shipping-cta                { padding-top: 4px; border-top: 1px solid var(--border); }

/* Right sidebar — sticky on desktop, static on mobile */
.detail-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - var(--header-h) - 32px);
    overflow-y: auto;
    scrollbar-width: none;
}
.detail-sidebar::-webkit-scrollbar { display: none; }

.detail-sidebar-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 2px;
}
.detail-machine-title { font-size: 1.3rem; font-weight: 800; line-height: 1.25; color: var(--text); margin: 0; }
.detail-year          { font-size: .85rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

/* Machine facts panel — rendered by tmw_machine_facts() in components.php */
.machine-facts {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.machine-facts-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    line-height: 1;
}
.machine-facts-list { list-style: none; margin: 0 0 18px; padding: 0; }
.machine-facts-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--bg);
    font-size: .84rem;
}
.machine-facts-row:last-child { border-bottom: none; }
.machine-facts-row dt { color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.machine-facts-row dd { color: var(--text); font-weight: 600; text-align: right; }
.machine-facts-actions     { display: flex; flex-direction: column; gap: 8px; }
.machine-facts-actions .btn { justify-content: center; width: 100%; }

/* Inquiry card */
.inquiry-card   { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.inquiry-heading {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.inquiry-form .form-group       { margin-bottom: 13px; }
.inquiry-form .form-group label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}
.inquiry-form input,
.inquiry-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color .12s, box-shadow .12s;
}
.inquiry-form input:focus,
.inquiry-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,82,192,.1); }
.inquiry-form textarea { min-height: 90px; resize: vertical; }

/* Shared spec table used by tmw_spec_table() in components.php */
.spec-table-wrap    { }
.spec-table-heading { font-size: 1rem; margin-bottom: 14px; }
.spec-table-empty   { padding: 28px; text-align: center; color: var(--text-muted); font-size: .88rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.spec-table th, .spec-table td   { padding: 10px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.spec-table tr:last-child th,
.spec-table tr:last-child td     { border-bottom: none; }
.spec-table th { background: var(--bg); color: var(--text-muted); font-weight: 500; width: 40%; }
.spec-table td { color: var(--text); font-weight: 600; }

/* =============================================================
   19. CTA Banner
   Rendered by tmw_cta_banner() in _inc/components.php.
   Full-width section — border-radius is intentionally zero.
   ============================================================= */
.cta-banner { } /* base — variant classes below provide all visuals */
.cta-banner--dark,
.cta-banner--blue { border-radius: 0; overflow: visible; } /* reset any inherited card styles */
.cta-banner--dark { background: var(--navy); }
.cta-banner--blue { background: var(--blue); }
.cta-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 40px 0;
    flex-wrap: wrap;
}
.cta-banner-heading { font-size: 1.4rem; color: var(--white); margin-bottom: 6px; }
.cta-banner-sub     { color: rgba(255,255,255,.75); font-size: .9rem; margin: 0; }

/* =============================================================
   20. Homepage Sections
   index.php — hero, trust bar, industry grid, sell CTA, stats
   ============================================================= */

/* Hero */
.hero {
    background: var(--navy-dark);
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .45;
}
.hero-overlay  { position: absolute; inset: 0; background: rgba(10,25,48,.58); }
.hero-inner    { position: relative; z-index: 1; padding: 40px 0 28px; text-align: center; }
.hero h1       { color: var(--white); margin-bottom: 14px; }
.hero p        { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 520px; margin: 0 auto 28px; }
.hero-heading  { color: var(--white); margin-bottom: 12px; font-size: 2.1rem; }
.hero-sub      { color: rgba(255,255,255,.8); font-size: 1rem; max-width: 520px; margin: 0 auto 20px; }
.hero-quick-links { margin-top: 20px; font-size: .84rem; color: rgba(255,255,255,.6); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.hero-quick-links a       { color: rgba(255,255,255,.85); font-weight: 600; text-decoration: none; }
.hero-quick-links a:hover { color: var(--white); text-decoration: underline; }

/* Hero search bar */
.hero-search {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto;
    backdrop-filter: blur(4px);
}
.hero-search select,
.hero-search input,
.hero-search-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    background: var(--white);
    color: var(--text);
    height: 44px;
    min-width: 0;
}
.hero-search select:focus,
.hero-search input:focus { outline: 2px solid var(--blue); }
.hero-search .btn { flex-shrink: 0; }

/* Trust bar */
.trust-bar      { background: var(--white); border-bottom: 1px solid var(--border); padding: 20px 0; }
.trust-bar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-item     { display: flex; align-items: center; gap: 14px; }
.trust-icon     { color: var(--blue); flex-shrink: 0; }
.trust-item div strong { display: block; font-size: .88rem; color: var(--text); }
.trust-item div span   { font-size: .78rem; color: var(--text-muted); }

/* Industry grid */
.industry-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.industry-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, color .15s;
    gap: 10px;
}
.industry-card:hover     { border-color: var(--blue); box-shadow: var(--shadow-md); color: var(--blue); text-decoration: none; }
.industry-card-icon      { width: 52px; height: 52px; background: var(--blue-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.industry-card-icon svg  { color: var(--blue); }
.industry-card-name      { font-size: .88rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.industry-card-count     { font-size: .75rem; color: var(--text-muted); }
/* Aliases used in older templates */
.industry-card .ind-name  { font-size: .83rem; font-weight: 700; line-height: 1.3; }
.industry-card .ind-count { font-size: .74rem; color: var(--text-muted); }

/* Sell CTA (dark band on homepage) */
.sell-cta         { background: var(--navy-dark); padding: 40px 0; }
.sell-cta-inner   { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.sell-cta-text h2 { color: var(--white); margin-bottom: 8px; }
.sell-cta-text p  { color: rgba(255,255,255,.7); max-width: 500px; margin: 0; }
.sell-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Stat bar */
.stat-bar           { background: var(--navy); padding: 32px 0; }
.stat-bar-grid      { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-item          { text-align: center; }
.stat-number        { display: block; font-size: 1.6rem; font-weight: 800; color: var(--white); }
.stat-label         { display: block; font-size: .78rem; color: rgba(255,255,255,.55); margin-top: 4px; }
.stat-bar-light     { background: var(--bg); }
.stat-bar-light .stat-number { color: var(--navy); }
.stat-bar-light .stat-label  { color: var(--text-muted); }

/* Process steps (used on homepage, sell.php, services.php) */
.process-steps    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 36px; position: relative; }
/* Horizontal connector line — runs through the numbered circles on desktop */
.process-steps::before {
    content: '';
    position: absolute;
    top: 39px; /* padding-top 16px + half of 46px circle = 39px */
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.process-step     { text-align: center; padding: 16px; position: relative; z-index: 1; }
.process-step-num {
    width: 46px; height: 46px;
    background: var(--blue);
    color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0 auto 14px;
    position: relative; z-index: 1;
}
.process-step h3  { margin-bottom: 6px; }
.process-step p   { font-size: .84rem; color: var(--text-muted); margin: 0; }

/* =============================================================
   21. Inner Pages
   sell.php, contact.php, about.php, services.php, resources.php
   ============================================================= */

/* Sell page */
.sell-layout        { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.sell-form-heading  { font-size: 1.2rem; margin-bottom: 22px; }
.sell-info-card     { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.sell-info-card h3  { margin-bottom: 14px; }
.sell-benefits      { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sell-benefits li   { display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; color: var(--text-2); }
.sell-benefits svg  { color: #16a34a; flex-shrink: 0; margin-top: 1px; }

/* Contact page */
.contact-layout         { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.contact-form-wrap h2   { margin-bottom: 22px; }
.contact-info-card      { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.contact-info-card h3   { margin-bottom: 14px; }
.contact-details        { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.contact-details li     { display: flex; align-items: flex-start; gap: 12px; }
.contact-details svg    { color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.contact-details strong { display: block; font-size: .84rem; color: var(--text-muted); margin-bottom: 2px; }
.contact-details a      { font-size: .9rem; font-weight: 600; color: var(--text); text-decoration: none; }
.contact-details a:hover { color: var(--blue); }
.contact-details span   { font-size: .9rem; color: var(--text); }
.contact-quick-links    { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.contact-quick-links a  { font-size: .88rem; font-weight: 600; color: var(--blue); text-decoration: none; }
.contact-quick-links a:hover { text-decoration: underline; }

/* About page */
.about-intro-layout  { display: grid; grid-template-columns: 1fr 400px; gap: 48px; align-items: center; }
.about-intro-text h2 { margin-bottom: 16px; }
.about-intro-img img { border-radius: var(--radius); width: 100%; }
.values-grid         { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.value-card          { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.value-card svg      { color: var(--blue); margin-bottom: 14px; display: block; }
.value-card h3       { margin-bottom: 8px; }
.value-card p        { font-size: .87rem; color: var(--text-muted); margin: 0; }

/* Services page */
.services-grid   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card    { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow); }
.service-card h3 { margin-bottom: 10px; }
.service-icon    { width: 60px; height: 60px; background: var(--blue-light); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.service-icon svg { color: var(--blue); }
.service-link    { display: inline-block; margin-top: 12px; font-size: .84rem; font-weight: 600; color: var(--blue); text-decoration: none; }
.service-link:hover { text-decoration: underline; }

/* Services page — intro band */
.svcs-intro         { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.svcs-intro-text    { flex: 1; min-width: 260px; }
.svcs-intro-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px; flex-shrink: 0; }

/* Section eyebrow label */
.section-eyebrow {
    display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--blue); background: var(--blue-light);
    padding: 4px 12px; border-radius: 3px; margin-bottom: 14px;
}

/* Repair feature — two-column layout */
.svcs-repair-layout  { display: grid; grid-template-columns: 1fr 380px; gap: 52px; align-items: start; }
.svcs-repair-heading { font-size: 1.85rem; margin-bottom: 14px; }
.svcs-subheading     { font-size: 1rem; font-weight: 700; margin: 22px 0 10px; color: var(--text); }

/* Service bullet list */
.svcs-list           { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 9px; }
.svcs-list li        { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--text-2); line-height: 1.55; }
.svcs-list li::before { content: ''; display: block; width: 7px; height: 7px; background: var(--blue); border-radius: 50%; flex-shrink: 0; margin-top: 7px; }

/* Specialty call-out cards inside repair section */
.svcs-specialty-card     { display: flex; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; align-items: flex-start; }
.svcs-specialty-primary  { border-left-color: var(--blue); background: var(--blue-light); }
.svcs-specialty-icon     { width: 40px; height: 40px; background: var(--white); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--blue); box-shadow: var(--shadow); }
.svcs-specialty-card h4  { margin-bottom: 6px; font-size: .95rem; }
.svcs-specialty-card p   { font-size: .87rem; color: var(--text-2); margin: 0; line-height: 1.6; }

/* Disclaimer/note */
.svcs-note { font-size: .84rem; color: var(--text-muted); border-left: 3px solid var(--border); padding-left: 14px; margin: 20px 0 28px; font-style: italic; }

/* Repair image column */
.svcs-repair-img     { position: relative; }
.svcs-img            {
    width: 100%; height: 480px; object-fit: cover;
    border-radius: var(--radius); box-shadow: var(--shadow-md);
    display: block;
    background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy) 100%);
}
.svcs-img-badge      { position: absolute; bottom: 16px; left: 16px; right: 16px; background: rgba(10,25,48,.82); backdrop-filter: blur(4px); color: var(--white); font-size: .8rem; font-weight: 600; padding: 10px 16px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 8px; }

/* Why TMW grid */
.svcs-why-grid       { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.svcs-why-item       { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; }
.svcs-why-item svg   { color: var(--blue); margin-bottom: 12px; display: block; }
.svcs-why-item h4    { margin-bottom: 6px; font-size: .9rem; }
.svcs-why-item p     { font-size: .84rem; color: var(--text-muted); margin: 0; }

/* Featured service card — services hub page (repair highlight) */
.service-feature         { background: var(--navy-dark); border-radius: var(--radius); padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; margin-bottom: 36px; }
.service-feature-text    { flex: 1; min-width: 260px; }
.service-feature-text h2 { color: var(--white); font-size: 1.5rem; margin-bottom: 10px; }
.service-feature-text p  { color: rgba(255,255,255,.72); margin-bottom: 16px; max-width: 540px; }
.service-feature-tags    { display: flex; flex-wrap: wrap; gap: 8px; }
.service-feature-tag     { background: rgba(255,255,255,.1); color: rgba(255,255,255,.75); font-size: .74rem; font-weight: 600; padding: 4px 12px; border-radius: 3px; }
.service-feature-actions { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; align-self: center; }

/* Field work / project image grid (repair page) */
.project-grid        { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.project-card        { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.project-img         { height: 220px; background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy) 100%); overflow: hidden; }
.project-img img     { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.project-card:hover .project-img img { transform: scale(1.04); }
.project-caption     { padding: 14px 16px; background: var(--white); }
.project-caption strong { display: block; font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.project-caption p   { font-size: .82rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* OEM / brand tag list (repair page) */
.repair-oem-list     { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.repair-oem-tag      { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 14px; font-size: .82rem; font-weight: 600; color: var(--text-2); }

/* Repair page two-col intro */
.repair-intro        { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: center; }
.repair-intro-actions { display: flex; flex-direction: column; gap: 12px; }

/* Resources page */
.resources-grid          { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.resource-card           { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; gap: 20px; box-shadow: var(--shadow); }
.resource-card-icon      { width: 52px; height: 52px; background: var(--blue-light); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.resource-card-icon svg  { color: var(--blue); }
.resource-card-body h3   { margin-bottom: 8px; }
.resource-card-body p    { font-size: .87rem; color: var(--text-muted); margin-bottom: 12px; }
.resource-link           { font-size: .84rem; font-weight: 600; color: var(--blue); text-decoration: none; }
.resource-link:hover     { text-decoration: underline; }

/* =============================================================
   22. Industry SEO Pages (industry.php)
   ============================================================= */
.industry-intro-section {
    background: var(--bg);
    padding: 44px 0 40px;
}
.industry-intro-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}
.industry-intro-lead {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-2);
    margin: 0;
}

/* Category box */
.industry-category-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
}
.industry-cat-heading {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin: 0 0 14px;
}
.industry-cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 16px;
}
.industry-cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background .12s, color .12s;
}
.industry-cat-list a:hover {
    background: rgba(30,82,192,.06);
    color: var(--blue);
    text-decoration: none;
}
.industry-cat-count {
    font-size: .76rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    border-radius: 20px;
    padding: 2px 8px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.industry-browse-all {
    display: block;
    font-size: .84rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.industry-browse-all:hover { text-decoration: underline; }

/* Empty state — no listings for this industry */
.industry-empty-state {
    text-align: center;
    padding: 56px 24px;
    max-width: 540px;
    margin: 0 auto;
}
.industry-empty-state svg {
    color: var(--text-muted);
    opacity: .3;
    margin: 0 auto 20px;
    display: block;
}
.industry-empty-state h2 {
    font-size: 1.25rem;
    color: var(--text-2);
    margin-bottom: 12px;
}
.industry-empty-state p {
    font-size: .9375rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* View all button row */
.industry-view-all-wrap {
    text-align: center;
    margin-top: 32px;
}

/* Trust / bridge section */
.industry-trust-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.industry-bridge {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.7;
    color: var(--text);
    margin: 0;
}
.industry-trust-text {
    font-size: .9375rem;
    line-height: 1.8;
    color: var(--text-2);
    margin: 0;
}

/* =============================================================
   23. Footer
   Rendered by _inc/footer.php
   ============================================================= */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.7);
    padding: 52px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-brand img      { height: 40px; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-tagline        { font-size: .84rem; line-height: 1.7; max-width: 280px; margin-top: 12px; color: rgba(255,255,255,.82); }
.footer-social         { display: flex; gap: 10px; margin-top: 16px; }
.social-icon           { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: rgba(255,255,255,.1); border-radius: 6px; color: rgba(255,255,255,.7); transition: background .12s, color .12s; text-decoration: none; }
.social-icon:hover     { background: rgba(255,255,255,.2); color: var(--white); text-decoration: none; }
.footer-heading        { color: var(--white); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-col h4         { color: var(--white); font-size: .85rem; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; }
.footer-links          { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-links a        { font-size: .84rem; color: rgba(255,255,255,.6); text-decoration: none; transition: color .12s; }
.footer-links a:hover  { color: var(--white); }
.footer-col a          { display: block; font-size: .84rem; color: rgba(255,255,255,.6); padding: 4px 0; text-decoration: none; transition: color .12s; }
.footer-col a:hover    { color: var(--white); }
.footer-contact-list   { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.footer-contact-list li { display: flex; align-items: flex-start; gap: 8px; font-size: .84rem; }
.footer-contact-list svg { color: rgba(255,255,255,.5); flex-shrink: 0; margin-top: 2px; }
.footer-contact-list a  { color: rgba(255,255,255,.75); text-decoration: none; }
.footer-contact-list a:hover { color: var(--white); }
.footer-contact-list span { color: rgba(255,255,255,.65); }
.footer-cta.btn        { display: flex; justify-content: center; margin-top: 12px; }
.footer-brand .footer-phone { display: flex; align-items: center; gap: 7px; color: var(--white); font-weight: 600; margin-top: 16px; font-size: .9rem; text-decoration: none; }
.footer-brand .footer-phone svg { width: 16px; height: 16px; }
.footer-bottom-inner   { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom         { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: .78rem; color: rgba(255,255,255,.4); flex-wrap: wrap; gap: 8px; }
.footer-copy           { font-size: .78rem; color: rgba(255,255,255,.4); margin: 0; }
.footer-legal          { display: flex; gap: 16px; }
.footer-legal a        { font-size: .78rem; color: rgba(255,255,255,.4); text-decoration: none; }
.footer-legal a:hover  { color: rgba(255,255,255,.7); }

/* ── Footer site-wide disclaimer ─────────────────────────────── */
.footer-disclaimer {
    color: rgba(255,255,255,.4);
    font-size: .78rem;
    line-height: 1.6;
    margin-top: 28px;
    padding-top: 18px;
    text-align: center;
}
.footer-disclaimer p { margin: 0 0 6px; color: rgba(255,255,255,.4); }
.footer-terms-link {
    display: block;
    font-size: .78rem;
    color: rgba(255,255,255,.4);
    text-decoration: none;
    margin-top: 6px;
    transition: color .12s;
}
.footer-terms-link:hover { color: rgba(255,255,255,.7); text-decoration: none; }

/* ── Listing page disclaimer (small-print note) ──────────────── */
.listing-disclaimer {
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid #edf0f3;
    font-size: 11px;
    color: #8a94a3;
    line-height: 1.35;
    white-space: normal;
}

/* ── Terms & Conditions page ─────────────────────────────────── */
.terms-page { background: #f7f9fc; padding: 44px 0 60px; }
.terms-content { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.terms-summary {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 28px;
    white-space: nowrap;
}
.terms-list { background: transparent; }
.terms-section {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    padding: 24px 0;
    border-bottom: 1px solid #e3e8ef;
}
.terms-section:last-of-type { border-bottom: none; }
.terms-section h2 {
    font-size: 17px;
    line-height: 1.35;
    color: #0f172a;
    margin: 0;
    padding-top: 2px;
}
.terms-section p {
    font-size: 14.5px;
    line-height: 1.75;
    color: #334155;
    margin: 0 0 12px;
}
.terms-section p:last-child { margin-bottom: 0; }
.terms-contact {
    background: rgba(255,255,255,.55);
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 10px;
}
.terms-contact p { font-size: 14.5px; line-height: 1.75; margin: 0 0 4px; }
.terms-contact p:last-child { margin-bottom: 0; }
.terms-meta-bottom {
    margin-top: 28px;
    font-size: 13px;
    color: #64748b;
    text-align: right;
}

/* =============================================================
   23. Empty State + Shared Components
   ============================================================= */
.empty-state     { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.empty-state svg { width: 52px; height: 52px; opacity: .25; margin: 0 auto 16px; }
.empty-state h2  { font-size: 1.1rem; color: var(--text-2); margin-bottom: 10px; }
.empty-state h3  { font-size: 1.05rem; color: var(--text-2); margin-bottom: 8px; }
.empty-state p   { font-size: .88rem; max-width: 360px; margin: 0 auto 20px; }

/* Generic tab system — kept for JS compatibility (initTabs('.tab-btn', '.tab-panel')) */
.tab-btn { padding: 12px 20px; font-size: .88rem; font-weight: 600; color: var(--text-muted); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: color .12s, border-color .12s; }
.tab-btn:hover  { color: var(--blue); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-panel      { display: none; }
.tab-panel.active { display: block; }

/* =============================================================
   24. Responsive Breakpoints
   All @media queries are consolidated here.
   ============================================================= */

/* ── 1100px — 3-column grids, narrower sidebars ─────────────── */
@media (max-width: 1100px) {
    .industry-grid           { grid-template-columns: repeat(4, 1fr); }
    .machine-grid            { grid-template-columns: repeat(3, 1fr); }
    .machine-grid-4          { grid-template-columns: repeat(3, 1fr); }
    .footer-grid             { grid-template-columns: 1fr 1fr; }
    .sell-layout             { grid-template-columns: 1fr 300px; }
    .about-intro-layout      { grid-template-columns: 1fr 320px; }
    .detail-layout           { grid-template-columns: 1fr 320px; gap: 24px; }
    .detail-tab-body         { padding: 22px 24px; }
    .industry-intro-layout   { grid-template-columns: 1fr 280px; gap: 32px; }
    .industry-trust-layout   { gap: 32px; }
}

/* ── 900px — mobile nav, stacked layouts ────────────────────── */
@media (max-width: 900px) {
    /* Header */
    .header-nav          { display: none; }
    .header-phone        { display: flex; }
    .mobile-call-only    { display: flex; width: 100%; justify-content: center; }
    .desktop-phone-note  { display: none; }
    .mobile-menu-btn     { display: flex; align-items: center; justify-content: center; }

    /* Grids */
    .machine-grid        { grid-template-columns: repeat(2, 1fr); }
    .machine-grid-4      { grid-template-columns: repeat(2, 1fr); }
    .trust-bar-grid      { grid-template-columns: repeat(2, 1fr); }
    .industry-grid       { grid-template-columns: repeat(3, 1fr); }

    /* Layouts */
    .inventory-layout    { grid-template-columns: 1fr; }
    .filter-toggle-btn   { display: inline-flex; }
    .filter-sidebar      { display: none; position: static; border-radius: var(--radius); }
    .filter-sidebar.mobile-open { display: block; }
    .detail-layout           { grid-template-columns: 1fr; }
    .detail-sidebar          { position: static; max-height: none; overflow-y: visible; }
    .industry-intro-layout   { grid-template-columns: 1fr; }
    .industry-trust-layout   { grid-template-columns: 1fr; gap: 24px; }
    .sell-layout             { grid-template-columns: 1fr; }
    .contact-layout      { grid-template-columns: 1fr; }
    .about-intro-layout  { grid-template-columns: 1fr; }
    .about-intro-img     { display: none; }
    .values-grid         { grid-template-columns: 1fr; }
    .services-grid       { grid-template-columns: repeat(2, 1fr); }
    .resources-grid      { grid-template-columns: 1fr; }
    .machine-card-h-img  { width: 180px; height: 180px; }
    .process-steps       { grid-template-columns: repeat(2, 1fr); }
    .process-steps::before { display: none; }
    .stat-bar-grid       { grid-template-columns: repeat(2, 1fr); }
    .svcs-repair-layout  { grid-template-columns: 1fr; }
    .svcs-repair-img     { display: none; }
    .svcs-why-grid       { grid-template-columns: repeat(2, 1fr); }
    .project-grid        { grid-template-columns: repeat(2, 1fr); }
    .repair-intro        { grid-template-columns: 1fr; }
    .service-feature     { flex-direction: column; align-items: flex-start; }

    /* Detail quick-facts — 2 cols on tablet */
    .detail-quick-facts { grid-template-columns: repeat(2, 1fr); }
    .detail-quick-fact  { border-right: none; border-bottom: 1px solid var(--border); }
    .detail-quick-fact:nth-child(odd)  { border-right: 1px solid var(--border); }
    .detail-quick-fact:last-child,
    .detail-quick-fact:nth-last-child(2):nth-child(odd) { border-bottom: none; }
}

/* ── 640px — single-column mobile ───────────────────────────── */
@media (max-width: 640px) {
    /* Header: phone number visible at 900px causes overflow on 390px phones.
       Hide it here — it's already in the mobile nav drawer footer. */
    .header-phone        { display: none; }

    h1                   { font-size: 1.7rem; }
    h2                   { font-size: 1.3rem; }
    .container           { padding: 0 16px; }
    .hero-inner          { padding: 48px 0 40px; }
    .hero-heading        { font-size: 1.85rem; }
    .hero-search         { flex-direction: column; }
    .machine-grid        { grid-template-columns: 1fr; }
    .machine-grid-4      { grid-template-columns: 1fr; }
    .trust-bar-grid      { grid-template-columns: 1fr; }
    .industry-grid       { grid-template-columns: repeat(2, 1fr); }
    .footer-grid         { grid-template-columns: 1fr; }
    .machine-card-h      { flex-direction: column; }
    .machine-card-h-img  { width: 100%; height: 200px; }
    .machine-card-h-aside { flex-direction: row; flex-wrap: wrap; border-left: none; border-top: 1px solid var(--bg); min-width: unset; }
    .cta-banner-inner    { flex-direction: column; text-align: center; }
    .sell-cta-inner      { flex-direction: column; text-align: center; }
    .sell-cta-actions    { justify-content: center; }
    .form-row-2          { grid-template-columns: 1fr; }
    .services-grid       { grid-template-columns: 1fr; }
    .process-steps       { grid-template-columns: 1fr; }
    .values-grid         { grid-template-columns: 1fr; }
    .page-banner-title   { font-size: 1.6rem; }
    /* Mobile homepage rhythm */
    .page-home .section,
    .page-home .section-alt { padding: 36px 0; }
    .sell-cta   { padding: 32px 0; }
    .stat-bar   { padding: 24px 0; }
    .nav-dropdown        { min-width: 300px; }
    .nav-dropdown-cols   { flex-direction: column; gap: 12px; }
    .svcs-intro          { flex-direction: column; }
    .svcs-why-grid       { grid-template-columns: 1fr; }
    .project-grid        { grid-template-columns: 1fr; }
}

/* ── 480px — small phones ────────────────────────────────────── */
@media (max-width: 480px) {
    .detail-tab-btn  { padding: 12px 16px; font-size: .82rem; }
    .detail-tab-body { padding: 18px 16px; }
    .detail-quick-facts { grid-template-columns: 1fr 1fr; }
}

/* ── Spec table — stacked label/value on mobile phones ──────── */
@media (max-width: 640px) {
    .detail-spec-table,
    .detail-spec-table tbody,
    .detail-spec-table tr,
    .detail-spec-table th,
    .detail-spec-table td          { display: block; }
    .detail-spec-table tr          { padding: 10px 0; border-bottom: 1px solid var(--border); }
    .detail-spec-table tr:last-child { border-bottom: none; }
    .detail-spec-table th          { width: 100%; padding: 0 14px 4px; white-space: normal; background: transparent; font-size: .78rem; color: var(--text-muted); font-weight: 600; }
    .detail-spec-table td          { width: 100%; padding: 0 14px 2px; font-size: .95rem; font-weight: 600; overflow-wrap: break-word; word-break: normal; }
    .detail-spec-table tr:nth-child(even) th,
    .detail-spec-table tr:nth-child(even) td { background: transparent; }
}

/* ── Lightbox nav — tighter on small phones ─────────────────── */
@media (max-width: 600px) {
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
    .lb-nav  { width: 40px; height: 40px; }
    .gallery-lightbox #lb-img { max-width: 96vw; max-height: 82vh; }
}

/* ── Listing disclaimer — one line on wider screens ─────────────── */
@media (min-width: 900px) {
    .listing-disclaimer {
        font-size: 10.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ── Terms page — mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .terms-page      { padding: 28px 0 44px; }
    .terms-summary   { white-space: normal; font-size: 14px; }
    .terms-section   { display: block; padding: 22px 0; }
    .terms-section h2 { margin-bottom: 8px; font-size: 16px; }
    .terms-section p  { font-size: 14px; }
    .terms-meta-bottom { text-align: left; }
}

/* ── Sell page — Prefer to Call button spacing ───────────────── */
.sell-info-contact .btn + .btn {
    margin-top: 12px;
}

/* ── Cookie consent banner ───────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a3a5c;
    color: #fff;
    z-index: 9999;
    box-shadow: 0 -2px 12px rgba(0,0,0,.25);
}
.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-banner-inner p {
    margin: 0;
    font-size: .88rem;
    flex: 1 1 300px;
    color: rgba(255,255,255,.9);
}
.cookie-banner-inner a {
    color: rgba(255,255,255,.9);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,.4);
    text-underline-offset: 2px;
    transition: text-decoration-color .12s;
}
.cookie-banner-inner a:hover { text-decoration-color: rgba(255,255,255,.9); }
.cookie-banner .btn-outline {
    color: var(--white);
    border-color: rgba(255,255,255,.45);
}
.cookie-banner .btn-outline:hover {
    background: rgba(255,255,255,.12);
    color: var(--white);
    border-color: var(--white);
}
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }

@media (max-width: 600px) {
    .cookie-banner-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .cookie-banner-actions { width: 100%; justify-content: flex-end; }
}
