/* === Base layout === */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f8f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Dedicated header wrapper — always identical to the homepage header,
   regardless of any page-local .container overrides (some pages redefine
   .container with a different max-width/padding for their own content).
   Kept in exact sync with .container and .site-footer (same max-width,
   margin, and padding) so header, body, and footer share identical
   horizontal width/margins on every page. */
.site-header-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header bar */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e60000; /* red background */
    padding: 20px;
}
/* Once the site is switched to the Carfana logo (a flat rectangle of the logo's red), the header is that
   same red so the logo blends in. Until then the header stays #e60000 with the old logo. */
.brand-switched .header { background: var(--brand-red); }

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}
/* Kept inline (not display:block): the image's baseline gap is part of the
   header height the desktop layout was built around. */
.logo-img { height: 60px; width: auto; }

.nav {
    /* Real flex container so flex-wrap/gap below actually take effect —
       previously .nav had no display:flex at all, so those properties
       were no-ops and items wrapped via plain (uncontrolled) inline text
       reflow at ANY width, not just below the intended 992px breakpoint. */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
}

.nav a {
    margin: 0;
    text-decoration: none;
    color: white;
    font-weight: 500;
}
/* 44px tap targets (WCAG 2.5.5) for every header link and control, on all
   screen sizes -- height only, so the desktop row keeps its spacing. */
.nav > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.nav a:hover {
    text-decoration: underline;
}

/* Log in link / account dropdown (far-right nav item) */
.login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}

/* Notification bell (logged-in users only) -- sits just before the account
   dropdown in the header nav. */
.header-bell {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

/* Notification bell: unread badge + dropdown (see main/partials/header.html) */
.notif-menu { position: relative; }
.notif-badge {
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #fff;
    color: #e60000;
    border: 2px solid #e60000;
    font-size: 11px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
    box-sizing: border-box;
}
.notif-badge[hidden] { display: none; }
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    right: -8px;
    width: 340px;
    max-width: calc(100vw - 24px);
    background: #fff;
    color: #111;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    overflow: hidden;
    z-index: 60;
    text-align: left;
}
.notif-menu.open .notif-dropdown { display: block; }
/* Phones: the nav wraps into centred rows, so a dropdown anchored to the bell
   can hang off the left edge. Anchor it to the header bar instead, full width
   minus a small gutter, just below it. */
@media (max-width: 600px) {
    .header { position: relative; }
    .notif-menu { position: static; }
    .notif-dropdown {
        top: calc(100% - 8px);
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }
}
.notif-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f2f4;
    font-size: 15px;
}
.notif-mark-all {
    background: none;
    border: none;
    color: #e50914;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    min-height: 44px;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-list { max-height: 380px; overflow-y: auto; }
.nav .notif-item,
.notif-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 16px;
    border-bottom: 1px solid #f5f6f8;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}
.nav .notif-item:hover { background: #f8fafc; text-decoration: none; }
.nav .notif-item.unread { background: #fff5f5; color: #111; font-weight: 600; }
.nav .notif-item.unread:hover { background: #ffecec; }
.notif-time { font-size: 12px; color: #94a3b8; font-weight: 400; }
.notif-empty { margin: 0; padding: 18px 16px; color: #64748b; font-size: 14px; }

/* Unread count next to a dashboard sidebar item or tab (custom_tags.nav_badge) */
.nav-count-badge {
    display: inline-block;
    min-width: 20px;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #e50914;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    vertical-align: middle;
}

.account-menu {
    position: relative;
}
.account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #fff;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    min-height: 44px;
}
.account-toggle:hover {
    text-decoration: underline;
}
.account-caret {
    font-size: 11px;
    transition: transform .15s ease;
}
.account-menu.open .account-caret {
    transform: rotate(180deg);
}
.account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #fff;
    color: #111;
    min-width: 170px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    z-index: 50;
}
.account-menu.open .account-dropdown {
    display: block;
}
.account-dropdown a,
.account-dropdown-item {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    color: #111;
    text-decoration: none;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}
.account-dropdown a:hover,
.account-dropdown-item:hover {
    background: #f4f5f7;
}

.page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.page-content {
    flex: 1;
}

@media (max-width: 992px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }
    .nav {
        justify-content: center;
    }
}

.ai-mechanic-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .12);
    padding: 8px 16px;
    border-radius: 999px;
}
.ai-mechanic-link:hover {
    background: rgba(255, 255, 255, .22);
    text-decoration: none !important;
}
.ai-mechanic-link .fa-robot {
    font-size: 16px;
}
.ai-mechanic-link .ai-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2f6fed;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .3px;
    line-height: 1;
}

