/* =========================================================
   Swift Mechanic theme layer (loaded after style.css).
   Soft mint surfaces + teal accents around the brand's navy and
   orange, floating pill navbar, large rounded cards.
   Remove the <link> to this file to get the previous look back.
   ========================================================= */
:root {
    --dark: #0A2342;
    --primary: #F26A2E;
    --primary-deep: #E0561B;
    --accent: #0E9F86;
    --accent-deep: #0B7F6B;
    --mint: #E7F6F1;
    --mint-2: #D3EFE6;
    --bg: #F3F8F6;
    --border: #DCE9E4;
    --slate: #5B6B7D;
    --sm-radius-xl: 34px;
    --sm-radius-lg: 24px;
    --sm-shadow: 0 24px 60px -28px rgba(10, 35, 66, 0.28);
    --sm-shadow-soft: 0 10px 30px -18px rgba(10, 35, 66, 0.25);
}

html, body {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(14, 159, 134, 0.10), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(242, 106, 46, 0.07), transparent 60%),
        var(--bg) !important;
    background-attachment: fixed !important;
}

.text-orange { color: var(--primary) !important; }
.text-teal { color: var(--accent) !important; }

/* Slightly smaller type across the site */
html { font-size: 15px !important; }
body { font-size: 0.95rem; }
html body h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }

/* ---------- Floating pill navbar ---------- */
/* The navbar is the frame: its inner .container must not add its own
   width/padding or the row overflows on laptop screens. */
html body .navbar .nav-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 10px !important;
    min-width: 0;
}
html body .logo-section { flex: 0 0 auto; gap: 9px !important; }
html body .nav-links { flex: 0 1 auto; min-width: 0; }
html body .nav-actions { flex: 0 0 auto; }

