/* Shared styles for quote / demo / find-a-dealer pages */
.contact-hero {
  background: var(--bg-black);
  color: var(--text-light);
  padding: 12rem 0 4rem;
  text-align: center;
}
.contact-hero h1 {
  font-weight: 200;
  font-size: 3.5rem;
  text-transform: uppercase;
}
.contact-subnav {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg-black);
  border-bottom: 1px solid #222;
  position: sticky;
  top: 60px;
  z-index: 50;
  flex-wrap: wrap;
}
.contact-subnav a {
  padding: 1rem 1.5rem;
  color: #888;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.contact-subnav a:hover { color: #fff; }
.contact-subnav a.active {
  color: #fff;
  border-bottom-color: #fff;
}
/* Avoid global style.css .tab-content { display:none } */
.contact-form-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: block !important;
}
.contact-page-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-subnav a { padding: .75rem 1rem; font-size: .68rem; }
  .contact-hero h1 { font-size: 2.4rem; }
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .4rem;
  color: var(--text-dark);
}
.form-control {
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid var(--border-light);
  font-family: var(--font-main);
  font-size: .9rem;
  background: var(--bg-white);
  color: var(--text-dark);
  transition: border-color .15s;
}
.form-control:focus {
  border-color: var(--text-dark);
  outline: none;
}
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}
.conditional-field { display: none; }
.conditional-field.visible { display: block; }
.success-msg {
  display: none;
  text-align: center;
  padding: 3rem 0;
}
.success-msg i {
  font-size: 3rem;
  color: #000;
  display: block;
  margin-bottom: 1rem;
}
.success-msg p {
  font-weight: 700;
  font-size: 1.1rem;
}
.section-title {
  font-size: 2rem;
  font-weight: 200;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.note-text {
  font-size: .8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: .25rem;
}
.required-star { color: #d00; }
.file-upload-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.file-upload-wrap input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.2rem;
  border: 1px solid var(--text-dark);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
}
.file-upload-label:hover {
  background: var(--text-dark);
  color: #fff;
}
.file-names {
  font-size: .8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

/* ===== Dealer finder layout: list | (detail when open) | map ===== */
.dealer-layout {
  display: grid;
  /* Default: list + map only; detail panel is hidden until a dealer is selected */
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 0;
  min-height: 640px;
  border: 1px solid var(--border-light);
  background: #fff;
}
.dealer-layout.has-detail {
  grid-template-columns: minmax(260px, 320px) minmax(280px, 360px) 1fr;
}
@media (max-width: 1100px) {
  .dealer-layout,
  .dealer-layout.has-detail {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .dealer-map-pane {
    grid-column: 1 / -1;
    min-height: 420px;
  }
  .dealer-layout.has-detail .dealer-detail-pane {
    grid-column: 1 / -1;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }
}
@media (max-width: 700px) {
  .dealer-layout,
  .dealer-layout.has-detail {
    grid-template-columns: 1fr;
  }
  .dealer-map-pane { min-height: 360px; }
}

.dealer-form-pane {
  background: var(--bg-gray);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  border-right: 1px solid var(--border-light);
}
.dealer-form-pane h3 {
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}
.dealer-list-pane {
  flex: 1;
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: .25rem;
}
.dealer-mini-card {
  background: #fff;
  border: 1px solid var(--border-light);
  padding: .85rem 1rem;
  margin-bottom: .65rem;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  overflow: hidden;
}
.dealer-mini-card:hover {
  border-color: var(--text-dark);
  transform: translateX(3px);
}
.dealer-mini-card.active {
  border-color: var(--text-dark);
  border-left: 3px solid var(--text-dark);
}
.dealer-mini-card .dm-name {
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  margin-bottom: .2rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.dealer-mini-card .dm-location {
  font-size: .72rem;
  color: var(--text-muted);
}
.dealer-card-logo {
  background: #fff;
  padding: .35rem 0 .5rem;
  margin-bottom: .35rem;
}
.dealer-card-logo img {
  max-width: 100%;
  max-height: 40px;
  display: block;
  object-fit: contain;
}
.dealer-empty {
  font-size: .85rem;
  color: var(--text-muted);
  padding: 1rem 0;
}

/* Detail panel - fully hidden until a dealer is clicked */
.dealer-detail-pane {
  display: none;
  background: #fff;
  border-right: 1px solid var(--border-light);
  padding: 1.5rem;
  position: relative;
  overflow-y: auto;
  max-height: 640px;
}
.dealer-detail-pane.is-open {
  display: block;
}

.dealer-detail-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  border: 1px solid #ddd;
  background: #fff;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.dealer-detail-close:hover { background: #111; color: #fff; border-color: #111; }
.dealer-detail-logo {
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border-light);
}
.dealer-detail-logo img {
  max-height: 56px;
  max-width: 200px;
  object-fit: contain;
  display: block;
}
.dealer-detail-country {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.dealer-detail-name {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 1.25rem;
  line-height: 1.25;
}
.dealer-detail-body {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 1.5rem;
}
.dealer-detail-row {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .88rem;
  color: #444;
  line-height: 1.45;
}
.dealer-detail-row i {
  color: #000;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 1rem;
}
.dealer-detail-row a { color: inherit; word-break: break-word; }
.dealer-detail-actions {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.dealer-detail-actions .btn {
  width: 100%;
  justify-content: center;
}

.dealer-map-pane {
  position: relative;
  background: #eee;
  min-height: 640px;
}
#dealerMap {
  width: 100%;
  height: 100%;
  min-height: 640px;
}
.map-interact-overlay {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(238, 238, 238, 0.55);
  cursor: pointer;
  transition: opacity .3s;
}
.map-interact-overlay span {
  font-size: .75rem;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.9);
  padding: .4rem .8rem;
  border-radius: 4px;
}
.map-interact-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.flag-icon {
  display: inline-block;
  width: 20px;
  height: 14px;
  vertical-align: middle;
  object-fit: cover;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.dealer-popup-name {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .5rem;
}
.dealer-popup-row {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  font-size: .8rem;
  margin-bottom: .3rem;
  color: #555;
}
.dealer-popup-row i {
  color: #000;
  margin-top: 2px;
  flex-shrink: 0;
}
.dealer-popup-row a { color: inherit; }