/* === Shared Card/Grid for cars + rentals + accessories === */
.section {
    margin-top: 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.card {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s;
}
.card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.thumb {
    height: 200px; /* unified height */
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.body {
    padding: 10px 12px;
}
.title {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.price {
    color: #e60000;
    font-weight: 800;
    margin-top: 4px;
}
.meta {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

@media (max-width: 980px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .card-grid { grid-template-columns: 1fr; }
}

/* === Buttons === */
.btn {
    display: inline-block;
    background: #0a58ca;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    text-align: center;
}
.btn:hover {
    background: #0949a9;
}
.btn-outline {
    border: 1px solid #ddd;
    background: #fff;
    color: #111;
}
.btn-outline:hover {
    border-color: #0a58ca;
    color: #0a58ca;
}

/* === Accessories category pills === */
.cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.pill {
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    text-decoration: none;
    color: #111;
    background: #fff;
}
.pill.active {
    border-color: #0a58ca;
    color: #0a58ca;
    font-weight: 700;
}
/* Footer (brand red theme) */
:root { --brand-red:#F30611; --brand-red-dark:#c10812; }

/* Sizing wrapper only (no background) — mirrors .site-header-wrap so the
   footer's red background lands at the exact same left/right edges as the
   header bar and the body content (background paints under padding, so
   without this split the background would bleed 20px past those edges). */
.site-footer-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
}

/* Vertical spacing only is kept compact here; horizontal padding/width must
   stay in sync with the header (see .site-footer-wrap above). */
.site-footer{ padding:0; background:var(--brand-red); color:#fff; }
.site-footer a{ color:#fff; text-decoration:none; }
.site-footer a:hover{ text-decoration:underline; }

/* top bar */
.footer-follow{
  display:flex; justify-content:space-between; align-items:center;
  gap:12px; padding:6px 20px; background:var(--brand-red-dark);
}
.follow-title{ font-weight:700; letter-spacing:.2px; }
.social-icons{ display:flex; gap:2px; font-size:22px; }
.social-icons a{ display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; }

/* 4-column area (row-gap only matters once the columns wrap on smaller screens) */
.footer-links{
  display:grid; grid-template-columns:repeat(4,1fr);
  gap:20px 32px; padding:14px 20px 6px;
}
.footer-col h4{ margin:0 0 6px; font-size:16px; font-weight:800; }
.footer-col ul{ list-style:none; padding:0; margin:0; }
.footer-col li{ margin:0; }
/* Spacing lives on the link itself, so the whole row stays clickable. */
.footer-col li a{ display:inline-flex; align-items:center; min-height:44px; }

/* bottom bar */
.footer-copy{
  border-top:1px solid rgba(255,255,255,.25);
  padding:8px 20px; text-align:center; font-size:14px; color:#f3f3f3;
}

/* responsive */
@media (max-width:992px){ .footer-links{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){
  .footer-follow{ flex-direction:column; align-items:flex-start; width:100%; gap:8px; padding:10px 20px; }
  /* Phones: sections in pairs -- Marketplace | For Business, Company | Legal. */
  .footer-links{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px; }
  .footer-col li a{ padding:4px 0; }   /* bigger touch targets on phones */
}
/* iPhone SE and smaller: one column again. */
@media (max-width:359px){ .footer-links{ grid-template-columns:1fr; } }

/* ==== Detail pages: gallery/hero sizing ==== */
/* Listing, rental and news detail share this hero (each page's own .hero rules
   only add borders/overlay positioning). The main photo is always shown whole
   (contain) on a neutral background: a 4:3 frame -- the shape of most car
   photos -- on phones, never taller than 420px (desktop keeps its 756x420
   frame). width:100% keeps the frame full width when max-height caps it.
   Photos of another shape get light-grey bands, never cropping. */
.gallery .hero{
  width:100%;
  aspect-ratio:4/3;
  max-height:420px;
  overflow:hidden;
  background:#f3f4f6;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px 12px 0 0;
}
.gallery .hero img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

/* Mechanic cards (mechanics landing + list): workshop photo frame. Desktop
   keeps the old fixed heights (list 160px, landing 150px); phones and tablets
   get a 3:2 frame so 4:3 photos aren't cropped top and bottom. */
.mech-card-photo{width:100%;height:160px;margin-bottom:10px;overflow:hidden;border-radius:10px;}
.mech-card-photo--compact{height:150px;}
/* div. prefix: outranks the later ".container img{height:auto}" safety net. */
div.mech-card-photo img{width:100%;height:100%;object-fit:cover;display:block;}
@media (max-width:900px){
  .mech-card-photo{height:auto;aspect-ratio:3/2;}
}

/* thumbs */
.gallery .thumbs img{
  width:120px;
  height:80px;
  object-fit:cover;
  border-radius:8px;
}

/* safety net: prevent images from exceeding container */
.container img{
  max-width:100%;
  height:auto;
}

/* —— Mechanics Register polish —— */
.form-card{background:#fff;border:1px solid #e9eef5;border-radius:14px;padding:22px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;column-gap:18px;row-gap:14px}
.grid-1{display:grid;grid-template-columns:1fr;gap:14px;margin-top:14px}
.f label{display:block;font-weight:600;margin-bottom:6px}

/* full width inputs/selects/textarea/file */
.f input[type="text"], .f input[type="email"], .f input[type="number"],
.f textarea, .f select, .ui-input, .ui-select, .ui-textarea, .ui-file {
  width:100%;
  box-sizing:border-box;
  padding:10px 12px;
  border:1px solid #cfd7e3;
  border-radius:10px;
  background:#fff;
}
.ui-input, .ui-select{ font-size:16px; }

/* Phones and tablets: iOS Safari zooms the page in on any text field under
   16px. Many templates size their own fields smaller (13-15px) with more
   specific selectors that load after this file, so this one rule needs
   !important to win on small screens; desktop keeps the template sizes. */
@media (max-width:768px){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]):not([type=hidden]),
  select,
  textarea{ font-size:16px !important; }
}

/* focus state */
.f input:focus, .f select:focus, .f textarea:focus,
.ui-input:focus,.ui-select:focus,.ui-textarea:focus{
  border-color:#0b2447;
  box-shadow:0 0 0 3px rgba(11,36,71,.08);
  outline:none;
}

/* Services list: one per line */
.services-grid{border:1px solid #e9eef5;border-radius:10px;padding:12px}
.services-grid ul{list-style:none;margin:0;padding:0}
.services-grid.single-col ul{display:grid;grid-template-columns:1fr;gap:8px}
.services-grid li{margin:0;display:flex;align-items:center;gap:8px}

.checks{display:flex;gap:18px;align-items:center}
.btn-primary{
  margin-top:16px;background:#0b2447;color:#fff;border:0;border-radius:10px;padding:12px 18px;
  font-weight:700;width:100%;cursor:pointer;
}

@media (max-width:760px){
  .grid-2{grid-template-columns:1fr}
}

/* ==== Auth pages (login/signup) single-card tabbed layout ==== */
.auth-page{
  background:#f5f6f8;
  padding:40px 20px;
}

.auth-card{
  max-width:650px;
  margin:0 auto;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 10px 40px rgba(0,0,0,.08);
  border:1px solid #eee;
}

.auth-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
}
.auth-tab{
  text-align:center;
  padding:18px 10px;
  font-size:15px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:#111;
  background:#fff;
  text-decoration:none;
  transition:.15s ease;
}
.auth-tab.active{ background:#e50914; color:#fff; }

.auth-card-body{ padding:32px; }

@media (max-width:700px){
  .auth-page{ padding:20px 12px; }
  .auth-card-body{ padding:24px 20px; }
}

.auth-forgot-link{
  font-size:13px;
  font-weight:700;
  color:#e50914;
  text-decoration:none;
}
.auth-forgot-link:hover{ text-decoration:underline; }

.auth-inline-link{ color:#e50914; font-weight:700; text-decoration:none; }
.auth-inline-link:hover{ text-decoration:underline; }

.auth-label-hint{ font-weight:400; color:#888; text-transform:none; letter-spacing:0; }

.auth-card-body .btn-primary{ background:#e50914; }
.auth-card-body .btn-primary:hover{ background:#c10812; }
.auth-card-body .btn-primary:disabled{ background:#e88686; cursor:not-allowed; }

.field-error{
  margin-top:4px;
  font-size:12px;
  font-weight:600;
  color:#e50914;
}

.auth-terms{
  display:flex;
  align-items:flex-start;
  gap:10px;
  font-size:13px;
  color:#555;
  line-height:1.5;
  margin:16px 0;
}
.auth-terms input{ width:auto; margin-top:3px; }
.auth-terms a{ color:#e50914; font-weight:600; text-decoration:none; }
.auth-terms a:hover{ text-decoration:underline; }

/* Password show/hide toggle */
.pw-field{ position:relative; }
.pw-field input.ui-input{ padding-right:44px; }
.pw-toggle{
  position:absolute;
  top:50%;
  right:10px;
  transform:translateY(-50%);
  background:none;
  border:none;
  padding:6px;
  color:#94a3b8;
  cursor:pointer;
  font-size:15px;
  line-height:1;
}
.pw-toggle:hover{ color:#475569; }

/* Signup role-selection checkbox grid ("How will you use the site?") */
.role-checkbox-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:8px;
}
@media (max-width:520px){
  .role-checkbox-grid{ grid-template-columns:1fr; }
}
.role-checkbox-card{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid #cfd7e3;
  border-radius:10px;
  padding:12px 14px;
  font-weight:600;
  cursor:pointer;
  transition:.15s ease;
}
.role-checkbox-card:has(input:checked){
  border-color:#e50914;
  background:#fff5f5;
}
.role-checkbox-card input{ width:auto; margin:0; flex-shrink:0; }
.role-checkbox-card i{ color:#e50914; width:16px; text-align:center; flex-shrink:0; }

/* ==== Business Setup (signup step 2) ==== */
.business-setup-page{
  background:#f5f6f8;
  padding:40px 20px;
}

.business-setup-card{
  max-width:760px;
  margin:0 auto;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 10px 40px rgba(0,0,0,.08);
  border:1px solid #eee;
}

.business-setup-header{ padding:32px 32px 0; }
.business-setup-body{ padding:24px 32px 32px; }

/* Tabs shown only when both Auto Parts Seller and Mechanic/Workshop roles
   were selected on Step 1 -- same visual language as the Sign In/Sign Up
   tabs (.auth-tabs), sized for an icon + label instead of plain text. */
.business-setup-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  border-top:1px solid #eee;
}
.business-setup-tab{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:16px 10px;
  font-size:14px;
  font-weight:800;
  color:#111;
  background:#fff;
  border:0;
  cursor:pointer;
  transition:.15s ease;
}
.business-setup-tab.active{ background:#e50914; color:#fff; }
.business-setup-tab i{ font-size:14px; }

.step-label{
  display:inline-block;
  font-size:12px;
  font-weight:800;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:#e50914;
  margin-bottom:8px;
}

.business-setup-title{
  font-size:28px;
  font-weight:800;
  color:#111;
  margin:0 0 8px;
}

.business-setup-subtitle{
  color:#667;
  font-size:15px;
  margin:0 0 20px;
}

.business-setup-progress{
  width:100%;
  height:6px;
  border-radius:999px;
  background:#f1d3d4;
  margin-bottom:4px;
  overflow:hidden;
}
.business-setup-progress-fill{
  width:100%;
  height:100%;
  background:#e50914;
}

@media (max-width:700px){
  .business-setup-page{ padding:20px 12px; }
  .business-setup-header{ padding:24px 20px 0; }
  .business-setup-body{ padding:20px 20px 24px; }
}

/* Address input with a leading icon */
.input-with-icon{ position:relative; }
.input-with-icon i{
  position:absolute;
  top:50%;
  left:14px;
  transform:translateY(-50%);
  color:#94a3b8;
  font-size:14px;
}
.input-with-icon input.ui-input{ padding-left:38px; }

/* Business setup photo drop zones (Photo, Store Photo) */
.file-dropzone{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-align:center;
  border:2px dashed #cfd7e3;
  border-radius:12px;
  padding:32px 20px;
  cursor:pointer;
  transition:.15s ease;
  margin-top:8px;
}
.file-dropzone:hover,
.file-dropzone.is-dragover{
  border-color:#e50914;
  background:#fff5f5;
}
.file-dropzone i{ font-size:28px; color:#e50914; margin-bottom:6px; }
/* Font Awesome's own CSS sets display on its icon classes (e.g. .fa-solid),
   an author-origin rule that beats the browser's default [hidden]{display:
   none} (lower-priority user-agent origin) regardless of specificity --
   without this, JS setting icon.hidden=true (Photo's live preview swap)
   would silently leave the icon visible. */
.file-dropzone i[hidden]{ display:none; }
.file-dropzone-title{ font-weight:800; color:#111; font-size:15px; }
.file-dropzone-hint{ color:#888; font-size:13px; }
.file-dropzone-input{
  position:absolute;
  opacity:0;
  width:0;
  height:0;
}
/* Under each photo drop zone: the photo appears on the public profile. */
.file-dropzone-note{ margin-top:6px; color:#64748b; font-size:13px; }

/* Footer buttons */
.business-setup-actions{
  display:flex;
  gap:14px;
  margin-top:24px;
}
.btn-outline{
  flex:1;
  text-align:center;
  padding:12px 18px;
  border-radius:10px;
  border:1px solid #111;
  background:#fff;
  color:#111;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
}
.btn-outline:hover{ background:#f5f5f5; }
.btn-primary-inline{
  flex:1;
  text-align:center;
  text-decoration:none;
  padding:12px 18px;
  border-radius:10px;
  border:0;
  background:#e50914;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
.btn-primary-inline:hover{ background:#c10812; }

/* Working Hours (Mechanic/Workshop business setup) */
.working-hours-icon{ color:#e50914; margin-right:6px; }
.working-hours-box{
  border:1px solid #e2e6ec;
  border-radius:10px;
  padding:14px 16px;
  margin-top:8px;
  display:grid;
  gap:12px;
}
.working-hours-row{
  display:flex;
  flex-wrap:wrap;   /* only an error line wraps on desktop */
  align-items:center;
  gap:12px;
}
.working-hours-times{
  display:flex;
  align-items:center;
  gap:12px;
  flex:1 1 0;
  min-width:0;
}
/* "Closed": a 44px tap target; ticking it hides the row's times (no script).
   .working-hours-row prefix: outranks the form's generic ".f label{display:block;
   margin-bottom:6px}", which would otherwise push it out of line with the day. */
.working-hours-row .working-hours-closed{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:44px;
  margin:0;
  font-size:14px;
  font-weight:600;
  color:#333;
  cursor:pointer;
  white-space:nowrap;
}
.working-hours-row .working-hours-closed input{ width:18px; height:18px; margin:0; flex:0 0 auto; }
.working-hours-row:has(.working-hours-closed input:checked) .working-hours-times{ display:none; }
.working-hours-error{ flex-basis:100%; margin:0; }
.working-hours-day{
  flex:0 0 90px;
  font-weight:700;
  color:#333;
  font-size:14px;
}
.working-hours-row input[type="time"]{
  flex:1;
  min-width:0;
}
.working-hours-sep{ color:#94a3b8; font-weight:700; }

/* Phones: the day and "Closed" share the first line, the times go full width
   below -- a closed day is just that one line. */
@media (max-width:480px){
  .working-hours-day{ flex:1 1 auto; }
  .working-hours-times{ order:2; flex-basis:100%; }
  .working-hours-error{ order:3; }
}

/* Business setup on phones: a plain 1fr column can't shrink below its widest
   field's natural width (the two time inputs side by side, ~395px), so the
   card's overflow:hidden cut every field off on the right. minmax(0,1fr) lets
   the column fit the panel; a long "Currently: workshop_photos/..." file
   name wraps instead of pushing out. Scoped here so other .grid-1 forms
   keep their layout. */
.business-setup-panel .grid-1{ grid-template-columns:minmax(0,1fr); }
.business-setup-panel .file-dropzone a{ overflow-wrap:anywhere; }
/* Side by side at that width each time box gets ~108px and drops its AM/PM
   (6 PM would read as 6:00), so on phones open/close stack full width. */
@media (max-width:480px){
  .business-setup-panel .working-hours-times{ flex-wrap:wrap; }
  .business-setup-panel .working-hours-row input[type="time"]{ flex-basis:100%; }
  .business-setup-panel .working-hours-sep{ display:none; }
}

/* Mechanic/Workshop extra fields: Car Makes/Models, Photo, Services & Prices */
.checkbox-inline{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:600;
  color:#333;
  font-size:14px;
  cursor:pointer;
}
.checkbox-inline input{ width:auto; margin:0; flex-shrink:0; }

/* Car Makes / Car Models dropdown-multiselect-with-chips (Mechanic Profile) */
.ms-select{ position:relative; margin-top:8px; }
.ms-control{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border:1px solid #cfd7e3;
  border-radius:10px;
  background:#fff;
  font-size:14px;
  color:#333;
  cursor:pointer;
}
.ms-control:focus{
  outline:none;
  border-color:#0b2447;
  box-shadow:0 0 0 3px rgba(11,36,71,.08);
}
.ms-control i{ color:#94a3b8; font-size:12px; }
.ms-dropdown{
  position:absolute;
  top:calc(100% + 4px);
  left:0;
  right:0;
  max-height:220px;
  overflow-y:auto;
  background:#fff;
  border:1px solid #cfd7e3;
  border-radius:10px;
  box-shadow:0 10px 24px rgba(0,0,0,.12);
  z-index:20;
  padding:6px;
}
.ms-option{
  display:block;
  width:100%;
  text-align:left;
  padding:9px 10px;
  border:0;
  background:none;
  border-radius:8px;
  font-size:14px;
  color:#333;
  cursor:pointer;
}
.ms-option:hover, .ms-option:focus{ background:#fff5f5; color:#e50914; outline:none; }
.ms-dropdown-empty{ padding:9px 10px; color:#94a3b8; font-size:13px; }
.ms-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.ms-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px 6px 12px;
  border-radius:999px;
  background:#fff5f5;
  border:1px solid #f3c8c8;
  color:#e50914;
  font-weight:700;
  font-size:13px;
}
.ms-chip-remove{
  border:0;
  background:none;
  color:#e50914;
  font-size:15px;
  line-height:1;
  cursor:pointer;
  padding:0 0 0 2px;
}
.ms-chip-remove:hover{ color:#a10711; }

/* Photo dropzone -- the .file-dropzone shell plus a live thumbnail once a
   file is chosen (see business_setup.html JS). */
/* .container img{height:auto} (specificity 0,1,1) would otherwise beat a
   bare .file-dropzone-preview rule (0,1,0) and stop the thumbnail from
   taking a fixed height -- .file-dropzone .file-dropzone-preview (0,2,0)
   reliably outranks it, same technique as .role-cards .role-card above. */
.file-dropzone .file-dropzone-preview{
  width:140px;
  height:140px;
  max-width:100%;
  border-radius:8px;
  object-fit:cover;
  margin-bottom:6px;
}

/* Services & Prices repeatable rows */
.repeatable-rows{
  display:grid;
  gap:10px;
  margin-top:8px;
}
.repeatable-row{
  display:flex;
  gap:10px;
  align-items:center;
}
.repeatable-row .service-name-input{ flex:2; }
.repeatable-row .service-price-input{ flex:1; }
.btn-remove-row{
  flex-shrink:0;
  width:36px;
  height:36px;
  border-radius:8px;
  border:1px solid #cfd7e3;
  background:#fff;
  color:#94a3b8;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}
.btn-remove-row:hover{ border-color:#e50914; color:#e50914; }
.btn-add-row{
  margin-top:10px;
  background:none;
  border:none;
  color:#e50914;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
  padding:0;
}
.btn-add-row:hover{ text-decoration:underline; }

/* ==== Dashboard (post-signup role-based home) ==== */
/* Uses the exact same site header as every other page (main/partials/
   header.html, plus its .header-bell -- see the header CSS near the top of
   this file) -- no dashboard-specific header here. */

/* Shell: sidebar + main content */
.dashboard-shell{
  display:flex;
  align-items:flex-start;
  gap:24px;
  margin-top:24px;
}
.dashboard-sidebar{
  flex:0 0 260px;
  background:#fff;
  border-radius:14px;
  border:1px solid #eee;
  box-shadow:0 4px 16px rgba(0,0,0,.05);
  padding:12px;
}
.dashboard-nav{ display:grid; gap:6px; }
.dashboard-nav-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:10px;
  color:#333;
  font-weight:700;
  font-size:14px;
  text-decoration:none;
  transition:.15s ease;
}
.dashboard-nav-item i{ width:18px; text-align:center; color:#e50914; }
.dashboard-nav-item:hover{ background:#fff5f5; }
.dashboard-nav-item.active{ background:#e50914; color:#fff; }
.dashboard-nav-item.active i{ color:#fff; }

.dashboard-main{
  flex:1;
  min-width:0;
  background:#fff;
  border-radius:14px;
  border:1px solid #eee;
  box-shadow:0 4px 16px rgba(0,0,0,.05);
  padding:28px;
}

.dashboard-content-header{ margin-bottom:20px; }
.dashboard-content-header h1{ font-size:24px; font-weight:800; color:#111; margin:0 0 6px; }
.dashboard-content-header p{ color:#667; font-size:14px; margin:0; }

/* Stat cards */
.dashboard-stats-row{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
  margin-bottom:24px;
}
.dashboard-stat-card{
  border:1px solid #eee;
  border-radius:12px;
  padding:18px;
  text-align:center;
}
.dashboard-stat-value{ font-size:28px; font-weight:800; color:#111; }
.dashboard-stat-label{ font-size:13px; color:#667; margin-top:4px; }

/* Tablets and phones: the sidebar becomes the shared compact menu bar
   (css/dashboard_sidebar.css) on top of the content. */
@media (max-width:992px){
  .dashboard-shell{ flex-direction:column; align-items:stretch; }
  .dashboard-sidebar{ flex:1 1 auto; width:100%; }
}
@media (max-width:700px){
  .dashboard-stats-row{ grid-template-columns:1fr; }
}

/* Listing cards */
.dashboard-listing-cards{ display:grid; gap:12px; }
.dashboard-listing-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  border:1px solid #eee;
  border-radius:12px;
  padding:16px 18px;
}
.dashboard-listing-title{ font-weight:700; color:#111; font-size:15px; }
.dashboard-listing-meta{ color:#667; font-size:13px; margin-top:2px; }
.dashboard-badge{
  font-size:12px;
  font-weight:800;
  padding:5px 12px;
  border-radius:999px;
  text-transform:uppercase;
  letter-spacing:.4px;
}
.dashboard-badge-live{ background:#e7f6ec; color:#1f9d55; }

/* Empty state */
.dashboard-empty-state{
  text-align:center;
  padding:48px 20px;
  color:#667;
}
.dashboard-empty-state i{ font-size:36px; color:#cfd7e3; margin-bottom:14px; }
.dashboard-empty-state p{ margin-bottom:18px; font-size:15px; }
.dashboard-empty-actions{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
}
.dashboard-empty-actions .btn-outline,
.dashboard-empty-actions .btn-primary-inline{ flex:0 0 auto; padding:10px 20px; }

/* My Cars for Sale -- top bar with CTA, 4-col KPI variant, filter bar,
   vehicle rows (image/info/price/status/actions) */
.dashboard-content-header-with-cta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.dashboard-cta-button{ flex:0 0 auto; padding:12px 20px; display:inline-flex; align-items:center; gap:8px; }

.dashboard-stats-row-4{ grid-template-columns:repeat(4, 1fr); }
@media (max-width:900px){
  .dashboard-stats-row-4{ grid-template-columns:repeat(2, 1fr); }
}
@media (max-width:480px){
  .dashboard-stats-row-4{ grid-template-columns:1fr; }
}

.dashboard-filter-bar{
  display:flex;
  gap:12px;
  margin-bottom:20px;
  flex-wrap:wrap;
}
.dashboard-filter-select{ flex:0 0 180px; }
.dashboard-filter-search{ flex:1 1 240px; }
.dashboard-filter-submit{ flex:0 0 auto; padding:10px 20px; }

.dashboard-vehicle-list{ display:grid; gap:12px; }
.dashboard-vehicle-row{
  display:flex;
  align-items:center;
  gap:16px;
  border:1px solid #eee;
  border-radius:12px;
  padding:14px 16px;
  flex-wrap:wrap;
}
.dashboard-vehicle-photo{
  flex:0 0 72px;
  width:72px;
  height:72px;
  border-radius:10px;
  background:#f4f5f7;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.dashboard-vehicle-photo img{ width:100%; height:100%; object-fit:cover; }
.dashboard-vehicle-photo i{ font-size:24px; color:#cfd7e3; }
.dashboard-vehicle-info{ flex:1 1 220px; min-width:0; }
.dashboard-vehicle-title{ font-weight:700; color:#111; font-size:15px; }
.dashboard-vehicle-meta{ color:#667; font-size:13px; margin-top:2px; }
.dashboard-vehicle-engagement{ color:#94a3b8; font-size:12px; margin-top:2px; }
.dashboard-vehicle-price{ flex:0 0 auto; font-weight:800; color:#111; font-size:15px; }
.dashboard-badge-active{ background:#e7f6ec; color:#1f9d55; }
.dashboard-badge-pending_review{ background:#fff4e5; color:#b45309; }
.dashboard-badge-sold{ background:#f1f2f4; color:#667; }
.dashboard-vehicle-actions{ flex:0 0 auto; display:flex; gap:8px; }
.dashboard-inline-form{ display:inline; }
.dashboard-action-btn{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #cfd7e3;
  border-radius:8px;
  background:#fff;
  color:#333;
  cursor:pointer;
  font-size:13px;
  text-decoration:none;
}
.dashboard-action-btn:hover{ border-color:#e50914; color:#e50914; }
.dashboard-action-btn-danger:hover{ border-color:#c10812; color:#c10812; background:#fff5f5; }

/* My Purchases / Rentals -- tab bar, saved-items grid, rental/inquiry cards.
   Stays embedded in the shared dashboard shell (unlike the seller/workshop
   sections, which moved to their own standalone apps), so it reuses the
   .dashboard-stat-card/.dashboard-badge/.dashboard-action-btn classes above
   rather than inventing a parallel set. */
.purchases-tabs{
  display:flex; gap:4px; border-bottom:1px solid #eee; margin-bottom:24px;
}
.purchases-tab{
  padding:10px 18px; font-size:14px; font-weight:700; color:#667;
  text-decoration:none; border-bottom:2px solid transparent; margin-bottom:-1px;
}
.purchases-tab:hover{ color:#111; }
.purchases-tab.active{ color:#e50914; border-bottom-color:#e50914; }
/* Phones: the three tabs share the row (each as wide as its words) and a long label
   ("Inquiries & Appointments") wraps between words inside its tab instead of pushing
   the row past a 320px screen. */
@media (max-width:600px){
  .purchases-tabs{ gap:0; }
  .purchases-tab{ flex:1 1 auto; min-width:0; padding:10px 4px; text-align:center; font-size:12.5px; }
}

.purchases-section-heading{
  font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
  color:#94a3b8; margin:28px 0 12px;
}
.purchases-section-heading:first-child{ margin-top:0; }

.purchases-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:16px; }
.purchases-item-card{
  border:1px solid #eee; border-radius:12px; overflow:hidden; display:flex; flex-direction:column;
}
.purchases-item-photo{
  height:130px; background:#f4f5f7; display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.purchases-item-photo img{ width:100%; height:100%; object-fit:cover; }
.purchases-item-photo i{ font-size:28px; color:#cfd7e3; }
.purchases-item-body{ padding:14px; display:flex; flex-direction:column; gap:6px; flex:1; }
.purchases-item-title{ font-weight:700; font-size:14px; color:#111; }
.purchases-item-price{ font-weight:800; font-size:15px; color:#111; }
.purchases-item-price-old{ font-size:12px; color:#94a3b8; text-decoration:line-through; margin-left:6px; }
.purchases-badge-drop{
  align-self:flex-start; font-size:11px; font-weight:800; color:#fff; background:#1f9d55;
  padding:3px 9px; border-radius:999px; text-transform:uppercase;
}
.purchases-item-actions{ display:flex; gap:6px; flex-wrap:wrap; margin-top:auto; }

.purchases-mechanic-row{
  display:flex; align-items:center; gap:14px; border:1px solid #eee; border-radius:12px;
  padding:12px 16px; margin-bottom:10px; flex-wrap:wrap;
}
.purchases-mechanic-name{ font-weight:700; color:#111; font-size:14px; }
.purchases-mechanic-meta{ color:#667; font-size:13px; }
.purchases-mechanic-actions{ margin-left:auto; display:flex; gap:8px; }

.purchases-card{
  border:1px solid #eee; border-radius:12px; padding:16px 18px; margin-bottom:12px;
}
.purchases-card-head{ display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap; }
.purchases-card-photo{
  flex:0 0 64px; width:64px; height:64px; border-radius:10px; background:#f4f5f7;
  display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.purchases-card-photo img{ width:100%; height:100%; object-fit:cover; }
.purchases-card-photo i{ font-size:22px; color:#cfd7e3; }
.purchases-card-title{ font-weight:700; color:#111; font-size:15px; }
.purchases-card-meta{ color:#667; font-size:13px; margin-top:2px; }
.purchases-card-badges{ margin-left:auto; display:flex; flex-direction:column; gap:6px; align-items:flex-end; }
.purchases-card-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.purchases-action-btn{
  padding:7px 14px; font-size:12px; border-radius:8px; border:1px solid #cfd7e3;
  background:#fff; color:#333; cursor:pointer; text-decoration:none; display:inline-block;
}
.purchases-action-btn:hover{ border-color:#e50914; color:#e50914; }
.purchases-action-btn-danger:hover{ border-color:#c10812; color:#c10812; background:#fff5f5; }
.purchases-details{ font-size:13px; color:#475569; margin-top:10px; }
.purchases-details summary{ cursor:pointer; color:#e50914; font-weight:600; font-size:12px; list-style:none; }
.purchases-details summary::-webkit-details-marker{ display:none; }

/* Lead/message thread bubbles -- shared by the listing detail page's "Send
   Offer" thread, the buyer dashboard's Price Quote Requests conversation
   view (main.views.dashboard_view / dashboard_purchases.html), and (in its
   own car_listings-prefixed .cld-chat-* copy, a different app's design
   system) the seller's Leads/Messages dashboard. One shared definition here
   rather than duplicating per-page since it's now used twice within this
   app's own templates. */
.thread-messages{
  max-height:360px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-right:4px;
  margin-bottom:14px;
}
.thread-bubble{
  max-width:85%;
  padding:10px 14px;
  border-radius:12px;
  font-size:14px;
  line-height:1.4;
}
.thread-bubble.buyer{ align-self:flex-start; background:#f1f2f4; color:#111827; }
.thread-bubble.seller{ align-self:flex-end; background:#d90429; color:#fff; }
.thread-bubble-time{ font-size:11px; opacity:.7; margin-top:4px; }

.thread-reply-form textarea{ min-height:70px; }

/* Compact variant: single-line input + button in a row, used where a full
   label+textarea form (listing_detail.html's own .thread-reply-form) would
   be too tall for a card already expanded inline in a list, e.g. the buyer
   dashboard's Price Quote Requests conversation view below. */
.thread-reply-form-inline{ display:flex; gap:10px; margin-top:4px; }
.thread-reply-form-inline input{
  flex:1; padding:10px 12px; border:1px solid #d1d5db; border-radius:8px; font:inherit; box-sizing:border-box;
}

/* Prev/next arrow controls overlaid on the large hero photo -- listing_detail.html
   and rental_detail.html both give their .hero element this exact class/id shape
   (#heroImg, #thumbs img[data-src]), so main/static/js/hero_gallery_nav.js finds
   and wires this up identically on both pages without either page needing its own
   copy of the nav logic. Each page's own local <style> block defines .hero's
   sizing but not position, so this is the only place position:relative is set --
   required for these buttons to anchor to the photo itself. */
.hero{ position:relative; }
.hero-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border-radius:50%; border:none;
  background:rgba(0,0,0,.45); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:22px; line-height:1; cursor:pointer;
  transition:background .15s ease;
  z-index:2;
}
.hero-nav:hover{ background:rgba(0,0,0,.68); }
.hero-nav:focus-visible{ outline:2px solid #fff; outline-offset:2px; }
.hero-nav-prev{ left:16px; }
.hero-nav-next{ right:16px; }
@media(max-width:600px){
  .hero-nav{ width:34px; height:34px; font-size:18px; }
  .hero-nav-prev{ left:8px; }
  .hero-nav-next{ right:8px; }
}

.dashboard-badge-confirmed{ background:#eef2ff; color:#4f46e5; }
.dashboard-badge-pending{ background:#fff4e5; color:#b45309; }
.dashboard-badge-completed{ background:#e7f6ec; color:#1f9d55; }
.dashboard-badge-cancelled{ background:#fde8e8; color:#c10812; }
.dashboard-badge-declined{ background:#fde8e8; color:#c10812; }
.dashboard-badge-accepted{ background:#eef2ff; color:#4f46e5; }
.dashboard-badge-rescheduled{ background:#fff4e5; color:#b45309; }
.dashboard-badge-paid{ background:#e7f6ec; color:#1f9d55; }
.dashboard-badge-deposit_held{ background:#fff4e5; color:#b45309; }
.dashboard-badge-pay_at_pickup{ background:#f1f2f4; color:#667; }
.dashboard-badge-new{ background:#eef2ff; color:#4f46e5; }
.dashboard-badge-read{ background:#f1f2f4; color:#667; }
.dashboard-badge-responded{ background:#e7f6ec; color:#1f9d55; }

/* Placeholder ("Coming soon") sections */
.dashboard-placeholder-note{
  text-align:center;
  padding:48px 20px;
  color:#94a3b8;
}
.dashboard-placeholder-note i{ font-size:32px; margin-bottom:12px; }
.dashboard-placeholder-note p{ font-size:15px; font-weight:600; }

@media (max-width:480px){
  .repeatable-row{ flex-wrap:wrap; }
  .repeatable-row .service-name-input,
  .repeatable-row .service-price-input{ flex-basis:100%; }
}

/* Role selection cards (signup "I want to:") */
.role-cards{ display:grid; gap:10px; }
/* .f label{display:block} (specificity 0,1,1) would otherwise beat a bare
   .role-card rule (0,1,0) regardless of source order and stack these
   vertically -- .role-cards .role-card (0,2,0) reliably outranks it. */
.role-cards .role-card{
  display:flex;
  align-items:center;
  gap:14px;
  border:1px solid #e2e6ec;
  border-radius:12px;
  padding:14px 16px;
  cursor:pointer;
  background:#fff;
  transition:.15s ease;
}
.role-card:hover{ border-color:#e50914; }
.role-card:has(.role-card-input:checked){
  border-color:#e50914;
  background:#fff5f5;
}

.role-card-icon{
  width:44px;
  height:44px;
  border-radius:10px;
  background:#f4f5f7;
  color:#e50914;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  flex-shrink:0;
}

.role-card-body{ flex:1; }
.role-card-title{ font-weight:800; color:#111; font-size:15px; }
.role-card-subtitle{ color:#777; font-size:13px; margin-top:2px; }

.role-card-input{
  appearance:none;
  -webkit-appearance:none;
  width:24px;
  height:24px;
  margin:0;
  flex-shrink:0;
  border:2px solid #cfd7e3;
  border-radius:50%;
  cursor:pointer;
  display:grid;
  place-content:center;
  transition:.15s ease;
}
.role-card-input::before{
  content:"";
  width:11px;
  height:11px;
  border-radius:50%;
  background:#fff;
  transform:scale(0);
  transition:.15s ease;
}
.role-card-input:checked{ background:#e50914; border-color:#e50914; }
.role-card-input:checked::before{ transform:scale(1); }

/* ==========================================================================
   Phone navigation (<= 767px): slim header + bottom tab bar + Menu sheet.
   Markup: main/partials/mobile_nav.html; behavior: static/js/mobile_nav.js.
   Tablets and desktop keep the full header; nothing below applies there
   except --mnav-offset, which stays 0.
   ========================================================================== */

/* How much fixed bottom UI must clear the tab bar (compare bar, toasts). */
:root { --mnav-h: 60px; --mnav-offset: 0px; }

/* viewport-fit=cover (base.html): keep content clear of side notches in
   landscape. env() is 0 on devices without one. */
body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.mnav-tabbar { display: none; }
.mnav-backdrop[hidden] { display: none; }
html.mnav-locked,
html.mnav-locked body { overflow: hidden; }

@media (max-width: 767px) {
    :root { --mnav-offset: calc(var(--mnav-h) + env(safe-area-inset-bottom)); }

    /* The tab bar must never hide the footer or the end of the page, and
       anything the browser scrolls into view (a focused field, an #anchor)
       stops above it rather than underneath. */
    body { padding-bottom: var(--mnav-offset); }
    html { scroll-padding-bottom: var(--mnav-offset); }

    /* Slim header: logo, bell, account icon (or "Log in"). */
    .header {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 6px 6px 12px;
    }
    .logo-img { height: 36px; width: auto; vertical-align: middle; }
    .logo-link { display: inline-flex; align-items: center; min-height: 44px; }
    .nav {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 2px;
    }
    .nav .nav-section { display: none; }
    .account-name { display: none; }
    .account-toggle {
        min-width: 44px;
        justify-content: center;
        gap: 4px;
        font-size: 22px;
    }
    .account-toggle .account-caret { font-size: 11px; }
    .login-link { padding: 0 8px; }

    /* Bottom tab bar */
    .mnav-tabbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900; /* below every modal/overlay on the site (999+) */
        padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
        background: #fff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, .06);
    }
    /* On-screen keyboard open (a text field has focus): get out of the way. */
    html.mnav-kb-open .mnav-tabbar { display: none; }

    .mnav-tab {
        flex: 1 1 0;
        min-width: 0;
        height: calc(var(--mnav-h) - 1px); /* + the bar's 1px top border = --mnav-h */
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 0;
        border: 0;
        background: none;
        color: #4b5563;
        font: 600 12px/1.1 Arial, Helvetica, sans-serif;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .mnav-icon {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .mnav-tab.is-active { color: #e50914; font-weight: 800; }
    .mnav-tab.is-active::before {
        content: "";
        position: absolute;
        top: 0;
        left: 22%;
        right: 22%;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: #e50914;
    }
    .mnav-tab:focus-visible { outline: 2px solid #0a58ca; outline-offset: -4px; border-radius: 8px; }

    /* Sell: the highlighted centre tab */
    .mnav-tab-sell { color: #111; }
    .mnav-sell-circle {
        width: 42px;
        height: 42px;
        margin-top: -16px;
        border-radius: 50%;
        border: 3px solid #fff;
        background: #e50914;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(229, 9, 20, .35);
    }
    .mnav-tab-sell .mnav-icon { stroke-width: 2.6; }
    .mnav-tab-sell.is-active::before { display: none; }
    .mnav-tab-sell.is-active .mnav-sell-circle { background: #b80710; box-shadow: 0 0 0 3px rgba(229, 9, 20, .25); }

    /* Below 360px "AI Mechanic" can't fit one line in a 62px slot: it wraps to two
       centred lines; icons are anchored to the same top line so all five stay level. */
    @media (max-width: 359px) {
        .mnav-tab { justify-content: flex-start; padding-top: 7px; }
        .mnav-label { text-align: center; line-height: 1; }
    }

    /* Menu sheet */
    .mnav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 950; /* above the tab bar, below site modals */
        display: flex;
        align-items: flex-end;
        background: rgba(15, 23, 42, .55);
    }
    .mnav-sheet {
        width: 100%;
        max-height: 85vh;
        max-height: 85dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        border-radius: 18px 18px 0 0;
        padding: 6px 16px calc(16px + env(safe-area-inset-bottom));
        box-shadow: 0 -10px 30px rgba(0, 0, 0, .2);
        animation: mnav-sheet-up .18s ease-out;
    }
    .mnav-sheet:focus { outline: none; }
    .mnav-sheet-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f1f2f4;
    }
    .mnav-sheet-title { margin: 0; font-size: 18px; font-weight: 800; color: #111; }
    .mnav-sheet-close {
        width: 44px;
        height: 44px;
        margin-right: -8px;
        border: 0;
        background: none;
        color: #111;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .mnav-sheet-close:focus-visible,
    .mnav-sheet-list a:focus-visible,
    .mnav-sheet-list button:focus-visible { outline: 2px solid #0a58ca; outline-offset: -2px; border-radius: 8px; }
    .mnav-sheet-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
    .mnav-sheet-list { list-style: none; margin: 0; padding: 0; }
    .mnav-sheet-account { margin-top: 10px; border-top: 6px solid #f4f5f7; }
    .mnav-sheet-list a,
    .mnav-sheet-list button {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 48px;
        padding: 0 4px;
        border: 0;
        border-bottom: 1px solid #f1f2f4;
        background: none;
        color: #111;
        font: 500 16px/1.2 Arial, Helvetica, sans-serif;
        text-align: left;
        text-decoration: none;
        cursor: pointer;
    }
    .mnav-sheet-list button[data-mnav-item="logout"] { color: #c10812; }
    .mnav-logout-form { margin: 0; }
}

@keyframes mnav-sheet-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .mnav-sheet { animation: none; }
}
@media print {
    .mnav-tabbar,
    .mnav-backdrop { display: none !important; }
    body { padding-bottom: 0; }
}

/* "Confirm your email" banner (main/partials/confirm_email_banner.html) and
   the shared "Resend link" button it and the confirm-first notices use. */
.confirm-email-banner{ background:#fff7e6; border-bottom:1px solid #f5d48a; margin:-1px 0 16px; }
.confirm-email-banner-inner{ display:flex; align-items:center; gap:12px; padding-top:10px; padding-bottom:10px; flex-wrap:wrap; }
.confirm-email-banner-inner > i{ color:#b45309; font-size:18px; }
.confirm-email-banner-text{ margin:0; flex:1 1 260px; color:#78350f; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.confirm-resend-form{ margin:0; }
.confirm-resend-btn{ min-height:40px; padding:8px 16px; border:1px solid #b45309; border-radius:8px; background:#fff; color:#92400e; font-weight:700; font-size:14px; cursor:pointer; }
.confirm-resend-btn:hover{ background:#b45309; color:#fff; }
@media (max-width:480px){
  .confirm-resend-form, .confirm-resend-btn{ width:100%; }
}

/* "Confirm your email first" page (main/confirm_email_required.html) and the
   inline notice that replaces a form (main/partials/confirm_email_notice.html). */
.confirm-required{ max-width:520px; margin:48px auto; padding:0 16px; }
.confirm-required-card{ background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:28px 24px; text-align:center; }
.confirm-required-icon{ font-size:36px; color:#b45309; margin-bottom:10px; }
.confirm-required-title{ margin:0 0 10px; font-size:24px; }
.confirm-required-text{ margin:0 0 18px; color:#374151; line-height:1.6; overflow-wrap:anywhere; }
.confirm-required-actions{ display:flex; gap:12px; justify-content:center; align-items:center; flex-wrap:wrap; }
.confirm-required-back{ min-height:40px; display:inline-flex; align-items:center; padding:8px 16px; color:#374151; font-weight:600; }
.confirm-email-notice{ background:#fff7e6; border:1px solid #f5d48a; border-radius:10px; padding:14px; margin-top:8px; }
.confirm-email-notice-text{ margin:0 0 10px; color:#78350f; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }

/* Small grey help text under a form field (e.g. "Shown publicly ..."). */
.field-hint{ margin-top:6px; color:#64748b; font-size:13px; line-height:1.4; }

/* Mechanic cards (mechanics/landing.html, list.html): the profile link covers
   the photo and details; the business phone is its own tap-to-call button. */
.mech-card{ display:flex; flex-direction:column; min-width:0; }
.mech-card-main{ display:block; flex:1; color:inherit; text-decoration:none; }
.mech-card-call{ display:flex; align-items:center; justify-content:center; gap:6px; min-height:44px;
  margin-top:10px; padding:8px 12px; border:1px solid #bcd3f5; border-radius:10px; background:#f3f8ff;
  color:#0a58ca; font-weight:700; text-decoration:none; overflow-wrap:anywhere; }
.mech-card-call:hover{ background:#e6f0ff; }

/* A dashboard notice (e.g. Auto Parts "Add your store phone"). */
.dash-notice{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 18px; padding:12px 14px;
  border:1px solid #f5d48a; border-radius:12px; background:#fff7e6; color:#78350f; }
.dash-notice p{ margin:0; flex:1 1 240px; font-size:14px; line-height:1.5; }
.dash-notice a{ min-height:40px; display:inline-flex; align-items:center; padding:8px 14px; border-radius:8px;
  background:#e50914; color:#fff; font-weight:700; text-decoration:none; }
