/* Laman Header dan Dashboard */
/* =========================
   MOBILE (<= 768px)
========================= */
@media (max-width: 768px) {
  /* tampilkan sidebar */
  .setting-sidebar {
    display: block;
  }

  /* sembunyikan hamburger */
  .hamburger {
    display: none;
  }

  /* logo jadi clickable */
  .logo-trigger {
    cursor: pointer;
  }

  /* sembunyikan link nav kiri */
  .nav-left a {
    display: none;
  }

  /* spacing lebih rapat */
  .nav-left {
    gap: 8px;
  }

  /* kecilkan logo */
  .logo-trigger img {
    width: 32px;
    height: 32px;
  }

  /* kecilkan teks logo */
  .logo-trigger strong {
    font-size: 14px;
  }

  .logo-trigger span {
    font-size: 10px;
  }

  /* padding navbar */
  .navbar {
    padding: 12px 15px;
  }

  /* sembunyikan brand */
  .brand {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* FORM */
  .navbar form {
    width: 40px !important;
    height: 40px;
    max-width: 40px !important;
    transition: all 0.3s ease;
    overflow: visible;
    margin-left: auto; /* 🔥 dorong ke kanan */
  }

  /* BOX DALAM */
  .navbar form > div:first-of-type {
    display: flex;
    align-items: center;
    justify-content: center; /* 🔥 ini kunci center */
    padding: 0; /* 🔥 hapus padding biar ga geser */
    width: 100%;
    height: 100%;
  }

  /* ICON */
  .navbar form img {
    width: 18px;
    display: block;
  }

  /* INPUT HIDDEN */
  #searchInput {
    display: none;
  }

  /* SAAT EXPAND */
  .navbar form.active {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: -38px !important;
  }

  .navbar form.active > div:first-of-type {
    justify-content: flex-start;
    padding: 10px 15px;
  }

  .navbar form.active #searchInput {
    display: block;
    width: 100%;
  }
}

@media (max-width: 768px) {
  #searchDropdown {
    min-height: 0 !important;
    max-height: 72px;
    height: auto !important;
    overflow-y: auto;
  }
}

/* =========================
   NAV RIGHT DEFAULT
========================= */
.nav-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* =========================
   TABLET (<=1280px)
   → tetap tampil semua
========================= */
@media (max-width: 1280px) {
  .nav-right {
    display: flex;
  }
}

/* =========================
   MOBILE (<=768px)
========================= */
@media (max-width: 768px) {
  /* layout navbar */
  .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  /* search ambil ruang tengah */
  .nav-center {
    flex: 1;
  }

  /* kanan (profile) */
  .nav-right {
    display: flex;
    align-items: center;
    margin-top: 3px;
    margin-left: 5px;
  }

  /* ❌ cart hilang */
  .cart-wrapper {
    display: none;
  }

  /* ✅ profile tetap */
  .profile-dropdown {
    display: block;
  }

  /* ukuran avatar */
  .avatar {
    width: 40px;
    height: 40px;
  }

  /* search expand tetap aman */
  .navbar form.active {
    width: 100% !important;
  }

  .kelas-link {
    display: none;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  /* default: cuma tampil 2 */
  .tryout-grid a:nth-child(n + 3) {
    display: none;
  }

  /* kalau aktif → tampil semua */
  .tryout-grid.show-all a {
    display: block;
  }
}

/* Laman Simulasi */
@media (max-width: 768px) {
  .simulasi-wrapper {
    padding: 0 15px;
  }

  .simulasi-layout {
    margin-left: -5px;
  }

  .mini-panel {
    width: 100%;
    /* margin-left: -4px; */
  }
}

@media (max-width: 768px) {
  .paket-card ul {
    display: none;
  }
}

@media (max-width: 768px) {
  .paket-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .paket-card {
    height: auto !important;
    min-height: unset !important;
    padding: 14px !important;
    border-radius: 16px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .paket-card ul {
    display: none;
  }

  .paket-header {
    font-size: 14px;
    padding: 8px;
    margin-bottom: 6px;
  }

  .paket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -6px !important;
  }

  .harga {
    line-height: 1.2;
  }

  .harga del {
    font-size: 12px;
  }

  .harga span {
    font-size: 16px;
  }

  .btn-card {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
  }
}

@media (max-width: 768px) {
  .paket-grid {
    margin-bottom: 30px !important; /* 🔥 kecilin jarak antar card */
  }

  .paket-card {
    margin-bottom: -15px !important; /* 🔥 hilangin extra spacing */
  }
}
