body { background: #f8f9fa; margin: 0; font-family: 'Segoe UI', Arial, sans-serif; }
.view-car-container {
  background: #fff;
  max-width: 900px;
  margin: 40px auto 32px auto;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  padding: 36px 32px 32px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}
.view-car-details {
  flex: 1 1 320px;
  min-width: 260px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.view-car-title {
  font-size: 2.1em;
  font-weight: 700;
  color: #22223b;
  margin-bottom: 8px;
}
.view-car-attr {
  font-size: 1.1em;
  color: #444;
  margin-bottom: 4px;
}
.view-car-price {
  font-size: 1.5em;
  color: #22c55e;
  font-weight: 700;
  margin-bottom: 12px;
}
.view-car-posted-date {
  font-size: 0.95em;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 16px;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  display: inline-block;
}
.view-car-desc {
  margin-top: 10px;
  color: #555;
  font-size: 1.08em;
}
.view-car-photos {
  flex: 1 1 320px;
  min-width: 260px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.view-car-photos .featured-photo {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  margin-bottom: 8px;
  object-fit: cover;
  aspect-ratio: 4/3;
}
.additional-photos-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: 100%;
  box-sizing: border-box;
}
.additional-photo {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  flex: 0 0 auto;
}
.featured-photo {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  margin-bottom: 8px;
}
.additional-photos-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.additional-photo {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  flex: 0 0 auto;
}
@media (max-width: 900px) {
  .view-car-container {
    flex-direction: column;
    padding: 18px 6vw 24px 6vw;
    gap: 24px;
  }
  .view-car-photos {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .view-car-details {
    order: 2;
    max-width: 100%;
    min-width: 0;
  }
  .featured-photo {
    max-width: 100%;
  }
  .additional-photos-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    box-sizing: border-box;
    border-radius: 0 0 10px 10px;
    scrollbar-width: thin;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  .additional-photo {
    max-width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    flex: 0 0 auto;
    margin-right: 0;
  }
}
.view-car-back {
  display: inline-block;
  margin: 24px 0 0 32px;
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.08em;
  transition: color 0.2s;
}
.view-car-back-top-link {
  display: block;
  margin: 32px auto 16px auto;
  color: #888;
  background: none;
  font-weight: 500;
  font-size: 1.08em;
  text-align: center;
  max-width: 220px;
  text-decoration: underline;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.view-car-back-top-link:hover {
  color: #555;
}
.view-car-back:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Contact Section Styles */
.contact-section {
  margin-top: 24px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.contact-section h3 {
  margin: 0 0 16px 0;
  color: #1e293b;
  font-size: 1.3em;
  font-weight: 600;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.contact-method.primary {
  border-color: #6366f1;
  background: #f0f9ff;
}

.contact-method.secondary {
  opacity: 0.8;
}

.contact-method.login-required {
  opacity: 0.7;
  background: #f9fafb;
}

.contact-label {
  font-weight: 500;
  color: #374151;
  min-width: 140px;
  padding-top: 6px;
}

.contact-link {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.contact-link:hover {
  background: #6366f1;
  color: white;
}

.contact-link.btn-primary {
  background: #6366f1;
  color: white;
}

.contact-link.btn-primary:hover {
  background: #5855eb;
  transform: translateY(-1px);
}

.contact-unavailable {
  color: #64748b;
  font-style: italic;
  margin: 0;
  padding: 8px 0;
}

.seller-info {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-top: 16px;
}

.seller-info p {
  margin: 0;
  color: #374151;
  font-size: 1.05em;
}

/* Owner Viewing Own Ad Styles */
.contact-section.owner-ad {
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
}

.owner-info p {
  margin: 0 0 15px 0;
  color: #0369a1;
  font-weight: 500;
}

.owner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.owner-actions .btn {
  padding: 8px 16px;
  font-size: 0.9em;
}

.login-note {
  font-style: italic;
  color: #6b7280;
}

.login-note .contact-link {
  color: #6366f1;
  text-decoration: underline;
}

.login-note .contact-link:hover {
  color: #5855eb;
  background: transparent;
}

.login-required-msg {
  display: block;
  width: 100%;
  color: #6b7280;
  font-size: 0.9em;
  font-style: italic;
  margin-top: 8px;
  margin-bottom: 0;
  font-weight: normal;
}

.login-required-msg-row {
  width: 100%;
  padding: 8px 16px 12px 16px;
  margin-top: -1px;
  background: #f0f9ff;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-sizing: border-box;
}

.contact-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.reveal-contact-btn {
  background: #6366f1;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
}

.reveal-contact-btn:hover {
  background: #5855eb;
  transform: translateY(-1px);
}

.reveal-contact-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.revealed-contact {
  margin-top: 4px;
}

.revealed-link {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.revealed-link:hover {
  background: #6366f1;
  color: white;
}

.revealed-email-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
}

.revealed-email-address {
  font-weight: 500;
  color: #374151;
  font-family: monospace;
  font-size: 0.9em;
  background: #f3f4f6;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  word-break: break-all;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
  line-height: 1.4;
}

.send-email-btn {
  background: #6366f1;
  color: white !important;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.9em;
}

.send-email-btn:hover {
  background: #5855eb;
  transform: translateY(-1px);
}
