/* ===========================================================
   FUKURO STORE — Tosca Gradient BG + Nagaram Layout
   =========================================================== */

:root {
  --tosca-green: #10c9a3;
  --tosca-mid: #0eb6bd;
  --tosca-blue: #0e8fc4;

  --text: #0d3b3a; /* dark text (used inside the white search field) */
  --text-light: #ffffff; /* text on gradient background */
  --muted: #5a7d7b;

  /* Dark Teal Glass cards (replaces the old white cards) */
  --card: rgba(59, 67, 70, 0.82); /* deep teal, slightly see-through */
  --card-border: rgba(255, 255, 255, 0.14);
  --card-text: #eafffb; /* near-white text on dark cards */
  --card-muted: #9fc9c4; /* soft tosca for secondary text */

  --glass: rgba(255, 255, 255, 0.16);
  --glass-border: rgba(255, 255, 255, 0.5);

  --teal-1: #12c3a6;
  --teal-2: #0e93c2;

  --shadow-sm: 0 6px 18px rgba(3, 60, 70, 0.14);
  --shadow: 0 14px 34px rgba(3, 60, 70, 0.22);
  --radius: 14px;
  --maxw: 1080px; /* lebar konten -> beri space kiri & kanan (gaya Takapedia) */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* cegah scroll mendatar (mis. dari menu geser/drawer off-canvas) */
}

body {
  font-family:
    "Segoe UI",
    Roboto,
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      1100px 600px at 85% -5%,
      rgba(255, 255, 255, 0.32),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 5% 8%,
      rgba(16, 201, 163, 0.5),
      transparent 55%
    ),
    linear-gradient(
      135deg,
      var(--tosca-green) 0%,
      var(--tosca-mid) 45%,
      var(--tosca-blue) 100%
    );
  background-attachment: fixed;
  min-height: 100vh;
  padding-top: 108px;
  overflow-x: clip; /* clip: hentikan luapan mendatar tanpa merusak position:sticky sidebar */
}

img {
  max-width: 100%;
  display: block;
}

/* centered content with side space */
.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ------------------- NAVBAR (floating glass) ------------------- */
header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 16px 24px;
}

.nav-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(3, 60, 70, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-weight: 800;
  font-size: 19px;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.search {
  flex: 1;
  min-width: 0; /* cegah overflow di layar sempit */
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 5px 5px 5px 20px;
}

.search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.search input::placeholder {
  color: #9aa7ad;
}

.search button {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-1), var(--teal-2));
  display: grid;
  place-items: center;
}

.auth {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-user,
.nav-balance {
  color: var(--text-light);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.nav-balance {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: 999px;
}

.btn-login {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 11px 24px;
  font-size: 15px;
  font-weight: 700;
  color: #0e5a52;
  background: #fff;
  box-shadow: 0 6px 16px rgba(3, 60, 70, 0.18);
  transition: transform 0.15s ease;
}

.btn-daftar {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  border-radius: 12px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light);
  transition: background 0.15s ease;
}

.btn-login:hover {
  transform: translateY(-2px);
}
.btn-daftar:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ------------------- HAMBURGER + DRAWER (menu HP) ------------------- */
/* Tombol hamburger: default disembunyikan (desktop), tampil di layar kecil. */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  padding: 0 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: #fff;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 30, 34, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  z-index: 90;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 320px;
  max-width: 86vw;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: linear-gradient(160deg, #0f9f97, #0c7fb0);
  box-shadow: -18px 0 44px rgba(3, 60, 70, 0.4);
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.4, 0.05, 0.2, 1);
  overflow-y: auto;
}
body.drawer-open .drawer-overlay {
  opacity: 1;
  visibility: visible;
}
body.drawer-open .drawer {
  transform: translateX(0);
}
body.drawer-open {
  overflow: hidden;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.drawer-head .brand {
  font-size: 16px;
}
.drawer-head .brand img {
  width: 38px;
  height: 38px;
}
.drawer-close {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.drawer-auth {
  padding: 12px 2px;
}
.drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 12px;
}
.drawer-user .av {
  font-size: 26px;
}
.drawer-user .dt {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  color: #fff;
}
.drawer-user .dt b {
  font-size: 15px;
}
.drawer-user .dt small {
  font-size: 13px;
  opacity: 0.92;
}

.drawer-actions {
  display: grid;
  gap: 9px;
}
.d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.d-btn.solid {
  background: #fff;
  color: #0e7d70;
  border-color: transparent;
}
.d-btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.drawer-menu {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.drawer-menu a,
.drawer-acc {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  justify-content: flex-start;
}
.drawer-acc {
  justify-content: space-between;
}
.drawer-menu a .di,
.drawer-acc .di {
  font-size: 17px;
}
.drawer-menu a:hover,
.drawer-menu a.active,
.drawer-acc:hover {
  background: rgba(255, 255, 255, 0.18);
}
.drawer-sub {
  display: grid;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding-left: 14px;
}
.drawer.sub-open .drawer-sub {
  max-height: 200px;
}
.drawer-sub a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: #eafffb;
}
.drawer-sub a:hover {
  background: rgba(255, 255, 255, 0.14);
}
.di-caret {
  transition: transform 0.25s ease;
}
.drawer.sub-open .di-caret {
  transform: rotate(180deg);
}

/* ------------------- TOMBOL WHATSAPP MENGAMBANG ------------------- */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.5);
  z-index: 70;
  transition: transform 0.15s ease;
}
.wa-float:hover {
  transform: scale(1.08);
}
@media (max-width: 768px) {
  .wa-float {
    width: 52px;
    height: 52px;
    right: 14px;
    bottom: 14px;
  }
}

