/* ===================================================
   CarConnect — car-detail.css
=================================================== */

.product-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 40px 100px;
}

/* ── Back button ── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 8px;
  color: #8899aa;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  background: rgba(17,34,64,0.5);
  backdrop-filter: blur(10px);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  margin-bottom: 32px;
}

.back-btn:hover {
  color: #e8c96f;
  border-color: rgba(201,168,76,0.4);
  background: rgba(201,168,76,0.06);
}

/* ── Flash message ── */
.flash-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 9px;
  font-size: 13.5px;
  margin-bottom: 28px;
  background: rgba(76,175,124,0.1);
  border: 1px solid rgba(76,175,124,0.28);
  color: #6fcf97;
}

/* ── Product card ── */
.product-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  background: rgba(17,34,64,0.7);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

/* ── Left: image + description ── */
.car-image-section {
  display: flex;
  flex-direction: column;
}

.car-image {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: rgba(10,22,40,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.5s;
}

.car-image img:hover { transform: scale(1.03); }

.car-description {
  padding: 24px 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.car-description h3 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 12px;
}

.desc-box {
  font-size: 13.5px;
  color: #8899aa;
  line-height: 1.75;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom scrollbar for desc-box */
.desc-box::-webkit-scrollbar {
  width: 5px;
}

.desc-box::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
}

.desc-box::-webkit-scrollbar-thumb {
  background: rgba(201,168,76,0.25);
  border-radius: 10px;
}

.desc-box::-webkit-scrollbar-thumb:hover {
  background: rgba(201,168,76,0.45);
}

/* ── Right: details ── */
.car-details {
  padding: 36px 32px 36px 24px;
  display: flex;
  flex-direction: column;
}

.car-details h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  line-height: 1.15;
}

.car-details .price {
  font-size: 26px;
  font-weight: 500;
  color: #e8c96f;
  margin-bottom: 32px;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ── Info grid ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
}

.info-box {
  background: rgba(10,22,40,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 16px 16px 14px;
  transition: border-color 0.25s;
}

.info-box:hover {
  border-color: rgba(201,168,76,0.28);
}

.info-box i {
  font-size: 14px;
  color: #c9a84c;
  margin-bottom: 8px;
  display: block;
}

.info-box p {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8899aa;
  margin-bottom: 4px;
}

.info-box h4 {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
}

/* ── Cart button ── */
.cart-btn {
  margin-top: auto;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #c9a84c 0%, #b8943e 100%);
  color: #0a1628;
  border: none;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 4px 20px rgba(201,168,76,0.25);
}

.cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.4);
  filter: brightness(1.05);
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .product-container { padding: 32px 20px 80px; }
  .product-card { grid-template-columns: 1fr; }
  .car-details { padding: 24px 24px 28px; }
  .car-description { padding: 20px 24px; }
}

@media (max-width: 480px) {
  .info-grid { grid-template-columns: 1fr; }
}