/* Header identity and controls. Crop only the supplied image's white margin;
   the original Ameba artwork is kept intact in the asset. */
:root .header-blog,
:root .collection-header .header-blog {
  width: 64px; height: 64px; aspect-ratio: 1; overflow: hidden;
  border-radius: 6px; background: #fff;
}
:root .header-blog img {
  position: absolute; width: 214.285714%; max-width: none; height: auto;
  left: -57.142857%; top: -57.142857%;
}
:root .header-stock { font-size: 14px; }

/* A single soft shadow behind each image, without an inset edge or frame. */
:root :is(.car-photo, .vehicle-image, .exclusive-photo, .collection-photo, .collection-main-photo),
:root .premium-vehicle-page .vehicle-image {
  border: 0; padding: 0; background: transparent; border-radius: 0;
  box-shadow: 0 7px 20px -3px rgb(0 0 0 / 46%);
}

/* Fill each inventory photo frame without the pale letterbox seam. */
:root :is(.car-photo, .exclusive-photo, .collection-photo) > img,
:root :is(.new-inventory, .inventory-catalogue) .car-photo img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border: 0; background: transparent;
}
:root .car-photo { container-type: inline-size; }
:root .car-photo .card-badge {
  left: 5%; top: auto; bottom: 6%; max-width: 88%; padding: 0;
  border: 0; background: none; box-shadow: none; color: #fff;
  font-family: var(--serif); font-size: clamp(20px, 10.5cqw, 56px);
  font-weight: 500; letter-spacing: .035em; line-height: 1.05;
  text-align: left; overflow-wrap: anywhere; text-shadow: 0 2px 6px #000c, 0 0 2px #0008;
}
.car-photo .card-reserved {
  position: absolute; left: 10px; top: 10px; padding: 5px 9px;
  background: #1b211cdb; color: #f5e5be; font-size: 12px; letter-spacing: .04em;
}

/* Inventory and new-arrival cards share the same layout. Both cards in a row
   stretch to the same height; flexible space belongs above the action row. */
:root :is(.inventory-catalogue, .new-inventory) .car-grid { align-items: stretch; }
:root :is(.inventory-catalogue, .new-inventory) .car-grid:not(.list-mode) .card-body { flex: 1; }
:root :is(.inventory-catalogue, .new-inventory) .car-title { font-size: 16px; letter-spacing: -.005em; line-height: 1.55; white-space: pre-line; }
:is(.inventory-catalogue, .new-inventory) .card-bottom { margin-top: auto; padding-top: 12px; }
:root :is(.inventory-catalogue, .new-inventory) .card-bottom .car-spec {
  display: flex; gap: 18px; margin: 0; font-size: 12px; padding: 0;
}
:root :is(.inventory-catalogue, .new-inventory) .car-spec span { display: flex; justify-content: space-between; gap: 8px; }
:root :is(.inventory-catalogue, .new-inventory) .car-spec span + span { border: 0; padding-left: 0; }
:root :is(.inventory-catalogue, .new-inventory) .car-spec b { font-size: 13px; margin: 0; white-space: nowrap; }
:root :is(.inventory-catalogue, .new-inventory) .car-description { min-height: 0; margin: 8px 0 0; }
:root :is(.inventory-catalogue, .new-inventory) .car-description:empty { display: none; }
:root :is(.inventory-catalogue, .new-inventory) .car-grid:not(.list-mode) .card-actions {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch; gap: 10px; margin-top: 0; padding-top: 8px;
}
:root :is(.inventory-catalogue, .new-inventory) .card-actions :is(.detail-link, .card-line) {
  display: flex; width: 100%; justify-content: center; align-items: center;
  min-height: 44px; padding: 10px 8px; gap: 8px; border: 1px solid #c5cec5;
  font-size: 13px; line-height: 1.4; box-sizing: border-box;
}
:root :is(.inventory-catalogue, .new-inventory) .detail-link { color: #242923; background: #f4f5f1; }
:root :is(.inventory-catalogue, .new-inventory) .detail-link:hover { background: #e9ece4; border-color: #818e7f; }
:root :is(.inventory-catalogue, .new-inventory) .card-line { border-color: #b8d2c0; }
:root :is(.inventory-catalogue, .new-inventory) .card-actions :is(.detail-link, .card-line):focus-visible { outline: 2px solid #53745a; outline-offset: 3px; }

/* Display-only line breaks come from the same formatter used in the editor. */
:root .vehicle-description { max-width: 46ic; overflow-wrap: anywhere; }
:root[lang=en] .vehicle-description { max-width: 90ch; word-break: normal; overflow-wrap: break-word; }

/* Showroom-first hero, with a warmer serif treatment and a quicker dissolve. */
:root .cinema-slide { transition-duration: 1.4s; }
:root .cinema-copy h1 {
  font-family: 'Baskerville', 'Palatino Linotype', 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif JP', serif;
  font-weight: 500; color: #f4dfaf; letter-spacing: .065em;
  text-shadow: 0 2px 10px #000b, 0 0 28px #0004;
}

@media (min-width: 701px) and (max-width: 1000px) {
  :root :is(.inventory-catalogue, .new-inventory) .car-title { font-size: 14px; }
  :root :is(.inventory-catalogue, .new-inventory) .car-spec { font-size: 11px; }
  :root :is(.inventory-catalogue, .new-inventory) .car-spec b { font-size: 12px; }
}
@media (max-width: 700px) {
  :root .header .header-blog { position: relative; grid-column: 2; grid-row: 1; width: 44px; height: 44px; }
  :root .header .mobile-menu { grid-column: 3; grid-row: 1; }
  :root .collection-header .header-blog { position: relative; width: 44px; height: 44px; }
  :root .header-stock { font-size: 14px; min-height: 36px; padding-inline: 8px; }
  :root .header .header-enquiry { font-size: 13px; }
  :root :is(.inventory-catalogue, .new-inventory) .car-title { font-size: clamp(9.5px, calc(3.4vw - 3.5px), 12.5px); letter-spacing: -.005em; }
  :root :is(.inventory-catalogue, .new-inventory) .card-bottom .car-spec { display: grid; grid-template-columns: 1fr; gap: 3px; margin: 0; padding: 0; font-size: 10px; }
  :root :is(.inventory-catalogue, .new-inventory) .car-spec span { gap: 3px; }
  :root :is(.inventory-catalogue, .new-inventory) .car-spec b { font-size: 11px; }
  :root :is(.inventory-catalogue, .new-inventory) .car-grid:not(.list-mode) .card-actions { grid-template-columns: 1fr; gap: 6px; padding-top: 8px; }
  :root :is(.inventory-catalogue, .new-inventory) .card-actions :is(.detail-link, .card-line) { font-size: 11px; padding: 8px 4px; min-height: 40px; }
  :root .car-photo .card-badge { font-size: clamp(18px, 10.5cqw, 34px); }
  .car-photo .card-reserved { left: 6px; top: 6px; padding: 4px 6px; font-size: 10px; }
  :root .cinema-copy h1 { font-size: clamp(19px, 5.4vw, 26px); line-height: 1.5; letter-spacing: .04em; }
}
@media (prefers-reduced-motion: reduce) {
  :root .cinema-slide { transition: none; }
}
