﻿
    :root {
      --color-primary: #0f172a;
      --color-accent: #2563eb;
      --color-bg: #f8fafc;
      --color-card: #ffffff;
      --color-text: #0f172a;
      --color-text-muted: #64748b;
      --shadow-card: 0 4px 14px rgba(15, 23, 42, 0.08);
      --border-subtle: rgba(15, 23, 42, 0.08);
    }
    body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: var(--color-bg); margin: 0; padding: 0; color: var(--color-text); }
    .wrap { max-width: 1100px; margin: 24px auto; background: var(--color-card); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 18px; box-shadow: var(--shadow-card); }
    a { color: var(--color-accent); text-decoration: none; }
    a:hover { text-decoration: underline; }
    h1 { margin: 0 0 12px 0; font-size: 22px; color: var(--color-primary); }
    .vehicle-layout {
      display: grid;
      grid-template-columns: 1.2fr 1fr;
      gap: 40px;
      max-width: 1200px;
      margin: 40px auto 0;
      align-items: start;
    }
    .vehicle-left { min-width: 0; }
    .vehicle-right { position: static; padding: 4px 0; min-width: 0; }

    .vehicle-title {
      font-size: 28px;
      font-weight: 800;
      margin: 0 0 10px 0;
      color: var(--color-primary);
      line-height: 1.15;
    }
    .vehicle-id-badge {
      display: inline-block;
      margin-bottom: 10px;
      padding: 6px 12px;
      font-size: 14px;
      font-weight: 600;
      background: #111;
      color: #fff;
      border-radius: 6px;
    }
    .vehicle-price {
      font-size: 26px;
      font-weight: 900;
      margin: 0 0 18px 0;
      color: #1a73e8;
    }
    .vehicle-specs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin: 0 0 18px 0;
    }
    .vehicle-specs > div {
      background: #f8f9fb;
      padding: 12px;
      border-radius: 8px;
      border: 1px solid rgba(15, 23, 42, 0.06);
    }
    .vehicle-specs > div.vehicle-specs__vin {
      border-color: rgba(37, 99, 235, 0.35);
      box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
    }
    .vehicle-specs strong {
      display: block;
      color: #555;
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .vehicle-specs p {
      margin: 0;
      font-weight: 600;
      font-size: 15px;
      color: var(--color-primary);
      line-height: 1.35;
    }
    .vehicle-cta {
      display: flex;
      gap: 10px;
      margin-bottom: 16px;
    }
    .vehicle-cta a {
      flex: 1;
      padding: 12px 10px;
      text-align: center;
      border-radius: 10px;
      text-decoration: none;
      font-weight: 800;
      color: #fff;
      box-shadow: 0 10px 18px rgba(0,0,0,0.06);
      transition: transform 0.12s ease, filter 0.12s ease;
    }
    .vehicle-cta a:hover {
      transform: translateY(-1px);
      filter: brightness(1.03);
    }
    .btn-call { background: #111; }
    .btn-whatsapp { background: #25D366; }
    .btn-email { background: #1a73e8; }

    .vehicle-description-section {
      max-width: 1000px;
      margin: 50px auto 0;
      padding-bottom: 48px;
    }
    .img-main { border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; background: #f1f5f9; }
    .img-main img { width: 100%; height: 420px; object-fit: cover; display: block; }
    .vehicle-gallery img {
      border-radius: 12px;
      transition: transform .3s ease;
    }
    .vehicle-gallery img:hover { transform: scale(1.05); }
    .thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
    .thumbs button {
      padding: 0; border: 1px solid var(--border-subtle); border-radius: 10px; background: transparent; cursor: pointer;
    }
    .thumbs img { width: 110px; height: 80px; object-fit: cover; display: block; border-radius: 10px; background: #f1f5f9; }
    .thumbs button:hover { border-color: var(--color-accent); }
    .price { font-size: 28px; font-weight: 900; margin: 10px 0 15px 0; color: var(--color-primary); }
    .vehicle-ad-id {
      font-size: 14px;
      color: #6b7280;
      margin-top: 5px;
      font-weight: 500;
    }
    .trust-box {
      margin-top: 15px;
      font-size: 14px;
      color: #16a34a;
      line-height: 1.55;
    }
    .trust-box div + div { margin-top: 4px; }
    .btn-primary {
      background: linear-gradient(135deg,#1e3c72,#2a5298);
      color: #fff;
      padding: 14px;
      border-radius: 10px;
      font-weight: bold;
      text-align: center;
      text-decoration: none;
      display: inline-flex;
      justify-content: center;
      align-items: center;
    }
    .btn-secondary {
      border: 1px solid #ddd;
      padding: 14px;
      border-radius: 10px;
      color: var(--color-text);
      text-align: center;
      text-decoration: none;
      display: inline-flex;
      justify-content: center;
      align-items: center;
      background: #fff;
      font-weight: 700;
    }
    .cta-box {
      display: flex;
      flex-direction: column;
      gap: 0;
      margin-top: 20px;
    }
    .cta-box > a,
    .cta-box > button { flex: none; width: 100%; }
    .cta-box .btn-primary { margin-bottom: 10px; }
    .cta-box button.btn-primary,
    .cta-box button.btn-secondary {
      border: none;
      cursor: pointer;
      font: inherit;
      box-sizing: border-box;
    }
    .cta-box button.btn-secondary {
      border: 1px solid #ddd;
    }
    .cta-box button.btn {
      width: 100%;
      border-radius: 10px;
      padding: 14px;
      font: inherit;
      font-weight: bold;
      box-sizing: border-box;
    }
    .cta-box button.btn.disabled {
      background: #9ca3af;
      color: #fff;
      border: none;
      cursor: not-allowed;
    }
    .cta-box button.btn-secondary.disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .forms-wrapper {
      display: none;
      gap: 20px;
      margin-top: 30px;
    }
    .forms-wrapper.active {
      display: grid;
      grid-template-columns: 1fr 1fr;
      animation: fadeIn 0.3s ease;
    }
    .form-box {
      background: #fff;
      padding: 20px;
      border-radius: 12px;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
      min-width: 0;
    }
    .form-box h3 {
      margin: 0 0 12px 0;
      font-size: 16px;
      color: var(--color-primary);
    }
    .legal-trust-note {
      margin: 10px 0 0;
      font-size: 12px;
      color: #64748b;
      line-height: 1.45;
    }
    .legal-trust-note a {
      color: #2563eb;
      text-decoration: none;
    }
    .legal-trust-note a:hover { text-decoration: underline; }
    #buy-form {
      border: 2px solid #2d4fff;
    }
    .zoom-hint {
      margin: 10px 0 0 0;
      color: var(--color-text-muted);
      font-size: 13px;
    }
    .key-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      margin-top: 14px;
    }
    .key-item {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      font-size: 14px;
      color: var(--color-text-muted);
    }
    .key-item .label { min-width: 160px; }
    .vehicle-description {
      position: relative;
      max-width: 900px;
      margin: 40px auto;
      padding: 30px;
      background: #ffffff;
      border-radius: 12px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
      line-height: 1.7;
      font-size: 16px;
      color: #333;
      max-height: 200px;
      overflow: hidden;
    }
    .desc-title {
      font-size: 24px;
      font-weight: 700;
      margin-bottom: 20px;
      color: #111;
    }
    .vehicle-description ul {
      padding-left: 18px;
      margin: 0;
    }

    .vehicle-description li {
      margin: 0;
      padding: 0;
      margin-bottom: 4px;
      line-height: 1.5;
    }

    .vehicle-description li:last-child {
      margin-bottom: 0;
    }
    .vehicle-description::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 60px;
      background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
      pointer-events: none;
    }
    .vehicle-description.expanded,
    .vehicle-description.is-short {
      max-height: none;
      overflow: visible;
    }
    .vehicle-description.expanded::after,
    .vehicle-description.is-short::after {
      display: none;
    }
    .read-more-container {
      text-align: center;
      margin: 30px 0 60px;
    }

    .read-more-btn {
      background: #1a73e8;
      color: white;
      border: none;
      padding: 14px 22px;
      font-size: 15px;
      font-weight: 600;
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .read-more-btn:hover {
      background: #155ac7;
      transform: translateY(-2px);
    }
    #contact-form input,
    #contact-form textarea {
      width: 100%;
      margin-bottom: 10px;
      padding: 10px;
      border-radius: 8px;
      border: 1px solid #ddd;
      font: inherit;
      color: var(--color-text);
      box-sizing: border-box;
      outline: none;
    }
    #contact-form textarea {
      min-height: 120px;
      resize: vertical;
    }
    #contact-form input:focus,
    #contact-form textarea:focus {
      border-color: var(--color-accent);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }
    #contact-form button[type="submit"] {
      width: 100%;
      background: #1e3c72;
      color: #fff;
      padding: 12px;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      font-weight: 800;
    }

    .buy-sub {
      font-size: 14px;
      color: #777;
      margin-bottom: 15px;
    }
    #buy-form.form-box .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 8px;
    }
    #buy-form.form-box input,
    #buy-form.form-box select {
      padding: 10px;
      border-radius: 8px;
      border: 1px solid #ddd;
      width: 100%;
      font: inherit;
      box-sizing: border-box;
      outline: none;
    }
    #buy-form.form-box input:focus,
    #buy-form.form-box select:focus {
      border-color: var(--color-accent);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }
    .payment-box {
      margin-top: 15px;
    }
    .payment-box label {
      display: block;
      font-weight: 800;
      margin-bottom: 8px;
      color: var(--color-primary);
    }
    .order-summary {
      background: #f7f7f7;
      padding: 15px;
      border-radius: 10px;
      margin: 15px 0;
    }
    .full { width: 100%; }
    #buy-form.form-box .btn-primary.full {
      width: 100%;
      margin-bottom: 0;
      display: inline-flex;
      justify-content: center;
    }
    .image-modal {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.86);
      z-index: 2000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }
    .image-modal.is-open { display: flex; }
    .image-modal img {
      max-width: 100%;
      max-height: 85vh;
      border-radius: 12px;
      box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    }
    .image-modal-close {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 42px;
      height: 42px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.25);
      background: rgba(255,255,255,0.12);
      color: #fff;
      cursor: pointer;
      font-size: 22px;
      line-height: 1;
    }
    .modal-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      font-size: 40px;
      background: rgba(0,0,0,0.4);
      color: white;
      border: none;
      width: 50px;
      height: 60px;
      cursor: pointer;
      z-index: 2100;
    }
    .modal-nav.prev { left: 10px; }
    .modal-nav.next { right: 10px; }
    .modal-nav:hover {
      background: rgba(0,0,0,0.7);
    }
    .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
    .kv div { font-size: 14px; color: var(--color-text-muted); }
    .label { font-weight: 700; color: var(--color-primary); }
    .not-found { padding: 20px 0; color: var(--color-text-muted); }
    @media (max-width: 768px) {
      .vehicle-layout { grid-template-columns: 1fr; gap: 16px; }
      .vehicle-right { position: static; top: auto; }
      .img-main img { height: 320px; }
      .cta-box { flex-direction: column; }
      .cta-box > a,
      .cta-box > button { width: 100%; }
      .forms-wrapper.active {
        grid-template-columns: 1fr;
      }
      #buy-form.form-box .form-grid { grid-template-columns: 1fr; }
    }
  
