/* ===== Safety reset (prevents horizontal scroll / width mismatch bugs) ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== Layout ===== */
.details-page {
  padding: 60px 70px;
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.cd-photo-col {
  width: 55%;
  min-width: 0;
}

.cd-info-col {
  width: 45%;
  min-width: 0;
}

/* ===== Photo carousel ===== */
.photo-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f2f3f5;
  border-radius: 20px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  cursor: pointer;
  transition: color 0.2s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  color: #163c8c;
}

.favorite-btn.active {
  color: #d4383e;
}

.favorite-btn.active svg {
  fill: #d4383e;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  color: #163c8c;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.carousel-arrow.prev {
  left: 14px;
}

.carousel-arrow.next {
  right: 14px;
}

.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: 0.25s;
}

.dot.active {
  background: #fff;
  width: 18px;
  border-radius: 4px;
}

/* ===== View All Features (text link) ===== */
.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  margin-top: 14px;
  color: #163c8c;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.view-all-link::after {
  content: "›";
  font-size: 17px;
  line-height: 1;
}

.view-all-link:hover {
  color: #d4a22c;
}

/* ===== Verified badge ===== */
.verified-badge {
  display: inline-block;
  background: #eaf6ec;
  color: #1a7f37;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ===== Title / VIN / Price ===== */
.cd-info-col h1 {
  font-size: 40px;
  margin: 0 0 6px 0;
}

.cd-info-col .vin {
  color: #666;
  font-size: 14px;
  margin: 0 0 14px 0;
}

.cd-info-col h2 {
  font-size: 34px;
  color: #d4a22c;
  margin: 0 0 24px 0;
}

/* ===== Finance / Cash toggle ===== */
.payment-toggle {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.toggle-option {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid #dcdcdc;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.toggle-option:hover {
  border-color: #163c8c;
}

.toggle-option.active {
  border-color: #163c8c;
  background: #f2f5fc;
}

.radio-dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  border: 2px solid #163c8c;
  position: relative;
}

.toggle-option.active .radio-dot::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #163c8c;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.option-label {
  margin: 0;
  font-size: 15px;
  color: #333;
}

.option-value {
  margin: 2px 0 0 0;
  font-weight: 700;
  font-size: 16px;
}

/* ===== Finance term panel (immediately follows the toggle) ===== */
.finance-panel {
  background: #f7f8fa;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.finance-title {
  margin: 0 0 12px 0;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.term-btn {
  padding: 10px 0;
  border: 2px solid #dcdcdc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.term-btn:hover {
  border-color: #163c8c;
}

.term-btn.active {
  border-color: #163c8c;
  background: #163c8c;
  color: #fff;
}

.finance-result {
  margin: 0;
  font-size: 15px;
  color: #333;
}

.finance-result span {
  font-weight: 700;
  color: #163c8c;
}

/* ===== Down payment ===== */
.down-payment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f7f8fa;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.down-payment-label {
  font-size: 14px;
  color: #444;
  font-weight: 600;
  min-width: 0;
}

.down-payment-amount {
  font-size: 18px;
  font-weight: 700;
  color: #163c8c;
}

/* ===== Order Now button ===== */
.btn.order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  width: 100%;
  height: auto;
  background: linear-gradient(135deg, #1c4aa8, #102c6e);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  padding: 17px 0;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(16, 44, 110, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn.order-btn::after {
  content: "→";
  font-size: 18px;
  transition: transform 0.15s ease;
}

.btn.order-btn:hover {
  background: linear-gradient(135deg, #204fb0, #123478);
  box-shadow: 0 8px 20px rgba(16, 44, 110, 0.38);
  transform: translateY(-2px);
}

.btn.order-btn:hover::after {
  transform: translateX(4px);
}

.btn.order-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(16, 44, 110, 0.3);
}

.order-status {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
}

.order-status.success {
  color: #1a7f37;
}

.order-status.error {
  color: #e05252;
}

/* ===== Sticky mobile Order Now bar ===== */
.sticky-order-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  padding: 12px 16px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 500;
}

.sticky-order-bar.show {
  transform: translateY(0);
}

