/* ================== VARS ================== */
:root {
  --red-top: #eb0b0a;
  --red-bottom: #310404;
  --red-gradient: linear-gradient(180deg, var(--red-top), var(--red-bottom));
  --white: #fff;
  --font-header: 'Poppins', 'Arial', sans-serif;
  --font-body: 'Poppins', 'Arial', sans-serif;
  --header-height-desktop: 60px;
  --header-height-mobile: 50px;
  --max-width: 700px;
  --shadow: 0 2px 12px rgba(235, 11, 10, 0.08);
}

/* ================== BASE ================== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--white);
  font-family: var(--font-body);
  margin: 0;
  color: #222;
}
img { max-width: 100%; display: block; -webkit-user-drag: none; user-select: none; }

/* ================== HEADER ================== */
.main-header {
  background: var(--white);
  box-shadow: 0 5px 20px #24040433;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 0;
}
.header-content { width: 100%; text-align: center; }

/* Logo Text Styling */
.logo-text {
  text-align: center;
  padding: 8px 0;
}

.logo-text-main {
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 2rem;
  color: var(--red-top);
  letter-spacing: 2px;
  display: block;
  line-height: 1.1;
}

.logo-text-subtitle {
  font-family: var(--font-header);
  font-size: 0.9rem;
  color: #222;
  display: block;
  font-weight: 500;
  margin-top: 3px;
}

.logo-text-slogan {
  font-family: var(--font-header);
  font-size: 0.8rem;
  color: #444;
  font-style: italic;
  display: block;
  margin-top: 2px;
}

@media (max-width: 600px) {
  .logo-text-main {
    font-size: 1.6rem;
  }
  .logo-text-subtitle {
    font-size: 0.75rem;
  }
  .logo-text-slogan {
    font-size: 0.7rem;
  }
}

/* ================== CONTAINER ================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 12px;
}

/* ================== TIERS ================== */
.reward-tier {
  margin-bottom: 12px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 12px #eb0b0a14;
  padding: 0 10px 12px 10px;
  overflow: hidden;
}

.tier-header {
  background: var(--red-gradient);
  color: var(--white);
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  padding: 10px 0;
  margin: 0 -10px 12px -10px; /* full bleed */
  border-radius: 12px 12px 0 0;
  letter-spacing: 1px;
  box-shadow: var(--shadow);
}

/* ================== GRID ================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
@media (max-width: 400px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

/* ================== CARD ================== */
.product-card {
  background: var(--white);
  border-radius: 10px;
  padding: 2px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid transparent;       /* <-- supaya hover border kelihatan */
  min-height: 100px;                      /* jaga layout rapi */
}
.product-card:hover,
.product-card:focus-visible {
  border-color: #b50909;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px #eb0b0a1e;
  outline: none;
}

/* Gambar selalu kotak, tidak kepotong */
.product-img {
  width: 100%;
  max-width: 250px;               /* desktop */
  aspect-ratio: 1 / 1;            /* selalu 1:1 */
  object-fit: contain;            /* tampil penuh, tidak crop */
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 5px 6px #eb0b0a18;
  background: #fff;
  border: 1px solid #eee;
}
@media (max-width: 600px) {
  .product-img { max-width: 100px; }
}

.product-name {
  font-family: var(--font-body);
  font-size: 0.80rem;
  color: #222;
  font-weight: 300;
  margin: 0 auto;
  max-width: 100%;
  line-height: 1;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;          /* maksimal 2 baris */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1em;              /* tinggi minimum supaya sejajar */
}

/* ================== VEJA MAIS BUTTON ================== */
.veja-mais-btn {
  display: flex; align-items: center; justify-content: center;
  margin: 2px auto 0;
  padding: 5px 25px;
  background: transparent;
  color: var(--red-top);
  font-family: var(--font-header);
  font-weight: 500;
  font-size: 0.85rem;
  border: 1.5px solid var(--red-top);
  border-radius: 100px;
  box-shadow: 0 5px 10px #eb0b0a11;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s, border-color .18s, transform .12s;
  outline: none;
  position: relative;
  overflow: hidden;
}
.veja-mais-btn .btn-text { pointer-events: none; }
.veja-mais-btn .arrow-icon {
  margin-left: 5px; font-size: 1.2em;
  filter: drop-shadow(0 1px 1px #fff2);
  transition: transform .18s;
}
.veja-mais-btn:hover,
.veja-mais-btn:focus-visible {
  background: var(--red-gradient);
  color: #fff;
  border-color: #b50909;
  box-shadow: 0 4px 20px #eb0b0a33;
  transform: scale(1.03);
}
.veja-mais-btn:hover .arrow-icon,
.veja-mais-btn:focus-visible .arrow-icon { transform: translateY(2px) scale(1.15); }
.veja-mais-btn:active {
  background: var(--red-gradient);
  color: #fff;
  box-shadow: 0 1px 8px #eb0b0a55;
  transform: scale(0.98);
}

/* ================== MODAL ================== */
#orderModal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center; justify-content: center;
  z-index: 999;
}
#orderModal.active { display: flex; }

.order-modal-content {
  max-height: 90vh; overflow-y: auto;
  padding: 32px 22px 24px 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 32px rgba(0,0,0,0.12);
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  width: min(560px, 92vw);
}

