/* ======== RESET & BASE ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #fff;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ======== HEADER ======== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #eee;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-weight: 700;
  font-size: 18px;
}

.search-box {
  display: flex;
  gap: 6px;
}

.search-box input {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 160px;
}

.search-box button {
  background: #000;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.profile-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}

/* ======== BANNER ======== */
.banner img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin-top: 10px;
  border-radius: 8px;
}

.popup-content .close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  cursor: pointer;
}

.popup-content select,
.popup-content button {
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border-radius: 6px;
}

/* HEADER */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 10px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 700;
  font-size: 18px;
}

.search-container {
  flex: 1;
  text-align: center;
}

.search-container input {
  width: 60%;
  max-width: 420px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.search-container button {
  padding: 8px 12px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 5px;
  margin-left: 4px;
  cursor: pointer;
}

.profile-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
}

/* BANNER */
.banner img {
  display: block;
  margin: 20px auto;
  width: 70%;
  max-width: 900px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .banner img {
    width: 92%;
  }
}

/* PRODUK GRID */
.product-grid {
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 0 6% 100px;
  grid-template-columns: repeat(2, 1fr); /* HP: 2 produk */
}

/* Tablet (3 produk per baris) */
@media (min-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Laptop (4 produk per baris) */
@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Desktop besar (5 produk per baris) */
@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
    padding: 0 8%;
  }
}

.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  text-align: center;
  padding: 15px;
  transition: 0.2s;
  width: 210px;
}
.card:hover { transform: translateY(-5px); }

.card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
}

.card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 8px 0;
}

.card p {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.card button {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  transition: 0.3s;
}
.card button:hover { background: #333; }

/* FOOTER */
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 12px;
  gap: 15px;
  position: fixed;
  bottom: 0;
  width: 100%;
}

.footer button {
  background: #f3f3f3;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}
.home-btn { background: #000; color: white; }

body, html {
  overflow-x: hidden;
}

body {
  padding-bottom: 90px; /* ruang ekstra di bawah biar aman */
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
}

/* POPUP GENERAL */
.info-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
}
.info-popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.info-popup-content h3 {
  margin-bottom: 10px;
}
.info-popup-content button {
  background: #000;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
}

/* ====== KATEGORI GRID DENGAN EMOJI ====== */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 20px 40px;
  justify-items: center;
  text-align: center;
  margin-top: 20px;
}

.cat {
  cursor: pointer;
  transition: transform 0.25s ease;
}

.cat:hover {
  transform: translateY(-5px);
}

/* ===== RESPONSIF HP ===== */
@media (max-width: 768px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px 20px;
  }

  .icon-circle {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

  .cat p {
    font-size: 13px;
  }
}

/* ====== KATEGORI GRID DENGAN EMOJI (RESPONSIF) ====== */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  padding: 20px 40px;
  justify-items: center;
  text-align: center;
  margin-top: 20px;
}

.cat {
  cursor: pointer;
  transition: transform 0.25s ease;
}

.cat:hover {
  transform: translateY(-4px);
}

.icon-circle {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: #f9f9f9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  transition: 0.25s ease;
}

.cat:hover .icon-circle {
  background: #000;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.cat p {
  margin-top: 6px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* ===== RESPONSIF UNTUK HP ===== */
@media (max-width: 480px) {
  .categories {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px 15px;
  }

  .icon-circle {
    width: 58px;
    height: 58px;
    font-size: 22px;
  }

  .cat p {
    font-size: 11.5px;
  }
}

.info-popup.hidden {
  display: none;
}

#packagePopup .info-popup-content {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

#packagePopup .close {
  position: absolute;
  right: 16px;
  top: 10px;
  cursor: pointer;
  font-size: 22px;
}

#packageList button {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  cursor: pointer;
  transition: 0.25s;
}
#packageList button:hover {
  background: #333;
}

.pkg-btn:hover {
  background: #f5f5f5;
}

.pkg-btn.active {
  border: 2px solid #111;
  background: #eaeaea;
}

.popup-actions button {
  flex: 1;
  margin: 0 4px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.cancel-btn {
  background: #ccc;
}

.continue-btn {
  background: #111;
  color: white;
}

.pkg-btn.active {
  border: 2px solid #000;
  background: #f1f1f1;
}

.popup-actions button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.cancel-btn {
  background: #ccc;
}

.continue-btn {
  background: #000;
  color: #fff;
}

#paymentInfo.hidden { display: none; }
#paymentInfo {
  background: #fff;
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
}
.done-btn {
  background: #28a745;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  margin-top: 15px;
  cursor: pointer;
  font-weight: 600;
}
.done-btn:hover {
  background: #1e7e34;
}

