/* ================================================================
   Elway VDP — inventory-detail-elway.css
   Mobile-first. Breakpoints: 769px (tablet), 1025px (desktop)
   ================================================================ */

/* --- Breadcrumb --- */
.ew-vdp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 8px;
  padding: 0;
  font-size: 14px;
  color: #000;
}
.ew-vdp-breadcrumb a {
  color: #000;
  text-decoration: none;
}
.ew-vdp-breadcrumb a:hover { text-decoration: underline; }
.ew-vdp-breadcrumb svg { flex-shrink: 0; }

/* --- Main container --- */
.ew-vdp {
  margin: 0;
  padding: 0;
}

/* --- Gallery --- */
.ew-vdp-gallery {
  width: 100%;
  margin-bottom: 16px;
}

.ew-vdp-main-image {
  position: relative;
}

.ew-vdp-gallery .vdp-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f9f9f9;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.ew-vdp-gallery .vdp-image--no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.ew-vdp-gallery .vdp-image--no-photo span {
  font-size: 14px;
  color: #999;
  font-style: italic;
}

.ew-vdp-main-image .vdp-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(71, 85, 105, 0.7);
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 20px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ew-vdp-main-image #prevBtn { left: 8px; }
.ew-vdp-main-image #nextBtn { right: 8px; }
.ew-vdp-main-image .vdp-nav-btn:hover { background: rgba(71, 85, 105, 0.9); }

/* --- Dot indicators (mobile) --- */
.vdp-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.vdp-dots::-webkit-scrollbar { display: none; }

.vdp-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #d1d5db;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}
.vdp-dot--active {
  background: var(--accent, #de1c21);
  transform: scale(1.25);
}

/* --- Thumbnail strip with nav arrows --- */
.ew-vdp-thumb-strip {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.ew-vdp-thumb-strip .thumb-nav {
  flex: 0 0 32px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(71, 85, 105, 0.7);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s, opacity 0.2s;
}
.ew-vdp-thumb-strip .thumb-nav:hover { background: rgba(71, 85, 105, 0.9); }
.ew-vdp-thumb-strip .thumb-nav[disabled] { opacity: 0.3; cursor: default; }

.ew-vdp-thumbs {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.ew-vdp-thumbs::-webkit-scrollbar { display: none; }

.ew-vdp-thumbs .vdp-thumb {
  flex: 0 0 80px;
  height: 80px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f9f9f9;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity 0.2s;
}
.ew-vdp-thumbs .vdp-thumb:hover { opacity: 0.8; }

/* --- Info panel --- */
.ew-vdp-info {
  width: 100%;
  padding: 16px 0;
}

/* --- Badges --- */
.ew-vdp-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.ew-vdp-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 2px;
  border: 1px solid #e9eaeb;
  background: #fff;
  color: #181d27;
}
.ew-vdp-badge--dark {
  background: #181d27;
  color: #fff;
  border-color: #181d27;
}

/* --- Title --- */
.ew-vdp-title {
  font-size: 24px;
  font-weight: 500;
  color: #000;
  margin: 0 0 4px;
  line-height: 1.25;
}

/* --- Subtitle --- */
.ew-vdp-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #535862;
  margin: 0 0 16px;
}

/* --- Price --- */
.ew-vdp-price-block {
  margin-bottom: 16px;
}
.ew-vdp-price {
  font-size: 24px;
  font-weight: 600;
  color: #000;
  margin: 0;
}
.ew-vdp-price-strike {
  text-decoration: line-through;
  color: #535862;
  font-weight: 400;
  margin-right: 8px;
}
.ew-vdp-price-sale {
  color: #de1c21;
}
.ew-vdp-save {
  font-size: 14px;
  color: #47916f;
  margin: 4px 0 0;
}

/* --- Monthly Payment Card --- */
.ew-vdp-payment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e9eaeb;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.ew-vdp-payment-label {
  font-size: 12px;
  color: #414651;
  margin: 0;
}
.ew-vdp-payment-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.ew-vdp-payment-price {
  font-size: 24px;
  font-weight: 600;
  color: #47916f;
}
.ew-vdp-payment-period {
  font-size: 12px;
  color: #181d27;
}
.ew-vdp-payment-note {
  font-size: 12px;
  color: #414651;
  margin: 2px 0 0;
}


/* --- Third-party mount point (hidden when empty) --- */
.ol-target-element:empty { display: none; }

/* --- Action Icons Bar --- */
.ew-vdp-actions {
  display: flex;
  justify-content: space-around;
  border: 1px solid #e9eaeb;
  border-radius: 8px;
  padding: 16px 12px;
  margin-bottom: 16px;
}
.ew-vdp-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  cursor: pointer;
  text-decoration: none;
}
.ew-vdp-action:hover { color: var(--accent, #de1c21); }
.ew-vdp-action svg { stroke: currentColor; }

/* --- Disclaimer --- */
.ew-vdp-disclaimer {
  font-size: 12px;
  color: #000;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* --- Below Sections --- */
.ew-vdp-below {
  margin: 0;
  padding: 0;
}

.ew-vdp-section {
  padding: 24px 0;
}

.ew-vdp-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  margin: 0 0 16px;
}

/* --- Inline description (info column, between price and CTAs — matches ADVL's vdp-inline-desc) --- */
.ew-vdp-inline-desc { margin: 0 0 16px; }
.ew-vdp-inline-desc-text {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ew-vdp-inline-desc-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
}
.ew-vdp-inline-desc-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: #006883;
  cursor: pointer;
  font-weight: 500;
}
.ew-vdp-inline-desc-toggle:hover { text-decoration: underline; }

.ew-vdp-divider {
  height: 1px;
  background: #f5f5f5;
}

/* --- Specs Row --- */
.ew-vdp-specs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ew-vdp-spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow-wrap: break-word;
}
.ew-vdp-spec-label {
  font-size: 14px;
  font-weight: 400;
  color: #535862;
}
.ew-vdp-spec-value {
  font-size: 14px;
  font-weight: 500;
  color: #181d27;
}

