/* ============================================
   PALET WARNA ECOPIL
   ============================================ */
:root {
  --ecopil-blue: #80c6e9;
  --ecopil-green: #80b042;
  --ecopil-yellow: #e9a71c;
  --ecopil-ice: #eaf9ff;
  --ecopil-mint: #d9f4b7;
  --ecopil-peach: #ffc698;
  --white: #ffffff;
  --dark: #2d3e1f;

  --font-display: 'Fredoka', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  /* PERBAIKAN: variabel bantu untuk safe area (notch/gesture bar) di HP modern.
     Jika browser tidak mendukung env(), fallback ke 0px. */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* ============================================
   GLOBAL
   ============================================ */
html {
  scroll-behavior: smooth;
  /* PERBAIKAN: overflow-x dipindahkan ke <html>, bukan <body>.
     Di banyak browser mobile (terutama iOS Safari), memberi overflow-x:hidden
     langsung pada <body> membuat elemen position:fixed ikut "terjebak" dalam
     konteks scrolling body, sehingga tombol fixed bisa bergeser/hilang dari
     viewport saat halaman discroll. Menaruhnya di <html> jauh lebih aman
     dan tetap mencegah scroll horizontal yang tidak diinginkan. */
  overflow-x: hidden;
  /* PERBAIKAN: pastikan tinggi penuh agar posisi fixed dihitung dari viewport asli */
  height: 100%;
  width: 100%;
  position:relative;
}

body {
  font-family: var(--font-body);
  color: #333;
  background-color: var(--white);
  margin: 0;
  padding: 0;
  /* PERBAIKAN: overflow-x pada body DIHAPUS (dipindah ke html, lihat di atas).
     Body TIDAK boleh punya overflow-x:hidden + overflow-y:visible sekaligus,
     karena kombinasi ini di beberapa browser mobile membuat body dianggap
     sebagai "scrolling container" baru, yang bisa merusak position:fixed
     (khususnya di iOS Safari lama & sebagian Android WebView). */
  overflow-y: visible;
  /* PERBAIKAN: pastikan body tidak memiliki transform/filter yang bisa
     membuatnya menjadi containing block baru bagi elemen fixed. */
  transform: none;
  min-height: 100%;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--dark);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ecopil-yellow);
  outline-offset: 2px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ecopil-green);
  background: rgba(128, 176, 66, 0.1);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--ecopil-ice);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader.hide {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

.preloader-content {
  text-align: center;
}

.preloader-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
  animation: pulseLogo 1.5s infinite;
}

.preloader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(128, 176, 66, 0.2);
  border-top-color: var(--ecopil-green);
  border-radius: 50%;
  margin: 20px auto 0;
  animation: spin 0.8s linear infinite;
}

/* Keyframes */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ============================================
   GLOBAL
   ============================================ */
html {
  scroll-behavior: smooth;
  /* KUNCI: Gabungkan overflow-x: hidden dan overscroll-behavior-x 
     agar mobile browser memblokir pelebaran layar akibat AOS fade-left/right */
  overflow-x: hidden !important;
  overscroll-behavior-x: none; /* Mencegah bounce effect horizontal */
  width: 100vw; /* Menggunakan vw memaksa 100% dari viewport, bukan konten */
  max-width: 100%; /* Mencegah horizontal scrollbar di desktop Windows */
  position: relative;
}

body {
  font-family: var(--font-body);
  color: #333;
  background-color: var(--white);
  margin: 0;
  padding: 0;
  overflow-y: visible;
  /* Pastikan overflow-x di body juga di-hidden untuk keamanan ekstra dari elemen AOS */
  overflow-x: hidden !important; 
  width: 100vw;
  max-width: 100%;
  position: relative;
  /* Mencegah pergeseran karena elemen fixed */
  transform: none; 
}