/* Logo lockup: SWIFT above MECHANIC, normal letter spacing */
html body .navbar .nav-logo-icon {
    height: 42px !important;
    width: auto !important;
    object-fit: contain !important;
}
html body .navbar .nav-logo-text { line-height: 1 !important; gap: 3px; }
html body .navbar .nav-logo-text .text-top {
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
    color: var(--dark) !important;
}
html body .navbar .nav-logo-text .text-bottom {
    font-size: 1.12rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
}
html body .navbar {
    position: sticky !important;
    top: 12px !important;
    margin: 12px auto 0 !important;
    width: calc(100% - 32px) !important;
    max-width: 1280px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.86) !important;
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid rgba(220, 233, 228, 0.9) !important;
    box-shadow: var(--sm-shadow-soft) !important;
    padding: 6px 10px 6px 18px !important;
    z-index: 1000;
}
html body .nav-links {
    background: var(--mint);
    border: 1px solid var(--mint-2);
    border-radius: 999px;
    padding: 6px 8px;
    gap: 2px !important;
}
html body .nav-content { gap: 12px; }
html body .nav-links a {
    display: inline-block;
    padding: 8px 10px !important;
    border-radius: 999px;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: var(--dark) !important;
    transition: background 0.2s, color 0.2s;
}
html body .nav-links a::after { display: none !important; }
html body .nav-links a:hover { background: rgba(255, 255, 255, 0.85); color: var(--accent-deep) !important; }
html body .nav-links a.active-nav { background: #fff; color: var(--accent-deep) !important; box-shadow: 0 2px 8px rgba(10, 35, 66, 0.08); }

html body .nav-actions a.btn-action,
html body .nav-actions button.btn-action {
    border-radius: 999px !important;
    height: 40px !important;
    padding: 0 14px !important;
    font-size: 0.78rem !important;
    white-space: nowrap;
    font-weight: 800 !important;
}
html body .nav-actions .btn-partner {
    background: #fff !important;
    color: var(--dark) !important;
    border: 1px solid var(--border) !important;
}
html body .nav-actions .btn-login {
    background: var(--dark) !important;
    color: #fff !important;
}

/* ---------- Home shell / hero ---------- */
html body .home-shell {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    padding-top: 8px !important;
}
html body .home-shell::before { display: none !important; }
html body .stats-bar { margin-top: 20px !important; }

html body .homepage-hero {
    position: relative;
    background:
        radial-gradient(700px 420px at 85% 35%, rgba(14, 159, 134, 0.16), transparent 65%),
        linear-gradient(160deg, #F2FBF8 0%, #E5F5EF 55%, #DDF1EA 100%) !important;
    border: 1px solid var(--mint-2) !important;
    border-radius: var(--sm-radius-xl) !important;
    box-shadow: var(--sm-shadow) !important;
    padding-bottom: 96px !important;
    overflow: hidden;
}
html body .homepage-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(10, 35, 66, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 35, 66, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    border-radius: inherit;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 55%);
            mask-image: linear-gradient(90deg, #000 0%, transparent 55%);
}
html body .homepage-hero > * { position: relative; z-index: 1; }

html body .hero-pill {
    background: #fff !important;
    color: var(--accent-deep) !important;
    border: 1px solid var(--mint-2) !important;
    letter-spacing: 0.14em !important;
    font-size: 0.72rem !important;
    box-shadow: 0 4px 14px -8px rgba(10, 35, 66, 0.25);
}
html body .hero-pill-dot { background: var(--accent) !important; box-shadow: 0 0 0 4px rgba(14, 159, 134, 0.18) !important; }

html body .hero-text h1 {
    font-weight: 800 !important;
    letter-spacing: -0.045em !important;
    line-height: 0.98 !important;
    font-size: clamp(2.4rem, 5.4vw, 4.3rem) !important;
    color: var(--dark) !important;
}
html body .hero-text h1 .hero-h1-accent {
    background: linear-gradient(92deg, #0B8F78 0%, #14B892 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent !important;
}
html body .hero-subheadline { color: var(--slate) !important; font-size: 1.12rem !important; line-height: 1.65 !important; }

html body .hero-actions--rescue { gap: 12px !important; flex-wrap: wrap; align-items: center; }
html body .hero-book-btn,
html body .hero-rescue-btn {
    border-radius: 999px !important;
    height: 54px !important;
    padding: 0 26px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
}
html body .hero-book-btn {
    background: var(--dark) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 14px 30px -14px rgba(10, 35, 66, 0.7) !important;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}
html body .hero-book-btn:hover { transform: translateY(-2px); }
html body .hero-rescue-btn {
    background: #fff !important;
    color: var(--primary-deep) !important;
    border: 1.5px solid rgba(242, 106, 46, 0.45) !important;
    box-shadow: none !important;
}
html body .hero-rescue-btn:hover { background: #FFF3EC !important; }
html body .hero-hours { color: var(--dark) !important; font-weight: 700 !important; }
html body .hero-hours i, html body .hero-hours svg { color: var(--accent) !important; }

/* Hero visual: teal dial instead of orange */
html body .hero-dial-sweep { filter: hue-rotate(0deg); }
html body .hero-floating-badge {
    border-radius: 20px !important;
    border: 1px solid var(--mint-2) !important;
    box-shadow: var(--sm-shadow-soft) !important;
}
html body .hero-floating-badge-icon { background: var(--mint) !important; color: var(--accent) !important; }
html body .hero-floating-badge small { color: var(--accent-deep) !important; letter-spacing: 0.12em; }
html body .hero-floating-badge--bottom {
    background: var(--dark) !important;
    border-color: var(--dark) !important;
}
html body .hero-floating-badge--bottom strong { color: #fff !important; }
html body .hero-floating-badge--bottom small { color: #6EE7C8 !important; }
html body .hero-floating-badge--bottom .hero-floating-badge-icon { background: var(--accent) !important; color: #fff !important; }

/* Picker sits on the hero card's bottom edge */
html body .hero-picker-card {
    position: relative;
    z-index: 3;
    margin: -72px 28px 0 !important;
    border-radius: var(--sm-radius-lg) !important;
    background: #fff !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--sm-shadow) !important;
}
html body .hero-picker-eyebrow { color: var(--accent-deep) !important; letter-spacing: 0.16em !important; }
html body .hero-picker-option {
    border-radius: 18px !important;
    background: var(--mint) !important;
    border: 1px solid var(--mint-2) !important;
    color: var(--dark) !important;
}
html body .hero-picker-option .hero-picker-option-icon { background: var(--accent) !important; color: #fff !important; border-radius: 14px !important; }
html body .hero-picker-option--dark { background: #EEF1F8 !important; border-color: #E0E6F2 !important; }
html body .hero-picker-option--dark .hero-picker-option-icon { background: var(--dark) !important; }
html body .hero-picker-option--dark strong { color: var(--dark) !important; }
html body .hero-picker-option--dark small { color: var(--slate) !important; }
html body .hero-picker-option:hover { transform: translateY(-2px); box-shadow: var(--sm-shadow-soft) !important; }
html body .hero-picker-arrow { color: var(--accent) !important; }

/* ---------- Stats: light strip instead of dark boxes ---------- */
html body .stats-bar {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--sm-radius-lg) !important;
    box-shadow: var(--sm-shadow-soft) !important;
    gap: 0 !important;
    overflow: hidden;
    padding: 0 !important;
}
html body .stats-bar-item {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--dark) !important;
    padding: 22px 18px !important;
    text-align: left !important;
    align-items: flex-start !important;
}
html body .stats-bar-item + .stats-bar-item { border-left: 1px solid var(--border) !important; }
html body .stats-bar-item strong { color: var(--dark) !important; font-size: 1.9rem !important; letter-spacing: -0.03em; }
html body .stats-bar-item span { color: var(--slate) !important; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.68rem !important; font-weight: 700; }

/* ---------- Sections: big rounded white cards ---------- */
html body .brands-section,
html body .workshop-showcase,
html body .coverage-section,
html body .trust-section,
html body .testimonial-section,
html body .faq-section {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--sm-radius-xl) !important;
    box-shadow: var(--sm-shadow-soft) !important;
}
html body .brand-orbit-wrap {
    background: linear-gradient(160deg, #F2FBF8, #E3F4EE) !important;
    border-radius: 28px !important;
}
html body .brands-stats > div {
    background: var(--mint) !important;
    border: 1px solid var(--mint-2) !important;
    border-radius: 16px !important;
}
html body .seo-eyebrow {
    color: var(--accent-deep) !important;
    letter-spacing: 0.18em !important;
    font-weight: 800 !important;
}
html body h2 { letter-spacing: -0.035em; }

/* Service cards: navy -> deep navy/teal gradient */
html body .service-category-card,
html body .svc-card-dark {
    background: linear-gradient(150deg, #0A2342 0%, #0C3550 70%, #0B4A55 100%) !important;
    border-radius: var(--sm-radius-xl) !important;
}

/* Generic buttons */
html body .btn-primary,
html body .btn-primary.btn-sm,
html body .btn-ghost.btn-sm {
    border-radius: 999px !important;
}

/* Footer: light mint, matches the hero */
html body .footer {
    background: linear-gradient(180deg, #F4FBF8 0%, #E8F5F0 100%) !important;
    border-top: 1px solid var(--mint-2) !important;
    box-shadow: none !important;
}
html body .footer h4 { color: var(--dark) !important; }
html body .footer .footer-link { color: var(--slate) !important; }
html body .footer .footer-link:hover { color: var(--accent-deep) !important; }
html body .footer .footer-link.text-orange { color: var(--primary-deep) !important; }

/* Laptops: shed the least important bits step by step so the row always
   fits (About Us and Our Mechanics stay reachable from the footer). */
@media (max-width: 1380px) {
    html body .nav-amc { display: none; }
}
@media (max-width: 1280px) {
    html body .nav-actions .btn-action-full { display: none !important; }
    html body .nav-actions .btn-action-short { display: inline !important; }
    html body .nav-links a { padding: 7px 8px !important; }
}
@media (max-width: 1160px) {
    html body .nav-li-about { display: none; }
}
@media (max-width: 1040px) {
    html body .nav-li-mechanics { display: none; }
    html body .navbar .nav-logo-text .text-top { font-size: 0.8rem !important; }
    html body .navbar .nav-logo-text .text-bottom { font-size: 1rem !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    html body .navbar {
        top: 8px !important;
        width: calc(100% - 16px) !important;
        padding: 6px 8px 6px 12px !important;
    }
    html body .navbar .nav-logo-icon { height: 34px !important; }
    html body .navbar .nav-logo-text .text-top { font-size: 0.76rem !important; }
    html body .navbar .nav-logo-text .text-bottom { font-size: 0.95rem !important; }
    html body .nav-actions { gap: 6px !important; }
    html body .nav-actions a.btn-action,
    html body .nav-actions button.btn-action { height: 36px !important; padding: 0 12px !important; }
    html body .nav-actions .btn-partner i,
    html body .nav-actions .btn-partner svg { display: none !important; }
    html body .homepage-hero { border-radius: 26px !important; padding-bottom: 84px !important; }
    html body .hero-picker-card { margin: -64px 12px 0 !important; }
    html body .hero-book-btn { width: 100%; justify-content: center; }
    html body .stats-bar { display: grid !important; grid-template-columns: 1fr 1fr !important; }
    html body .stats-bar-item + .stats-bar-item { border-left: 0 !important; }
    html body .stats-bar-item:nth-child(even) { border-left: 1px solid var(--border) !important; }
    html body .stats-bar-item:nth-child(n+3) { border-top: 1px solid var(--border) !important; }
}

/* ---------- Page bottom / footer layout ---------- */
/* The space reserved for the mobile bottom bar used to sit under the footer
   (an empty strip on desktop). Desktop needs none; on phones the footer
   itself carries that space so its colour runs to the bottom edge. */
html body { padding-bottom: 0 !important; }
@media (max-width: 900px) {
    html body .footer {
        padding: 28px 18px calc(92px + env(safe-area-inset-bottom)) !important;
    }
    /* Compact footer: brand + contact full width, the two link lists side by side */
    html body .footer > .container {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 18px 16px !important;
        text-align: left !important;
    }
    html body .footer > .container > div:first-child,
    html body .footer > .container > div:last-child { grid-column: 1 / -1; }
    html body .footer > .container > div:first-child > div { justify-content: flex-start !important; margin-bottom: 8px !important; }
    html body .footer > .container p { margin: 0 !important; max-width: none !important; font-size: 0.85rem !important; }
    html body .footer h4 { margin-bottom: 10px !important; font-size: 0.95rem !important; }
    html body .footer .footer-link {
        margin: 0 0 8px 0 !important;
        font-size: 0.85rem !important;
        transform: none !important;
    }
    html body .footer .footer-link.text-orange { font-size: 0.95rem !important; }
    html body .footer > div:last-child { margin-top: 18px !important; padding-top: 14px !important; font-size: 0.78rem !important; }
}

/* ---------- Phone layout fixes (customer pages + admin) ---------- */
@media (max-width: 900px) {
    /* style.css zeroes the top padding of every page on phones, so inner
       pages started right under the floating navbar. */
    html body #main-content > .page-header { padding-top: 20px !important; }

    /* Inline two-column page grids (checkout etc.) stack, and their cells may
       shrink below their content's min width instead of overflowing. */
    html body #main-content div[style*="grid-template-columns: 2fr 1fr"],
    html body #main-content div[style*="grid-template-columns:2fr 1fr"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    html body #main-content .surface-card input,
    html body #main-content .surface-card select,
    html body #main-content .surface-card textarea { min-width: 0 !important; max-width: 100% !important; }
    html body #main-content div[style*="grid-template-columns: 1fr 1fr"] > *,
    html body #main-content div[style*="grid-template-columns:1fr 1fr"] > * { min-width: 0; }

    /* 2W / 4W packages: the 240px menu becomes a full-width card. */
    html body #main-content .surface-card[style*="flex: 0 0 240px"] { flex: 1 1 100% !important; }

    /* Gap between stacked section cards on the home page */
    html body #main-content .fade-page > section + section,
    html body #main-content .fade-page > div + section,
    html body #main-content .fade-page > section + div { margin-top: 14px; }
}

/* Admin tables become one card per row on phones (labels come from
   data-label, set by labelAdminTables() in script.js). */
@media (max-width: 700px) {
    html body .admin-table-wrap { overflow: visible !important; background: transparent !important; border: 0 !important; }
    html body .admin-table,
    html body .admin-table tbody,
    html body .admin-table tr,
    html body .admin-table td { display: block !important; width: 100% !important; }
    html body .admin-table thead { display: none !important; }
    html body .admin-table tbody tr {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 6px 14px;
        margin-bottom: 12px;
        box-shadow: var(--sm-shadow-soft);
    }
    html body .admin-table td {
        position: relative;
        padding: 9px 0 9px 104px !important;
        min-height: 36px;
        border-bottom: 1px dashed var(--border) !important;
        word-break: break-word;
        text-align: left !important;
    }
    html body .admin-table td:last-child { border-bottom: 0 !important; }
    html body .admin-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 11px;
        width: 94px;
        font-size: 0.68rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        line-height: 1.3;
        color: var(--slate);
    }
    html body .admin-table td:not([data-label]),
    html body .admin-table td[data-label=""],
    html body .admin-table .admin-table-empty td { padding-left: 0 !important; }
    html body .admin-table td:not([data-label])::before,
    html body .admin-table td[data-label=""]::before { content: none; }
    html body .admin-table td button,
    html body .admin-table td select,
    html body .admin-table td input { max-width: 100%; }
}

/* Small phones (must come after the 900px block) */
@media (max-width: 380px) {
    html body .nav-actions .btn-partner { display: none !important; }
    html body .navbar .nav-logo-text .text-bottom { font-size: 0.88rem !important; letter-spacing: 0 !important; }
    html body .navbar .nav-logo-text .text-top { font-size: 0.7rem !important; letter-spacing: 0.02em !important; }
    html body .navbar .nav-logo-text { overflow: visible !important; flex-shrink: 0 !important; padding-right: 2px; }
}