.ew-vdp-vin {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
}

/* --- Feature Accordion (Design/Performance/Technology categories) --- */
.ew-vdp-feature-category {
  border-bottom: 1px solid #e9eaeb;
}
.ew-vdp-feature-category:last-child {
  border-bottom: none;
}
.ew-vdp-feature-category-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #181d27;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  margin-top: 8px;
  border-radius: 2px;
}
.ew-vdp-feature-category-title::-webkit-details-marker { display: none; }
.ew-vdp-feature-category-title::after {
  content: '▾';
  font-size: 16px;
  transition: transform 0.2s;
}
details[open] > .ew-vdp-feature-category-title::after {
  transform: rotate(-180deg);
}
.ew-vdp-feature-list {
  list-style: none;
  padding: 12px 16px 16px;
  margin: 0;
}
.ew-vdp-feature-item {
  margin-bottom: 10px;
  font-size: 14px;
  color: #181d27;
  line-height: 1.6;
}
.ew-vdp-feature-item:last-child { margin-bottom: 0; }
.ew-vdp-feature-item strong {
  font-weight: 700;
}

/* ================================================================
   TABLET+ (min-width: 769px)
   ================================================================ */
@media (min-width: 769px) {
  .vdp-dots { display: none; }
  .ew-vdp-thumb-strip { display: flex; }

  .ew-vdp {
    display: flex;
    gap: 24px;
  }

  .ew-vdp-gallery {
    flex: 1 1 0;
    min-width: 0;
    margin-bottom: 0;
  }

  .ew-vdp-info {
    flex: 0 1 340px;
    padding: 0;
  }

  .ew-vdp-thumbs .vdp-thumb {
    flex: 0 0 100px;
    height: 100px;
  }

  .ew-vdp-thumb-strip .thumb-nav {
    height: 100px;
  }

  .ew-vdp-specs-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .ew-vdp-below {
    padding: 0 16px;
  }
}

/* ================================================================
   DESKTOP (min-width: 1025px)
   ================================================================ */
@media (min-width: 1025px) {
  .ew-vdp-title {
    font-size: 30px;
  }

  .ew-vdp-specs-row {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 32px;
  }

  .ew-vdp-below {
    padding: 0;
  }

  .ew-vdp-breadcrumb {
    padding: 0;
  }

  .ew-vdp {
    padding: 0;
  }
}

/* --- Hide base VDP styles that shouldn't show --- */
.vdp-product,
.vdp-specs,
.vdp-disclaimer {
  display: none;
}

/* --- Prequalify Lead Capture Modal (temp — revert when Octane delivers) --- */
.ew-prequal-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ew-prequal-modal[hidden] { display: none; }

.ew-prequal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.ew-prequal-inner {
  position: relative;
  z-index: 1;
  width: min(440px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
}

.ew-prequal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.08);
  color: #414651;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.ew-prequal-close:hover { background: rgba(0, 0, 0, 0.15); }

.ew-prequal-content {
  padding: 24px 24px 28px;
}

.ew-prequal-title {
  font-size: 22px;
  font-weight: 700;
  color: #181d27;
  margin: 0 0 4px;
}

.ew-prequal-subtitle {
  font-size: 14px;
  color: #717680;
  margin: 0 0 16px;
}

/* dot-form overrides inside modal */
#ew-prequal-form-wrap dot-form form {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

#ew-prequal-form-wrap dot-form-column {
  margin: 0 0.5rem;
}

#ew-prequal-form-wrap dot-form-row {
  margin-bottom: 0;
}

#ew-prequal-form-wrap dot-form .dot-form__buttons {
  position: relative !important;
  margin-top: 12px;
  padding: 0;
}

#ew-prequal-form-wrap .dot-form__required-mark {
  margin-bottom: 8px;
}

#ew-prequal-form-wrap dot-form input[type="text"],
#ew-prequal-form-wrap dot-form input[type="email"],
#ew-prequal-form-wrap dot-form input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5d7da;
  border-radius: 8px;
  font-size: 15px;
  color: #181d27;
  background: #fff;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

#ew-prequal-form-wrap dot-form input:focus {
  outline: none;
  border-color: #006883;
  box-shadow: 0 0 0 3px rgba(0, 104, 131, 0.12);
}

#ew-prequal-form-wrap dot-form label {
  font-size: 13px;
  font-weight: 500;
  color: #414651;
}

#ew-prequal-form-wrap dot-form button[type="submit"] {
  width: 100%;
  padding: 0;
  background: #192B3B;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin: 8px 0;
}

#ew-prequal-form-wrap dot-form button[type="submit"]:hover { opacity: 0.9; }
#ew-prequal-form-wrap dot-form button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; }

/* Hide the reset button in the modal form */
#ew-prequal-form-wrap dot-form button[type="reset"] { display: none; }

.ew-request-more-info-success {
  text-align: center;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ew-request-more-info-success h3 {
  font-size: 20px;
  font-weight: 700;
  color: #181d27;
  margin: 16px 0 8px;
}

.ew-request-more-info-success p {
  font-size: 14px;
  color: #717680;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .ew-prequal-content {
    padding: 24px 20px;
  }
}
