/*
Theme Name: Bio Katalog Pro
Theme URI: https://arzz.my.id
Author: Andriansah
Author URI: https://arzz.my.id
Description: Tema WordPress bio link dan katalog produk neobrutalism modern berbasis WordPress Pages, Categories, dan Customizer.
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
Text Domain: bio-katalog-pro
*/

:root {
  --latar: #F4E9DC;
  --kartu: #FFFFFF;
  --teks: #2B1D14;
  --aksen-dasar: #8A4B2A;
  --teks-aksen: #FFFFFF;
  --aksen: var(--aksen-dasar);
  --redam: rgba(0, 0, 0, 0.62);
  --garis: var(--teks);
  --jenis-huruf: 400 16px 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --tebal: 2px;
  --bayang: 4px 4px 0 var(--garis);
  --bayang-tekan: 2px 2px 0 var(--garis);
  color-scheme: light;
}

@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --redam: color-mix(in srgb, var(--teks) 66%, transparent);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--latar);
  color: var(--teks);
  font: var(--jenis-huruf);
  line-height: 1.5;
  min-height: 100vh;
}

/* Background image kustom jika diunggah */
body.kt-custom-bg {
  background-size: cover !important;
  background-position: center center !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1, h2, h3, p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--teks);
  outline-offset: 2px;
}

.kt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Kerangka */
.kt-akar {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

body.kt-ada-wa .kt-akar {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

/* Profil */
.kt-sampul {
  height: 0;
  padding-bottom: 33.33%;
  position: relative;
  overflow: hidden;
  background-color: var(--aksen);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0 10px, transparent 10px 20px);
  border-bottom: var(--tebal) solid var(--garis);
}

.kt-sampul img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kt-identitas {
  padding: 0 16px;
  margin-top: -46px;
  position: relative;
}

.kt-foto {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  border: var(--tebal) solid var(--garis);
  background: var(--kartu);
  box-shadow: var(--bayang);
  overflow: hidden;
}

.kt-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kt-inisial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--aksen);
  color: var(--teks-aksen);
  font-size: 2.4rem;
  font-weight: 800;
}

.kt-nama {
  margin-top: 14px;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.kt-bio {
  margin-top: 6px;
  color: var(--redam);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.kt-sosial {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.kt-sosial a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: var(--tebal) solid var(--garis);
  background: var(--kartu);
  box-shadow: var(--bayang-tekan);
  text-decoration: none;
}

/* Ikon platform & Chip */
.kt-ikon {
  display: block;
  flex: none;
}

.kt-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 10px;
  background: var(--chip, #5f6368);
  color: #fff;
}

/* Bilah Navigasi Tab */
.kt-bilah-tab {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 16px 10px;
  background: var(--latar);
}

body.kt-custom-bg .kt-bilah-tab {
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.kt-daftar-tab {
  display: flex;
  gap: 8px;
}

.kt-tab {
  flex: 1 1 0;
  min-height: 44px;
  padding: 8px 12px;
  border: var(--tebal) solid var(--garis);
  border-radius: 999px;
  background: var(--kartu);
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.kt-tab.kt-aktif,
.kt-tab[aria-selected="true"] {
  background: var(--aksen);
  color: var(--teks-aksen);
  box-shadow: var(--bayang-tekan);
}

.kt-tab:active {
  transform: translate(2px, 2px);
}

.kt-panel {
  padding: 8px 16px 8px;
}

/* Kotak Pencarian & Chip Filter Kategori Produk */
.kt-cari-wrap {
  margin: 0 0 14px;
}

.kt-cari-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--kartu);
  border: var(--tebal) solid var(--garis);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--bayang);
  color: var(--redam);
}

.kt-cari-box input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--teks);
  outline: none;
}