/**
 * Phase 8D / 8D.1 â€” Vehicle detail premium layout (overrides legacy extract).
 * Scoped with .mc-detail-page where safe; forms, modal, .vehicle-description keep legacy selectors for JS.
 */

.mc-detail-page {
  --mc-detail-ink: #0b1220;
  --mc-detail-gold: #c9a227;
  --mc-detail-gold-bright: #e8cf7a;
  --mc-detail-surface: #ffffff;
  --mc-detail-muted: #64748b;
  --mc-detail-line: #e2e8f0;
  overflow-x: hidden;
}

.mc-detail-page .wrap {
  max-width: var(--mc-layout-max, 1200px);
  margin: 20px auto 0;
  padding: 0 var(--mc-layout-gutter, 20px) 12px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.mc-detail-hero {
  margin-bottom: 8px;
}

.mc-detail-hero__breadcrumb {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.mc-detail-hero__breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.mc-detail-hero__breadcrumb a:hover {
  text-decoration: underline;
}

.mc-detail-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.mc-detail-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mc-detail-badge--status-available {
  background: rgba(22, 101, 52, 0.92);
  color: #fff;
}

.mc-detail-badge--status-reserved {
  background: rgba(161, 98, 7, 0.95);
  color: #fff;
}

.mc-detail-badge--status-sold {
  background: rgba(71, 85, 105, 0.95);
  color: #fff;
}

.mc-detail-badge--type {
  background: #f1f5f9;
  color: var(--mc-detail-ink);
  border: 1px solid var(--mc-detail-line);
}

.mc-detail-hero__title {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--mc-detail-ink);
}

.mc-detail-hero__price {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 900;
  color: #0f172a;
}

.mc-detail-hero__trust-line {
  margin: 0;
  max-width: 720px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--mc-detail-muted);
}

