/* =========================================
   1. ROOT VARIABLES & COLOR SCHEME
   ========================================= */
:root {
  /* Identitas Warna Utama */
  --primary-color: #8f0099;
  --primary-darker: #6a0070; /* Untuk Hover */
  --secondary-color: #f7e6f8;
  --white-color: #fff;

  /* Light Mode Defaults */
  --bg-color: #f8f9fa;
  --card-bg: #fff;
  --text-color: #343a40;
  --text-light: #6c757d;
  --section-bg: #f8f9fa;
  --section-product-bg: #faf7ff; /* Background khusus produk */
  --border-color: #e9ecef;

  /* Footer Variables (Tetap Gelap di Light Mode - Gaya Hermina) */
  --footer-bg: #2d1733;
  --footer-bottom-bg: #1a0f1c;
  --footer-highlight: #ff66ff;
}

/* Dark Mode Overrides */
body.dark-mode {
  --primary-color: #ce7df2;
  --primary-darker: #e0aaff;
  --secondary-color: #4b0050;
  
  --bg-color: #1a202c;
  --card-bg: #2d3748;
  --text-color: #ffffff;
  --text-light: #a0aec0;
  --section-bg: #1a202c;
  --section-product-bg: #171923; /* Produk jadi gelap */
  --border-color: #4a5568;

  /* Footer menyesuaikan sedikit di dark mode */
  --footer-bg: #170a1a;
  --footer-bottom-bg: #0d060e;
  --footer-highlight: #ff99ff;
}

/* =========================================
   2. GLOBAL STYLES
   ========================================= */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.5s, color 0.5s;
  overflow-x: hidden; /* Mencegah scroll horizontal tidak sengaja */
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--primary-color);
}

/* Judul menjadi putih di dark mode */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
  color: var(--text-color);
}

a { text-decoration: none; }

/* Utilitas Section */
.section-padding { padding: 60px 0; }

.section-title { margin-bottom: 40px; text-align: center; }
.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
  display: inline-block;
}
.section-title h2::after {
  content: '';
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.section-title p { color: var(--text-light); }

/* Tombol Global */
.btn-primary, .btn-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white-color);
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 500;
  transition: 0.3s;
}

.btn-primary:hover, .btn-custom:hover {
  background-color: var(--primary-darker);
  border-color: var(--primary-darker);
  color: var(--white-color);
  transform: translateY(-2px);
}

/* =========================================
   3. HEADER & NAVBAR
   ========================================= */
.navbar {
  transition: all 0.3s ease;
  background-color: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 999;
}

.navbar .nav-link {
  font-weight: 600;
  color: var(--text-color);
  padding: 10px 15px;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--primary-color);
}

.navbar-brand img {
  max-height: 45px;
  transition: transform 0.2s ease;
}
.navbar-brand img:hover { transform: scale(1.05); }

/* Dark mode navbar specific */
body.dark-mode .navbar {
  background-color: #1a1a1a;
  box-shadow: 0 2px 10px rgba(255,255,255,0.05);
}
body.dark-mode .nav-link { color: #e6e6e6; }
body.dark-mode .nav-link:hover { color: var(--primary-color); }

/* =========================================
   4. HERO SECTION
   ========================================= */
#hero {
  width: 100%;
  position: relative;
  background-color: var(--card-bg); 
  padding-top: 55px;
  margin-bottom: 20px;
}

.hero-wrapper {
  position: relative;
  height: 0;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

#hero .carousel,
#hero .carousel-inner {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

#hero .carousel-item {
  height: 100%;
  background-color: var(--card-bg);
}

#hero .carousel-item img {
  height: 100%;
  width: 100%; 
  object-fit: contain;
  filter: brightness(100%);
}

.carousel-control-prev, .carousel-control-next {
  width: 10%;
  transition: opacity 0.15s ease;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
  background-color: rgba(143, 0, 153, 0.5);
  border-radius: 50%;
  padding: 20px;
}

/* =========================================
   5. SECTIONS (Features, Services, etc)
   ========================================= */
/* Features */
#features { background-color: var(--bg-color); }
.feature-box {
  padding: 25px;
  text-align: center;
  border-radius: 8px;
  background: var(--card-bg);
  height: 100%;
  transition: 0.3s;
  border: 1px solid var(--border-color);
}
.feature-box:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.feature-box .icon { font-size: 2.5rem; margin-bottom: 15px; color: var(--primary-color); }

/* Services */
#services { background-color: var(--bg-color); }
.services .nav-pills .nav-link {
  color: var(--text-color);
  border-left: 3px solid transparent;
  padding: 10px 20px;
  margin-bottom: 5px;
  transition: 0.3s;
  text-align: left; /* Biasanya lebih rapi rata kiri */
}
.services .nav-pills .nav-link.active {
  color: var(--primary-color);
  background-color: var(--secondary-color);
  border-left: 3px solid var(--primary-color);
}

