/* ---------- Base ---------- */

body {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #1c1c1c;
  background: #fff;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0.2em 0 0.6em;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid #1c1c1c;
}

a {
  color: #0b5c9c;
}

/* ---------- Availability banner ---------- */

body > p:first-of-type strong {
  display: inline-block;
  padding: 0.35em 0.7em;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #fff;
  background: #b4531a;
  border-radius: 3px;
}

/* ---------- Carousel ---------- */

.carousel {
  margin: 1.5rem 0 2rem;
}

.carousel-frame {
  --matte: 16px;
  position: relative;
  /* matte is added on top of the picture area so the image keeps its size */
  height: calc(clamp(240px, 56vw, 520px) + (2 * var(--matte)));
  background: rgba(28, 28, 28, 0.05);
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
}

/* Slides are stacked; only the active one is shown. No scrolling, no reflow. */
.carousel-frame img {
  position: absolute;
  /* an img won't stretch to a four-sided inset, so size it explicitly */
  inset: var(--matte);
  width: calc(100% - (2 * var(--matte)));
  height: calc(100% - (2 * var(--matte)));
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
}

.carousel-frame img.is-active {
  opacity: 1;
  visibility: visible;
}

.carousel-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.carousel-btn {
  flex: none;
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  line-height: 1;
  color: #1c1c1c;
  background: #f2f1ee;
  border: 1px solid #d8d5cf;
  border-radius: 50%;
  cursor: pointer;
}

.carousel-btn:hover {
  background: #e6e3dc;
}

.carousel-dots {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

/* dot stays 9px visually; the padding widens the tap target to ~21px */
.carousel-dots button {
  box-sizing: content-box;
  width: 9px;
  height: 9px;
  padding: 6px;
  background: #d8d5cf;
  background-clip: content-box;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.carousel-dots button:hover {
  background-color: #b9b5ad;
}

.carousel-dots button.is-active {
  background-color: #b4531a;
}

.carousel-count {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  font-variant-numeric: tabular-nums;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vmin, 64px);
  background: rgba(12, 12, 12, 0.92);
  /* an X over the surround, so it reads as "click here to close" */
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M7 7 L21 21 M21 7 L7 21' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, zoom-out;
}

.lightbox[hidden] {
  display: none;
}

/* the X cursor is invisible on touch, so give phones a real button */
.lightbox-close {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.16);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background-color: rgba(255, 255, 255, 0.3);
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: default;
}

/* keeps the page behind from scrolling while the lightbox is up */
.no-scroll {
  overflow: hidden;
}

/* ---------- Key specs ---------- */

.main-specs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.main-specs li {
  display: flex;
  align-items: center;
  gap: 0.65em;
  padding: 0.7em 0.9em;
  font-weight: 600;
  background: #f2f1ee;
  border-left: 3px solid #b4531a;
  border-radius: 3px;
}

/* icon slot; each spec fills it in by id below */
.main-specs li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#spec-miles::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4531a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 18a9 9 0 1 1 17 0'/%3E%3Cpath d='M12 14.5 16.8 9.2'/%3E%3Ccircle cx='12' cy='17.5' r='1.3' fill='%23b4531a' stroke='none'/%3E%3C/svg%3E");
}

#spec-location::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4531a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21.5s7-6.4 7-11.5a7 7 0 1 0-14 0c0 5.1 7 11.5 7 11.5z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

#spec-price::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4531a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h8.2L21 12.8 12.8 21 3 11.2V3z'/%3E%3Ccircle cx='7.6' cy='7.6' r='1.4'/%3E%3C/svg%3E");
}

/* ---------- Highlights ---------- */

.highlights {
  margin: 2.5rem 0;
}

.highlights ul {
  columns: 2;
  column-gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.highlights li {
  break-inside: avoid;
  margin-bottom: 0.5em;
  padding-left: 1.1em;
  text-indent: -1.1em;
}

.highlights li::before {
  content: "• ";
  color: #b4531a;
  font-weight: 700;
}

/* ---------- Viewing ---------- */

.viewing {
  margin: 2.5rem 0;
  padding: 1.25rem 1.5rem;
  background: #f2f1ee;
  border-radius: 6px;
}

.viewing h2 {
  border-bottom-color: #b4531a;
}

.viewing p {
  margin-bottom: 0;
}

/* ---------- Contact ---------- */

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  text-align: center;
}

/* stretch keeps the heading rule full-width while the section stays centered */
.contact h2 {
  align-self: stretch;
  margin-bottom: 0.25em;
}

.contact p {
  margin: 0;
}

.contact a {
  display: inline-flex;
  align-items: center;
  padding: 0.6em 1.2em;
  font-weight: 600;
  color: #b4531a;
  text-decoration: none;
  background-color: #fff;
  border: 1.5px solid #e0dbd3;
  border-radius: 999px;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.contact a:hover,
.contact a:focus-visible {
  color: #fff;
  background-color: #b4531a;
  border-color: #b4531a;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(180, 83, 26, 0.28);
}

.contact a:active {
  transform: translateY(0);
  box-shadow: none;
}

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

  .contact a:hover,
  .contact a:focus-visible {
    transform: none;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.5rem; }
  .highlights ul { columns: 1; }
}
