@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
/* Variabel, reset dan tipografi. */
:root {
  --brand-950: #212121;
  --brand-900: #5c0a0a;
  --brand-800: #9f0000;
  --brand-700: #c90000;
  --brand-600: #d60000;
  --brand-500: #ec0000;
  --brand-300: #efaaaa;
  --brand-100: #fee2e2;
  --brand-50: #fff5f5;
  --ink: #212121;
  --muted: #616161;
  --line: #e8e3e3;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --bg: var(--surface);
  --shadow: 0 18px 50px rgba(33,33,33,.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans',system-ui,sans-serif;
  color: var(--ink);
  margin: 0;
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,input,textarea,select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: wait;
}

a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline: 3px solid var(--brand-700);
  outline-offset: 3px;
}

[hidden] {
  display: none!important;
}

.wrap {
  width: min(1120px,calc(100% - 48px));
  margin-inline: auto;
}

.narrow {
  max-width: 650px;
}

.section-space {
  padding: 76px 0 92px;
}

h1,h2,h3 {
  font-family: 'Plus Jakarta Sans',system-ui,sans-serif;
  line-height: 1.18;
  letter-spacing: -.045em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.35rem,5.4vw,4.15rem);
}

h2 {
  font-size: clamp(1.65rem,3.3vw,2.65rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 15px;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.85;
}

.eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--brand-800);
  display: inline-block;
  margin-bottom: 14px;
}

.small-muted,.hint,small {
  font-size: .8rem;
  color: var(--muted);
}

/* Header dan navigasi. */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  gap: 16px;
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.03em;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  width: 192px;
  max-width: 100%;
  height: auto;
}


.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: .89rem;
  font-weight: 700;
}

.site-nav a:hover,.nav-link:hover {
  color: var(--brand-800);
}

.inline {
  display: inline;
}

.nav-link {
  border: 0;
  background: none;
  color: inherit;
  font-size: .89rem;
  font-weight: 700;
  padding: 0;
}

/* Beranda dan katalog. */
.hero {
  background: var(--brand-50);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 4vw;
  align-items: center;
  min-height: 570px;
  padding-block: 72px;
}

.hero h1 {
  font-size: clamp(2.8rem,5vw,4.8rem);
}

.hero h1 em {
  font-style: normal;
  color: var(--brand-800);
}

.hero p {
  max-width: 530px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--brand-100);
  padding: 14px 21px;
  font-weight: 800;
  font-size: .91rem;
  transition: .15s;
  line-height: 1.2;
}

.button.primary {
  background: var(--brand-700);
  color: #fff;
}

.button.primary:hover {
  background: var(--brand-800);
  transform: translateY(-1px);
}

.button.ghost {
  background: transparent;
  color: var(--brand-700);
  border-color: var(--brand-300);
}

.button.small {
  padding: 10px 14px;
  font-size: .8rem;
}

.button.wide {
  width: 100%;
}

.hero-art {
  min-height: 350px;
  position: relative;
}

.art-book {
  position: absolute;
  width: 42%;
  max-width: 190px;
  box-shadow: 12px 20px 32px #21212130;
  border-radius: 3px 7px 7px 3px;
  overflow: hidden;
  background: var(--surface);
}

.art-book img {
  display: block;
  width: 100%;
  height: auto;
}

.art-b1 {
  transform: rotate(-15deg);
  left: 0;
  top: 12%;
  z-index: 1;
}

.art-b2 {
  transform: rotate(-2deg);
  left: 28%;
  top: 2%;
  z-index: 3;
}

.art-b3 {
  transform: rotate(14deg);
  right: 0;
  top: 17%;
  z-index: 2;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 32px;
}

.section-head p {
  max-width: 310px;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 24px;
}

.product-card,.card,.library-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-cover,.detail-cover {
  aspect-ratio: 1.35;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 27px;
  background: linear-gradient(139deg,var(--brand-800),var(--brand-900) 70%,var(--brand-950));
  color: var(--brand-50);
}