/* ------------------- SLIDER PROMO (full, no crop) ------------------- */
.hero {
  margin-top: 24px;
}

.slider {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1920 / 754; /* sama dengan ukuran banner -> tidak pernah terpotong */
  background: rgba(255, 255, 255, 0.12);
}

.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  touch-action: pan-y; /* izinkan scroll vertikal, tangkap geser mendatar */
  cursor: grab;
  transition: transform 0.45s ease;
}
.slider-track.dragging {
  transition: none;
  cursor: grabbing;
}

.slider-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover; /* pas mengisi karena rasio kontainer = rasio gambar */
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none; /* biar event geser diterima track, bukan gambar */
}

/* Panah geser (tampil di desktop, HP cukup swipe) */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #0e7d70;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(3, 60, 70, 0.25);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.slider:hover .slider-arrow {
  opacity: 1;
}
.slider-arrow.prev {
  left: 14px;
}
.slider-arrow.next {
  right: 14px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.slider-dots span {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition:
    background 0.2s ease,
    width 0.2s ease;
}

.slider-dots span.on {
  background: #fff;
  width: 42px;
}

/* ------------------- SECTION PANEL (Populer) ------------------- */
.section {
  margin-top: 32px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 800;
  color: var(--card-text);
  margin-bottom: 20px;
}

.pop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.pop-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-1), var(--teal-2));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 18px rgba(14, 165, 185, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  min-width: 0; /* biar teks bisa dipangkas, tidak melebar */
}

.pop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(14, 165, 185, 0.4);
}

.pop-card img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(3, 60, 70, 0.25);
}

.pop-card > div {
  min-width: 0;
}

.pop-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pop-card p {
  font-size: 12.5px;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------- CATEGORY TABS ------------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.tab {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-light);
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.32);
}

.tab.active {
  border-color: transparent;
  color: var(--teal-2);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

/* ------------------- CATEGORY HEADING + RULE ------------------- */
.cat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 22px;
}

.cat-head h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-light);
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.cat-head .slashes {
  color: #fff;
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  letter-spacing: -3px;
}

.cat-head .rule {
  flex: 1;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.1)
  );
  border-radius: 2px;
}

/* ------------------- GAME GRID (white poster cards) ------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    180deg,
    rgba(72, 82, 86, 0.85),
    rgba(50, 58, 62, 0.9)
  );
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 10px 10px 4px;
  color: var(--card-text);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(3, 60, 70, 0.32);
  border-color: rgba(16, 201, 163, 0.75);
}

.game-card .thumb {
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  overflow: hidden;
  background: #eef5f3;
  margin-bottom: 10px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 6px 14px rgba(3, 60, 70, 0.18);
}

.game-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .thumb img {
  transform: scale(1.06);
}

/* text thumbnail (e.g. pulsa, no logo image) */
.game-card .thumb.txt {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 30px;
  background: linear-gradient(135deg, var(--teal-1), var(--teal-2));
}

/* empty search/filter state */
#empty-msg {
  display: none;
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
  font-weight: 600;
  padding: 40px 10px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.game-card h3 {
  font-size: 14.5px;
  font-weight: 700;
  text-align: center;
  color: var(--card-text);
  line-height: 1.3;
  padding: 2px 4px 6px;
}

/* ------------------- FOOTER (contained glass) ------------------- */
footer {
  margin-top: 44px;
}

.footer-card {
  max-width: var(--maxw);
  margin-inline: auto;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-bottom: none;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 30px;
  padding: 40px 34px 30px;
}

