/* ================================================
   RESET & BASE
   ================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ================================================
   STICKY HEADER
   ================================================ */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #e60012;
  color: #fff;
  box-shadow: 0 2px 10px rgba(230, 0, 18, 0.35);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 16px;
  position: relative;
}

/* Logo di KIRI */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
}

.logo i {
  color: #ffd700;
}

/* Tombol hamburger (default hidden, muncul di mobile) */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Menu Utama (desktop) */
.main-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-item > a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.nav-item > a i {
  font-size: 0.7rem;
  transition: transform 0.25s;
}

/* Submenu (desktop: dropdown) */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  padding: 6px 0;
  list-style: none;
  margin: 6px 0 0;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 100;
}

.nav-item.has-submenu.open .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item.has-submenu.open > a i {
  transform: rotate(180deg);
}

.submenu li a {
  display: block;
  padding: 9px 18px;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.submenu li a:hover {
  background: #e60012;
  color: #fff;
}

/* ================================================
   BANNER ATAS
   ================================================ */
.banner-top {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.banner-top img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* ================================================
   FORM SECTION
   ================================================ */
.form-section {
  background: #fff;
  margin: 30px auto;
  padding: 30px 24px;
  max-width: 900px;
  width: calc(100% - 40px);
  border: 3px solid #e53935;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.15);
  box-sizing: border-box;
}

.form-section h2 {
  margin-bottom: 22px;
  color: #e53935;
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #444;
}

.required {
  color: #e53935;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

.form-group select:disabled {
  background: #f0f0f0;
  cursor: not-allowed;
}

/* ============= CHECKBOX BIAYA PACKING ============= */
.checkbox-packing {
  margin-top: 22px;
  margin-bottom: 22px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  line-height: 1.4;
}

.checkbox-item:hover {
  border-color: #e53935;
  background: #fff5f5;
}

.checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #e53935;
  flex-shrink: 0;
  margin: 2px 0 0;
  cursor: pointer;
}

.checkbox-item span {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  user-select: none;
}

.checkbox-item:has(input:checked) {
  border-color: #25d366;
  background: #f0fff4;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

/* ================================================
   TOMBOL SUBMIT
   ================================================ */
.btn-submit {
  width: 100%;
  background: #25d366;
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.25s, transform 0.15s;
}

.btn-submit:hover {
  background: #1ebe5b;
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

/* ================================================
   GALERI BAWAH
   ================================================ */
.gallery-bottom {
  margin-top: 40px;
}

.gallery-bottom h2 {
  color: #e53935;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.gallery-grid img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.gallery-grid img:hover {
  transform: scale(1.03);
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  background: #263238;
  color: #eceff1;
  margin-top: 50px;
  padding: 30px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding-bottom: 20px;
}

.footer h3 {
  margin-bottom: 10px;
  color: #4fc3f7;
}

.footer p {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.footer i {
  margin-right: 6px;
}

.copyright {
  text-align: center;
  padding: 14px;
  background: #1c262b;
  font-size: 0.85rem;
  color: #b0bec5;
}

/* ================================================
   OVERLAY LOADING
   ================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay-content {
  background: #fff;
  padding: 36px 40px;
  border-radius: 16px;
  text-align: center;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popIn 0.35s ease;
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.overlay-content h3 {
  color: #e53935;
  margin: 16px 0 6px;
  font-size: 1.2rem;
}

.overlay-content p {
  color: #666;
  font-size: 0.9rem;
}

.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border: 5px solid #ffe5e5;
  border-top-color: #e53935;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ================================================ */
@media (max-width: 768px) {

  /* Header — logo kiri, hamburger kanan */
  .header-content {
    flex-wrap: nowrap;             /* JANGAN column */
    padding: 12px 16px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;             /* dorong ke kanan */
  }

  /* Menu mobile — full width, rata kiri */
  .main-nav {
    position: fixed;               /* fixed biar full width layar */
    top: 60px;                     /* sesuaikan tinggi header */
    left: 0;
    right: 0;
    width: 100vw;
    margin: 0;
    background: #b3000e;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 999;
  }

  .main-nav.open {
    max-height: 600px;
  }

  /* List menu — vertikal, rata kiri */
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    margin: 0;
    gap: 0;
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
  }

  /* Submenu jadi accordion */
  .submenu {
    position: static;
    background: #8a000a;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.3s ease;
  }

  .nav-item.has-submenu.open .submenu {
    max-height: 300px;
  }

  .submenu li {
    width: 100%;
  }

  .submenu li a {
    display: block;
    color: #ffe5e5;
    padding: 12px 36px;
    font-size: 0.88rem;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
  }

  .submenu li a:hover {
    background: #e60012;
    color: #fff;
  }

  /* Form — full lebar dengan sedikit jarak */
  .form-section {
    width: calc(100% - 24px);
    padding: 22px 16px;
    border-width: 2px;
  }
}

/* ================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ================================================ */
@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }

  .form-section h2,
  .gallery-bottom h2 {
    font-size: 1.25rem;
  }

  .checkbox-item span {
    font-size: 0.88rem;
  }
}

/* =====================================================
   ANIMASI HADIAH PEMBUKA (muncul sekali saat first visit)
   ===================================================== */
.hadiah-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at 50% 40%, #2b0a0a 0%, #1a0303 60%, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow: hidden;
}

.hadiah-overlay.show {
  opacity: 1;
  visibility: visible;
}

.hadiah-overlay.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hadiah-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  perspective: 1000px;
}

