/*
 * X3WEB — Car Dealership Websites page (/business-models/car-dealership-websites).
 *
 * Loaded after x3.css, x3-bm.css and x3-niche.css, for the few things only this
 * page has: the AutoTrader stock-sync diagram, the ads price table and the one
 * large dealership website figure. Every value is a token from x3.css.
 */

/* ── The dealership website we built, shown large ──────────────────────────── */

.x3-dealer-feature { max-width: 62rem; margin-inline: auto; }


/* ── AutoTrader stock sync: three boxes joined by arrows ───────────────────── */

.x3-dealer-sync { margin: 0; }
.x3-dealer-sync__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 0.75rem;
}
.x3-dealer-sync__box {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  width: 100%;
  max-width: 22rem;
  padding: 1.25rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  text-align: center;
}
.x3-dealer-sync__box strong { font-size: 1.125rem; font-weight: 550; color: var(--ink); }
.x3-dealer-sync__box span { font-size: 0.9375rem; color: var(--ink-muted); }
/* The sync itself carries the orange hairline. */
.x3-dealer-sync__box--accent { border-top: 2px solid var(--accent); }
.x3-dealer-sync__arrow { width: 3rem; height: 1.5rem; color: var(--ink); transform: rotate(90deg); }
@media (min-width: 900px) {
  .x3-dealer-sync__row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }
  .x3-dealer-sync__arrow { transform: none; }
}
.x3-dealer-sync__notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2rem;
  margin-top: 1.5rem;
  list-style: none;
}
.x3-dealer-sync__notes li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; color: var(--ink); }
.x3-dealer-sync__notes svg { flex: none; color: var(--accent); }

/* What the importer does, numbered, in two columns. */
.x3-dealer-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 2.5rem;
  margin-top: clamp(2.5rem, 2rem + 1.6vw, 3.5rem);
  list-style: none;
  counter-reset: sync;
}
@media (min-width: 768px) { .x3-dealer-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.x3-dealer-steps li {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
  counter-increment: sync;
}
.x3-dealer-steps li::before {
  content: counter(sync);
  flex: none;
  min-width: 1.5rem;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.x3-dealer-sync-note { max-width: 46rem; margin: clamp(2rem, 1.6rem + 1.2vw, 2.75rem) auto 0; text-align: center; }
.x3-dealer-sync-note p + p { margin-top: 0.75rem; }
.x3-dealer-sync-note p { font-size: 1.0625rem; line-height: 1.6; color: var(--ink); }
.x3-dealer-sync-note p.x3-dealer-small { font-size: 0.9375rem; color: var(--ink-muted); }


/* ── Google Ads and Meta Ads ───────────────────────────────────────────────── */

.x3-dealer-ads .x3-tile .x3-h3 a { color: inherit; text-decoration: none; }
.x3-dealer-ads .x3-tile .x3-h3 a:hover { color: var(--accent-text); }
.x3-dealer-ads .x3-pkg__list { margin-top: 0.5rem; padding-top: 1.125rem; border-top: 1px solid var(--line); }
.x3-dealer-adprice {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}
.x3-dealer-adprice strong { font-size: 1.375rem; font-weight: 500; color: var(--ink); }

/* What you take, and what it costs. */
.x3-dealer-table-wrap {
  max-width: 56rem;
  margin: clamp(2.5rem, 2rem + 1.6vw, 3.5rem) auto 0;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.x3-dealer-table { width: 100%; border-collapse: collapse; font-size: 1rem; text-align: left; }
.x3-dealer-table caption { padding: 1.125rem 1.25rem 0; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; text-align: left; color: var(--accent-text); }
.x3-dealer-table th,
.x3-dealer-table td { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.x3-dealer-table thead th { font-size: 0.8125rem; font-weight: 550; color: var(--ink-muted); }
.x3-dealer-table tbody th { font-weight: 500; color: var(--ink); }
.x3-dealer-table td { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.x3-dealer-table tbody tr:last-child > * { border-bottom: 0; }
.x3-dealer-table-note { max-width: 46rem; margin: 1.5rem auto 0; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-muted); text-align: center; }

/* On a phone each option becomes a small card: the name, then its two prices
   labelled, rather than a table squeezed sideways. */
@media (max-width: 639.98px) {
  .x3-dealer-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .x3-dealer-table tr { display: block; padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--line); }
  .x3-dealer-table tbody tr:last-child { border-bottom: 0; }
  .x3-dealer-table th,
  .x3-dealer-table td { display: flex; justify-content: space-between; gap: 1rem; padding: 0.25rem 0; border: 0; white-space: normal; }
  .x3-dealer-table tbody th { padding-bottom: 0.375rem; }
  .x3-dealer-table td { text-align: right; }
  .x3-dealer-table td::before { content: attr(data-label); color: var(--ink-muted); text-align: left; }
}


/* ── Everything included: the dealership features across the full width ───── */

/* Nine cards in two columns would leave the last one alone; the first card,
   the features only this page has, spans the row with a wider photo. */
@media (min-width: 640px) {
  #included .x3-niche-incl > .x3-tile:first-child { grid-column: 1 / -1; }
  #included .x3-niche-incl > .x3-tile:first-child .x3-tile__img { aspect-ratio: 32 / 10; }
  #included .x3-niche-incl > .x3-tile:first-child .x3-pkg__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
}


/* ── Design ideas ──────────────────────────────────────────────────────────── */

/* Three to a row from tablet width, so nine designs fill three rows. */
@media (min-width: 640px) {
  #designs .x3-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* A landscape design shows whole in the portrait frame, on the frame's own fill. */
.bm-frame__screen img.x3-dealer-design--wide { object-fit: contain; }