/* Two-column layout */
.mc-detail-page .vehicle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 380px);
  gap: 28px 36px;
  max-width: var(--mc-layout-max, 1200px);
  margin: 28px auto 0;
  align-items: start;
}

@media (max-width: 900px) {
  .mc-detail-page .vehicle-layout {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 18px;
  }
}

/* Gallery */
.mc-detail-page .vehicle-gallery.main-image {
  border-radius: 16px;
  overflow: hidden;
}

.mc-detail-page .img-main {
  border-radius: 14px;
  border: 1px solid var(--mc-detail-line);
  overflow: hidden;
  background: #e2e8f0;
}

.mc-detail-page .img-main img {
  height: min(420px, 52vw);
  width: 100%;
  object-fit: cover;
}

.mc-detail-page .thumbs {
  margin-top: 12px;
}

.mc-detail-page .thumbs button {
  border-radius: 10px;
}

/* Sticky panel */
.mc-detail-page .vehicle-right {
  position: static;
}

@media (min-width: 901px) {
  .mc-detail-page .vehicle-right {
    position: sticky;
    top: 96px;
    height: fit-content;
  }
}

.mc-detail-panel__title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mc-detail-muted);
}

.mc-detail-panel__price {
  font-size: 1.55rem;
  font-weight: 900;
  margin: 0 0 14px;
  color: var(--mc-detail-ink);
}