/* KUNCI: Mencegah section menjadi melar akibat elemen children yang di-animasikan AOS keluar bounds */
section {
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--dark);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ecopil-yellow);
  outline-offset: 2px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ecopil-green);
  background: rgba(128, 176, 66, 0.1);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

/* ============================================

   NAVBAR

   ============================================ */

.navbar-ecopil {

  background: linear-gradient(135deg, var(--ecopil-green), var(--ecopil-blue));

  box-shadow: 0 2px 15px rgba(0,0,0,0.12);

}



.navbar-ecopil .nav-link.active {

  background-color: rgba(255,255,255,0.3);

  font-weight: 700;

}



.navbar-logo-img {

    width: 45px;

    height: 45px;

    object-fit: contain;

    background: var(--ecopil-ice);

    border-radius: 50%;

    border: 2px solid var(--ecopil-green);

    padding: 4px;

    box-shadow: 0 0 0 3px var(--ecopil-mint);

    transition: transform 0.3s ease;

}



.navbar-logo-img:hover {

    transform: scale(1.1);

}



.navbar-ecopil .navbar-brand {

  font-family: var(--font-display);

  font-size: 1.8rem;

  letter-spacing: 1px;

}



.brand-droplet {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  width: 34px;

  height: 34px;

  background: rgba(255,255,255,0.25);

  border-radius: 50%;

  font-size: 1rem;

}



.navbar-ecopil .nav-link {

  font-weight: 500;

  margin: 0 5px;

  transition: all 0.3s ease;

  border-radius: 20px;

  padding: 8px 16px !important;

  color: white !important;

}



.navbar-ecopil .nav-link:hover {

  background-color: rgba(255,255,255,0.2);

  transform: translateY(-2px);

}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  background: linear-gradient(160deg, var(--ecopil-ice) 0%, #cdeaf7 55%, var(--ecopil-blue) 100%);
  min-height: 92vh;
  color: var(--dark);
  position: relative;
  overflow: hidden;
  padding-top: 3rem;
  padding-bottom: 5rem;
}

.hero-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  top: -10%;
  right: -12%;
  width: 55%;
  max-width: 520px;
  opacity: 0.55;
  animation: blobFloat 12s ease-in-out infinite;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.15));
  box-shadow: inset 0 0 15px rgba(255,255,255,0.4);
}

.bubble-1 { width: 70px; height: 70px; top: 12%; left: 6%; animation: floatUp 7s ease-in-out infinite; }
.bubble-2 { width: 40px; height: 40px; top: 65%; left: 15%; animation: floatUp 9s ease-in-out infinite 1s; }
.bubble-3 { width: 25px; height: 25px; top: 30%; left: 45%; animation: floatUp 6s ease-in-out infinite 0.5s; }
.bubble-4 { width: 55px; height: 55px; top: 78%; left: 42%; animation: floatUp 8s ease-in-out infinite 2s; }
.bubble-5 { width: 30px; height: 30px; top: 20%; right: 20%; animation: floatUp 10s ease-in-out infinite 1.5s; }

@keyframes floatUp {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-25px) translateX(10px); }
}

@keyframes blobFloat {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.06) rotate(8deg); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ecopil-green);
  background: rgba(255,255,255,0.6);
  padding: 6px 16px;
  border-radius: 20px;
}

.hero-section h1 {
  color: var(--dark);
  line-height: 1.2;
}

.text-highlight {
  color: var(--ecopil-green);
  position: relative;
  white-space: normal;
}

.hero-trust {
  font-size: 0.9rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--dark);
}

.trust-item i {
  color: var(--ecopil-green);
}

/* Hero logo signature element */
.hero-logo-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.hero-logo-ring {
  position: absolute;
  inset: 0;
  border: 3px dashed rgba(128, 176, 66, 0.4);
  border-radius: 50%;
  animation: spinSlow 30s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-logo-circle {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ecopil-green), #6a9a2e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(128, 176, 66, 0.35);
}