.product-cover:before,.detail-cover:before {
  content: '✣';
  position: absolute;
  font-size: 140px;
  opacity: .12;
  right: 12px;
  top: 0;
}

.product-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.cover-kicker,.cover-footer {
  letter-spacing: .15em;
  font-weight: 700;
  font-size: .64rem;
}

.cover-title {
  font: 800 clamp(1.4rem,2.6vw,2rem)/1.15 'Plus Jakarta Sans',sans-serif;
  letter-spacing: -.05em;
  max-width: 270px;
}

.cover-footer {
  display: flex;
  justify-content: space-between;
  opacity: .75;
}

.product-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-body h3 {
  margin-top: 8px;
}

.product-body p {
  font-size: .9rem;
  color: var(--muted);
}

.product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.product-price strong {
  font-size: 1.2rem;
}

.info-banner {
  background: var(--brand-50);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  margin-bottom: 70px;
}

.info-banner p {
  max-width: 400px;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  background: white;
  border: 1px dashed var(--line);
  border-radius: 20px;
  padding: 70px 20px;
}

.empty-icon {
  font-size: 3rem;
  color: var(--brand-700);
}

.empty-state p {
  color: var(--muted);
}

/* Detail produk. */
.breadcrumb {
  font-size: .84rem;
  color: var(--muted);
  margin: -28px 0 35px;
}

.detail-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 7vw;
  align-items: start;
}

.detail-cover {
  aspect-ratio: .8;
  min-height: 440px;
  position: relative;
  box-shadow: 22px 30px 60px #21212126;
  border-radius: 5px 15px 15px 5px;
}

.detail-cover .cover-title {
  font-size: clamp(2rem,4vw,3.6rem);
  max-width: 350px;
}

.detail-content h1 {
  font-size: clamp(2.2rem,4vw,3.65rem);
}

.product-feature {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: .88rem;
  color: var(--brand-900);
  margin: 22px 0;
}

.purchase-panel {
  background: var(--brand-50);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 4vw, 26px);
  margin-top: 28px;
}

.purchase-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
}

.purchase-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.purchase-price-row .huge-price {
  font-size: clamp(1.8rem, 5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -.04em;
  margin: 0;
  overflow-wrap: anywhere;
}

.purchase-price-row .compare-price {
  font-size: .95rem;
}

.purchase-panel small {
  display: block;
  text-align: center;
  margin-top: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.included {
  margin-top: 85px;
  max-width: 780px;
}

.ebook-list {
  border-top: 1px solid var(--line);
}

.ebook-list-item {
  display: flex;
  gap: 20px;
  padding: 21px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.ebook-index {
  font-size: 1.25rem;
  color: var(--brand-300);
  font-weight: 800;
}

.ebook-list-item>div {
  flex: 1;
}

.ebook-list-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.tag {
  padding: 5px 10px;
  background: var(--surface-soft);
  border-radius: 7px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
}

.tag.success {
  background: #dff3e7;
  color: #276a47;
}

/* Checkout dan formulir. */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 38px;
  align-items: start;
}

.form-stack {
  display: grid;
  gap: 20px;
}

.card {
  padding: 30px;
}

.form-stack label {
  font-weight: 700;
  font-size: .88rem;
  display: grid;
  gap: 8px;
}

.form-stack label small {
  font-weight: 400;
}

.form-stack input:not([type=checkbox]),.form-stack select,.form-stack textarea {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 9px;
  padding: 14px;
  width: 100%;
  color: var(--ink);
}

.form-stack input:focus,.form-stack textarea:focus {
  border-color: var(--brand-800);
  outline: 2px solid var(--brand-100);
}

.form-stack .checkline {
  display: flex;
  align-items: flex-start;
  font-weight: 400;
  font-size: .83rem;
  line-height: 1.5;
}

.checkline input {
  margin-top: 4px;
  accent-color: var(--brand-700);
}

.checkline a {
  text-decoration: underline;
}

.form-message {
  font-size: .86rem;
  margin: 0;
  color: #276a47;
}

.form-message[data-state=error] {
  color: #af3737;
}

.order-summary {
  background: var(--brand-50);
  position: sticky;
  top: 105px;
}

.order-summary p {
  color: var(--muted);
  font-size: .9rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 17px 0;
  margin: 0;
}

.order-summary .summary-row {
  margin: 18px 0;
}

.summary-row strong {
  font-size: 1.16rem;
}

.bank-box {
  background: var(--brand-50);
  border-radius: 12px;
  padding: 20px;
}

.bank-box h3 {
  margin: 5px 0;
}

.bank-box p {
  margin: 0;
  font-size: .89rem;
  color: var(--muted);
}

.checkout-complete {
  border-color: #b9d9bf;
}

.success-icon {
  font-size: 2.5rem;
  background: #dfefdf;
  color: #267b56;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.order-chip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--brand-50);
  padding: 15px;
  border-radius: 9px;
}

/* Perpustakaan dan akun. */
.library-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 35px;
}

.account-chip {
  background: var(--surface-soft);
  padding: 16px 22px;
  border-radius: 12px;
  display: grid;
  font-size: .85rem;
  min-width: 250px;
}

.account-chip span {
  color: var(--muted);
  font-size: .73rem;
}

.library-grid {
  display: grid;
  gap: 23px;
}

.library-card {
  padding: 27px;
}

.library-card-header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin-bottom: 16px;
}

