/* Marketplace shell tweaks on top of reseller-portal.css */
:root {
  --mp-accent: var(--red);
}

.nav-text-link {
  color: var(--nav-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 4px;
  transition: color 0.15s ease;
}

.nav-text-link:hover,
.nav-text-link.is-active {
  color: #fff;
}

.nav-text-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.nav-text-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: #fff !important;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.nav-cta-btn:hover {
  background: var(--red-dark);
}

.nav-logout-form {
  display: inline;
  margin: 0;
}

.mp-flash-bar {
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.mp-flash-bar .alert-banner {
  margin: 16px 32px 0;
}

/* Auth / checkout / pesanan pages that still use mp-* helpers */
.mp-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.mp-page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.mp-muted {
  color: var(--muted);
  font-size: 13px;
}

.mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--red);
  color: #fff;
  text-decoration: none;
}

.mp-btn:hover { background: var(--red-dark); }

.mp-btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.mp-btn-outline:hover {
  border-color: #fecaca;
  color: var(--red);
}

.mp-btn-block { width: 100%; }

.mp-form { display: grid; gap: 14px; }

.mp-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.mp-field input,
.mp-field select,
.mp-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.mp-field input:focus,
.mp-field select:focus,
.mp-field textarea:focus {
  outline: none;
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(217, 43, 43, 0.12);
}

.mp-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.mp-split { display: grid; gap: 16px; }

@media (min-width: 860px) {
  .mp-split-2 { grid-template-columns: 1.35fr 0.95fr; }
}

.mp-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.mp-table th,
.mp-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.mp-table th {
  background: var(--surface2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.mp-status {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #fef2f2;
  color: #b91c1c;
}

.mp-auth-box {
  max-width: 420px;
  margin: 40px auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.mp-auth-box h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.mp-radio {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}

.mp-radio:has(input:checked) {
  border-color: #fecaca;
  background: #fff7f7;
}

.mp-empty {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 14px;
}

.mp-empty h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.mp-empty p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.mp-back {
  display: inline-flex;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.mp-back:hover { color: var(--red); }

.mp-price {
  font-weight: 700;
  color: var(--red);
}

.mp-card-brand {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mp-card-img {
  aspect-ratio: 1;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Address book (profil + checkout) */
.mp-address-book {
  margin-top: 1.25rem;
}

.mp-address-book-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mp-address-empty {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px dashed var(--border, #e5e7eb);
  border-radius: 12px;
  color: var(--muted, #6b7280);
}

.mp-address-empty p { margin: 0 0 0.75rem; }

.mp-address-list {
  display: grid;
  gap: 0.75rem;
}

.mp-address-card,
.mp-address-pick {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #fff;
}

.mp-address-card.is-default,
.mp-address-pick.is-selected {
  border-color: #fecaca;
  background: #fff7f7;
}

.mp-address-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.mp-address-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.mp-address-label {
  font-weight: 700;
  font-size: 0.92rem;
}

.mp-address-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.mp-address-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.mp-address-name {
  margin: 0 0 0.2rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.mp-address-line {
  margin: 0;
  color: var(--muted, #6b7280);
  font-size: 0.85rem;
  line-height: 1.45;
}

.mp-link-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: #b91c1c;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.mp-link-btn.is-danger { color: #9f1239; }
.mp-link-btn:hover { text-decoration: underline; }

.mp-inline-form { display: inline; margin: 0; }

.mp-btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.mp-btn-outline {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.mp-btn-outline:hover { background: #fff7f7; }

.mp-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.9rem;
  margin: 0.35rem 0 0.75rem;
  cursor: pointer;
}

.mp-check input { margin-top: 0.2rem; }

.mp-address-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(520px, calc(100vw - 2rem));
  width: min(520px, calc(100vw - 2rem));
  margin: auto;
  position: fixed;
  inset: 0;
  height: fit-content;
  max-height: min(90vh, 760px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  background: #fff;
}

.mp-address-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.mp-address-dialog-panel {
  padding: 1.1rem 1.15rem 1.25rem;
  max-height: min(85vh, 720px);
  overflow: auto;
}

.mp-address-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.mp-address-dialog-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.mp-address-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.mp-checkout-addresses {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.mp-address-pick {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  cursor: pointer;
}

.mp-address-pick-input {
  margin-top: 0.3rem;
}

.mp-address-pick-body {
  flex: 1;
  min-width: 0;
}

.mp-save-address {
  margin: 0.25rem 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid var(--border, #e5e7eb);
}

.checkout-shipping-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
}

.checkout-shipping-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.checkout-shipping-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.checkout-shipping-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b91c1c;
  text-decoration: none;
}

.checkout-shipping-link:hover { text-decoration: underline; }

.checkout-shipping-hint {
  margin: 0;
  color: var(--muted, #6b7280);
  font-size: 0.85rem;
}

.checkout-shipping-hint a {
  color: #b91c1c;
  font-weight: 600;
  text-decoration: none;
}

.checkout-address-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.checkout-address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.checkout-shipping-services {
  display: grid;
  gap: 0.55rem;
}

.checkout-shipping-option {
  margin-bottom: 0;
}

.mp-order-shipping {
  display: grid;
  gap: 0.9rem;
}

.mp-order-shipping-block .mini-label {
  display: block;
  margin-bottom: 0.2rem;
}

.mp-order-shipping-block strong {
  display: block;
  font-size: 0.95rem;
}

.mp-order-shipping-block p {
  margin: 0.2rem 0 0;
  color: var(--muted, #6b7280);
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .mp-wrap { padding: 20px 16px 40px; }
  .mp-flash-bar { padding: 0 16px; }

  .mp-address-book-head {
    flex-direction: column;
  }

  .mp-address-card-top {
    flex-direction: column;
  }

  .mp-address-actions {
    justify-content: flex-start;
  }

  .checkout-address-grid {
    grid-template-columns: 1fr;
  }
}
