/* ------------------------------------------------------------------ */
/* Promo cards — the shared closed-card design for one-cell cards     */
/* app.js places between vehicles in #showroom-grid (PROMO_CARDS /    */
/* PromoCardMarkup): Location today; CARFAX, Financing, Warranty      */
/* later. Each card's popup or page has its own files; this file is   */
/* only the card itself. A card kind can restyle its panel through    */
/* .promo-card--<kind> (e.g. .promo-card--carfax .promo-card__media). */
/* Reuses the site tokens from styles.css.                            */
/* ------------------------------------------------------------------ */
.promo-card {
  --promo-navy: var(--primary, #0f172a);
  --promo-bg: var(--surface, #fff);
  --promo-border: var(--border, #e2e8f0);
  --promo-radius: var(--radius-card, 12px);
  /* Panel background; override per kind. */
  --promo-panel: radial-gradient(ellipse at 110% 110%, #6b1732 0, transparent 52%), var(--promo-navy);
  --promo-kicker-icon: #fb7185;
  min-width: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
.promo-card *, .promo-card *::before, .promo-card *::after { box-sizing: border-box; }

/* The grid uses align-items: start, so the card stretches itself to the
   row height of the vehicle cards beside it. */
.showroom-grid .promo-card { align-self: stretch; display: flex; }

.promo-card__button {
  display: flex; flex-direction: column; align-items: stretch; gap: 0; width: 100%; height: 100%; padding: 0;
  border: 1px solid var(--promo-border); border-radius: var(--promo-radius);
  background: var(--promo-bg); color: var(--promo-navy); text-align: left; text-decoration: none;
  font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 24px rgb(0 0 0 / .08); overflow: hidden; container-type: inline-size;
  transition: border-color 160ms, box-shadow 160ms;
}
.promo-card__button:hover { border-color: #b9c4d2; box-shadow: 0 4px 16px rgb(15 23 42 / .06); }
.promo-card__button:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 3px; }
.promo-card .material-symbols-outlined { width: 22px; height: 22px; font-size: 22px; line-height: 1; flex: 0 0 auto; }

/* Same photo frame as a desktop vehicle card; grows to fill the row so the
   footer stays compact instead of leaving an empty band. */
.promo-card__media {
  width: 100%; aspect-ratio: 16 / 10; flex: 1 0 auto; position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(12px, 8cqw, 24px); overflow: hidden;
  background: var(--promo-panel); color: #fff;
}
.promo-card__media::before { content: ""; position: absolute; width: 90%; aspect-ratio: 1; border: 1px solid rgb(255 255 255 / .08); border-radius: 50%; right: -50%; top: -24%; pointer-events: none; }
.promo-card__kicker { position: relative; display: flex; align-items: center; gap: 5px; color: #e2e8f0; font-size: 11px; line-height: 1.2; font-weight: 500; white-space: nowrap; }
.promo-card__kicker .material-symbols-outlined { width: 15px; height: 15px; font-size: 15px; color: var(--promo-kicker-icon); }
.promo-card__title { position: relative; display: block; margin-top: 10px; color: #fff; font-size: clamp(18px, 14cqw, 34px); line-height: 1.05; font-weight: 800; letter-spacing: -.045em; white-space: pre-line; }
.promo-card__summary { display: flex; flex: 0 0 auto; flex-direction: column; padding: 14px 16px; min-width: 0; }
.promo-card__summary-title { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 16px; margin-bottom: 6px; color: var(--promo-navy); font-size: 14px; font-weight: 800; line-height: 1.35; }
.promo-card__summary-title > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-card__summary-title .material-symbols-outlined { width: 18px; height: 18px; font-size: 18px; }
.promo-card__caption { display: block; align-self: flex-start; max-width: 100%; color: #2563eb; background: rgb(37 99 235 / .06); padding: 1px 6px; border-radius: 4px; font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap; }

/* Phones: match the vehicle cards exactly — 4:3 photo on the 2-up grid,
   2:1 on the single-column grid, compact 8px footer. */
@media (max-width: 768px) {
  .showroom-grid:not(.grid-1col) .promo-card__media { aspect-ratio: 4 / 3; }
  .showroom-grid.grid-1col .promo-card { width: calc(100% - var(--s-32, 32px)); max-width: 100%; justify-self: center; }
  .showroom-grid.grid-1col .promo-card__button { border-radius: 16px; }
  .showroom-grid.grid-1col .promo-card__media { aspect-ratio: 2 / 1; }
  .promo-card__summary { padding: 8px; }
  .promo-card__summary-title { margin-bottom: 5px; font-size: 11px; }
  .promo-card__summary-title .material-symbols-outlined { width: 16px; height: 16px; font-size: 16px; }
  .promo-card__caption { padding: 0 4px; font-size: 11px; line-height: 14.4px; }
}

@media (prefers-reduced-motion: reduce) { .promo-card__button { transition: none; } }
