/* ==========================================================================
   1. RESET DEFAULT, FONTS & GLOBAL UTILITIES
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: #ffffff;
  color: #111111;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   2. NAVBAR & HEADER
   ========================================================================== */
#navbar-container {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8%;
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #111111;
  display: inline-block;
}

nav a {
  color: #555555;
  margin: 0 20px;
  font-size: 14px;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #111111;
}

.bag {
  font-size: 14px;
  letter-spacing: 1px;
  padding-bottom: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.nav-cart {
  font-size: 20px;
  color: #111111;
  position: relative;
  display: inline-block;
}

.nav-cart:hover {
  opacity: 0.7;
}

/* ==========================================================================
   3. HERO SECTION (INDEX.HTML)
   ========================================================================== */
.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 8% 80px 8%;
  min-height: calc(100vh - 90px);
}

.hero-left {
  flex: 1;
  padding-right: 5%;
}

.sub-title {
  font-size: 11px;
  letter-spacing: 4px;
  color: #888888;
  text-transform: uppercase;
  display: block;
  margin-bottom: 20px;
  font-weight: 600;
}

#hero-title,
.hero-left h1 {
  font-size: 52px;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 25px;
  letter-spacing: -1px;
  transition:
    opacity 0.3s ease,
    color 0.3s ease;
}

.description {
  font-size: 15px;
  color: #555555;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 450px;
}

.btn-explore {
  display: inline-block;
  background-color: #111111;
  color: #ffffff;
  padding: 16px 42px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid #111111;
  transition: all 0.3s ease;
}

.btn-explore:hover {
  background-color: transparent;
  color: #111111;
}

.hero-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero-right img {
  width: 100%;
  max-width: 480px;
  height: 550px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
  transition: opacity 0.4s ease-in-out;
}

.separator {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 0 8%;
}

/* ==========================================================================
   4. CATALOG GRID SECTION
   ========================================================================== */
.gallery-container {
  padding: 80px 8%;
}

.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-header h2 {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.gallery-header p {
  color: #666666;
  font-size: 15px;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
  gap: 15px;
}

.filter-btn {
  background: none;
  border: 1px solid #e0e0e0;
  padding: 10px 24px;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.3s ease;
  color: #666666;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #111111;
  border-color: #111111;
  color: #ffffff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.product-item {
  background-color: #fafafa;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.product-item h3 {
  transition: color 0.3s ease;
}

.product-item:hover h3 {
  color: #555555;
}

.product-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
}

.item-info {
  padding: 20px;
  background-color: #ffffff;
  border-top: 1px solid #f5f5f5;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.item-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
}

.item-info p {
  font-size: 13px;
  color: #888888;
}

/* ==========================================================================
   5. DETAIL PRODUK
   ========================================================================== */
.detail-container {
  display: flex;
  gap: 8%;
  padding: 60px 8%;
  align-items: flex-start;
}

.product-gallery,
.product-info-sheet {
  flex: 1;
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  object-position: top center;
}

.product-tag {
  font-size: 11px;
  letter-spacing: 3px;
  color: #888888;
  text-transform: uppercase;
  display: block;
  margin-bottom: 15px;
  font-weight: 600;
}

.product-info-sheet h1 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 10px;
}

.price {
  font-size: 20px;
  font-weight: 500;
  color: #111111;
  margin-bottom: 30px;
}

.price-container {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.original-price {
  text-decoration: line-through;
  color: #888;
  font-size: 0.9rem;
  margin-right: 8px;
}

.flash-price {
  color: #111;
  font-weight: bold;
  font-size: 1.4rem;
}

.discount-tag {
  background-color: #ffebe9;
  color: #ff4d4f;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
}

.product-narration p {
  font-size: 15px;
  color: #444444;
  line-height: 1.7;
  margin-bottom: 15px;
}

.product-features h3,
.product-sizing h3,
.size-selector-container h3 {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 35px 0 15px 0;
  color: #111111;
  font-weight: 600;
}

.product-features ul {
  list-style: none;
}

.product-features li {
  font-size: 14px;
  color: #555555;
  margin-bottom: 12px;
  position: relative;
  padding-left: 18px;
  line-height: 1.5;
}

.product-features li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #111111;
  font-weight: bold;
}

.product-styling-guide {
  margin-bottom: 28px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table.sizing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
  min-width: 450px;
}

table.sizing-table th,
table.sizing-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #eeeeee;
}