/* ==== PERBAIKAN POPUP PILIH PAKET ==== */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Perbaikan mobile biar tidak kepotong */
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 10px 110px;
  }

  .card {
    width: 100%;
    max-width: 180px;
  }

  .card img {
    width: 65px;
    height: 65px;
  }

  .card h3 {
    font-size: 13px;
  }

  .card p {
    font-size: 12px;
  }

  .card button {
    padding: 6px 10px;
    font-size: 12px;
  }
}

.ribbon {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #ff2a2a;
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 600;
}
.card {
  position: relative;
}

.cat.active .icon-circle {
  background: #000;
  color: #fff;
  transform: scale(1.08);
}

/* ========== ICON CIRCLE MODERN ========== */
.icon-circle {
  width: 55px;
  height: 55px;
  font-size: 20px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0,0,0,0.07);
  transition: 0.25s ease;
  cursor: pointer;
  border: 1px solid #e8e8e8;
}

/* Hover efek glowing */
.cat:hover .icon-circle {
  background: #000;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  transform: translateY(-4px);
}

/* Aktif (kategori terpilih) */
.cat.active .icon-circle {
  background: #000;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  transform: scale(1.08);
}

/* 📱 Responsif HP */
@media (max-width: 480px) {
  .icon-circle {
    width: 65px;
    height: 65px;
    font-size: 26px;
  }
}

/* ✅ Fix kategori tetap sejajar */
.categories {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px;
}

/* ✅ Mobile -- rapat tapi tetap sejajar */
@media(max-width: 600px){
  .categories {
    gap: 16px;
  }
}

/* ✅ Perbaikan kategori di HP */
@media (max-width: 480px) {
  .categories {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    padding: 10px 18px;
  }

  .icon-circle {
    width: 58px !important;
    height: 58px !important;
    font-size: 22px !important;
  }

  .cat p {
    font-size: 12px !important;
    margin-top: 5px;
  }
}

/* Popup Overlay */
.info-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Popup Box */
.info-popup-content {
  background: #ffffff;
  padding: 22px;
  width: 90%;
  max-width: 420px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  text-align: center;
  animation: fadeUp .25s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Invoice Card Style */
.inv-box {
  margin-top: 14px;
  padding: 14px;
  background: #f7f7f7;
  text-align: left;
  border-radius: 12px;
  border-left: 4px solid #007aff;
  font-size: 14px;
  line-height: 1.4rem;
}

.inv-box p {
  margin: 4px 0;
}

/* Status Badge */
.status-badge {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
}

.status-pending { background: #f59e0b; }
.status-paid { background: #10b981; }
.status-done { background: #007aff; }
.status-canceled { background: #e11d48; }

/* Buttons */
.info-popup-content button {
  background: #111;
  color: white;
  border: none;
  padding: 10px;
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
}

.popup.hidden { display: none; }

.popup-content {
  background: #fff;
  width: 92%;
  max-width: 420px;
  padding: 20px;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  text-align: center;
  animation: pop 0.25s ease-out;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(15px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Judul produk */
#popupTitle {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* List Varian */
.pkg-btn {
  width: 100%;
  text-align: left;
  padding: 14px;
  margin: 6px 0;
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s;
}

.pkg-btn:hover {
  background: #f1f1f1;
}

.pkg-btn.active {
  border-color: #111;
  background: #eaeaea;
}

/* container tombol bawah */
.popup-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.popup-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
}

.cancel-btn { background: #ccc; color: #222; }
.continue-btn { background: #111; color: #fff; }
.continue-btn:hover { background: #000; }

/* === HOME BUTTON FIXED STYLING === */
.home-btn {
  background: #000;
  color: #fff;
  font-weight: 700;
  border: none;
  padding: 10px 28px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.25s ease;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.home-btn:hover {
  background: #111;
  transform: translateY(-3px);
}

.home-btn:active {
  transform: scale(.97);
}

@media(max-width: 480px){
  .home-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* Fix Home Button Transparency */
.footer .home-btn {
  background: #000 !important;
  color: #fff !important;
  opacity: 1 !important;
  border-radius: 10px;
  padding: 10px 28px;
}

.floating-wa {
  position: fixed;
  right: 18px;
  bottom: 80px; /* ✅ naik dari 18 → 80 */
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.floating-wa img {
  width: 35px;
  height: 35px;
}

/* ✅ Jika di layar kecil, naikin lebih tinggi lagi */
@media (max-width: 480px) {
  .floating-wa {
    bottom: 100px;
    width: 55px;
    height: 55px;
  }
  .floating-wa img {
    width: 30px;
    height: 30px;
  }
}

@keyframes pulseWA {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.floating-wa {
  animation: pulseWA 1.8s infinite ease-in-out;
}
