/* ============================================================
   toko.css – Halaman Toko Terpercaya Pantau Tech
   (warna, font, header, hero & footer ada di style.css)
   ============================================================ */

.toko-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 56px;
}

.toko-group + .toko-group { margin-top: 36px; }

/* ── Judul bagian (Top 12 / Toko Lainnya) ───────────────── */
.toko-section-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 14px;
}

.toko-section-title {
  font-stretch: 125%;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--white);
}

.toko-group:first-child .toko-section-title {
  color: var(--neon);
  text-shadow: 0 0 16px rgba(57, 255, 126, .4);
}

.toko-section-sub {
  font-size: 13px;
  color: var(--muted);
}

/* ── Daftar toko ────────────────────────────────────────── */
.toko-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toko-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s;
}

.toko-card:hover { border-color: var(--line-2); }

/* Top: ada kolom angka peringkat di kiri */
.toko-card-top {
  grid-template-columns: 30px 52px minmax(0, 1fr) auto;
  padding-left: 10px;
  background: linear-gradient(90deg, rgba(57, 255, 126, .07), var(--surface) 45%);
  border-color: rgba(57, 255, 126, .18);
}

.toko-card-top:hover { border-color: rgba(57, 255, 126, .45); }

.toko-rank {
  font-stretch: 125%;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  text-align: center;
  color: var(--neon);
  font-variant-numeric: tabular-nums;
}

/* 3 teratas sedikit lebih menyala */
.toko-list-top .toko-card:nth-child(-n+3) .toko-rank {
  font-size: 26px;
  text-shadow: 0 0 14px rgba(57, 255, 126, .55);
}

/* ── Logo ───────────────────────────────────────────────── */
.toko-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toko-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toko-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-stretch: 125%;
  font-size: 16px;
  font-weight: 900;
  color: var(--neon);
  background: var(--neon-soft);
}

/* ── Info ───────────────────────────────────────────────── */
.toko-info { min-width: 0; }

.toko-nama {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toko-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.toko-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: var(--white);
}

.toko-rating svg { color: #facc15; }

.toko-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid rgba(57, 255, 126, .5);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--neon);
}

/* ── Tombol ─────────────────────────────────────────────── */
.toko-actions {
  display: flex;
  gap: 6px;
}

.toko-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s;
}

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

.toko-btn-note {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--white);
}
.toko-btn-note:hover { border-color: var(--white); }

.toko-btn-shopee {
  background: var(--neon);
  border: 1px solid var(--neon);
  color: var(--black);
}
.toko-btn-shopee:hover { background: #6dffa0; }

/* ── Modal catatan ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid rgba(57, 255, 126, .3);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 20px 60px rgba(0, 0, 0, .8), 0 0 40px rgba(57, 255, 126, .12);
  overflow: hidden;
  transform: translateY(10px);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}

.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 14px 14px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.modal-title {
  font-stretch: 125%;
  font-weight: 900;
  font-size: 17px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--neon);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
}

.modal-close:hover { border-color: var(--white); }

.modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.modal-body p + p { margin-top: 12px; }

/* ── HP ─────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .toko-card {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 10px 10px 12px;
  }
  .toko-card-top {
    grid-template-columns: 22px 44px minmax(0, 1fr) auto;
    padding-left: 8px;
  }
  .toko-logo-wrap { width: 44px; height: 44px; border-radius: 10px; }
  .toko-rank { font-size: 18px; }
  .toko-list-top .toko-card:nth-child(-n+3) .toko-rank { font-size: 21px; }
  .toko-nama { font-size: 14px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .toko-meta { gap: 0 8px; font-size: 11.5px; }
  .toko-actions { flex-direction: column; gap: 5px; }
  .toko-btn { height: 32px; padding: 0 12px; font-size: 12px; }

  /* Catatan muncul dari bawah, lebih enak dibaca pakai jempol */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box {
    max-width: none;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    transform: translateY(100%);
  }
  .modal-box::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 4px;
    background: var(--line-2);
  }
  .modal-header { padding-top: 22px; }
  .modal-body { padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .toko-pengikut { display: none; }
}