.mc-detail-panel__notes {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--mc-detail-line);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--mc-detail-muted);
}

.mc-detail-panel__notes p {
  margin: 0 0 8px;
}

.mc-detail-panel__notes p:last-child {
  margin-bottom: 0;
}

.mc-detail-panel__availability {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mc-detail-ink);
}

/* Specs full-width below grid */
.mc-detail-specs {
  max-width: var(--mc-layout-max, 1200px);
  margin: 32px auto 0;
  padding: 0 var(--mc-layout-gutter, 20px);
}

.mc-detail-specs__title {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--mc-detail-ink);
}

.mc-detail-page .vehicle-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 640px) {
  .mc-detail-page .vehicle-specs {
    grid-template-columns: 1fr;
  }
}

.mc-detail-page .vehicle-specs > div {
  background: #fff;
  border: 1px solid var(--mc-detail-line);
  border-radius: 12px;
  padding: 10px 12px;
}

/* CTAs â€” gold primary accent */
.mc-detail-page .cta-box .btn-buy:not(.btn-buy--disabled),
.mc-detail-page .cta-box .btn-reserve {
  background: linear-gradient(135deg, var(--mc-detail-gold), var(--mc-detail-gold-bright)) !important;
  color: #111 !important;
  border: none !important;
  font-weight: 800 !important;
}