.kt-cari-box input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.kt-filter-kategori {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.kt-filter-kategori::-webkit-scrollbar {
  display: none;
}

.kt-chip-kategori {
  flex: 0 0 auto;
  border: var(--tebal) solid var(--garis);
  border-radius: 999px;
  background: var(--kartu);
  padding: 7px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
}

.kt-chip-kategori.kt-aktif {
  background: var(--aksen);
  color: var(--teks-aksen);
  box-shadow: var(--bayang-tekan);
}

.kt-chip-kategori:active {
  transform: translate(2px, 2px);
}

/* Kartu & Tautan */
.kt-daftar {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kt-kartu {
  position: relative;
  background: var(--kartu);
  border: var(--tebal) solid var(--garis);
  border-radius: var(--radius);
  box-shadow: var(--bayang);
}

.kt-tautan {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 10px;
  min-height: 68px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.kt-tautan:active {
  transform: translate(2px, 2px);
  box-shadow: var(--bayang-tekan);
}

.kt-utama {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.kt-mini {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
  display: block;
}

.kt-chip.kt-mini {
  display: inline-flex;
  border-radius: 12px;
}

.kt-teks {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.kt-judul {
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.kt-catatan {
  font-size: 0.85rem;
  color: var(--redam);
  overflow-wrap: anywhere;
}

.kt-lencana {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 3px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--aksen);
  color: var(--teks-aksen);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.6;
}

.kt-kecil {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--redam);
}

/* Grup Heading & Unggulan */
.kt-grup {
  margin: 10px 0 -2px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--redam);
}

.kt-grup::after {
  content: "";
  flex: 1;
  height: 2px;
  background: currentColor;
  opacity: 0.35;
}

.kt-unggulan {
  overflow: hidden;
  padding: 0;
}

.kt-unggulan a {
  display: block;
}

.kt-unggulan img,
.kt-unggulan .kt-chip {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
  border-bottom: var(--tebal) solid var(--garis);
}

.kt-unggulan-isi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-weight: 800;
}

.kt-unggulan-isi span:first-child {
  flex: 1;
  overflow-wrap: anywhere;
}

/* Video */
.kt-video {
  overflow: hidden;
  padding: 0;
}

.kt-video-kotak {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.kt-video-kotak button {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.kt-video-kotak img,
.kt-video-kotak iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.kt-putar {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kt-video-judul {
  padding: 10px 14px;
  font-weight: 700;
  border-top: var(--tebal) solid var(--garis);
}

/* Katalog Produk */
.kt-katalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kt-katalog.kt-geser {
  display: flex;
  overflow-x: auto;
  padding: 2px 6px 12px 2px;
  margin: 0 -6px 0 -2px;
  scroll-snap-type: x proximity;
}

.kt-geser > li {
  flex: 0 0 168px;
  scroll-snap-align: start;
}

.kt-produk {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kt-produk-gambar {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--latar);
  border-bottom: var(--tebal) solid var(--garis);
}

.kt-produk-gambar img,
.kt-produk-gambar .kt-tanpa-gambar {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kt-produk-gambar .kt-tanpa-gambar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.kt-produk-gambar .kt-lencana {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  margin: 0;
  box-shadow: 0 0 0 2px var(--kartu);
}

.kt-produk-isi {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  padding: 10px 12px 12px;
}

.kt-produk-nama {
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kt-produk-nama::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}

.kt-produk-desk {
  font-size: 0.82rem;
  color: var(--redam);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kt-harga {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  font-weight: 800;
  color: var(--aksen);
}

.kt-coret {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--redam);
  text-decoration: line-through;
}

.kt-tombol {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 8px 10px;
  border: var(--tebal) solid var(--garis);
  border-radius: 10px;
  background: var(--aksen);
  color: var(--teks-aksen);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.kt-produk .kt-harga + .kt-tombol {
  margin-top: 6px;
}

/* Pembayaran */
.kt-rekening {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kt-rekening-atas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kt-bank {
  font-weight: 800;
}

.kt-nomor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.kt-tombol-salin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border: var(--tebal) solid var(--garis);
  border-radius: 10px;
  background: var(--aksen);
  color: var(--teks-aksen);
  font-weight: 800;
  font-size: 0.85rem;
}

.kt-qris {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  text-align: left;
  background: var(--kartu);
  border: var(--tebal) solid var(--garis);
  border-radius: var(--radius);
  box-shadow: var(--bayang);
}

.kt-konfirmasi {
  margin-top: 14px;
}

/* Dialog / Modal */
.kt-dialog {
  width: calc(100% - 32px);
  max-width: 420px;
  padding: 0;
  border: var(--tebal) solid var(--garis);
  border-radius: var(--radius);
  background: var(--kartu);
  color: var(--teks);
  box-shadow: var(--bayang);
}

.kt-dialog:focus {
  outline: none;
}

.kt-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.kt-dialog:not([open]) {
  display: none;
}

.kt-dialog-kepala {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 12px 16px;
  border-bottom: var(--tebal) solid var(--garis);
  font-weight: 800;
}

.kt-dialog-isi {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.kt-dialog img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.kt-masuk {
  width: 100%;
  padding: 10px 12px;
  border: var(--tebal) solid var(--garis);
  border-radius: 10px;
  background: var(--latar);
  color: var(--teks);
  font: inherit;
}

.kt-baris-tombol {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kt-aksi {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: var(--tebal) solid var(--garis);
  border-radius: 10px;
  background: var(--kartu);
  font-weight: 700;
}

.kt-aksi-utama {
  background: var(--aksen);
  color: var(--teks-aksen);
}

/* Bilah WhatsApp Melayang */
.kt-wa-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 30;
  max-width: 608px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 16px;
  border: var(--tebal) solid var(--garis);
  border-radius: 999px;
  background: #1a9e4b;
  color: #fff;
  font-weight: 800;
  box-shadow: var(--bayang);
}

/* Header Minimal (Halaman Detail Produk) */
.kt-header-minimal .kt-sampul {
  position: relative;
}

.kt-tombol-kembali-mengapung {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  backdrop-filter: blur(3px);
}

.kt-identitas-minimal {
  padding-bottom: 20px;
}

.kt-identitas-minimal .kt-foto {
  display: block;
}

/* Halaman Detail Produk */
.kt-detail-produk {
  padding-top: 4px;
}

.kt-kembali-teks {
  display: inline-block;
  margin: 0 16px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--redam);
}

.kt-artikel-produk {
  padding: 0 16px 28px;
}

.kt-detail-gambar {
  position: relative;
  margin: 0 -16px 16px;
  overflow: hidden;
}

.kt-detail-gambar img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.kt-detail-gambar .kt-lencana {
  position: absolute;
  top: 12px;
  left: 12px;
  margin-bottom: 0;
}

.kt-detail-judul {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 4px 0 10px;
}

.kt-detail-harga {
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.kt-detail-harga .kt-coret {
  font-size: 1rem;
}

.kt-detail-isi {
  line-height: 1.75;
  color: var(--teks);
  margin-bottom: 24px;
}

.kt-detail-isi p {
  margin: 0 0 12px;
}

.kt-detail-isi img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 12px 0;
  display: block;
}

.kt-detail-isi figure {
  margin: 16px 0;
}

.kt-detail-isi figcaption {
  font-size: 0.8rem;
  color: var(--redam);
  text-align: center;
  margin-top: 6px;
}

.kt-tombol-beli-besar {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: var(--tebal) solid var(--garis);
  border-radius: var(--radius);
  background: var(--aksen);
  color: var(--teks-aksen);
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  box-shadow: var(--bayang);
}

@media (min-width: 680px) {
  .kt-detail-gambar {
    margin-left: 0;
    margin-right: 0;
    border-radius: var(--radius);
  }
}

/* Tampilan Tulisan / Blog / Laman Biasa */
.kt-tulisan {
  padding: 24px 16px;
}

.kt-kembali {
  display: inline-block;
  margin-bottom: 16px;
  font-weight: 700;
}

.kt-artikel h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 12px 0;
}

.kt-isi-artikel {
  line-height: 1.7;
}

.kt-isi-artikel img {
  border-radius: 10px;
  margin: 12px 0;
}

/* Preset & Mode */
:root[data-gaya="halus"] {
  --tebal: 0px;
  --bayang: 0 2px 14px rgba(0, 0, 0, 0.12);
  --bayang-tekan: 0 1px 6px rgba(0, 0, 0, 0.14);
}

:root[data-gaya="halus"] .kt-sampul {
  border-bottom: 0;
}

:root[data-preset="kopi-susu"] { --latar: #F4E9DC; --kartu: #FFFFFF; --teks: #2B1D14; --aksen-dasar: #8A4B2A; --teks-aksen: #FFFFFF; }
:root[data-preset="rimba"] { --latar: #DDEBDD; --kartu: #FFFFFF; --teks: #14301F; --aksen-dasar: #1F7A46; --teks-aksen: #FFFFFF; }
:root[data-preset="samudra"] { --latar: #DCEBFA; --kartu: #FFFFFF; --teks: #0F2540; --aksen-dasar: #1560BD; --teks-aksen: #FFFFFF; }
:root[data-preset="senja"] { --latar: #FFE3D3; --kartu: #FFFFFF; --teks: #3B1420; --aksen-dasar: #D6336C; --teks-aksen: #FFFFFF; }
:root[data-preset="sakura"] { --latar: #FCE4EC; --kartu: #FFFFFF; --teks: #3A1A26; --aksen-dasar: #C2185B; --teks-aksen: #FFFFFF; }
:root[data-preset="kertas"] { --latar: #F5F5F0; --kartu: #FFFFFF; --teks: #111111; --aksen-dasar: #111111; --teks-aksen: #FFFFFF; }
:root[data-preset="malam-ungu"] { --latar: #14121F; --kartu: #1F1B30; --teks: #F1EEFA; --aksen-dasar: #B79CFF; --teks-aksen: #14121F; color-scheme: dark; }
:root[data-preset="arang"] { --latar: #101214; --kartu: #1B1F23; --teks: #F2F4F5; --aksen-dasar: #FFC857; --teks-aksen: #101214; color-scheme: dark; }

:root[data-tema="gelap"] {
  --latar: #121218;
  --kartu: #1D1D27;
  --teks: #F2F2F6;
  --teks-aksen: #14121F;
  color-scheme: dark;
}

@supports (color: color-mix(in srgb, red, blue)) {
  :root[data-tema="gelap"] {
    --aksen: color-mix(in srgb, var(--aksen-dasar) 50%, #ffffff);
  }
}

@media (min-width: 680px) {
  .kt-akar {
    margin-top: 24px;
  }
  .kt-sampul {
    border-radius: var(--radius) var(--radius) 0 0;
    border-top: var(--tebal) solid var(--garis);
  }
}