table.sizing-table th {
  font-weight: 600;
  color: #777777;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

table.sizing-table td {
  color: #444444;
}

table.sizing-table tr:hover td {
  background-color: #f9f9f9;
}

.purchase-action-container {
  margin-top: 40px;
  width: 100%;
}

.btn-main-buy {
  display: block;
  text-align: center;
  width: 100%;
  background-color: #111111;
  color: #ffffff;
  padding: 18px;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  border: 1px solid #111111;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-main-buy:hover {
  background-color: transparent;
  color: #111111;
}

.size-selector-container {
  margin-top: 30px;
  margin-bottom: 20px;
}

.size-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.size-btn {
  background-color: #ffffff;
  color: #111111;
  border: 1px solid #e0e0e0;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
}

.size-btn:hover {
  border-color: #111111;
}

.size-btn.selected {
  background-color: #111111;
  border-color: #111111;
  color: #ffffff;
  font-weight: 600;
}

.stock-warning {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
}

/* Styling Tombol Beli Sekarang (Atas & Bawah) */
#btn-buy-top,
#btn-buy-now-bottom {
  background-color: #111111;
  color: #ffffff;
  border: 1px solid #111111;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease; /* Transisi halus saat kursor menyentuh tombol */
  border-radius: 4px; /* Sesuaikan dengan corner radius tema Anda */
}

/* Efek Hover (Saat Kursor Menyentuh Tombol) */
#btn-buy-top:hover,
#btn-buy-now-bottom:hover {
  background-color: #333333; /* Warna sedikit lebih terang saat di-hover */
  border-color: #333333;
  transform: translateY(-2px); /* Efek tombol terangkat sedikit */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Efek bayangan halus */
}

/* Efek Active (Saat Tombol Diklik/Ditekan) */
#btn-buy-top:active,
#btn-buy-now-bottom:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Box Flash Sale Timer */
.flash-sale-box {
  background: linear-gradient(135deg, #fff3f3 0%, #ffe6e6 100%);
  border: 1px dashed #ff4d4d;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flash-sale-header {
  display: flex;
  flex-direction: column;
}

.flash-tag {
  font-size: 11px;
  font-weight: 800;
  color: #d90429;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.flash-label {
  font-size: 12px;
  color: #555;
}

.timer-display {
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  background-color: #d90429;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

/* Container Satu Baris (Flash Sale + Tombol) */
.flash-buy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 24px 0; /* Memberikan jarak napas yang pas ke narasi di bawahnya */
}

/* Penyesuaian Flex untuk Box Flash Sale */
.flash-buy-row .flash-sale-box {
  flex: 1.2; /* Mengambil porsi sedikit lebih lebar */
  margin: 0; /* Reset margin lama agar rapi */
}

/* Penyesuaian Tombol Beli Sekarang Atas */
.flash-buy-row #btn-buy-top {
  flex: 1; /* Mengambil porsi proporsional */
  white-space: nowrap; /* Teks tidak tertekuk ke bawah */
  padding: 12px 16px;
  height: 100%; /* Menyesuaikan tinggi dengan box flash sale */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* RESPONSIVE: Di Layar HP Kecil Otomatis Tumpuk Rapi */
@media (max-width: 480px) {
  .flash-buy-row {
    flex-direction: column;
    gap: 8px;
  }

  .flash-buy-row .flash-sale-box,
  .flash-buy-row #btn-buy-top {
    width: 100%;
  }
}
/* ==========================================================================
   6. FORM & UTILITAS
   ========================================================================== */
.options-grid {
  display: flex;
  gap: 15px;
}

.option-card {
  flex: 1;
  border: 1px solid #e0e0e0;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  transition: all 0.3s ease;
  background-color: #fff;
}

.option-card:hover {
  border-color: #111111;
  color: #111111;
}

.option-card.active {
  border: 2px solid #111111;
  color: #111111;
  background-color: #fafdff;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-family: inherit;
  color: #111111;
  background-color: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  border-color: #111111;
  outline: none;
}

.shipping-form-container {
  border: 1px solid #eee;
  padding: 25px;
  background-color: #fff;
}

#toast-container {
  position: fixed;
  top: 80px; /* 👈 Sudah digeser turun ke bawah navbar */
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   7. CHAT PENGUNJUNG
   ========================================================================== */
#tombolChat {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #111;
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
}

#tombolChat:hover {
  background: #333;
}

#kotakChat {
  position: fixed;
  bottom: 100px;
  right: 15px;
  width: calc(100% - 30px);
  max-width: 340px;
  height: 480px;
  max-height: 75vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}

