/* Menu di HP: tampil sebagai baris yang bisa digeser di bawah logo */
@media (max-width: 819px) {
  header .bar { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  header nav { display: flex; order: 3; flex: 0 0 100%; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  header nav::-webkit-scrollbar { display: none; }
  header nav a { flex: none; border: 2px solid var(--ink); background: var(--paper); padding: 3px 14px; font-size: .85rem; }
  html { scroll-padding-top: calc(120px + env(safe-area-inset-top, 0px)); }
}

/* Galeri */
.gal { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile { position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--green); cursor: pointer; box-shadow: var(--pop); font: inherit; color: #fff; text-align: left; transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .cap { position: absolute; inset: auto 0 0; padding: 30px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); font-weight: 700; font-size: .85rem; }
.tile .play { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; background: var(--sun); color: var(--ink); border: 2px solid var(--ink); display: grid; place-items: center; font-size: .85rem; }
.tile .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.6rem; }

#lb { width: min(920px, calc(100% - 24px)); max-height: 92vh; padding: 0; border: 2px solid var(--ink); border-radius: 20px; background: var(--paper); color: var(--ink); overflow: auto; }
#lb::backdrop { background: rgba(10, 20, 14, .82); }
#lbmedia { background: #000; display: grid; place-items: center; }
#lbmedia img, #lbmedia video { width: 100%; max-height: 70vh; object-fit: contain; }
#lbmedia iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
#lbtext { margin: 0; padding: 16px 20px 20px; color: var(--muted); }
#lbtext b { display: block; color: var(--ink); font-family: var(--display); font-size: 1.2rem; }
.lbx { position: absolute; top: 10px; right: 10px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: var(--sun); font-size: 1.3rem; font-weight: 800; cursor: pointer; }

/* Panduan */
.prose { max-width: 46em; }
.prose p { color: var(--muted); margin: 12px 0 0; }
.table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: 18px; background: var(--paper); box-shadow: var(--pop); }
table.compare { width: 100%; border-collapse: collapse; min-width: 680px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 2px solid var(--ink); font-size: .95rem; }
.compare th { background: var(--sun); font-weight: 800; }
.compare tr:last-child td { border-bottom: 0; }
.compare td a { font-weight: 800; border-bottom: 3px solid var(--sun); }
.choices { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.choice { background: var(--paper); border: 2px solid var(--ink); border-radius: 22px; box-shadow: var(--pop); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.choice p { color: var(--muted); margin: 0; }
.choice .btn { margin-top: auto; align-self: flex-start; }
.tips { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.tips li { position: relative; padding-left: 30px; color: var(--muted); }
.tips li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.cta-box { background: var(--green); color: #fff; border: 2px solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--sun); padding: 36px 28px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.cta-box h2 { color: #fff; }
.cta-box p { margin: 0; color: #e4f4e8; max-width: 34em; }

/* Filter dan pencarian */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filter { display: grid; gap: 14px; margin-bottom: 24px; }
.f-row { display: flex; gap: 10px; }
.f-search { flex: 1; }
.filter input, .filter select { width: 100%; font: inherit; padding: 11px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); color: var(--ink); }
.f-more { border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); padding: 0 16px; }
.f-more summary { cursor: pointer; font-weight: 800; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; }
.f-more summary::-webkit-details-marker { display: none; }
.f-more summary::after { content: "▾"; }
.f-more[open] summary::after { content: "▴"; }
.f-grid { display: grid; gap: 12px; padding: 4px 0 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.f-grid label { display: grid; gap: 4px; font-weight: 700; font-size: .85rem; }
.f-reset { justify-self: start; font-weight: 800; border-bottom: 3px solid var(--sun); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 52em; }
.faq details { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1.2; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Testimoni */
.quotes { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.quote { margin: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 22px; box-shadow: var(--pop); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.quote p { margin: 0; }
.quote .who { display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.quote small { color: var(--muted); }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; background: var(--sun); display: grid; place-items: center; font-weight: 800; }

.social { display: flex; flex-wrap: wrap; gap: 10px; }

/* Rapikan di HP */
.hero { overflow: hidden; }
.card h3, .price { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand img { width: 38px; height: 38px; }
  h1 { font-size: 2.1rem; }
  .hero { padding: 36px 0 52px; }
  .f-row { flex-direction: column; }
}
/* Filter: rapi di HP dan laptop */
.filter { max-width: 920px; }
.f-row { align-items: stretch; }
.f-search { min-width: 0; }

.filter input, .filter select {
  min-width: 0; max-width: 100%; height: 46px;
  padding: 0 14px; font-size: .95rem; border-radius: 14px;
}

/* Panah pilihan berwarna emas, tanpa tampilan bawaan browser */
.filter select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23e8b84a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

/* Hilangkan tombol panah kecil di isian angka */
.filter input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.filter input[type=number]::-webkit-outer-spin-button,
.filter input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.f-more { box-shadow: 3px 3px 0 var(--ink); }
.f-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 6px 0 16px; }
.f-grid label { min-width: 0; font-size: .8rem; color: var(--muted); }

/* Tombol Terapkan: emas dan selebar kotak di HP */
.f-more > .btn { width: 100%; justify-content: center; background: var(--sun); color: var(--dark); }

@media (min-width: 720px) {
  .f-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .f-grid label:nth-child(-n+2) { grid-column: span 2; }  /* Status dan Urutkan di baris pertama */
  .f-more > .btn { width: auto; }
}

@media (max-width: 420px) {
  .f-row .btn { width: 100%; justify-content: center; }
}

/* Filter: pastikan tidak ada yang keluar dari bingkai */
.filter, .filter *, .filter *::before, .filter *::after { box-sizing: border-box; }

.f-more { overflow: hidden; }
.f-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.f-grid > label { display: block; min-width: 0; }
.f-grid > label > input,
.f-grid > label > select {
  display: block; width: 100%; min-width: 0; max-width: 100%; margin-top: 6px;
}

/* Tombol Terapkan: selebar kotak di HP */
.f-more > .btn { display: flex; justify-content: center; width: 100%; max-width: 100%; margin: 0 0 16px; }

@media (min-width: 720px) {
  .f-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .f-more > .btn { display: inline-flex; width: auto; }
}