.hero-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  color: white;
  text-align: center;
  line-height: 1.1;
  letter-spacing: 1px;
}

.hero-logo-icon {
  position: absolute;
  bottom: 18px;
  right: 18px;
  background: var(--ecopil-yellow);
  color: white;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.section-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 1;
}

.section-wave svg {
  width: 100%;
  height: 80px;
  display: block;
}

/* ============================================
   BUTTON CUSTOM
   ============================================ */
.btn-ecopil {
  background-color: var(--ecopil-green);
  border: none;
  color: white;
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(128, 176, 66, 0.3);
}

.btn-ecopil:hover {
  background-color: #6a9a2e;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(128, 176, 66, 0.5);
  color: white;
}

.btn-ecopil-outline {
  background: transparent;
  border: 2px solid var(--ecopil-green);
  color: var(--ecopil-green);
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-ecopil-outline:hover {
  background-color: var(--ecopil-green);
  color: white;
  transform: translateY(-2px);
}

/* ============================================
   SECTION BACKGROUNDS
   ============================================ */
.bg-ice {
  background-color: var(--ecopil-ice);
}

.bg-mint {
  background-color: var(--ecopil-mint);
}

/* ============================================
   KEUNGGULAN / FEATURE CARDS
   ============================================ */
.feature-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem 1.75rem;
  height: 100%;
  transition: all 0.35s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}

.feature-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
  color: white;
}