.footer-col .brand {
  margin-bottom: 14px;
  color: var(--card-text);
  text-shadow: none;
}
.footer-col .brand span {
  background: linear-gradient(90deg, var(--teal-1), var(--teal-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-col > p {
  color: var(--card-muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--card-text);
}

.footer-col a {
  display: block;
  color: var(--card-muted);
  font-size: 14.5px;
  line-height: 2.2;
}

.footer-col a:hover {
  color: var(--tosca-green);
}

.socials {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}
.socials img {
  width: 30px;
  height: 30px;
  transition: transform 0.15s ease;
}
.socials img:hover {
  transform: translateY(-3px);
}

.pay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pay-chips span {
  font-size: 12px;
  font-weight: 800;
  color: var(--teal-2);
  background: #eef6f4;
  border: 1px solid #e2ece9;
  padding: 7px 12px;
  border-radius: 8px;
}

.footer-bottom {
  background: linear-gradient(90deg, var(--teal-1), var(--teal-2));
  text-align: center;
  padding: 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

/* ------------------- RESPONSIVE ------------------- */
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .pop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  header {
    padding: 12px 14px;
  }
  .nav-inner {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 8px 12px;
  }
  body {
    padding-top: 92px;
  }
  .brand span {
    display: none; /* HP: cukup logo saja agar rapi */
  }
  .brand img {
    width: 40px;
    height: 40px;
  }
  .search {
    order: 0;
    flex: 1;
    flex-basis: auto;
  }
  .auth {
    display: none; /* login/daftar pindah ke menu geser (drawer) */
  }
  .nav-burger {
    display: flex; /* tampilkan hamburger */
  }
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  /* Game cards: 3 per baris di HP (gaya Takapedia) */
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .game-card {
    padding: 7px 7px 3px;
  }
  .game-card h3 {
    font-size: 12px;
    padding: 2px 2px 5px;
  }
  .game-card .thumb {
    margin-bottom: 7px;
    border-radius: 10px;
  }
  /* "Paling Banyak Dicari" tetap 2 kolom di HP (rapi seperti contoh) */
  .pop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .pop-card {
    gap: 11px;
    padding: 12px;
  }
  .pop-card img {
    width: 46px;
    height: 46px;
  }
  /* Kategori (Game / MLBB / App Premium / Pulsa) rapi 2x2 sejajar */
  .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .tab {
    text-align: center;
    padding: 11px 10px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    padding: 28px 20px;
  }
  .cat-head h2 {
    font-size: 20px;
  }
  .panel {
    padding: 18px;
  }
  .btn-login,
  .btn-daftar {
    padding: 9px 15px;
    font-size: 14px;
  }
  .brand {
    font-size: 17px;
  }
  .brand img {
    width: 38px;
    height: 38px;
  }
}

/* HP sangat kecil: "Paling Banyak Dicari" jadi 1 kolom biar tak sempit */
@media (max-width: 360px) {
  .pop-grid {
    grid-template-columns: 1fr;
  }
  .pop-card {
    flex-direction: row;
    align-items: center;
  }
}

/* ===================================================================
   SUB-NAV (menu kecil permanen di bawah header) — gaya Takapedia
   =================================================================== */
body.has-subnav {
  padding-top: 170px; /* ruang untuk header + sub-nav yang fixed */
}

/* Sub-nav MENYAMBUNG dengan header (hanya di halaman ber-subnav) */
body.has-subnav .nav-inner {
  border-radius: 18px 18px 0 0; /* sudut bawah lurus supaya menempel */
  border-bottom: none;
  box-shadow: none;
}

.subnav {
  max-width: var(--maxw);
  margin: 0 auto; /* tanpa jarak -> menempel di bawah header */
  padding: 5px 12px;
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(255, 255, 255, 0.18); /* garis pemisah tipis antar baris */
  border-radius: 0 0 18px 18px;
  box-shadow: 0 10px 26px rgba(3, 60, 70, 0.2);
}

.subnav-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.subnav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.subnav-item:hover,
.subnav-item.active {
  background: rgba(255, 255, 255, 0.24);
}
.subnav .caret {
  font-size: 10px;
  opacity: 0.85;
}

.subnav-drop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  max-width: calc(100vw - 32px); /* jangan lewati layar di HP */
  display: grid;
  gap: 2px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s;
  z-index: 60;
}
.has-drop:hover .subnav-drop,
.has-drop:focus-within .subnav-drop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.subnav-drop a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--card-text);
}
.subnav-drop a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@media (max-width: 768px) {
  /* Di HP, sub-nav pindah ke menu geser (drawer) -> sembunyikan baris subnav
     supaya header tetap satu baris rapi (logo + pencarian + hamburger). */
  .subnav {
    display: none;
  }
  body.has-subnav {
    padding-top: 92px;
  }
}
