/* ============================================================
   Home page — Pasar Hyundai
   ============================================================ */

/* ========== Hero Slider ========== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 480px;
  max-height: 720px;
  overflow: hidden;
  background: #000;
}

.hero-slides { width: 100%; height: 100%; position: relative; }

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  padding: 0 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.hero-caption h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.hero-caption p {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.95;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  font-size: 1.4rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}
.hero-nav:hover { background: rgba(0,0,0,0.7); }
.hero-nav.prev { left: 20px; }
.hero-nav.next { right: 20px; }

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.2s;
}
.hero-dot.active { background: #fff; transform: scale(1.2); }

/* ========== Profile / Sales Section ========== */
.profile-section { padding: 60px 0; background: #fff; }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; gap: 30px; }
}

.recommendation {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #555;
}
.rec-icon {
  width: 40px;
  height: 40px;
  background: var(--hyundai-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.profile-pic-container {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--hyundai-red);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
}
.profile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-meta h2 {
  font-size: 1.4rem;
  color: var(--hyundai-blue);
  margin: 0 0 4px;
  font-weight: 700;
}

.profile-jabatan {
  font-size: 0.85rem;
  color: #555;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.profile-lokasi {
  font-size: 0.85rem;
  color: #777;
  margin: 2px 0 0;
}

.profile-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #444;
  margin: 0 0 20px;
}

/* Showroom slider */
.showroom-slider {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  position: relative;
  aspect-ratio: 4/3;
}

.showroom-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

.showroom-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s;
}
.showroom-slide.active { opacity: 1; }
.showroom-slide img { width: 100%; height: 100%; object-fit: cover; }

/* ========== Product Carousel ========== */
.product-carousel-section { padding: 60px 0; background: #f8f9fa; }

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  padding: 20px 0;
  user-select: none;
  touch-action: pan-y;
}

.carousel-container {
  display: flex;
  cursor: grab;
  transition: transform 0.5s ease;
}

.car-item {
  flex: 0 0 calc(33.333% - 14px);
  margin: 0 7px;
  background: #fff;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.car-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.car-item img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  margin-bottom: 12px;
  transition: transform 0.3s;
}

.car-item:hover img { transform: scale(1.05); }

.car-item h3 {
  font-size: 1rem;
  color: var(--text-dark);
  margin: 0 0 6px;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-price {
  font-size: 0.88rem;
  color: var(--hyundai-blue);
  font-weight: 600;
  margin: 0;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.slide-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: all 0.2s;
}
.slide-dots .dot.active {
  background: var(--hyundai-blue);
  transform: scale(1.2);
}

@media (max-width: 1024px) { .car-item { flex: 0 0 calc(50% - 14px); } }
@media (max-width: 768px)  { .car-item { flex: 0 0 calc(100% - 14px); } }

/* ========== Video Section ========== */
.video-section { padding: 60px 0; }

.video-content {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
  margin-top: 24px;
  align-items: center;
}

@media (max-width: 900px) {
  .video-content { grid-template-columns: 1fr; }
}

.video-info h3 {
  font-size: 1.3rem;
  color: var(--hyundai-blue);
  margin: 0 0 12px;
  font-weight: 700;
}

.video-info p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.video-frame {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.video-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
}

.video-slide {
  min-width: 100%;
  height: 100%;
}
.video-slide iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none;
}

.video-nav button {
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  pointer-events: all;
  transition: background 0.2s;
}
.video-nav button:hover { background: rgba(0,0,0,0.8); }

/* ========== Delivery Section ========== */
.delivery-section { padding: 60px 0; background: #f8f9fa; }

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 1200px) { .delivery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .delivery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .delivery-grid { grid-template-columns: 1fr; } }

.delivery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  cursor: pointer;
  aspect-ratio: 4/3;
  transition: transform 0.2s;
}
.delivery-item:hover { transform: scale(1.02); }
.delivery-item img { width: 100%; height: 100%; object-fit: cover; }

/* Image modal */
.img-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.img-modal.open { display: flex; }

.img-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.img-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
}

@media (max-width: 768px) {
  .hero-slider {
    height: 50vh;
    min-height: 280px;
    max-height: 400px;
  }

  .hero-slide img {
    object-fit: cover;
    object-position: center center;
  }

  .hero-caption {
    bottom: 40px;
    padding: 0 16px;
  }

  .hero-caption h2 {
    font-size: 1.2rem;
    margin: 0 0 4px;
    line-height: 1.3;
  }

  .hero-caption p {
    font-size: 0.8rem;
    display: none;
  }

  .hero-nav {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .hero-nav.prev { left: 10px; }
  .hero-nav.next { right: 10px; }

  .hero-dots {
    bottom: 12px;
    gap: 6px;
  }

  .hero-dot {
    width: 8px;
    height: 8px;
  }

  /* Profile Section Mobile */
  .profile-section { padding: 40px 0; }
  .profile-card { flex-direction: column; text-align: center; gap: 12px; }
  .profile-pic-container { width: 90px; height: 90px; }
  .profile-meta h2 { font-size: 1.2rem; }

  /* Product Carousel Mobile */
  .product-carousel-section { padding: 40px 0; }
  .section-title { font-size: 1.4rem; }
  .section-subtitle { font-size: 0.85rem; margin-bottom: 20px; }

  /* Video Section Mobile */
  .video-section { padding: 40px 0; }
  .video-info h3 { font-size: 1.1rem; }
  .video-info p { font-size: 0.85rem; }

  /* Delivery Section Mobile */
  .delivery-section { padding: 40px 0; }
}
