/* Marketplace Dentaapps — gaya katalog, toko, keranjang, checkout, panel seller & admin.
   Memakai token warna aplikasi: --color-medicare-blue (#06f), slate, Plus Jakarta Sans. */

.mkt-wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 64px; }
.mkt-empty { text-align: center; padding: 56px 20px; color: #64748b; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mkt-empty i { width: 40px; height: 40px; color: #94a3b8; }
.mkt-empty p { margin: 0; font-size: .9rem; }

/* ---------- kepala halaman ---------- */
.mkt-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.mkt-head h1 { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin: 0; letter-spacing: -.02em; }
.mkt-head p { margin: 2px 0 0; font-size: .82rem; color: #64748b; }
.mkt-head__act { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- tombol ---------- */
.mkt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 12px; border: 0; cursor: pointer;
  background: #06f; color: #fff; font: inherit; font-size: .85rem; font-weight: 700;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 4px 12px -3px rgba(0, 102, 255, .35); text-decoration: none;
}
.mkt-btn:hover { background: #0052cc; transform: translateY(-1px); }
.mkt-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.mkt-btn i { width: 16px; height: 16px; }
.mkt-btn--ghost { background: #fff; color: #334155; box-shadow: none; border: 1px solid #e2e8f0; }
.mkt-btn--ghost:hover { background: #f8fafc; color: #0f172a; }
.mkt-btn--danger { background: #fee2e2; color: #b91c1c; box-shadow: none; }
.mkt-btn--danger:hover { background: #fecaca; }
.mkt-btn--sm { padding: 7px 12px; font-size: .78rem; border-radius: 9px; }
.mkt-btn--lg { padding: 13px 22px; font-size: .92rem; border-radius: 14px; }
.mkt-btn--full { width: 100%; }
.mkt-link { display: block; text-align: center; margin-top: 10px; font-size: .8rem; color: #64748b; text-decoration: none; }
.mkt-link:hover { color: #06f; text-decoration: underline; }
.mkt-hapus { background: none; border: 0; cursor: pointer; color: #94a3b8; padding: 4px; border-radius: 8px; }
.mkt-hapus:hover { color: #dc2626; background: #fef2f2; }
.mkt-hapus i { width: 16px; height: 16px; }

/* ---------- pencarian & filter ---------- */
.mkt-search { display: flex; gap: 8px; margin-bottom: 14px; }
.mkt-search input {
  flex: 1; padding: 12px 16px; border-radius: 12px; border: 1px solid #e2e8f0;
  background: #fff; font: inherit; font-size: .88rem; color: #0f172a;
}
.mkt-search input:focus { outline: none; border-color: #06f; box-shadow: 0 0 0 3px rgba(0, 102, 255, .12); }
.mkt-kats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 16px; scrollbar-width: thin; }
.mkt-kat {
  flex: 0 0 auto; padding: 8px 15px; border-radius: 999px; border: 1px solid #e2e8f0;
  background: #fff; color: #475569; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: all .15s ease;
}
.mkt-kat:hover { border-color: #cbd5e1; color: #0f172a; }
.mkt-kat.is-on { background: #06f; border-color: #06f; color: #fff; box-shadow: 0 3px 10px -2px rgba(0, 102, 255, .4); }

/* ---------- grid & kartu produk ---------- */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.mkt-card { background: #fff; border: 1px solid #eef2f7; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease; }
.mkt-card:hover { box-shadow: 0 12px 24px -8px rgba(15, 23, 42, .14); transform: translateY(-2px); }
.mkt-card__media { display: block; aspect-ratio: 1 / 1; background: #f8fafc; }
.mkt-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkt-img--kosong { display: flex; align-items: center; justify-content: center; color: #cbd5e1; }
.mkt-img--kosong i { width: 34px; height: 34px; }
.mkt-card__body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mkt-card__toko { font-size: .68rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; text-decoration: none; }
.mkt-card__toko:hover { color: #06f; }
.mkt-card__nama { font-size: .87rem; font-weight: 700; color: #0f172a; text-decoration: none; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; }
.mkt-card__harga { font-size: 1rem; font-weight: 800; color: #06f; margin-top: 2px; display: flex; align-items: baseline; gap: 6px; }
.mkt-card__harga s { font-size: .72rem; font-weight: 500; color: #94a3b8; }
.mkt-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 9px; }
.mkt-chip { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: .68rem; font-weight: 700; }

/* ---------- detail produk ---------- */
.mkt-detail { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 768px) { .mkt-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mkt-detail__main { aspect-ratio: 1 / 1; background: #fff; border: 1px solid #eef2f7; border-radius: 18px; overflow: hidden; }
.mkt-detail__main img { width: 100%; height: 100%; object-fit: cover; }
.mkt-thumbs { display: flex; gap: 9px; margin-top: 10px; }
.mkt-thumb { width: 62px; height: 62px; border-radius: 11px; overflow: hidden; border: 2px solid #e2e8f0; padding: 0; cursor: pointer; background: #fff; }
.mkt-thumb.is-on { border-color: #06f; }
.mkt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mkt-detail__info { display: flex; flex-direction: column; gap: 10px; }
.mkt-detail__info h1 { font-size: 1.4rem; font-weight: 800; color: #0f172a; margin: 0; line-height: 1.25; }
.mkt-detail__harga { font-size: 1.7rem; font-weight: 800; color: #06f; }
.mkt-detail__harga s { font-size: .95rem; font-weight: 500; color: #94a3b8; }
.mkt-detail__meta { display: flex; flex-wrap: wrap; gap: 7px; }
.mkt-detail__desc { font-size: .87rem; color: #475569; line-height: 1.65; white-space: pre-line; margin: 4px 0; }
.mkt-detail__beli { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.mkt-wa { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 600; color: #16a34a; text-decoration: none; }
.mkt-wa i { width: 17px; height: 17px; }

/* ---------- pemilih jumlah ---------- */
.mkt-qty { display: inline-flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 11px; overflow: hidden; background: #fff; }
.mkt-qty button { width: 34px; height: 38px; border: 0; background: #f8fafc; color: #334155; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.mkt-qty button:hover { background: #eef2f7; }
.mkt-qty input { width: 48px; border: 0; text-align: center; font: inherit; font-size: .88rem; font-weight: 700; color: #0f172a; background: #fff; -moz-appearance: textfield; }
.mkt-qty input::-webkit-outer-spin-button, .mkt-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mkt-qty--sm button { width: 28px; height: 32px; font-size: .95rem; }
.mkt-qty--sm input { width: 38px; font-size: .82rem; }

/* ---------- kepala toko ---------- */
.mkt-tokohead { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid #eef2f7; border-radius: 18px; padding: 20px; margin-bottom: 20px; }
.mkt-tokohead__logo { width: 64px; height: 64px; border-radius: 16px; background: #eff6ff; color: #06f; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden; }
.mkt-tokohead__logo img { width: 100%; height: 100%; object-fit: contain; }
.mkt-tokohead__logo i { width: 30px; height: 30px; }
.mkt-tokohead h1 { font-size: 1.3rem; font-weight: 800; color: #0f172a; margin: 0; }
.mkt-tokohead p { margin: 3px 0 7px; font-size: .83rem; color: #64748b; }

/* ---------- keranjang & checkout ---------- */
.mkt-cart { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
@media (min-width: 768px) { .mkt-cart { grid-template-columns: minmax(0, 1fr) 330px; } }
.mkt-cart__list { display: flex; flex-direction: column; gap: 10px; }
.mkt-cart__row { display: flex; gap: 13px; align-items: center; background: #fff; border: 1px solid #eef2f7; border-radius: 15px; padding: 13px; }
.mkt-cart__img { width: 60px; height: 60px; border-radius: 12px; background: #f8fafc; overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: #cbd5e1; }
.mkt-cart__img img { width: 100%; height: 100%; object-fit: cover; }
.mkt-cart__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mkt-cart__info b { font-size: .88rem; color: #0f172a; line-height: 1.3; }
.mkt-cart__info span { font-size: .72rem; color: #94a3b8; }
.mkt-cart__info .mkt-qty { margin-top: 5px; align-self: flex-start; }
.mkt-cart__kanan { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.mkt-cart__kanan b { font-size: .92rem; font-weight: 800; color: #0f172a; }
.mkt-cart__sum { background: #fff; border: 1px solid #eef2f7; border-radius: 18px; padding: 20px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 9px; }
.mkt-cart__sum h3 { font-size: .95rem; font-weight: 800; color: #0f172a; margin: 0 0 4px; }
.mkt-row { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; color: #64748b; }
.mkt-row b { color: #0f172a; font-weight: 700; }
.mkt-row--total { border-top: 1px dashed #e2e8f0; padding-top: 11px; margin-top: 3px; font-size: .92rem; }
.mkt-row--total b { font-size: 1.2rem; font-weight: 800; color: #06f; }
.mkt-note { font-size: .76rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 11px; padding: 11px 13px; line-height: 1.55; }

/* ---------- form ---------- */
.mkt-form { display: flex; flex-direction: column; gap: 13px; }
.mkt-form--sempit { max-width: 460px; background: #fff; border: 1px solid #eef2f7; border-radius: 18px; padding: 22px; }
.mkt-form label, .mkt-modal .mkt-form label { display: flex; flex-direction: column; gap: 6px; font-size: .79rem; font-weight: 700; color: #334155; }
.mkt-form input, .mkt-form textarea, .mkt-form select {
  padding: 11px 13px; border-radius: 11px; border: 1px solid #e2e8f0; background: #fff;
  font: inherit; font-size: .87rem; font-weight: 500; color: #0f172a; width: 100%;
  box-sizing: border-box;
}
.mkt-form input:focus, .mkt-form textarea:focus { outline: none; border-color: #06f; box-shadow: 0 0 0 3px rgba(0, 102, 255, .12); }
.mkt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- pesanan ---------- */
.mkt-pesanan { background: #fff; border: 1px solid #eef2f7; border-radius: 16px; padding: 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.mkt-pesanan__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mkt-pesanan__top b { font-size: .88rem; color: #0f172a; font-family: ui-monospace, monospace; }
.mkt-pesanan__top span { display: block; font-size: .74rem; color: #94a3b8; margin-top: 2px; }
.mkt-pesanan__items { border-top: 1px solid #f1f5f9; padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.mkt-badge { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.mkt-badge--menunggu_bayar { background: #fef3c7; color: #92400e; }
.mkt-badge--dibayar { background: #dbeafe; color: #1d4ed8; }
.mkt-badge--diproses { background: #e0e7ff; color: #3730a3; }
.mkt-badge--dikirim { background: #cffafe; color: #0e7490; }
.mkt-badge--selesai { background: #d1fae5; color: #047857; }
.mkt-badge--dibatalkan { background: #fee2e2; color: #b91c1c; }

/* ---------- statistik seller ---------- */
.mkt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 11px; margin-bottom: 18px; }
.mkt-stat { background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.mkt-stat span { font-size: .72rem; color: #94a3b8; font-weight: 600; }
.mkt-stat b { font-size: 1.05rem; font-weight: 800; color: #0f172a; }

/* ---------- tab ---------- */
.mkt-tabs { display: flex; gap: 6px; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; overflow-x: auto; }
.mkt-tab { padding: 10px 16px; border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 700; color: #64748b; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.mkt-tab:hover { color: #0f172a; }
.mkt-tab.is-on { color: #06f; border-bottom-color: #06f; }

/* ---------- daftar baris (seller/admin) ---------- */
.mkt-list { display: flex; flex-direction: column; gap: 9px; }
.mkt-list__row { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 13px; }
.mkt-list__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mkt-list__info b { font-size: .87rem; color: #0f172a; }
.mkt-list__info span { font-size: .74rem; color: #94a3b8; }
.mkt-list__act { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; flex: 0 0 auto; }
.mkt-list__act select, .mkt-list__act input {
  padding: 7px 9px; border-radius: 9px; border: 1px solid #e2e8f0; font: inherit; font-size: .78rem; background: #fff; color: #0f172a;
}
.mkt-list__act input[type="number"] { width: 66px; }

/* ---------- modal ---------- */
.mkt-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.mkt-modal__box { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 22px; }
.mkt-modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mkt-modal__head h3 { font-size: 1.1rem; font-weight: 800; color: #0f172a; margin: 0; }
.mkt-modal__foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }

/* ---------- toast ---------- */
.mkt-toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 13px;
  font-size: .84rem; font-weight: 600; z-index: 90; box-shadow: 0 12px 28px -8px rgba(15, 23, 42, .5);
  max-width: calc(100vw - 32px); text-align: center; animation: mktUp .25s ease;
}
.mkt-toast--err { background: #b91c1c; }
.mkt-toast--ok { background: #047857; }
.mkt-toast--out { opacity: 0; transition: opacity .4s ease; }
@keyframes mktUp { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 640px) {
  .mkt-wrap { padding: 16px 12px 56px; }
  .mkt-grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 11px; }
  .mkt-head h1 { font-size: 1.25rem; }
  .mkt-cart__sum { position: static; }
}

/* ---------- form card & pesan (pendaftaran toko) ---------- */
.mkt-wrap--sempit { max-width: 620px; }
.mkt-head--tengah { text-align: center; justify-content: center; flex-direction: column; align-items: center; gap: 6px; }
.mkt-head--tengah p { max-width: 40ch; }
.mkt-formcard { background: #fff; border: 1px solid #eef2f7; border-radius: 20px; padding: 24px; box-shadow: 0 8px 24px -14px rgba(15,23,42,.16); }
.mkt-note--err { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.mkt-note--ok { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.mkt-kecil { font-size: .74rem; color: #94a3b8; line-height: 1.6; margin: 4px 0 0; text-align: center; }
.mkt-kecil a { color: #06f; font-weight: 700; text-decoration: none; }
.mkt-kecil a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .mkt-formcard { padding: 18px; }
}

/* ---------- Pemilih wilayah bertingkat & pilihan kurir ---------- */
.mkt-grid3 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .mkt-grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.mkt-form select {
  padding: 11px 13px; border-radius: 11px; border: 1px solid #e2e8f0; background: #fff;
  font: inherit; font-size: .87rem; font-weight: 500; color: #0f172a; width: 100%;
  box-sizing: border-box; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.mkt-form select:focus { outline: none; border-color: #06f; box-shadow: 0 0 0 3px rgba(0,102,255,.12); }
.mkt-chip--ok { background: #d1fae5; color: #047857; }

.mkt-ongkir { border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; }
.mkt-ongkir__judul { padding: 11px 14px; background: #f8fafc; font-size: .76rem; font-weight: 800; color: #334155; text-transform: uppercase; letter-spacing: .05em; }
.mkt-ongkir__row {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border-top: 1px solid #f1f5f9; cursor: pointer; font-size: .83rem;
}
.mkt-ongkir__row:hover { background: #f8fafc; }
.mkt-ongkir__row.is-on { background: #eff6ff; }
.mkt-ongkir__row input[type="radio"] { accent-color: #06f; flex: 0 0 auto; }
.mkt-ongkir__nama { flex: 1; min-width: 0; color: #0f172a; }
.mkt-ongkir__nama b { font-weight: 700; }
.mkt-ongkir__etd { color: #94a3b8; font-size: .74rem; white-space: nowrap; }
.mkt-ongkir__harga { font-weight: 800; color: #0f172a; white-space: nowrap; }

.mkt-cek { flex-direction: row !important; align-items: center; gap: 9px !important; font-weight: 600; }
.mkt-cek input[type="checkbox"] { width: 17px; height: 17px; accent-color: #06f; }