/* Testimonials */
#testimonials { background-color: var(--section-bg); }
.testimonial-item {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
  height: 100%;
}
.testimonial-item .stars { color: #ffc107; }
.testimonial-item .quote-icon-left, .testimonial-item .quote-icon-right { color: var(--secondary-color); font-size: 24px; }
.testimonial-item footer { font-weight: 600; color: var(--primary-color); font-size: 0.9rem; }

/* FAQ */
#faq { background-color: var(--section-bg); }
.accordion-item { border: none; border-bottom: 1px solid var(--border-color); background-color: var(--card-bg);}
.accordion-button { color: var(--text-color); background-color: var(--card-bg);}
.accordion-button:not(.collapsed) { color: var(--white-color); background-color: var(--primary-color); }
.accordion-button:focus { box-shadow: none; }
.accordion-body { background-color: var(--card-bg); color: var(--text-light);}

/* =========================================
   6. PRODUK UNGGULAN (MODERN SLIDER)
   ========================================= */
.produk-section {
  padding: 60px 20px;
  background: var(--section-product-bg); /* Menggunakan variabel agar dark mode support */
  transition: background-color 0.5s;
}

.produk-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  margin-bottom: 40px;
  width: 100%;
}

.produk-title h2 {
  text-align: left;
  margin: 0;
  padding-bottom: 0;
  font-size: 2.2rem;
  font-weight: 700;
}

/* Reset pseudo-element garis bawah khusus di section ini agar tidak dobel */
.produk-title h2::after { display: none; }

.btn-selengkapnya {
  flex-shrink: 0;
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.btn-selengkapnya:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.produk-slider {
  display: flex;
  gap: 25px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 5px 25px 5px; /* Padding bawah ditambah untuk bayangan hover */
}

/* Scrollbar Custom */
.produk-slider::-webkit-scrollbar { height: 8px; }
.produk-slider::-webkit-scrollbar-thumb { background: #a47bd8; border-radius: 10px; }
.produk-slider::-webkit-scrollbar-track { background: transparent; }

/* CARD PRODUK */
.produk-card {
  min-width: 260px;
  background: var(--card-bg);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(123, 60, 180, 0.10);
  transition: .35s ease;
  cursor: pointer;
  text-align: center;
  border: 1px solid var(--border-color);
  
  /* PENTING: Flex layout agar tombol bisa rata bawah */
  display: flex;
  flex-direction: column;
}

.produk-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 15px 35px rgba(90, 30, 150, 0.22);
  z-index: 2; /* Agar card yang di-hover muncul di atas */
}

.produk-card img {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 15px;
  aspect-ratio: 1/1; /* Memaksa gambar kotak */
  object-fit: cover;
}

.produk-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 5px;
}

.produk-card p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
}

.btn-beli {
  display: block;
  background: #7c4dff;
  color: white;
  padding: 10px 0;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: .25s;
  margin-top: auto; /* Memaksa tombol ke bawah */
  border: none;
}

.btn-beli:hover { background: #5d2ad9; color: white; }

/* Responsif Produk */
@media (max-width: 600px) {
  .produk-title {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-selengkapnya {
    margin-top: 10px;
    align-self: flex-start;
  }
}

/* =========================================
   7. FOOTER (Gaya Hermina)
   ========================================= */
.new-footer-dark {
  background-color: var(--footer-bg);
  color: white;
  padding: 40px 0 0;
  font-size: 14px;
}

.new-footer-dark .row > div { margin-bottom: 30px; }

.new-footer-dark h4 {
  color: white; /* Footer tetap putih teksnya meski dark mode */
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.company-info p {
  line-height: 1.6;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.8);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  color: white;
  text-decoration: none;
}

.contact-item i {
  color: var(--footer-highlight);
  font-size: 18px;
  margin-top: 3px;
  margin-right: 10px;
}
.contact-item span { color: rgba(255, 255, 255, 0.8); }

.social-links a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--footer-highlight);
  border-radius: 5px;
  margin-right: 10px;
  transition: background 0.3s;
  text-decoration: none;
}
.social-links a:hover { background: #d000d9; }
.social-links i { color: var(--footer-bg); font-size: 20px; }

.footer-bottom {
  background-color: var(--footer-bottom-bg);
  padding: 15px 0;
  margin-top: 30px;
}
.footer-bottom .copyright { margin: 0; color: rgba(255, 255, 255, 0.7); }
.footer-bottom .policy a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-left: 15px;
  transition: color 0.3s;
}
.footer-bottom .policy a:hover { color: var(--footer-highlight); }

@media (max-width: 767px) {
  .new-footer-dark .row > div { margin-bottom: 20px; }
  .footer-bottom { text-align: center; }
  .footer-bottom .policy { margin-top: 10px; display: flex; justify-content: center; }
  .footer-bottom .policy a { margin: 0 8px; }
}

/* =========================================
   8. FLOATING BUTTONS
   ========================================= */

/* Scroll Top Button */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  transition: 0.3s;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
}
.scroll-top.active { visibility: visible; opacity: 1; }
.scroll-top:hover { background-color: var(--primary-darker); color: white; }

/* WhatsApp Float */
.wa-float {
  position: fixed;
  /* Ditinggikan sedikit agar tidak menimpa scroll-top */
  bottom: 80px; 
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  z-index: 999; /* Z-index diperbaiki */
  overflow: visible;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: transform 0.3s ease;
}

.wa-float:hover { transform: scale(1.1); }

.wa-float img { width: 32px; height: 32px; }

.wa-text {
  position: absolute;
  background: #25D366;
  padding: 10px 16px;
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  right: 70px;
  opacity: 0;
  transition: right 0.35s ease, opacity 0.35s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  pointer-events: none;
}

.wa-float:hover .wa-text {
  opacity: 1;
  right: 75px;
}