/* Halaman detail produk (produk/) */

:root {
  --pd-primary: #1e2e8e;
  --pd-primary-dark: #16226b;
  --pd-soft: #eef0fa;
  --pd-border: #e6e8f2;
  --pd-muted: #6b7080;
  --pd-wa: #25d366;
}

.pd { padding-top: 20px; padding-bottom: 60px; }

.pd-back a { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--pd-muted); }
.pd-back a:hover { color: var(--pd-primary); }
.pd-back svg { width: 18px; height: 18px; }

/* ---------- gambar + info ---------- */
.pd-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-top: 16px; }

.pd-gallery { position: sticky; top: 130px; }
.pd-image { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: #f4f5fa; cursor: zoom-in; aspect-ratio: 1 / 1; }
.pd-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.pd-image:hover img { transform: scale(1.6); }
.pd-image__hint { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: 12px; font-weight: 700; color: var(--pd-primary); pointer-events: none; transition: opacity .2s; }
.pd-image__hint svg { width: 16px; height: 16px; }
.pd-image:hover .pd-image__hint { opacity: 0; }

.pd-brand { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--pd-soft); color: var(--pd-primary); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pd-brand:hover { background: var(--pd-primary); color: #fff; }
.pd-title { margin: 12px 0 10px; font-size: 32px; font-weight: 800; line-height: 1.2; color: #000; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-tag { padding: 4px 12px; border: 1px solid var(--pd-border); border-radius: 999px; font-size: 13px; font-weight: 600; color: #3d4152; }
.pd-price { margin: 22px 0; font-size: 34px; font-weight: 800; color: var(--pd-primary); line-height: 1; }

.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border: 0; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.pd-btn svg { width: 20px; height: 20px; flex: none; }
.pd-btn--wa { flex: 1 1 260px; background: var(--pd-wa); color: #fff !important; }
.pd-btn--wa:hover { background: #1eb457; }
.pd-btn--ghost { border: 1px solid var(--pd-border); background: #fff; color: #2b2f3c; }
.pd-btn--ghost:hover { border-color: var(--pd-primary); color: var(--pd-primary); }
.pd-btn--primary { background: var(--pd-primary); color: #fff !important; }

.pd-perks { list-style: none; margin: 26px 0 0; padding: 18px; display: grid; gap: 14px; border-radius: 16px; background: #f7f8fc; }
.pd-perks li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--pd-muted); }
.pd-perks svg { flex: none; width: 22px; height: 22px; color: var(--pd-primary); }
.pd-perks strong { display: block; color: #000; }

/* ---------- deskripsi & detail ---------- */
.pd-sections { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 48px; align-items: start; }
.pd-card { padding: 24px; border: 1px solid var(--pd-border); border-radius: 16px; background: #fff; }
.pd-card h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: #000; }
.pd-desc { color: #3d4152; line-height: 1.75; }
.pd-desc p { margin: 0 0 10px; }
.pd-muted { margin: 0; color: var(--pd-muted); }

.pd-specs { margin: 0; display: grid; }
.pd-specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--pd-border); }
.pd-specs dt { color: var(--pd-muted); }
.pd-specs dd { margin: 0; font-weight: 700; color: #000; text-align: right; }

.pd-terms { margin-top: 16px; }
.pd-terms summary { display: flex; align-items: center; cursor: pointer; list-style: none; font-weight: 700; color: var(--pd-primary); }
.pd-terms summary::-webkit-details-marker { display: none; }
.pd-terms summary::after { content: ""; margin-left: 8px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.pd-terms[open] summary::after { transform: rotate(-135deg); }
.pd-terms ul { margin: 10px 0 0; padding-left: 18px; color: var(--pd-muted); font-size: 14px; line-height: 1.7; }

/* ---------- produk lainnya ---------- */
.pd-related { margin-top: 56px; }
.pd-related__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.pd-related__head h2 { margin: 0; font-size: 22px; font-weight: 800; color: #000; }
.pd-related__head a { font-size: 14px; font-weight: 700; color: var(--pd-primary); white-space: nowrap; }

/* ---------- tidak ditemukan ---------- */
.pd-notfound { padding-top: 80px; padding-bottom: 80px; text-align: center; }
.pd-notfound p { color: var(--pd-muted); margin-bottom: 20px; }

/* ---------- penampil gambar ---------- */
.pd-viewer { padding: 0; border: 0; background: transparent; max-width: min(720px, 92vw); overflow: visible; }
.pd-viewer::backdrop { background: rgba(5, 9, 35, .85); }
.pd-viewer img { display: block; width: 100%; border-radius: 16px; }
.pd-viewer__close { position: absolute; top: -46px; right: 0; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #fff; font-size: 24px; line-height: 38px; cursor: pointer; }

/* ---------- bar pesan HP ---------- */
.pd-buybar { display: none; }

@media screen and (max-width: 999px) {
  .pd-main { grid-template-columns: 1fr; gap: 24px; }
  .pd-gallery { position: static; max-width: 560px; width: 100%; margin: 0 auto; }
  .pd-sections { grid-template-columns: 1fr; }
}

@media screen and (max-width: 640px) {
  .pd { padding-top: 14px; padding-bottom: 150px; }
  .pd-title { font-size: 24px; }
  .pd-price { font-size: 28px; margin: 16px 0; }
  .pd-image:hover img { transform: none; }
  .pd-card { padding: 18px; }
  .pd-actions { flex-wrap: nowrap; }
  .pd-btn--wa { flex: 1 1 auto; min-width: 0; }
  .pd-btn--ghost { flex: none; padding: 14px; }
  .pd-btn--ghost [data-share-label] { display: none; }
  .pd-sections { margin-top: 28px; gap: 16px; }
  .pd-related { margin-top: 36px; }
  .pd-related__head h2 { font-size: 19px; }

  /* tombol pesan menempel di atas nav bawah */
  .pd-buybar { position: fixed; left: 0; right: 0; bottom: 64px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #fff; box-shadow: 0 -4px 14px rgba(0, 0, 0, .08); transform: translateY(100%); opacity: 0; visibility: hidden; transition: transform .25s ease, opacity .25s ease, visibility .25s; }
  .pd-buybar.is-visible { transform: translateY(0); opacity: 1; visibility: visible; }
  .pd-buybar div { min-width: 0; display: flex; flex-direction: column; }
  .pd-buybar__name { font-size: 12px; color: var(--pd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pd-buybar__price { font-size: 17px; font-weight: 800; color: var(--pd-primary); }
  .pd-buybar .pd-btn { flex: none; padding: 11px 26px; }
}