.mc-detail-page .cta-box .btn-buy:not(.btn-buy--disabled):hover,
.mc-detail-page .cta-box .btn-reserve:hover {
  filter: brightness(1.03);
}

.mc-detail-page .cta-box .btn-contact:not(.btn-contact--disabled) {
  border: 2px solid var(--mc-detail-ink) !important;
  color: var(--mc-detail-ink) !important;
  background: #fff !important;
}

.mc-detail-page .cta-box .action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mc-detail-page .cta-box .btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--mc-btn-radius, 12px) !important;
  font-size: var(--mc-btn-font-size, 0.95rem);
  padding: var(--mc-btn-pad-y, 12px) var(--mc-btn-pad-x, 18px);
}

.mc-detail-page .forms-wrapper {
  margin-bottom: 16px;
}

.mc-detail-page .forms-wrapper.active {
  margin-bottom: 20px;
}

/* Description */
.mc-detail-page .vehicle-description-section {
  max-width: 900px;
  margin: 36px auto 0;
  padding: 0 var(--mc-layout-gutter, 20px) 22px;
}

.mc-detail-page .vehicle-description {
  border-radius: 16px;
  border: 1px solid var(--mc-detail-line);
}

.mc-detail-page .desc-title {
  font-size: 1.15rem;
}

/* Detail page footer — full-bleed band (aligned content, edge-to-edge background) */
.mc-detail-page .mc-detail-trust--footer {
  position: relative;
  width: 100vw;
  max-width: none;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 12px;
  margin-bottom: 0;
  padding: 0;
  border: none;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(168deg, #051018 0%, #0a2540 38%, #0f3558 100%);
  color: #e2e8f0;
  box-shadow: 0 -8px 26px rgba(15, 23, 42, 0.12);
}

.mc-detail-page .mc-detail-trust__inner {
  max-width: var(--mc-layout-max, 1200px);
  margin: 0 auto;
  padding: 42px var(--mc-layout-gutter, 20px) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(200px, 320px);
  gap: 28px 48px;
  align-items: start;
}

.mc-detail-page .mc-detail-trust__title {
  margin: 0 0 14px;
  font-size: clamp(1.28rem, 2.6vw, 1.72rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: #f8fafc;
}

.mc-detail-page .mc-detail-trust__text {
  margin: 0 0 18px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(241, 245, 249, 0.95);
}

.mc-detail-page .mc-detail-trust__company {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fde68a;
}

.mc-detail-page .mc-detail-trust__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mc-detail-page .mc-detail-trust__nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  color: #0b1220;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  border: 1px solid rgba(251, 191, 36, 0.95);
  text-align: center;
}

.mc-detail-page .mc-detail-trust__nav-link:hover {
  filter: brightness(1.06);
  text-decoration: none;
}

.mc-detail-page .mc-detail-trust__cta {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mc-detail-page .mc-detail-trust__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  border: 2px solid rgba(248, 250, 252, 0.55);
  color: #f8fafc;
  background: rgba(8, 30, 52, 0.45);
}

.mc-detail-page .mc-detail-trust__cta-btn:hover {
  background: rgba(248, 250, 252, 0.12);
  border-color: #f8fafc;
}

.mc-detail-page .mc-detail-trust__cta-btn--primary {
  border: none;
  color: #111827;
  background: linear-gradient(135deg, var(--mc-detail-gold), var(--mc-detail-gold-bright));
}

.mc-detail-page .mc-detail-trust__cta-btn--primary:hover {
  filter: brightness(1.05);
}

@media (max-width: 768px) {
  .mc-detail-page .mc-detail-trust__inner {
    grid-template-columns: 1fr;
    padding: 32px 18px 40px;
    gap: 24px;
  }
}

.mc-detail-page .trust-box {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #15803d;
}
