@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Poppins:wght@400;500&display=swap");

:root {
  --bg-dark: #0f172a;
  --text-light: #f9fafb;
  --card-bg: #1f2937;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --price-strike: #9ca3af;
  --label-free: #22c55e;
  --label-discount: #ef4444;
  --shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 20px 0 30px;
  color: var(--text-light);
}

/* Container & Grid */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.ebook-grid {
  display: grid;
  grid-template-columns: 1fr; /* Default HP: 1 kolom */
  gap: 24px;
  justify-items: center;
}

/* Tablet: 2 kolom */
@media (min-width: 600px) {
  .ebook-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 3 kolom */
@media (min-width: 992px) {
  .ebook-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* eBook Card */
.ebook-card {
  width: 100%;
  max-width: 320px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ebook-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.ebook-thumb {
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
  background-color: #1e293b; /* gelap, biar pas dengan dark mode */
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 8px;
}

.ebook-card:hover .ebook-thumb {
  transform: scale(1.02);
}

.ebook-content {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ebook-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-light);
}

.ebook-desc {
  font-size: 0.65rem;
  line-height: 1.4;
  color: #d1d5db; /* abu terang tapi lembut */
  margin: 6px 0 10px;
  font-weight: 400;
}

.ebook-price {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.price-strike {
  text-decoration: line-through;
  color: var(--price-strike);
  margin-right: 6px;
}

.ebook-labels {
  margin-bottom: 10px;
}

.label {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: white;
}

.label.free {
  background-color: var(--label-free);
}

.label.discount {
  background-color: var(--label-discount);
}

/* Button */
.btn-beli {
  width: 100%;
  padding: 12px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-beli:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Animasi */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInItem 1s forwards;
}

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-delay-1 {
  animation-delay: 0.2s;
}
.fade-delay-2 {
  animation-delay: 0.4s;
}
.fade-delay-3 {
  animation-delay: 0.6s;
}
.fade-delay-4 {
  animation-delay: 0.8s;
}
.fade-delay-5 {
  animation-delay: 1s;
}
.fade-delay-6 {
  animation-delay: 1.2s;
}

/* Responsive */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .ebook-price {
    font-size: 15px;
  }

  .btn-beli {
    font-size: 0.95rem;
    padding: 10px;
  }

  .ebook-title {
    font-size: 18px;
  }
}

.social-icons {
  margin-top: 30px;
}
.social-icons a {
  margin: 0 10px;
  display: inline-block;
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.3s;
}
.social-icons img {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  transition: all 0.3s ease;
}
.social-icons a:hover {
  transform: scale(1.2);
  opacity: 1;
}
.footer {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--footer-color);
}

/* Tambahan styling untuk halaman baca ebook dan formulir */
.page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.ebook-page {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.cta-box {
  background: var(--card-bg);
  padding: 24px;
  text-align: center;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.cta-box h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text-light);
}

.btn-beli.cta {
  width: auto;
  display: inline-block;
  padding: 12px 24px;
  margin-top: 12px;
}

/* Input form styling */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"] {
  padding: 1rem;
  border-radius: 10px;
  border: none;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  margin-bottom: 1rem;
  font-size: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
/* Untuk layar HP (kurang dari 480px) */
@media (max-width: 480px) {
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"] {
    max-width: 100%;
  }
}

/* Placeholder style */
input::placeholder {
  color: #aaa;
  font-size: 0.95rem;
}

/* Tombol submit di dalam form */
form button[type="submit"] {
  background-color: var(--primary);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

form button[type="submit"]:hover {
  background-color: var(--primary-hover);
}

/* Centered image style */
.center-image {
  width: 100%;
  max-width: 400px;
  margin: 20px auto;
  display: block;
}

.disclaimer {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-light);
}

/* =========================
   ETALASE INFO (GEN Z STYLE)
   ========================= */

.etalase-desc {
  margin: 14px auto 22px;
  max-width: 680px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
  opacity: 0.95;
}

/* fitur utama */
.etalase-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}

.etalase-features div {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.18),
    rgba(59, 130, 246, 0.05)
  );
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #e5edff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.etalase-features div:hover {
  transform: translateY(-2px);
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.28),
    rgba(59, 130, 246, 0.12)
  );
}

/* FAQ mini */
.etalase-faq {
  margin: 46px auto 10px;
  max-width: 760px;
  padding: 22px 20px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.9),
    rgba(15, 23, 42, 0.95)
  );
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.etalase-faq p {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.etalase-faq p:last-child {
  margin-bottom: 0;
}

.etalase-faq strong {
  display: inline-block;
  margin-bottom: 4px;
  color: #93c5fd;
  font-weight: 600;
}

/* responsive tweak */
@media (max-width: 480px) {
  .etalase-desc {
    font-size: 0.9rem;
  }

  .etalase-features div {
    font-size: 0.75rem;
    padding: 7px 12px;
  }

  .etalase-faq {
    padding: 18px 16px;
  }
}

/* Paling worth it */
.badge-recommended {
  background: linear-gradient(135deg, #ffb703, #ffd166);
  color: #111;
  box-shadow: 0 4px 10px rgba(255, 183, 3, 0.35);
}

/* Paling dipilih */
.badge-best {
  background: linear-gradient(135deg, #fb5607, #ff7a18);
  color: #fff;
  box-shadow: 0 4px 10px rgba(251, 86, 7, 0.35);
}

/* === BADGE DI AREA GAMBAR (FINAL & STABIL) === */
.ebook-thumb-wrapper {
  position: relative;
}

.ebook-thumb-wrapper .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  z-index: 3;
}

.popup-box {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: #334155;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.75rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  animation: fadeInOut 4s ease-in-out;
}

.popup-text {
  font-size: 0.75rem;
  color: white;
}

.popup-time {
  font-size: 0.65rem;
  opacity: 0.75;
  margin-top: 4px;
  color: white;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  10%,
  90% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 480px) {
  .popup-box {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

.popup-link {
  display: block; /* seluruh box bisa diklik */
  color: inherit; /* ikut warna putih popup */
  text-decoration: none; /* HILANGKAN GARIS BAWAH */
}

.popup-link:hover {
  color: inherit;
  text-decoration: none;
}