.library-card-header h2 {
  font-size: 1.4rem;
  margin: 7px 0;
}

.library-ebook {
  display: flex;
  gap: 17px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}

.library-ebook:last-child {
  border: 0;
}

.library-ebook strong {
  flex: 1;
}

.mini-book {
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 8px;
  padding: 9px;
  font-size: 1.4rem;
}

.article h2 {
  font-size: 1.45rem;
  margin: 30px 0 12px;
}

.article p {
  color: var(--muted);
}

/* Footer. */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 36px 0 28px;
}

.footer-identity img {
  display: block;
  width: 160px;
  height: auto;
}

.footer-identity p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 18px 0;
  font-size: .78rem;
  color: var(--muted);
}

.footer-contact {
  min-width: 0;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-contact h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.footer-contact-links {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px 32px;
}

.footer-contact-links a {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.footer-contact-links span {
  color: var(--muted);
  font-size: .78rem;
}

.footer-contact-links a:hover strong {
  color: var(--brand-700);
}

.consent-banner {
  position: fixed;
  z-index: 90;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: 0 12px 60px #0002;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(740px,calc(100% - 32px));
}

.consent-banner p {
  font-size: .85rem;
  flex: 1;
  margin: 0;
}

.consent-banner>div {
  display: flex;
  gap: 6px;
}

.consent-banner .button {
  padding: 9px;
}

/* Responsivitas dasar; urutan cascade dipertahankan. */
@media(max-width:840px) {
  .hero-grid,.detail-grid,.checkout-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    width: min(100%,440px);
    min-height: 340px;
    margin: 20px auto 0;
  }

  .product-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .order-summary {
    position: static;
  }

  .detail-cover {
    max-width: 400px;
    min-height: 420px;
  }

  .library-heading,.section-head {
    align-items: flex-start;
    flex-direction: column;
  }

}

@media(max-width:560px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-logo {
    width: 128px;
  }

  .site-nav {
    gap: 12px;
    font-size: .74rem;
  }

  .site-nav a:nth-child(1) {
    display: none;
  }

  .section-space {
    padding: 45px 0 66px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: 450px;
    padding: 50px 0;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .info-banner {
    flex-direction: column;
    padding: 25px;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
    padding: 28px 0;
  }

  .footer-contact-links {
    grid-template-columns: minmax(0,1fr);
    gap: 14px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card,.library-card {
    padding: 20px;
  }

  .detail-cover {
    min-height: 380px;
  }

  .account-chip {
    min-width: 100%;
  }

  .library-ebook {
    flex-wrap: wrap;
  }

  .library-ebook .button {
    margin-left: auto;
  }

  .consent-banner {
    display: block;
  }

  .consent-banner>div {
    margin-top: 12px;
  }

}

/* Status formulir publik; struktur dan desain halaman dipertahankan. */
.form-message[data-state="warning"] {
  color: #815600;
}

#checkout-email-status[data-state="warning"] {
  padding: 12px 14px;
  border: 1px solid #e5cb8c;
  border-radius: 8px;
  background: #fff8e6;
}

form[aria-busy="true"] button[type="submit"] {
  cursor: wait;
}

form button[type="submit"]:disabled {
  opacity: .65;
}

:focus-visible {
  outline: 2px solid var(--brand-700);
  outline-offset: 3px;
}

/* Kontak bantuan setelah checkout dan pada konfirmasi pembayaran. */
.admin-contact {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: left;
}

.admin-contact h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.admin-contact p {
  margin: 0 0 14px;
  line-height: 1.6;
}

.admin-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-contact small {
  display: block;
  color: var(--muted);
  line-height: 1.6;
}

.admin-contact [hidden] {
  display: none!important;
}

@media(max-width:560px) {
  .admin-contact-links .button {
    flex: 1;
    white-space: nowrap;
  }

}

/* Sampul katalog memenuhi area persegi; bagian tepi boleh terpotong. */
.product-cover-image {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: minmax(0,1fr);
  place-items: center;
  padding: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-soft);
}

.product-cover-image::before { content: none; }
.product-cover-image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.image-unavailable {
  align-self: center;
  justify-self: center;
  padding: 12px;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.5;
  text-align: center;
}

/* Scroll snap juga berfungsi tanpa JS; tombol ditampilkan setelah enhancement. */
.product-gallery {
  width: 100%;
  min-width: 0;
}

.product-gallery-track {
  display: flex;
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4/5;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-300) var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
  direction: ltr;
}

