/* ========================= */
/* ✅ SLIDE MENU FULL RAPI */
/* ========================= */

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;

  opacity: 0;
  pointer-events: none;
  transition: 0.35s ease;
}

/* ✅ MENU OFFCANVAS */
.mobile-menu.slide-menu {
  position: fixed;
  top: 0;
  right: 0;

  width: 100vw; /* ✅ TUTUP PENUH AGAR TIDAK NGINTIP */
  max-width: none;
  height: 100vh;

  background: linear-gradient(180deg, #1b1464, #150f45);
  z-index: 9999;

  display: flex;
  flex-direction: column;

  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  padding-top: 90px;

  visibility: hidden;
  pointer-events: none;

  box-shadow: -8px 0 20px rgba(0, 0, 0, 0.45);
}

.mobile-menu.slide-menu a {
  color: white;
  padding: 18px 24px;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

/* ✅ SAAT AKTIF */
.mobile-menu.show {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ✅ ACTIVE STATE */
.mobile-menu a.active {
  color: #00f5a0;
  font-weight: bold;
}

/* ✅ KUNCI SCROLL SAAT MENU TERBUKA (ANTI TEMBUS DI ANDROID & CHROME) */
html.menu-open,
body.menu-open {
  overflow: hidden !important;
  width: 100%;
  overscroll-behavior: none;
  touch-action: none; /* tambahan biar anti scroll di HP */
}

/* ✅ HEADER & TOMBOL BACK DI MENU */
.mobile-menu-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;

  display: flex;
  align-items: center;
  padding: 0 20px;

  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(6px);
}

.back-menu-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* ============================= */
/* ✅ TOTAL RESET KHUSUS MOBILE */
/* ============================= */
@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
    background: #150f45;
  }

  /*  SEMBUNYIKAN KHUSUS DESKTOP SAJA */
  .about-section {
    display: none !important;
  }

  /* ✅ PASTIKAN PRODUCTS TETAP TAMPIL */
  .product-section {
    display: block !important;
  }

  /* ========================= */
  /* ✅ NAVBAR MOBILE */
  /* ========================= */
  .mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 14px;
    z-index: 9999;
  }

  .mobile-logo {
    height: 34px;
  }

  .burger-btn {
    font-size: 28px;
    background: none;
    border: none;
    color: white;
  }

  .mobile-menu {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #150f45;
    display: none;
    flex-direction: column;
  }

  .mobile-menu a {
    color: white;
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
  }

  .mobile-menu.show {
    display: flex;
  }

  .mobile-price {
    color: #e53935;
    font-weight: bold;
  }

  .mobile-product-card button {
    background: #f60000;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 8px;
  }

  /* ========================= */
  /* ✅ ABOUT US MOBILE */
  /* ========================= */
  .mobile-about {
    width: 100%;
    padding: 40px 14px;
    background: #2a2381;
    text-align: center;
  }

  /* .mobile-about-img {
    width: 92%;
    max-width: 360px;
    border-radius: 16px;
    margin-bottom: 16px;
  } */

  /* .mobile-about-card {
    background: white;
    padding: 16px;
    border-radius: 14px;
    color: black;
  } */

  /* .mobile-about-nav {
    margin-top: 12px;
  } */

  /* .mobile-about-nav button {
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    background: white;
    margin: 0 6px;
    font-size: 16px;
  } */
}

@media (max-width: 768px) {
  html,
  body {
    height: auto !important;
    overflow-y: auto !important;
  }

  .mobile-about {
    padding: 40px 14px !important;
  }
}

@media (max-width: 768px) {
  .mobile-products {
    display: block !important;
    padding: 30px 14px !important;
  }

  .mobile-about {
    display: block !important;
    padding: 40px 14px !important;
  }
}