/* ===== Kotak hadiah ===== */
.hadiah-box {
  position: relative;
  width: 160px;
  height: 160px;
  cursor: pointer;
  animation: hadiahFloat 2.5s ease-in-out infinite;
  filter: drop-shadow(0 20px 30px rgba(255, 60, 60, 0.35));
}

@keyframes hadiahFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}

.hadiah-lid {
  position: absolute;
  top: 0;
  left: -8px;
  right: -8px;
  height: 40px;
  background: linear-gradient(135deg, #ff5252, #c62828);
  border-radius: 8px;
  transform-origin: bottom center;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hadiah-ribbon-v {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 18px;
  margin-left: -9px;
  background: linear-gradient(180deg, #ffd54f, #ffb300);
}

.hadiah-bow {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 40px;
  height: 24px;
  margin-left: -20px;
  background: linear-gradient(135deg, #ffd54f, #ffb300);
  border-radius: 50% 50% 0 0;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.hadiah-bow::before,
.hadiah-bow::after {
  content: '';
  position: absolute;
  top: 4px;
  width: 26px;
  height: 20px;
  background: linear-gradient(135deg, #ffd54f, #ffb300);
  border-radius: 50%;
}

.hadiah-bow::before { left: -18px; transform: rotate(-25deg); }
.hadiah-bow::after  { right: -18px; transform: rotate(25deg); }

.hadiah-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(135deg, #e53935, #8e0000);
  border-radius: 8px 8px 12px 12px;
  overflow: hidden;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.3);
}

.hadiah-ribbon-h {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 18px;
  margin-top: -9px;
  background: linear-gradient(90deg, #ffd54f, #ffb300, #ffd54f);
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.5);
}

.hadiah-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 213, 79, 0.5), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
  z-index: -1;
}

.hadiah-overlay.opened .hadiah-lid {
  transform: translateY(-140px) rotate(-35deg);
}

.hadiah-overlay.opened .hadiah-glow {
  opacity: 1;
  animation: hadiahGlowPulse 1s ease-in-out infinite;
}

@keyframes hadiahGlowPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.3); opacity: 1; }
}

/* ===== Teks ===== */
.hadiah-text {
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s 0.2s, transform 0.6s 0.2s;
}

.hadiah-overlay.opened .hadiah-text {
  opacity: 1;
  transform: translateY(0);
}

.hadiah-text h2 {
  font-size: 2rem;
  background: linear-gradient(90deg, #ffd54f, #fff, #ffd54f);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hadiahShine 2s linear infinite;
  margin-bottom: 6px;
}

@keyframes hadiahShine {
  to { background-position: 200% center; }
}

.hadiah-text p {
  font-size: 1rem;
  color: #ffcdd2;
}

/* ===== Tombol ===== */
.hadiah-btn {
  padding: 14px 40px;
  font-size: 1.05rem;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #e53935, #c62828);
  border: 2px solid #ffd54f;
  border-radius: 40px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 20px rgba(229, 57, 53, 0.5);
  animation: hadiahBtnPulse 1.6s ease-in-out infinite;
}

.hadiah-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 28px rgba(229, 57, 53, 0.7);
}

@keyframes hadiahBtnPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(229, 57, 53, 0.5); }
  50%      { box-shadow: 0 8px 30px rgba(255, 213, 79, 0.8); }
}

/* ===== Confetti ===== */
.hadiah-confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 5;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 14px;
  opacity: 0;
  border-radius: 2px;
}

/* ===== Mobile ===== */
@media (max-width: 480px) {
  .hadiah-box { width: 130px; height: 130px; }
  .hadiah-body { height: 98px; }
  .hadiah-text h2 { font-size: 1.5rem; }
  .hadiah-text p { font-size: 0.9rem; }
  .hadiah-btn { padding: 12px 32px; font-size: 0.95rem; }
}