.chat-header {
  background: #111;
  color: white;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header button {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

#wadahPesan {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f8f8f8;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pesan {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.pesan.kanan {
  align-self: flex-end;
  background: #111;
  color: white;
  border-bottom-right-radius: 2px;
}

.pesan.kiri {
  align-self: flex-start;
  background: #e4e4e4;
  color: #111;
  border-bottom-left-radius: 2px;
}

.pesan small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.7;
  text-align: right;
}

.input-chat {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid #eee;
}

#inputPesan {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
}

#kirimPesan {
  padding: 8px 16px;
  background: #111;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
}

/* ==========================================================================
   8. ADMIN DASHBOARD
   ========================================================================== */
:root {
  --utama: #111;
  --abu-lembut: #f5f5f5;
  --abu-terang: #fafafa;
  --abu-batas: #e5e5e5;
  --abu-teks: #666;
  --merah: #dc2626;
  --bayangan: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.toast-admin-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid var(--abu-batas);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 999;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar.buka {
  transform: translateX(0);
}

.sidebar-header {
  padding: 18px 20px;
  background: var(--utama);
  color: white;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.nav-menu {
  padding: 16px 0;
}

/* Pastikan DAFTAR MENU URUTAN SAMA & VERTIKAL */
.nav-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column !important; /* Paksa urutan ATAS-BAWAH */
  width: 100% !important;
  gap: 2px;
  padding: 0;
  margin: 0;
}

.nav-menu li {
  display: block !important; /* Setiap menu berdiri sendiri */
  width: 100% !important;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: flex;
  align-items: center; /* Ikon & tulisan tetap satu baris */
  justify-content: flex-start;
  flex-direction: row;
  padding: 12px 20px;
  color: var(--abu-teks);
  text-decoration: none;
  font-size: 15px;
  gap: 12px;
  transition: all 0.2s ease;
  margin: 0 12px;
  border-radius: 8px;
  width: calc(100% - 24px); /* Sesuaikan lebar dengan margin */
  box-sizing: border-box;
  white-space: nowrap; /* Jangan biar tulisan turun ke bawah */
}

.nav-menu a:hover,
.nav-menu a.aktif {
  background: #f0f0f0;
  color: var(--utama);
}

.jumlah-badge {
  margin-left: auto;
  background: #eee;
  color: var(--utama);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.konten {
  flex: 1;
  margin-left: 260px;
  margin-right: 0;
  min-height: 100vh;
  transition: margin 0.3s ease;
}

.header-halaman {
  background: white;
  padding: 12px 20px;
  margin: 0 0 20px 0;
  border-bottom: 1px solid var(--abu-batas);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 998;
  box-shadow: var(--bayangan);
}

.header-kiri {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-halaman h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--utama);
}

.header-kanan {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tombol-nav {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--utama);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  position: relative;
}

.tombol-nav:hover {
  background: var(--abu-lembut);
}

.lencana-pesan {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--merah);
  color: white;
  font-size: 10px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wadah-konten {
  padding: 0 20px 40px;
}

.wadah-tabel {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--abu-batas);
  overflow: hidden;
  box-shadow: var(--bayangan);
}

.wadah-tabel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.wadah-tabel th {
  background: var(--abu-terang);
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid var(--abu-batas);
}

.wadah-tabel td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.wadah-tabel tr:hover td {
  background: #fcfcfc;
}

.badge-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.sel-aksi {
  padding: 6px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--abu-batas);
  outline: none;
  background-color: #fff;
  cursor: pointer;
  font-weight: 500;
  margin-top: 6px;
  display: block;
}

.belum-bayar {
  background: #fffbeb;
  color: #92400e;
}
.perlu-kirim {
  background: #eff6ff;
  color: #1e40af;
}
.dikirim {
  background: #ecfeff;
  color: #0e7490;
}
.selesai {
  background: #f0fdf4;
  color: #15803d;
}
.batal {
  background: #fef2f2;
  color: #b91c1c;
}

/* PANEL CHAT ADMIN */
.panel-chat {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  background: #fff;
  border-left: 1px solid var(--abu-batas);
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.panel-chat.buka {
  transform: translateX(0);
}

.halaman-daftar {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#daftarObrolan {
  flex: 1;
  overflow-y: auto;
}

.item-chat-user {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}

.item-chat-user:hover {
  background: #f4f4f4;
}

.halaman-obrolan {
  display: none;
  flex-direction: column;
  height: 100%;
}

.ruang-header {
  padding: 12px 16px;
  background: var(--utama);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ruang-header button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

#wadahPesanAdmin {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f8f8f8;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pesan.kiri {
  align-self: flex-start;
  background: #e4e4e4;
  color: #111;
  border-bottom-left-radius: 2px;
}

.pesan.kanan {
  align-self: flex-end;
  background: var(--utama);
  color: white;
  border-bottom-right-radius: 2px;
}

.kotak-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--abu-batas);
  background: white;
}

