/* ============================================================
   TokoKu Marketplace — Style
   Tema: Hijau (sesuai admin panel)
============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
  background: #f0f9f2;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ===== HEADER ===== */
.tk-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.tk-header-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.tk-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #16a34a;
  flex-shrink: 0;
}
.tk-logo img { height: 40px; }
.tk-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: #16a34a;
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.tk-search {
  flex: 1;
  max-width: 500px;
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.tk-search input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
}
.tk-search button {
  border: none;
  background: #16a34a;
  color: #fff;
  padding: 0 20px;
  font-size: 16px;
}
.tk-search button:hover { background: #15803d; }
.tk-header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-left: auto;
}
.tk-icon-btn {
  position: relative;
  background: none;
  border: none;
  font-size: 22px;
  color: #4b5563;
  padding: 8px;
  border-radius: 6px;
}
.tk-icon-btn:hover { background: #f0fdf4; color: #16a34a; }
.tk-icon-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.tk-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.tk-user-btn:hover { background: #dcfce7; }

/* ===== NAVBAR ===== */
.tk-navbar {
  background: #16a34a;
  color: #fff;
}
.tk-navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.tk-navbar a {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  border-bottom: 3px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.tk-navbar a:hover,
.tk-navbar a.active {
  background: rgba(255,255,255,.15);
  border-bottom-color: #fbbf24;
}

/* ===== CONTAINER ===== */
.tk-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ===== BANNER ===== */
.tk-banner {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  border-radius: 12px;
  padding: 50px 40px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.tk-banner-text h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
}
.tk-banner-text p {
  font-size: 15px;
  opacity: .95;
  margin-bottom: 20px;
}
.tk-banner-cta {
  background: #fff;
  color: #16a34a;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  display: inline-block;
}
.tk-banner-cta:hover { background: #f0fdf4; }
.tk-banner-img {
  font-size: 120px;
  line-height: 1;
}

/* ===== SECTION ===== */
.tk-section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tk-section-title a {
  font-size: 13px;
  font-weight: 600;
  color: #16a34a;
}

/* ===== KATEGORI ===== */
.tk-kategori-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.tk-kategori-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
}
.tk-kategori-card:hover {
  border-color: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22,163,74,.12);
}
.tk-kategori-card .icon { font-size: 32px; margin-bottom: 8px; }
.tk-kategori-card .name {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

/* ===== PRODUK GRID ===== */
.tk-produk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.tk-produk-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  transition: all .15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.tk-produk-card:hover {
  border-color: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22,163,74,.15);
}
.tk-produk-img {
  aspect-ratio: 1;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  position: relative;
}
.tk-produk-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.tk-produk-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tk-produk-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}
.tk-produk-price {
  font-size: 16px;
  font-weight: 800;
  color: #16a34a;
  margin-top: auto;
}
.tk-produk-price-old {
  font-size: 12px;
  color: #9ca3af;
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 500;
}
.tk-produk-stock {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}
.tk-produk-actions {
  padding: 0 14px 14px;
}
.tk-btn-add {
  width: 100%;
  background: #16a34a;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tk-btn-add:hover { background: #15803d; }
.tk-btn-add:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

/* ===== BUTTON ===== */
.tk-btn {
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s;
}
.tk-btn-primary { background: #16a34a; color: #fff; }
.tk-btn-primary:hover { background: #15803d; }
.tk-btn-outline { background: #fff; color: #16a34a; border: 1px solid #16a34a; }
.tk-btn-outline:hover { background: #f0fdf4; }
.tk-btn-danger { background: #ef4444; color: #fff; }
.tk-btn-block { width: 100%; }

/* ===== CARD ===== */
.tk-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.tk-card-head {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 16px;
  font-weight: 700;
}
.tk-card-body { padding: 20px; }

/* ===== FOOTER ===== */
.tk-footer {
  background: #1f2937;
  color: #9ca3af;
  margin-top: 40px;
  padding: 40px 20px 20px;
}
.tk-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #374151;
}
.tk-footer h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 14px;
}
.tk-footer a {
  display: block;
  font-size: 13px;
  padding: 4px 0;
}
.tk-footer a:hover { color: #22c55e; }
.tk-footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 12px;
}

/* ===== MODAL ===== */
.tk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.tk-modal-overlay.show { display: flex; }
.tk-modal {
  background: #fff;
  border-radius: 10px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.tk-modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tk-modal-head h3 { font-size: 16px; font-weight: 700; }
.tk-modal-head button {
  background: none;
  border: none;
  font-size: 22px;
  color: #6b7280;
  cursor: pointer;
}
.tk-modal-body { padding: 20px 22px; }
.tk-modal-foot {
  padding: 16px 22px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ===== TOAST ===== */
.tk-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 2000;
  max-width: 90%;
}
.tk-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.tk-toast.success { background: #16a34a; }
.tk-toast.error { background: #ef4444; }

/* ===== FORM ===== */
.tk-field {
  margin-bottom: 16px;
}
.tk-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.tk-field label .req { color: #ef4444; }
.tk-field input,
.tk-field select,
.tk-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.tk-field input:focus,
.tk-field select:focus,
.tk-field textarea:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}
.tk-field textarea { resize: vertical; min-height: 80px; }
.tk-field .hint { font-size: 12px; color: #6b7280; margin-top: 4px; }

/* ===== EMPTY ===== */
.tk-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.tk-empty .icon { font-size: 60px; margin-bottom: 14px; }
.tk-empty .msg { font-size: 15px; margin-bottom: 18px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .tk-header-top { flex-wrap: wrap; padding: 12px 16px; }
  .tk-search { order: 3; width: 100%; max-width: none; margin-top: 10px; }
  .tk-banner { padding: 30px 24px; }
  .tk-banner-text h1 { font-size: 22px; }
  .tk-banner-img { font-size: 60px; }
  .tk-produk-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tk-produk-name { font-size: 13px; min-height: 34px; }
  .tk-produk-price { font-size: 14px; }
  .tk-navbar a { padding: 12px 14px; font-size: 12px; }
}