/* =========================================================
   AMS – halaman promo. Dipakai di atas /css/style.css (microsite).
   ========================================================= */

/* ---------- State: upcoming / active / ended ---------- */
html:not([data-state="upcoming"]) .when-upcoming,
html:not([data-state="ended"]) .when-ended,
html:not([data-state="active"]) .when-active,
html[data-state="ended"] .when-live { display: none !important; }

/* ---------- Header + countdown ringkas ---------- */
.promo-header .header-inner { gap: 14px; }
.bar-cd { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 7px 12px; border: 1px solid rgba(163, 18, 47, .55); border-radius: 999px; background: var(--red-soft); color: #ffd0d8; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.bar-cd .ico { color: var(--red-ink); }
.bar-cd b { color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.bar-ended { margin-left: auto; color: var(--muted); font-size: .85rem; font-weight: 700; }
.promo-header .header-cta { margin-left: 4px; }

/* ---------- Hero ---------- */
.promo-hero { min-height: min(92vh, 880px); }
.promo-hero h1 { max-width: 820px; }
.code-chip { display: inline-block; padding: 1px 8px; border: 1px dashed rgba(109, 188, 240, .6); border-radius: 6px; background: var(--blue-soft); color: #d8efff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; letter-spacing: .04em; white-space: nowrap; }
.cd-box { margin-top: 28px; }
.cd-label { margin-bottom: 10px; color: #ffb3c0; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.cd { display: inline-grid; grid-template-columns: repeat(4, minmax(68px, 1fr)); gap: 10px; }
.cd-cell { display: flex; flex-direction: column; align-items: center; padding: 12px 8px 10px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(7, 8, 11, .6); backdrop-filter: blur(10px); }
.cd-cell b { color: #fff; font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 850; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cd-cell span { margin-top: 6px; color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.cd-sm .cd-cell { padding: 10px 6px 8px; }
.cd-sm .cd-cell b { font-size: 1.6rem; }
.ended-box { display: flex; flex-direction: column; gap: 4px; max-width: 560px; margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(7, 8, 11, .6); }
.ended-box strong { color: #fff; }
.ended-box span { color: #a6afba; font-size: .9rem; }
.promo-quota { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: #ffd0d8; font-size: .86rem; font-weight: 700; }

/* ---------- Kartu harga promo ---------- */
.promo-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; margin-inline: auto; }
.promo-badge { position: absolute; z-index: 2; top: 14px; right: 14px; padding: 6px 12px; border-radius: 999px; background: var(--red); color: #fff; font-size: .9rem; font-weight: 850; letter-spacing: -.01em; box-shadow: 0 8px 22px rgba(163, 18, 47, .45); }
.promo-price { row-gap: 4px; }
.price-old { color: #7d8792; font-size: .95rem; font-weight: 650; text-decoration-thickness: 1.5px; transition: opacity .2s; }
.price-save { flex-basis: 100%; color: #8ff0b3; font-size: .82rem; font-weight: 700; }
.price-save b { transition: opacity .2s; }
.price-old.swap, .price-save b.swap { opacity: .25; }
.promo-tiers .tier .button-block { margin-top: auto; }
.promo-tiers .tier .ticks { margin-bottom: 22px; }

/* ---------- Helm ---------- */
.promo-helm { background: var(--bg-2); border-block: 1px solid var(--line); }
.helm-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.helm-media { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); }
.helm-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.helm-grid h2 { margin: 14px 0 12px; }
.helm-table-wrap { margin: 22px 0 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.helm-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.helm-table th, .helm-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.helm-table tbody tr:last-child > * { border-bottom: 0; }
.helm-table thead th { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.helm-table tbody th { color: var(--white); font-weight: 750; }
.helm-table tbody th small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.4; }
.helm-table td { white-space: nowrap; }
.helm-table td s { display: block; color: #6f7883; font-size: .78rem; }
.helm-table td strong { color: #fff; font-size: .98rem; }

/* ---------- Galeri ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gallery figure { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(7, 8, 11, .75); backdrop-filter: blur(8px); color: #dfe4ea; font-size: .74rem; font-weight: 700; }
.gallery-note { margin-top: 14px; color: #6f7883; font-size: .78rem; text-align: center; }

/* ---------- Cara klaim ---------- */
.promo-steps { background: var(--bg-2); border-block: 1px solid var(--line); }
.claim-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.claim-steps li { padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.claim-num { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-ink); font-weight: 850; font-size: 1.15rem; }
.claim-steps h3 { margin-bottom: 8px; }
.claim-steps p { color: #9aa4b0; font-size: .9rem; }

/* ---------- S&K ---------- */
.terms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.terms-grid h2 { margin: 14px 0 4px; }
.terms-list li { font-size: .9rem; }

/* ---------- Penutup ---------- */
.final-panel { align-items: flex-start; gap: 18px; }
.final-panel h2 { margin: 0; }
.final-panel .button { margin-top: 4px; }
.final-location { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); color: #a6afba; font-size: .86rem; }
.final-location .ico { color: var(--red-ink); }
.final-location strong { color: var(--white); }
.final-location a { color: var(--blue-ink); font-weight: 700; }
.promo-footer { padding: 0 0 28px; }
.promo-footer .footer-bottom { margin-top: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .promo-header .header-cta { display: none; }
  .promo-tiers { grid-template-columns: 1fr; max-width: 560px; }
  .helm-grid, .terms-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .claim-steps { grid-template-columns: 1fr; }
  .promo-mbar { transform: none; }
}
@media (max-width: 680px) {
  .bar-cd { padding: 6px 10px; font-size: .74rem; gap: 6px; }
  .bar-cd > span { display: none !important; }
  .promo-hero .hero-content { padding-top: 210px; }
  .cd { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 8px; }
  .helm-table th, .helm-table td { padding: 10px 10px; }
}