#inputBalas {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 24px;
  outline: none;
}

#btnKirim {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--utama);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   9. KEAMANAN & TAMBAHAN ADMIN
   ========================================================================== */
#layar-kunci {
  position: fixed;
  inset: 0;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.3s ease;
}
#layar-kunci.hilang {
  opacity: 0;
  pointer-events: none;
}
.kotak-kunci {
  background: #fff;
  padding: 30px 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 380px;
  text-align: center;
}
.kotak-kunci h3 {
  margin: 0 0 8px 0;
  color: #111;
  font-size: 1.2em;
}
.kotak-kunci p {
  margin: 0 0 18px 0;
  color: #666;
  font-size: 0.9em;
}
.kotak-kunci input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 1em;
  text-align: center;
  letter-spacing: 2px;
}
.kotak-kunci button {
  width: 100%;
  padding: 12px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}
.pesan-salah {
  color: #e74c3c;
  font-size: 0.85em;
  margin-top: 8px;
  display: none;
}

#pwa-install-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  width: 90%;
  max-width: 400px;
  justify-content: space-between;
  display: none;
}
#pwa-install-banner button {
  background: #fff;
  color: #111;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 12px;
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
footer {
  text-align: center;
  padding: 40px;
  font-size: 13px;
  color: #999999;
  border-top: 1px solid #f0f0f0;
  background-color: #fafafa;
}

/* ==========================================================================
   PERBAIKAN KUSUS HP (CARD VIEW & SIDEBAR FIX)
   ========================================================================== */
