/* ============================================================
   detail.css — Halaman Detail (Modern & Clean UI)
   Berisi: Base, Header, Spesifikasi, Galeri, Lightbox, Footer
   ============================================================ */

/* ============================================================
   1. BASE & RESET
============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden; /* Mencegah scrollbar horizontal */
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: #f4f7fc;
  color: #1e2a41;
  line-height: 1.6;
  padding: 2rem 1.5rem 0;
  min-height: 100vh;
}

/* ============================================================
   2. CONTAINER & CARD
============================================================ */
.detail-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1.5rem;
  color: #1e5fa8;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  background: #fff;
  border-radius: 30px;
  border: 1px solid #e3ebf5;
  transition: all 0.25s ease;
}

.btn-back:hover {
  background: #1e5fa8;
  color: #fff;
  transform: translateX(-3px);
  box-shadow: 0 6px 14px -4px rgba(30, 95, 168, 0.4);
}

.detail-card {
  background: #fff;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 15px 40px -12px rgba(0, 20, 40, 0.15);
  border: 1px solid #e3ebf5;
}

/* ============================================================
   3. HEADER INFO
============================================================ */
.detail-info {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eef3f9;
}

.detail-info h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #0f1c2e;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
  color: #4b5b73;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-uploader {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: #2b3e58;
  background: linear-gradient(135deg, #e8f0fe, #f0f6ff);
  padding: 10px 18px;
  border-radius: 30px;
  border: 1px solid #d2e0f0;
}

.detail-uploader strong {
  color: #1e5fa8;
}

/* ============================================================
   4. SPESIFIKASI KENDARAAN
============================================================ */
.detail-specs {
  margin: 30px 0;
  padding: 24px;
  background: linear-gradient(180deg, #f8fbff 0%, #f0f6ff 100%);
  border: 1px solid #e3ebf5;
  border-radius: 18px;
}

.detail-specs h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f1c2e;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e3ebf5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e3ebf5;
  transition: all 0.25s ease;
}

.spec-item:hover {
  border-color: #1e5fa8;
  box-shadow: 0 8px 16px -6px rgba(30, 95, 168, 0.15);
  transform: translateY(-3px);
}

.spec-label {
  font-size: 0.7rem;
  color: #6a7d99;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: 1rem;
  color: #0f1c2e;
  font-weight: 600;
  word-break: break-word;
}

/* Harga lebih menonjol */
.spec-harga {
  background: linear-gradient(135deg, #e8f0fe 0%, #dce9fb 100%);
  border: 1px solid #b8d0ef;
}

.spec-harga .spec-label {
  color: #1e5fa8;
}

.spec-harga .spec-value {
  color: #1e5fa8;
  font-size: 1.15rem;
  font-weight: 800;
}

/* ============================================================
   5. GALERI GAMBAR
============================================================ */
.detail-card > h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f1c2e;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eef3f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.detail-gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 16px;
  background: #e8f0fe;
  box-shadow: 0 4px 12px -4px rgba(0, 20, 40, 0.15);
  border: 1px solid #e3ebf5;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 4 / 3;
}

.detail-gallery-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 30px -10px rgba(30, 95, 168, 0.35);
  border-color: #1e5fa8;
}

.detail-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.detail-gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-number {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* ============================================================
   6. DESKRIPSI & TIMESTAMP
============================================================ */
.description.detail-desc {
  margin-top: 2rem;
  padding: 18px 20px;
  background: #f8fbff;
  border-left: 4px solid #1e5fa8;
  border-radius: 0 12px 12px 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #2b3e58;
}

.description.detail-desc strong {
  display: block;
  margin-bottom: 6px;
  color: #0f1c2e;
  font-size: 1.05rem;
}

.description.detail-desc p {
  margin: 0;
}

.timestamp {
  font-size: 0.85rem;
  color: #7c8ea8;
  border-top: 1px dashed #cfddee;
  padding-top: 1rem;
  margin-top: 1.5rem;
  text-align: right;
  font-style: italic;
}

/* ============================================================
   7. LIGHTBOX
============================================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox img {
  max-width: 90%;
  max-height: 88%;
  border-radius: 12px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  font-weight: 300;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
  user-select: none;
  z-index: 10;
}

.lightbox-close:hover {
  background: #e74c3c;
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  user-select: none;
  z-index: 10;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox-nav:hover {
  background: #1e5fa8;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-prev { left: 25px; }
.lightbox-next { right: 25px; }

.lightbox-counter {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  user-select: none;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================================
   8. FOOTER
============================================================ */
.site-footer {
  background: linear-gradient(180deg, #16191f 0%, #0c0e12 100%);
  color: #c9cdd4;
  border-top: 3px solid #1e5fa8;
  margin-top: 80px;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 60px 40px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 45px;
}

.footer-col h3 {
  color: #fff;
  font-size: 24px;
  margin: 0 0 15px;
  letter-spacing: 0.5px;
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin: 0 0 20px;
  position: relative;
  padding-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #1e5fa8, #4a8fd4);
  border-radius: 2px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  color: #9aa0a8;
  margin: 0 0 20px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 12px;
  font-size: 14px;
}

.footer-col ul li a {
  color: #9aa0a8;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-block;
  position: relative;
}

.footer-col ul li a:hover {
  color: #4a8fd4;
  transform: translateX(5px);
}

.footer-contact li {
  color: #9aa0a8;
  line-height: 1.8;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #1e222a;
  border-radius: 12px;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #2a2f38;
}

.footer-social a:hover {
  background: linear-gradient(135deg, #1e5fa8, #4a8fd4);
  border-color: #1e5fa8;
  transform: translateY(-4px) rotate(5deg);
  box-shadow: 0 8px 18px rgba(30, 95, 168, 0.45);
}

.footer-bottom {
  border-top: 1px solid #22262e;
  background: #0a0c0f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 40px;
  font-size: 13px;
  color: #7d838c;
  max-width: 100%;
  margin: 0 auto;
}

.footer-bottom p { margin: 0; }
.footer-bottom strong { color: #fff; }
.footer-tagline {
  color: #4a8fd4;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ============================================================
   9. RESPONSIVE
============================================================ */

/* Tablet */
@media (max-width: 900px) {
  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    padding: 50px 30px 30px;
  }
  .footer-bottom {
    padding: 20px 30px;
  }
}

/* HP */
@media (max-width: 600px) {
  body {
    padding: 1.25rem 0.75rem;
  }
  .detail-card {
    padding: 1.5rem;
    border-radius: 18px;
  }
  .detail-info h1 {
    font-size: 1.6rem;
  }
  .detail-meta {
    font-size: 0.85rem;
    gap: 0.8rem;
  }
  .specs-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .spec-item {
    padding: 12px 14px;
  }
  .detail-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .detail-gallery-item {
    border-radius: 12px;
  }
  .gallery-number {
    width: 24px;
    height: 24px;
    font-size: 11px;
    top: 6px;
    left: 6px;
  }
  
  /* Lightbox HP */
  .lightbox {
    padding: 10px;
  }
  .lightbox img {
    max-width: 95%;
    max-height: 80%;
  }
  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 32px;
    width: 40px;
    height: 40px;
  }
  .lightbox-counter {
    font-size: 12px;
    padding: 6px 14px;
    bottom: 15px;
  }

  /* Footer HP */
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 20px 20px;
    gap: 30px;
  }
  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .footer-social {
    justify-content: center;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
}

/* HP Kecil */
@media (max-width: 380px) {
  .detail-gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}