@media (max-width: 768px) {
  .hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center; /* TEKS DI TENGAH SECARA VISUAL */
    align-items: center;

    text-align: center;
    padding-top: 40px;
    padding-bottom: 40px;
    overflow: hidden;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
  }

  .hero h1,
  .hero h2 {
    position: relative;
    z-index: 2;
  }

  /* ✅ H1 — BENTUK BLOK SEPERTI GAMBAR KAMU */
  .hero h1 {
    font-size: 22px;
    max-width: 340px; /* ✅ KUNCI BENTUK BLOK */
    line-height: 1.4;
    font-weight: 700;
    margin: 0 auto 12px auto;
    letter-spacing: 0.3px;
  }

  /* ✅ H2 — SUBTITLE PADAT & RAPI */
  .hero h2 {
    font-size: 12.8px;
    max-width: 310px;
    line-height: 1.7;
    /* color: #00f5a0; */
    margin: 0 auto;
  }

  /* ✅ ICON */
  .hero .icon {
    width: 80px;
  }

  .icon1 {
    top: 23%;
    left: 8%;
  }

  .icon2 {
    top: 65%;
    left: 8%;
  }

  .icon3 {
    top: 20%;
    right: 8%;
  }

  .icon4 {
    top: 68%;
    right: 8%;
  }
}

@media (max-width: 768px) {
  #products {
    height: auto !important;
    min-height: unset !important;
    padding: 40px 0 20px 0 !important;
    scroll-snap-align: unset !important;
    margin-bottom: 0 !important;
  }

  #aboutus-mobile {
    height: auto !important;
    min-height: unset !important;
    padding: 40px 0 20px 0 !important;
    scroll-snap-align: unset !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 768px) {
  .product-viewport {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  /* ===== ABOUT US MOBILE ===== */
  #aboutus-mobile {
    width: 100%;
    padding: 40px 14px;
    background: linear-gradient(180deg, #2a2381, #150f45);
    text-align: center;
  }

  /* ===== MEDIA (IMAGE / VIDEO) ===== */
  .mobile-about-media {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 20px auto;
    border-radius: 16px;
    overflow: hidden;
    background: black;
  }

  .mobile-about-thumb,
  .mobile-about-video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s linear;
  }

  .mobile-about-video {
    display: none;
  }

  .mobile-play-btn {
    /* position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid white;
    font-size: 22px;
    cursor: pointer;
    z-index: 3; */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid white;
    font-size: 22px;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ===== SLIDER ===== */
  .mobile-about-slider-wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .mobile-about-slider {
    display: flex;
    gap: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  .mobile-about-card {
    /* min-width: 100%;
    max-width: 100%;
    background: white;
    padding: 18px;
    border-radius: 14px;
    color: #1e1e1e;
    flex-shrink: 0; */
    flex: 0 0 100%;
    max-width: 100%;
    background: #ffffff;
    padding: 18px;
    border-radius: 14px;
    color: #1e1e1e;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  }

  .mobile-about-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .mobile-about-card p {
    font-size: 13px;
    line-height: 1.6;
  }

  .mobile-about-card.active {
    background: #0026b3;
    color: #ffffff;
  }

  .mobile-about-card.active h3,
  .mobile-about-card.active p {
    color: #ffffff;
  }

  /* ===== NAVIGATION ===== */
  .mobile-about-nav {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  /* .mobile-about-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    font-size: 18px;
  } */
}

/* ============================= */
/* ✅ FOOTER MOBILE FINAL FIX   */
/* ============================= */
@media (max-width: 768px) {
  #footer-mobile {
    background: #bdb6ff;
    padding: 26px 16px 14px;
    font-size: 13px;
    color: #000;
  }

  /* ✅ GRID 2 KOLOM BERSIH */
  .fm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 18px;
    align-items: start;
  }

  .fm-col {
    align-self: start;
  }

  /* ✅ JUDUL */
  .fm-col h4 {
    font-weight: 700;
    margin-bottom: 6px;
  }

  /* ✅ LINK */
  .fm-col a {
    display: block;
    margin-bottom: 4px;
    text-decoration: none;
    color: inherit;
  }

  /* ✅ ICON + TEKS */
  .fm-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }

  .fm-row img {
    width: 18px;
    height: 18px;
    object-fit: contain;
  }

  /* ✅ TOKO (ANTI KELEWAT & TURUN BARIS) */
  .fm-store {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
  }

  .fm-store img {
    height: 26px;
    max-width: 90px;
    object-fit: contain;
  }

  /* ✅ PEMBAYARAN */
  .fm-qris {
    height: 26px;
    margin-top: 4px;
  }

  /* ✅ DOWNLOAD QR */
  .fm-download {
    display: block;
    height: 80px;
    margin-top: 6px;
  }

  /* ✅ GARIS PEMISAH */
  .fm-divider {
    margin-top: 18px;
    height: 1px;
    background: rgba(0, 0, 0, 0.3);
  }

  /* ✅ COPYRIGHT */
  .fm-copyright {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    opacity: 0.8;
  }
}

/* ============================= */
/* ✅ SWITCH FOOTER DESKTOP & MOBILE */
/* ============================= */

#footer-mobile {
  display: none;
}