.product-gallery-slide {
  display: grid;
  grid-template-rows: minmax(0,1fr);
  place-items: center;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  padding: 12px;
  margin: 0;
  scroll-snap-align: start;
}

.product-gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.product-gallery-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.product-gallery-controls .button { min-width: 44px; min-height: 44px; }
.product-gallery-controls .button:disabled { cursor: default; }
.product-gallery-position { font-size: .8rem; color: var(--muted); text-align: center; }

.product-gallery-thumbnails {
  display: flex;
  position: relative;
  gap: 10px;
  max-width: 100%;
  padding: 4px;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-300) var(--surface-soft);
  overscroll-behavior-inline: contain;
}

.product-gallery-thumbnail {
  display: grid;
  grid-template-rows: minmax(0,1fr);
  place-items: center;
  flex: 0 0 72px;
  width: 72px;
  height: 80px;
  padding: 5px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.product-gallery-thumbnail img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.product-gallery-thumbnail[aria-current="true"] { border-color: var(--brand-700); background: var(--brand-50); }
.product-gallery-thumbnail:hover { border-color: var(--brand-800); }
.gallery-hint { margin: 10px 0 0; color: var(--muted); font-size: .76rem; }

@media (max-width:560px) {
  .product-gallery-slide { padding: 8px; }
  .product-gallery-thumbnail { flex-basis: 64px; width: 64px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-gallery-track { scroll-behavior: auto; }
}

/* Harga normal opsional; harga jual tetap menjadi total pembayaran. */
.price-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.compare-price {
  display: block;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: line-through;
  overflow-wrap: anywhere;
}
.summary-price {
  text-align: right;
}
.product-price {
  flex-wrap: wrap;
}

/* Sampul produk pada ringkasan checkout. */
.summary-product {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 16px;
}
.summary-thumbnail {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.summary-product-info {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.summary-product-info h3 {
  margin: 0 0 8px;
}
.summary-product-info p {
  margin: 0;
}
@media (max-width: 380px) {
  .summary-product { gap: 10px; }
  .summary-thumbnail { flex-basis: 64px; width: 64px; height: 64px; }
}

.purchase-panel .product-feature {
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
