/* Variabel Global (Tema Terang) */
:root {
  --primary-color: #ff6b00; /* Oranye Api */
  --primary-hover: #e66000;
  --secondary-color: #6b4423; /* Coklat Kayu */
  --dark-color: #1a1a1a; /* Hitam Arang */

  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --text-color: #333333;
  --text-light: #666666;
  --card-bg: #ffffff;
  --border-color: #eeeeee;

  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Tema Gelap (Dark Mode) */
body.dark-mode {
  --bg-color: #121212;
  --bg-light: #1e1e1e;
  --text-color: #f1f1f1;
  --text-light: #bbbbbb;
  --card-bg: #1a1a1a;
  --border-color: #333333;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* Reset & Dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition:
    background-color 0.3s,
    color 0.3s;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--dark-color);
}
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
  color: #ffffff;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}
.section-padding {
  padding: 80px 0;
}
.bg-light {
  background-color: var(--bg-light);
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--dark-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.loader {
  font-size: 3rem;
  color: var(--primary-color);
}

/* Header & Navigasi */
header {
  background-color: var(--bg-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-weight: 500;
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--primary-color);
}
.nav-actions {
  display: flex;
  gap: 1rem;
}
.nav-actions button {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-color);
  cursor: pointer;
}
#mobile-menu-btn {
  display: none;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  background: url("img/bg.png   ") center/cover no-repeat;
  display: flex;
  align-items: center;
  text-align: center;
  color: #ffffff;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 26, 0.85); /* Hitam Arang Overlay */
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}
.badge {
  background-color: var(--primary-color);
  color: #fff;
  padding: 5px 15px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #e0e0e0;
}
.wa-info {
  font-size: 0.9rem !important;
  margin-top: 20px;
  color: var(--primary-color) !important;
  font-weight: 500;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.hero-stats span {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-stats i {
  color: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  border: 2px solid var(--primary-color);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}
.btn-outline {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  margin-left: 10px;
}
.btn-outline:hover {
  background-color: #ffffff;
  color: var(--dark-color);
}
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* Section Title */
.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.section-title p {
  color: var(--text-light);
}

/* Keunggulan */
.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.feature-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}
.feature-card i {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}
.feature-card h3 {
  font-size: 1.2rem;
}

/* Katalog & Filter */
.filter-controls {
  margin-bottom: 40px;
}
.search-box {
  max-width: 400px;
  margin: 0 auto 20px;
  position: relative;
}
.search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}
.search-box input {
  width: 100%;
  padding: 12px 15px 12px 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
}
.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-color);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.filter-btn.active,
.filter-btn:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Product Cards */
.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}
.product-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.product-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.product-info {
  padding: 20px;
}
.product-category {
  font-size: 0.8rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
}
.product-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.product-price {
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 15px;
}

/* Galeri */
.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.grid-gallery img {
  border-radius: 12px;
  height: 250px;
  object-fit: cover;
  width: 100%;
  transition: var(--transition);
  cursor: pointer;
}
.grid-gallery img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
}

/* ==================================================
       TESTIMONI MOBILE ALA SHOPEE (SWIPEABLE)
       ================================================== */
.shopee-testi-wrapper {
  display: flex; /* Ubah dari grid ke flex untuk scroll */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 15px;
  padding-bottom: 15px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Sembunyikan scrollbar di Firefox */
}
.shopee-testi-wrapper::-webkit-scrollbar {
  display: none; /* Sembunyikan scrollbar di Chrome/Safari */
}
.shopee-testi-card {
  min-width: 280px; /* Lebar minimum card agar tidak gepeng */
  scroll-snap-align: start; /* Snap otomatis saat di-swipe */
  padding: 15px;
}
.testi-date {
  position: static; /* Pindahkan tanggal ke bawah nama untuk HP */
  display: block;
  margin-top: 3px;
}
.testi-header {
  display: flex; /* Memperbaiki posisi avatar dan nama agar sejajar */
  align-items: flex-start;
  position: relative; /* FIX BUG: Menahan posisi tanggal agar tidak keluar dari card */
  margin-bottom: 12px; /* Memberi jarak bawah antara header dan teks ulasan */
}