.icon-green { background: linear-gradient(145deg, var(--ecopil-green), #6a9a2e); }
.icon-blue  { background: linear-gradient(145deg, var(--ecopil-blue), #5aa8d4); }
.icon-yellow{ background: linear-gradient(145deg, var(--ecopil-yellow), #c98d13); }

.feature-card h3,
.feature-card h4,
.feature-card h5,
.feature-card h6 {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: #5f6b57;
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ============================================
   PRODUK CARD
   ============================================ */
.product-card {
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  transition: all 0.35s ease;
  height: 100%;
  max-width: 100%;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.product-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.badge-blue { background: var(--ecopil-blue); }
.badge-peach { background: var(--ecopil-peach); color: var(--dark); }

.product-img-wrap {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    padding: 0;
    margin: 0;
    transition: transform 0.3s;
}

.product-illustration {
  width: 140px;
  height: auto;
  transition: transform 0.35s ease;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.12));
}

.product-card:hover .product-illustration {
  transform: scale(1.06) translateY(-4px);
}

.product-body {
  padding: 1.75rem 1.5rem 2rem;
}

.price-text {
  color: var(--ecopil-yellow);
  font-weight: bold;
}

/* ============================================
   CARA PEMESANAN
   ============================================ */
#cara-pesan {
  position: relative;
}

.cara-pesan-toggle {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  background: linear-gradient(135deg, var(--ecopil-green), #6a9a2e);
  padding: 16px 36px;
  border-radius: 40px;
  box-shadow: 0 10px 25px rgba(128, 176, 66, 0.35);
  transition: all 0.3s ease;
}

.cara-pesan-toggle:hover {
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(128, 176, 66, 0.5);
}

.toggle-chevron {
  transition: transform 0.3s ease;
}

.cara-pesan-toggle[aria-expanded="true"] .toggle-chevron {
  transform: rotate(180deg);
}

.order-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border-radius: 18px;
  padding: 2rem 1rem;
  text-decoration: none;
  color: var(--dark);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  height: 100%;
}

.order-method-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.14);
  color: var(--dark);
}

.order-method-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.order-method-card small {
  color: #6b7a63;
}

/* ============================================
   TESTIMONI
   ============================================ */
.testimoni-card {
  background-color: var(--white);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.testimoni-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}

.testimoni-card::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 4rem;
  color: var(--ecopil-peach);
  position: absolute;
  top: -5px;
  left: 20px;
  opacity: 0.6;
  line-height: 1;
}

.testimoni-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.stars {
  color: var(--ecopil-yellow);
  margin-bottom: 0.75rem;
}

.testimoni-text {
  font-style: italic;
  color: #4a4a4a;
  margin-bottom: 1rem;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.accordion-item {
  border: none;
  margin-bottom: 12px;
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.accordion-button {
  font-weight: 600;
  color: var(--dark);
}

.accordion-button:not(.collapsed) {
  background-color: var(--ecopil-mint);
  color: var(--dark);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(128, 176, 66, 0.3);
}

/* ============================================
   KONTAK
   ============================================ */
.contact-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 1.5rem;
}

.contact-row:last-child {
  margin-bottom: 0;
}

.contact-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(128, 176, 66, 0.12);
  color: var(--ecopil-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-ecopil {
  background: linear-gradient(135deg, var(--ecopil-green), var(--ecopil-blue));
  color: white;
}

.footer-ecopil a {
  color: white;
  transition: opacity 0.3s;
}

.footer-ecopil a:hover {
  opacity: 0.75;
}

.footer-tagline {
  opacity: 0.9;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.footer-divider {
  border-color: rgba(255,255,255,0.3);
  max-width: 200px;
  margin: 1.5rem auto;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed !important;
  bottom: calc(100px + var(--safe-bottom)) !important;
  /* KUNCI: Gunakan 'right' statis, jangan calc dengan var(--safe-right) untuk 
     elemen fixed jika tidak mutlak diperlukan, karena bisa memicu bug repaint lambat di iOS */
  right: 24px !important; 
  width: 44px;
  height: 44px;
  background: var(--ecopil-green);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) !important;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  z-index: 10000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  /* Memaksa elemen ini berada di layer komposisinya sendiri agar tidak terpengaruh layout shift parent-nya */
  transform: translateZ(0); 
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) !important;
}

.back-to-top:hover {
  background: var(--dark);
  transform: translateY(-3px) !important;
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed !important;
  bottom: calc(24px + var(--safe-bottom)) !important;
  /* KUNCI: 'right' statis */
  right: 24px !important; 
  width: 58px;
  height: 58px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  z-index: 10000;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  animation: pulseWa 2.5s ease-in-out infinite;
  /* Memaksa elemen berada di layer komposisi sendiri */
  transform: translateZ(0); 
}

.whatsapp-float:hover {
  color: white;
  /* KUNCI: Menambahkan translateZ(0) pada state hover jika ada scale */
  transform: scale(1.1) translateZ(0) !important; 
}

@keyframes pulseWa {
  0%, 100% { box-shadow: 0 8px 20px rgba(0,0,0,0.25), 0 0 0 0 rgba(37,211,102,0.5); }
  50% { box-shadow: 0 8px 20px rgba(0,0,0,0.25), 0 0 0 12px rgba(37,211,102,0); }
}

/* ============================================
   RESPONSIF (Perbaikan pada Media Query)
   ============================================ */
@media (max-width: 768px) {
  /* ... (Biarkan kode hero & hero-logo TETAP SAMA) ... */

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: calc(85px + var(--safe-bottom)) !important;
    right: 16px !important; /* Gunakan statis 16px */
    z-index: 10000 !important;
    transform: translateY(20px) translateZ(0) !important;
  }

  .back-to-top.visible {
    transform: translateY(0) translateZ(0) !important;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    bottom: calc(16px + var(--safe-bottom)) !important;
    right: 16px !important; /* Gunakan statis 16px */
    z-index: 10000 !important;
    transform: translateZ(0) !important; /* Wajib ada translateZ */
  }
}

/* ============================================
   AKSESIBILITAS: Kurangi animasi jika diinginkan
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  /* Nonaktifkan animasi kecuali spinner, bubble, blob, ring, dan whatsapp */
  *:not(.preloader-spinner):not(.bubble):not(.hero-blob):not(.hero-logo-ring):not(.whatsapp-float) {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}