.form-divider {
    margin: 20px 0;
    border-top: 2px solid #eb0b0a;
}

.order-product-info-centered {
  display: flex; flex-direction: column; align-items: center;
  margin: 4px 0 18px 0;
}
.modal-product-img {
  width: 250px; aspect-ratio: 1/1;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 10px;
  object-fit: contain;
  border: 2.5px solid #e4e4e4;
  background: #fff;
}
.modal-product-title {
  font-size: 1.12rem; font-weight: 700; color: #222; text-align: center; margin-bottom: 8px;
}

.modal-close-btn {
  position: absolute; top: 12px; right: 12px;
  background: var(--red-gradient);
  color: #fff; font-size: 1.6rem;
  border-radius: 8px; border: none;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-close-btn:hover { background: linear-gradient(180deg, #f92c2b, #4a0508); }

/* ================== FORM ================== */
#orderForm label {
  margin-top: 10px; margin-bottom: 3px;
  font-size: 0.98rem; color: #393939; font-weight: 500;
}
#orderForm input, #orderForm select {
  width: 100%;
  padding: 10px 14px; margin-bottom: 8px;
  border-radius: 7px; border: 1.2px solid #eee;
  font-size: 1rem; background: #f8f8fa;
  outline: none; transition: border .2s, background .2s, box-shadow .2s;
}
#orderForm input:focus, #orderForm select:focus {
  border: 1.2px solid var(--red-top);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(235, 11, 10, 0.12);
}
#orderFormMessage { margin-top: 10px; font-weight: 700; min-height: 1.2em; }
#orderSubmitBtn {
  margin-top: 18px; padding: 10px 0; width: 100%;
  border-radius: 8px; background: var(--red-gradient);
  color: #fff; font-size: 1.05rem; font-weight: 700; border: none;
  transition: background .18s, filter .18s;
}
#orderSubmitBtn:hover { filter: brightness(1.08); }
#orderSubmitBtn:disabled { background: #ccc !important; color: #888 !important; cursor: not-allowed; }

/* ================== UTIL ================== */
.extra-product[hidden] { display: none !important; }

/* ================== Mentor Contact Button Styles ================== */
.mentor-contact-section {
  width: 100%;
  max-width: var(--max-width);
  margin: 20px auto 14px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mentor-contact-title {
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--red-top);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.mentor-contact-btn-row {
  display: flex;
  gap: 45px;
  justify-content: center;
  align-items: center;
}

.mentor-contact-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 2px solid var(--red-top);
  border-radius: 8px;
  box-shadow: 0 2px 12px #eb0b0a18;
  padding: 11px 22px;
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.01rem;
  color: #222;
  text-decoration: none;
  transition: background 0.16s, box-shadow 0.16s, border-color 0.16s, color 0.16s, transform 0.13s;
  cursor: pointer;
  outline: none;
  will-change: transform;
  /* Animasi halus */
  animation: mentor-btn-gentlepop 1.6s ease-in-out infinite;
}

@keyframes mentor-btn-gentlepop {
  0% { transform: scale(1); }
  50% { transform: scale(1.045); }
  100% { transform: scale(1); }
}

.mentor-contact-btn:hover,
.mentor-contact-btn:focus-visible {
  background: #fff7f6;
  border-color: var(--red-bottom);
  color: var(--red-bottom);
  box-shadow: 0 4px 16px #eb0b0a33;
  transform: scale(1.07);
}

.whatsapp-btn .mentor-contact-icon {
  width: 24px;
  height: 24px;
}

.telegram-btn .mentor-contact-icon {
  width: 24px;
  height: 24px;
}

@media (max-width: 600px) {
  .mentor-contact-section {
    margin: 16px auto 10px auto;
  }
  .mentor-contact-title {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }
  .mentor-contact-btn-row {
    gap: 35px;
  }
  .mentor-contact-btn {
    padding: 8px 6vw;
    font-size: 0.95rem;
    gap: 7px;
  }
  .mentor-contact-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 400px) {
  .mentor-contact-title {
    font-size: 0.8rem;
  }
  .mentor-contact-btn {
    padding: 7px 2vw;
    font-size: 0.91rem;
    gap: 6px;
  }
  .mentor-contact-btn-row {
    gap: 25px;
  }
  .mentor-contact-icon {
    width: 15px;
    height: 15px;
  }
}

/* Tambahan untuk T&C di dalam modal */
#orderFormTC {
  font-size: 0.85rem;         /* Lebih kecil dari sebelumnya */
  line-height: 1.5;           /* Jarak baris lebih nyaman */
  letter-spacing: 0.01em;     /* Sedikit beri ruang */
  padding: 14px 12px;         /* Padding lebih ramping */
}

#orderFormTC strong {
  font-size: 1.0rem;          /* Judul tetap agak menonjol, tapi tidak terlalu besar */
  margin-bottom: 7px;
}

#orderFormTC ol {
  margin: 10px 0 0 16px;
  padding-left: 8px;
}

#orderFormTC li {
  margin-bottom: 9px;
}

#orderFormTC .tc-section-title {
  color: #eb0b0a;
  font-weight: bold;
  font-size: 0.97rem;
}