@media (max-width: 768px) {
  #footer-desktop {
    display: none !important;
  }

  #footer-mobile {
    display: block !important;
  }
}

#footer-mobile a:active {
  opacity: 0.6;
  transform: scale(0.97);
}

/* ✅ KHUSUS MAPS AGAR IKON DI AWAL TEKS, BUKAN DI TENGAH */
.fm-row-maps {
  align-items: flex-start; /* ✅ paksa ke atas */
}

.fm-row-maps .fm-icon-top {
  margin-top: 3px; /* ✅ fine-tuning biar presisi */
  flex-shrink: 0; /* ✅ ikon tidak mengecil */
}

/* =============================== */
/* ✅ PRODUCT DETAIL - MOBILE FIX FINAL */
/* =============================== */
@media (max-width: 768px) {
  /* ✅ SECTION UTAMA */
  .product-detail-mobile {
    height: auto !important;
    min-height: unset !important;
    padding: 40px 14px 24px 14px !important;
    scroll-snap-align: unset !important;
    margin-bottom: 0 !important;
    margin-top: 32px !important;
  }

  /* ✅ WRAPPER FLEX JADI VERTICAL */
  .product-detail-mobile > div {
    flex-direction: column !important;
    gap: 20px !important;
    max-width: 100% !important;
  }

  /* ✅ HAPUS MIN-WIDTH DESKTOP */
  .product-detail-mobile > div > div {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* ================= MEDIA UTAMA ================= */
  .product-detail-mobile .zoom-container {
    height: 270px !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .product-detail-mobile #mainMediaContainer,
  .product-detail-mobile #mainMediaContainer img,
  .product-detail-mobile #mainMediaContainer iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
  }

  /* ================= THUMBNAIL ================= */
  .product-detail-mobile .thumb-wrapper {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .product-detail-mobile .thumb-item {
    min-width: 70px !important;
    height: 70px !important;
    border-radius: 12px !important;
  }

  /* ================= JUDUL & HARGA ================= */
  .product-detail-mobile h1 {
    font-size: 22px !important;
    line-height: 1.3 !important;
  }

  .product-detail-mobile p {
    font-size: 15px !important;
  }

  /* ================= BENEFIT ================= */
  .product-detail-mobile p i {
    font-size: 14px !important;
  }

  /* ================= TOMBOL BELI ================= */
  .product-detail-mobile button {
    font-size: 16px !important;
    padding: 14px 18px !important;
    border-radius: 12px !important;
  }

  /* ================= POPUP STORE ================= */
  #storePopup > div {
    width: 92% !important;
    padding: 20px !important;
    border-radius: 16px !important;
  }

  #storePopup button {
    height: 64px !important;
  }
}

/* Default desktop */
#navbar-mobile {
  display: none;
}

/* Mobile only */
@media (max-width: 768px) {
  #navbar {
    display: none !important;
  }
  #navbar-mobile {
    display: flex !important;
    height: 44px;
  }
}