@media (max-width: 768px) {
  /* Pastikan halaman utama (konten) TETAP diam di tempat, tidak ikut terseret ke kanan */
  .konten {
    margin-left: 0 !important;
    width: 100% !important;
    transform: none !important; /* Mencegah halaman ikut kegeser */
  }

  /* Kunci Sidebar melayang di atas layar */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 260px !important;
    height: 100dvh !important; /* Menggunakan dvh agar pas dengan layar browser HP */
    z-index: 999999 !important; /* Z-index super tinggi biar selalu di paling depan */
    transform: translateX(
      -100%
    ) !important; /* Sembunyi penuh di luar layar kiri */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
  }

  /* Saat kelas 'buka' aktif, sidebar muncul dari kiri */
  .sidebar.buka {
    transform: translateX(0) !important;
  }

  /* Overlay tirai hitam transparan di belakang sidebar */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px); /* Efek blur estetik */
    z-index: 999998; /* Berada tepat di bawah sidebar */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.aktif {
    display: block;
    opacity: 1;
  }

  /* ==========================================================================
     CARD VIEW UTAMA (UBAH TABEL JADI KARTU DI HP)
     ========================================================================== */
  .wadah-tabel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Sembunyikan Judul Header Tabel Desktop (ID/Tanggal, Total, dll) */
  .wadah-tabel table,
  .wadah-tabel thead,
  .wadah-tabel tbody,
  .wadah-tabel th,
  .wadah-tabel td,
  .wadah-tabel tr {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .wadah-tabel thead {
    display: none !important; /* Biar judul kolom atas yang bikin sempit hilang */
  }

  /* Setiap Baris Pesanan Berubah Jadi 1 Kartu Rapi */
  .wadah-tabel tr {
    background: #ffffff;
    border: 1px solid var(--abu-batas);
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  /* Isi Didalam Kartu */
  .wadah-tabel td {
    padding: 10px 0 !important;
    border-bottom: 1px dashed #eee !important;
    text-align: left !important;
    font-size: 13px !important;
  }

  .wadah-tabel td:last-child {
    border-bottom: none !important;
  }

  /* Tombol Aksi Status & Cetak Resi Bikin Full Width di HP */
  .sel-aksi {
    width: 100% !important;
    padding: 10px !important;
    font-size: 13px !important;
    margin-top: 8px !important;
  }

  .filter-btn {
    width: 100% !important;
    padding: 8px !important;
    text-align: center !important;
  }
} /* <--- Kurung kurawal penutup media query */

/* ==========================================================================
   PERBAIKAN HALAMAN DEPAN PUBLIC (MOBILE VIEW)
   ========================================================================== */
@media (max-width: 768px) {
  /* --- 1. NAVBAR & HEADER --- */
  header {
    padding: 15px 5%; /* Perkecil padding samping */
    flex-wrap: wrap; /* Mengizinkan navigasi turun jika belum ada hamburger menu */
    gap: 15px;
  }

  .logo {
    font-size: 18px;
    letter-spacing: 2px;
  }

  nav {
    display: flex;
    overflow-x: auto; /* Navigasi dapat di-scroll horizontal jika terlalu panjang */
    width: 100%;
    order: 3; /* Memindahkan menu ke baris baru di bawah logo & keranjang */
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }

  nav a {
    margin: 0 10px 0 0;
    font-size: 13px;
    white-space: nowrap; /* Mencegah teks menu terputus turun ke bawah */
  }

  /* --- 2. HERO SECTION --- */
  .hero-container {
    flex-direction: column-reverse; /* Gambar produk di atas, teks di bawah */
    padding: 20px 5% 40px 5%;
    min-height: auto;
    gap: 30px;
  }

  .hero-left {
    padding-right: 0;
    text-align: center;
  }

  #hero-title,
  .hero-left h1 {
    font-size: 32px; /* Perkecil ukuran font judul agar tidak terpotong */
    line-height: 1.2;
    margin-bottom: 15px;
  }

  .description {
    font-size: 14px;
    margin: 0 auto 25px auto;
  }

  .btn-explore {
    width: 100%; /* Tombol memenuhi lebar layar */
    text-align: center;
    padding: 14px 20px;
  }

  .hero-right {
    width: 100%;
    justify-content: center;
  }

  .hero-right img {
    height: 380px; /* Sesuaikan tinggi gambar hero untuk mobile */
    max-width: 100%;
  }

  /* --- 3. CATALOG & PRODUCT GRID --- */
  .gallery-container {
    padding: 40px 5%;
  }

  .gallery-header h2 {
    font-size: 24px;
  }

  .filter-buttons {
    flex-wrap: wrap; /* Tombol filter dapat menyesuaikan baris */
    gap: 8px;
    margin-bottom: 30px;
  }

  /* Mengubah katalog dari 4 kolom menjadi 2 kolom di mobile */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .item-info {
    padding: 12px;
  }

  .item-info h3 {
    font-size: 13px;
  }

  /* --- 4. DETAIL PRODUK --- */
  .detail-container {
    flex-direction: column;
    padding: 20px 5%;
    gap: 30px;
  }

  .product-info-sheet h1 {
    font-size: 26px;
  }

  .options-grid {
    flex-direction: column; /* Opsi produk/pembayaran berjajar vertikal */
  }

  /* ==========================================================================
     FIX DETAIL PRODUK & NARRATION (MOBILE)
     ========================================================================== */

  /* 1. Kunci kontainer utama agar tidak melebihi lebar layar HP */
  .detail-container {
    flex-direction: column;
    padding: 20px 5%;
    gap: 25px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden; /* Mencegah elemen anak jebol ke kanan */
  }

  .product-gallery,
  .product-info-sheet {
    width: 100%;
    max-width: 100%;
  }

  /* 2. Perbaiki narasi & teks deskripsi agar terbungkus sempurna */
  .product-narration {
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word; /* Memaksa kata panjang terpotong rapi */
    word-break: break-word;
  }

  .product-narration p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    max-width: 100%;
  }

  /* 3. Atur ulang ukuran judul & harga agar pas di layar kecil */
  .product-info-sheet h1 {
    font-size: 24px;
    line-height: 1.25;
    word-break: break-word;
  }

  .price-container {
    flex-wrap: wrap; /* Agar tag diskon tidak keluar layar jika harga panjang */
    gap: 5px;
  }

  /* 4. Perbaiki Tabel Sizing (Penyebab Utama Layar Melebar) */
  .table-responsive {
    width: 100%;
    overflow-x: auto; /* Izinkan tabel di-scroll sendiri jika melebihi layar */
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
  }

  table.sizing-table {
    min-width: 100%; /* Reset min-width 450px desktop agar fleksibel di HP */
  }

  /* 5. Ratakan pilihan ukuran & tombol beli */
  .size-options {
    gap: 8px;
  }

  .size-btn {
    flex: 1; /* Pilihan ukuran menyesuaikan baris secara proporsional */
    min-width: 45px;
    text-align: center;
    padding: 10px 5px;
  }
}

/* Penyesuaian khusus untuk layar HP yang sangat kecil (layar < 480px) */
@media (max-width: 480px) {
  /* Jika ingin tampilan produk 1 kolom di HP yang sangat kecil */
  .product-grid {
    grid-template-columns: 1fr;
  }
}
