:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #0f172a;
  --primary-hover: #334155;
  --danger: #ef4444;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
}

button, input, textarea {
  font-family: inherit;
  transition: all 0.2s ease;
}

/* Header & Navigasi Utama */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.logo-area h1 { font-size: 16px; margin: 0; font-weight: 600; }

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger-btn span {
  display: block; width: 22px; height: 2px; background: var(--text-dark); margin: 4px 0; border-radius: 2px;
}

.nav-menu { display: flex; gap: 8px; }
.header-btn {
  background: transparent; color: var(--text-muted); border: none; padding: 8px 12px;
  border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.header-btn:hover { background: #f1f5f9; color: var(--text-dark); }

@media (max-width: 768px) {
  .hamburger-btn { display: block; }
  .nav-menu {
    display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%;
    background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 12px 20px; box-sizing: border-box;
  }
  .nav-menu.active { display: flex; }
  .header-btn { text-align: left; padding: 12px; }
}

/* Kontainer Utama & Grid Produk */
.main-container { padding: 24px 16px; max-width: 1200px; margin: 0 auto; }
.filter-box { margin-bottom: 24px; }
.premium-input {
  width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; outline: none; box-sizing: border-box;
}
.premium-input:focus { border-color: #94a3b8; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.product-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px;
  display: flex; flex-direction: column; height: 100%; position: relative;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); }

/* Tombol Wishlist Hati */
.wishlist-btn-icon {
  position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border); border-radius: 50%; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10;
}
.wishlist-btn-icon.active svg { fill: var(--danger); stroke: var(--danger); }
.wishlist-btn-icon:hover { background: #ffffff; transform: scale(1.05); }

.product-img-box { border-radius: 6px; overflow: hidden; height: 150px; background: #f1f5f9; cursor: pointer; margin-bottom: 12px; }
.product-img-box img { width: 100%; height: 100%; object-fit: cover; }
.product-body { flex-grow: 1; cursor: pointer; }
.meta-row { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; }
.product-name { font-size: 14px; font-weight: 600; margin: 0 0 6px 0; }
.product-desc { font-size: 12px; color: var(--text-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.product-footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }
.action-buttons { display: flex; gap: 6px; }
.btn-outline { background: transparent; border: 1px solid #cbd5e1; padding: 6px 12px; border-radius: 4px; font-size: 11px; cursor: pointer; color: var(--text-muted); }
.btn-solid { background: var(--primary); color: white; border: none; padding: 6px 12px; border-radius: 4px; font-size: 11px; cursor: pointer; font-weight: 500; }
.btn-solid:disabled { background: #cbd5e1; cursor: not-allowed; }

@media (max-width: 576px) {
  .product-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .action-buttons { width: 100%; flex-direction: column; gap: 8px; }
  .action-buttons button { width: 100%; padding: 10px; font-size: 12px; }
}

/* Modal System */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6);
  display: flex; justify-content: center; align-items: center; z-index: 1000;
  opacity: 0; visibility: hidden; transition: all 0.2s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-card { background: var(--bg-card); width: 100%; max-width: 400px; padding: 24px; border-radius: 12px; position: relative; max-height: 90vh; overflow-y: auto; }
.close-btn { position: absolute; top: 16px; right: 16px; background: transparent; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); }

/* Tabel Panel Admin */
.table-wrapper { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 600px; }
.admin-table th { background: #f8fafc; color: var(--text-muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }

/* Toast */
.toast-notification {
  position: fixed; bottom: -50px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white;
  padding: 10px 20px; border-radius: 8px; font-size: 12px; z-index: 9999; transition: bottom 0.3s ease;
}
.toast-notification.show { bottom: 20px; }