.testi-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  background-color: #f0f0f0;
}
.testi-user {
  display: flex;
  flex-direction: column;
}
.testi-name {
  font-size: 0.85rem;
  color: var(--text-color);
  font-weight: 600;
}
.testi-stars {
  color: #ffce3d;
  font-size: 0.75rem;
  margin-top: 2px;
}
.testi-date {
  position: absolute;
  right: 0; /* Tanggal akan rapi di pojok kanan card */
  top: 0; /* Sejajar dengan bagian atas */
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Varian Produk & Isi Review */
.testi-variant {
  font-size: 0.8rem;
  color: #757575; /* Abu-abu mirip Shopee */
  margin-bottom: 10px;
  font-family: var(--font-body);
}
.testi-body {
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.5;
}

/* Lokasi & Kontak */
.grid-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.info-list li {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}
.info-list i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-top: 5px;
}
.map-container {
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.map-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: var(--shadow-hover);
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: #ffffff;
  text-align: center;
  padding: 60px 0 30px;
}
.footer-content h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333333;
  font-size: 0.9rem;
  color: #aaaaaa;
}

/* Floating Elements */
.floating-wa {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
  z-index: 100;
  transition: var(--transition);
}
.floating-wa:hover {
  transform: scale(1.1);
}
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--secondary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Animasi Scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================================================
   RESPONSIVE (MOBILE OPTIMIZATION) - VERSI 2 KOLOM (KOMPAK & RAPI)
   ================================================== */
@media (max-width: 768px) {
  /* 1. Lebar Container & Spacing Dasar */
  .container {
    width: 95%; /* Memaksimalkan ruang kosong di kiri-kanan layar HP */
  }
  .section-padding {
    padding: 40px 0;
  }
  .section-title {
    margin-bottom: 20px;
  }
  .section-title h2 {
    font-size: 1.4rem; /* Mengecilkan judul agar tidak memakan tempat */
  }
  .section-title p {
    font-size: 0.85rem;
  }

  /* 2. Header & Navigasi */
  .nav-links {
    position: absolute;
    top: 80px;
    left: -100%;
    width: 100%;
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 1px solid var(--border-color);
  }
  .nav-links.active {
    left: 0;
  }
  #mobile-menu-btn {
    display: block;
  }

  /* 3. Hero Section (Banner) */
  .hero {
    min-height: auto;
    padding: 100px 0 50px;
  }
  .hero h1 {
    font-size: 1.5rem; /* Judul banner lebih proporsional */
  }
  .hero p {
    font-size: 0.85rem;
  }
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .hero-buttons .btn {
    margin: 0;
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
  }
  .hero-stats span {
    font-size: 0.8rem;
  }

  /* 4. Filter Kategori (Bisa digeser/swipe ke samping) */
  .filter-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 10px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-buttons::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  /* 5. GRID PRODUK (DIBUAT 2 KOLOM) */
  .grid-products {
    grid-template-columns: repeat(2, 1fr); /* Tampil 2 produk berdampingan */
    gap: 10px; /* Jarak antar produk dirapatkan */
  }
  .product-card {
    border-radius: 8px;
  }
  .product-img {
    height: 120px; /* Tinggi gambar dipendekkan agar pas di HP */
  }
  .product-info {
    padding: 10px;
  }
  .product-title {
    font-size: 0.85rem;
    margin-bottom: 3px;
    line-height: 1.2;
  }
  .product-category {
    font-size: 0.65rem;
    margin-bottom: 3px;
  }
  .product-price {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }
  .product-info .btn {
    padding: 6px;
    font-size: 0.75rem; /* Tombol pesan di dalam card lebih mungil */
  }

  /* 6. GRID FITUR / KEUNGGULAN (DIBUAT 2 KOLOM) */
  .grid-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .feature-card {
    padding: 15px 10px;
  }
  .feature-card i {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }
  .feature-card h3 {
    font-size: 0.85rem;
  }

  /* 7. GRID GALERI (DIBUAT 2 KOLOM) */
  .grid-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .grid-gallery img {
    height: 120px; /* Galeri kotak-kotak rapi */
    border-radius: 8px;
  }

  /* 8. Testimoni, Kontak, dan Peta (Sisa 1 Kolom tapi dipadatkan) */
  .grid-testimonials {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .testi-card {
    padding: 15px;
  }
  .grid-contact {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .info-list li {
    margin-bottom: 12px;
    font-size: 0.85rem;
  }
  .map-container {
    height: 200px; /* Peta lebih ceper */
  }

  /* 9. Floating Buttons */
  .floating-wa {
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