.sticky-price {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sticky-label {
  font-size: 11px;
  color: #888;
}

.sticky-amount {
  font-size: 16px;
  font-weight: 700;
  color: #163c8c;
  white-space: nowrap;
}

.sticky-order-bar .btn.order-btn {
  width: auto;
  flex-shrink: 0;
  padding: 13px 22px;
  font-size: 14px;
}

/* ===== Trust section (standalone, below hero) ===== */
.trust-section {
  padding: 20px 70px 80px;
}

.trust-panel {
  max-width: 900px;
  margin: 0 auto;
}

.trust-panel h2 {
  font-size: 26px;
  color: #163c8c;
  margin: 0 0 24px 0;
}

.trust-item {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
}

.trust-item svg {
  width: 26px;
  height: 26px;
  min-width: 26px;
  color: #163c8c;
  margin-top: 2px;
}

.trust-item h4 {
  margin: 0 0 6px 0;
  font-size: 16px;
  color: #222;
}

.trust-item p {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* ===== View All Features modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #fff;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 32px 28px;
  position: relative;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.25s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  background: #f2f3f5;
  color: #555;
  font-size: 22px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: #163c8c;
  color: #fff;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.modal-thumb {
  width: 90px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  color: #163c8c;
}

.modal-vin {
  margin: 0 0 4px 0;
  font-size: 13px;
  color: #777;
}

.modal-price {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #d4a22c;
}

.modal-section {
  margin-bottom: 22px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section h3 {
  margin: 0 0 12px 0;
  font-size: 15px;
  color: #163c8c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.modal-section ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 14px;
  color: #333;
}

.modal-section ul li svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  color: #163c8c;
}

/* ===== Footer ===== */
footer {
  background: #10163a;
  color: #c7cbdd;
  padding: 70px 8% 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid h2 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.footer-grid h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 18px;
}

.footer-grid > div > p {
  line-height: 1.8;
  font-size: 14px;
  color: #a8adc4;
}

.footer-grid > div a {
  display: block;
  color: #a8adc4;
  font-size: 14px;
  margin-bottom: 12px;
  transition: 0.25s;
}

.footer-grid > div a:hover {
  color: #d4a22c;
}

.copyright {
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
  color: #8087a3;
}

/* ===== Payment modal ===== */
.payment-modal-box {
  max-width: 480px;
}

.payment-order-summary {
  font-size: 14px;
  color: #444;
  background: #f7f8fa;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.payment-method-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.method-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  border: 2px solid #dcdcdc;
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  color: #444;
  cursor: pointer;
  transition: 0.2s;
}

.method-tab svg {
  width: 16px;
  height: 16px;
}

.method-tab.active {
  border-color: #163c8c;
  background: #f2f5fc;
  color: #163c8c;
}

.method-panel {
  display: none;
}

.method-panel.active {
  display: block;
}

.coin-select {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.coin-btn {
  flex: 1;
  padding: 10px 0;
  border: 2px solid #dcdcdc;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  transition: 0.2s;
}

.coin-btn.active {
  border-color: #d4a22c;
  background: #fbf3e2;
  color: #a3791f;
}

.deposit-address-box {
  background: #f7f8fa;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.deposit-label {
  font-size: 13px;
  color: #444;
  margin-bottom: 8px;
}

.deposit-address-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.deposit-address-row code {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #18163d;
  word-break: break-all;
  font-family: monospace;
}

.copy-btn {
  flex-shrink: 0;
  background: #163c8c;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.deposit-note {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

.dash-field {
  margin-bottom: 16px;
}

.dash-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
}

.dash-field input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #e2e2e2;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: border-color 0.2s ease;
}

.dash-field textarea {
  box-sizing: border-box;
  width: 100%;
  height: 70px;
  padding: 13px 14px;
  border: 1.5px solid #e2e2e2;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  resize: none;
  overflow-y: auto;
}

.dash-field textarea:focus {
  border-color: #163c8c;
}

.dash-field input:focus {
  border-color: #163c8c;
}

.dash-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #1c4aa8, #102c6e);
  color: #fff;
  border: none;
  padding: 15px 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
}

.dash-submit-btn:hover {
  transform: translateY(-2px);
}

.dash-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.card-note {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin-top: 12px;
}

.card-disclosure {
  font-size: 12.5px;
  color: #555;
  line-height: 1.6;
  background: #f7f8fa;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #444;
  line-height: 1.5;
  margin-bottom: 18px;
  cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #163c8c;
  cursor: pointer;
}

/* ===== Full Image Lightbox ===== */
.lightbox-trigger {
  cursor: zoom-in;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-y;
}

.lightbox-track::-webkit-scrollbar {
  display: none;
}

.lightbox-slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 5;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 5;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.lightbox-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: 0.25s;
}

.lightbox-dots .dot.active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {

  .details-page {
    flex-direction: column;
    padding: 24px 20px 40px;
    gap: 28px;
  }

  .cd-photo-col, .cd-info-col {
    width: 100%;
  }

  .photo-carousel {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
  }

  .verified-badge {
    font-size: 13px;
  }

  .cd-info-col h1 {
    font-size: 28px;
  }

  .cd-info-col h2 {
    font-size: 28px;
  }

  .payment-toggle {
    gap: 12px;
  }

  .toggle-option {
    padding: 14px 12px;
  }

  .option-label {
    font-size: 13px;
  }

  .option-value {
    font-size: 15px;
  }

  .term-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .term-btn {
    padding: 13px 0;
    min-height: 46px;
    font-size: 13px;
  }

  .down-payment {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .down-payment-amount {
    font-size: 20px;
  }

  .btn.order-btn {
    padding: 16px 0;
    font-size: 15px;
  }

  .trust-section {
    padding: 50px 20px 60px;
  }

  .trust-panel h2 {
    font-size: 22px;
  }

  footer {
    padding: 50px 6% 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 32px;
  }

  .sticky-order-bar {
    display: flex;
  }

  /* reserve space so the sticky bar never covers page content */
  body {
    padding-bottom: 84px;
  }

}

@media (max-width: 480px) {

  .details-page {
    padding: 20px 16px 32px;
  }

  .photo-carousel {
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }

  .cd-info-col h1 {
    font-size: 24px;
  }

  .cd-info-col h2 {
    font-size: 25px;
  }

  .payment-toggle {
    flex-direction: column;
  }

  .term-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .term-btn {
    font-size: 12px;
    padding: 12px 0;
  }

  .finance-panel {
    padding: 16px;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px;
  }

  .modal-overlay.active .modal-box {
    transform: translateY(0);
  }

  .modal-header {
    gap: 12px;
  }

  .modal-thumb {
    width: 72px;
    height: 52px;
  }

  .sticky-label {
    display: none;
  }

}