/* ==========================================================================
   HALAMAN DETAIL PRODUK – Andira Utama
   (kartu produk & label memakai gaya dari produk-list.css)
   ========================================================================== */

.detail-page {
  background: #F8F9FA;
}

/* SECTION 1: INFO UTAMA */
.detail-main {
  padding: 139px 0 0;
}

.detail-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 56px;
  align-items: start;
}

.detail-image {
  height: 460px;
  background: #FFFFFF;
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 12px 0;
  font-size: 14px;
  line-height: 21px;
  color: #A4A4A4;
}

.detail-breadcrumb a {
  color: #A4A4A4;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.detail-breadcrumb a:hover {
  color: #1B2B60;
}

.detail-breadcrumb span {
  font-weight: 600;
  color: #606060;
}

.detail-title {
  font-weight: 700;
  font-size: 34px;
  line-height: 48px;
  color: #C3161C;
  margin: 4px 0 0;
}

.detail-category {
  margin-top: 4px;
  font-weight: 500;
  font-size: 14px;
  line-height: 24px;
  color: #777777;
  text-transform: uppercase;
  text-decoration: none;
}

.detail-category:hover {
  color: #1B2B60;
}

.detail-description {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.5;
  color: #4A4A4A;
}

.detail-description p {
  margin: 0 0 12px;
}

.detail-description p:last-child {
  margin-bottom: 0;
}

.detail-actions {
  display: flex;
  align-items: stretch;
  gap: 20px;
  margin-top: 24px;
}

.detail-qty {
  display: flex;
  align-items: center;
  width: 170px;
  height: 50px;
  border: 1px solid #1B2B60;
  background: #FFFFFF;
}

.detail-qty button {
  flex: 0 0 50px;
  height: 100%;
  border: 0;
  background: transparent;
  color: #1B2B60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.detail-qty button:first-child {
  border-right: 1px solid #1B2B60;
}

.detail-qty button:last-child {
  border-left: 1px solid #1B2B60;
}

.detail-qty button:hover {
  background: #F2F4F7;
}

.detail-qty input {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  text-align: center;
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-weight: 500;
  font-size: 16px;
  color: #000000;
  background: transparent;
}

.detail-btn-order {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #C3161C;
  color: #FFFFFF;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.128px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-fast);
}

.detail-btn-order:hover {
  background: #A31112;
}

/* SECTION 2: DETAIL PRODUK */
.detail-spec {
  padding: 60px 0;
}

.detail-spec-title {
  font-weight: 700;
  font-size: 24px;
  line-height: 36px;
  color: #1B2B60;
  margin: 0 0 12px;
}

.detail-spec-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-spec-group h3 {
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: #4A4A4A;
  margin: 0;
}

.detail-spec-group ul,
.detail-spec-group ol {
  margin: 0;
  padding-left: 24px;
}

.detail-spec-group li {
  font-size: 16px;
  line-height: 24px;
  color: #606060;
}

/* Tanpa section detail, beri jarak bawah pada info utama */
.detail-main:last-child,
.detail-main + .detail-related {
  margin-top: 60px;
}

/* SECTION 3: REKOMENDASI PRODUK */
.detail-related {
  background: #FFFFFF;
  padding: 80px 0;
}

.detail-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.detail-related-head > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.detail-related-label {
  padding-left: 24px;
}

.detail-related-title {
  font-weight: 600;
  font-size: 32px;
  line-height: 44px;
  color: #333333;
  margin: 0;
}

.detail-related-nav {
  display: flex;
  gap: 12px;
}

.detail-related-nav[hidden] {
  display: none;
}

.detail-related-arrow {
  width: 48px;
  height: 48px;
  padding: 8px;
  border: 0;
  background: #C51516;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.detail-related-arrow:hover {
  background: #A31112;
}

.detail-related-viewport {
  overflow: hidden;
}

.detail-related-track {
  display: flex;
  gap: 56px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-related-track .produk-card {
  flex: 0 0 calc((100% - 112px) / 3);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .detail-main {
    padding-top: 110px;
  }

  .detail-main-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .detail-image {
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 520px;
  }

  .detail-related-track {
    gap: 24px;
  }

  .detail-related-track .produk-card {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 768px) {
  .detail-main {
    padding-top: 96px;
  }

  /* Breadcrumb, judul & kategori tampil di atas gambar:
     isi kolom info dilebur ke grid utama lalu diurutkan ulang */
  .detail-main-grid {
    gap: 0;
  }

  .detail-info {
    display: contents;
  }

  .detail-breadcrumb { order: 1; }
  .detail-title { order: 2; }
  .detail-category { order: 3; justify-self: start; }
  .detail-image { order: 4; margin-top: 20px; }
  .detail-description { order: 5; }
  .detail-actions { order: 6; }

  .detail-title {
    font-size: 26px;
    line-height: 36px;
  }

  .detail-description {
    font-size: 16px;
  }

  /* Jumlah & tombol Pesan selalu sejajar */
  .detail-actions {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .detail-qty {
    flex: 0 0 150px;
    width: 150px;
  }

  .detail-qty button {
    flex-basis: 44px;
  }

  .detail-btn-order {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }

  .detail-btn-order-extra {
    display: none;
  }

  .detail-spec {
    padding: 48px 0;
  }

  .detail-related {
    padding: 48px 0;
  }

  .detail-related-head {
    align-items: flex-end;
  }

  .detail-related-title {
    font-size: 24px;
    line-height: 32px;
  }

  .detail-related-arrow {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .detail-related-track .produk-card {
    flex-basis: 100%;
  }
}
