/* marketplace.css — Produzia Marketplace v1.0 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Syne:wght@700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:       #1a4fd8;
  --brand-dark:  #1340b0;
  --brand-light: #e8eeff;
  --brand-mid:   #c7d4fb;
  --accent:      #f97316;
  --accent-bg:   #fff4ed;
  --green:       #16a34a;
  --green-bg:    #dcfce7;
  --red:         #dc2626;
  --yellow:      #d97706;
  --yellow-bg:   #fef9c3;

  --bg:          #f5f6fa;
  --surface:     #ffffff;
  --surface2:    #f8f9fc;
  --border:      #e4e7ef;
  --border2:     #d0d5e8;

  --text:        #0f172a;
  --text2:       #475569;
  --muted:       #94a3b8;

  --radius:      14px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --shadow:      0 1px 4px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
  --shadow-md:   0 4px 12px rgba(15,23,42,.10), 0 12px 40px rgba(15,23,42,.08);
  --shadow-lg:   0 8px 32px rgba(15,23,42,.14), 0 24px 64px rgba(15,23,42,.10);

  --font-body:   'Plus Jakarta Sans', sans-serif;
  --font-display:'Syne', sans-serif;

  --header-h:    64px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ───────────────────────────────────────────── */
.mkp-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 20px; gap: 16px;
  box-shadow: 0 1px 0 var(--border), 0 2px 12px rgba(15,23,42,.04);
}

.mkp-brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; min-width: 0;
  text-decoration: none;
}
.mkp-brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; overflow: hidden;
}
.mkp-brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.mkp-brand-logo svg { width: 20px; height: 20px; }
.mkp-brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 800;
  color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.mkp-search-wrap {
  flex: 1; position: relative; max-width: 480px;
}
.mkp-search {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 10px 18px 10px 44px;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  font-size: 16px; /* evita zoom iOS */
}
.mkp-search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,79,216,.10);
  background: var(--surface);
}
.mkp-search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
  display: flex; align-items: center;
}
.mkp-search-clear {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: var(--muted); border: none; border-radius: 50%;
  width: 18px; height: 18px; cursor: pointer; display: none;
  align-items: center; justify-content: center; color: white;
  font-size: .7rem; line-height: 1;
}
.mkp-search-clear.visible { display: flex; }

.mkp-header-actions {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}

.mkp-cart-btn {
  position: relative;
  background: var(--brand);
  color: white; border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: .85rem; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background .18s, transform .12s;
  white-space: nowrap;
}
.mkp-cart-btn:hover { background: var(--brand-dark); }
.mkp-cart-btn:active { transform: scale(.97); }
.mkp-cart-badge {
  background: var(--accent);
  color: white;
  border-radius: 50%;
  min-width: 20px; height: 20px;
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  animation: badge-pop .2s ease;
}
@keyframes badge-pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ── HERO BANNER ──────────────────────────────────────── */
.mkp-hero {
  background: linear-gradient(135deg, var(--brand) 0%, #3b6ef0 60%, #6b8ef7 100%);
  padding: 40px 20px 36px;
  text-align: center;
  position: relative; overflow: hidden;
}
.mkp-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") center;
  pointer-events: none;
}
.mkp-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
  position: relative;
}
.mkp-hero-desc {
  font-size: .95rem;
  color: rgba(255,255,255,.82);
  max-width: 420px;
  margin: 0 auto 20px;
  line-height: 1.5;
  position: relative;
}
.mkp-hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap;
  position: relative;
}
.mkp-hero-stat {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: .8rem;
  color: rgba(255,255,255,.9);
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* ── CATEGORIA CHIPS ──────────────────────────────────── */
.mkp-cats {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  overflow-x: auto;
  display: flex; gap: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mkp-cats::-webkit-scrollbar { display: none; }
.mkp-cat-chip {
  flex-shrink: 0;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 7px 16px;
  font-family: var(--font-body);
  font-size: .82rem; font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.mkp-cat-chip:hover { border-color: var(--brand); color: var(--brand); }
.mkp-cat-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
  box-shadow: 0 2px 8px rgba(26,79,216,.3);
}

/* ── MAIN LAYOUT ──────────────────────────────────────── */
.mkp-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.mkp-results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap; gap: 8px;
}
.mkp-results-count {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 500;
}
.mkp-results-count strong { color: var(--text); }

/* ── GRID DE PRODUTOS ─────────────────────────────────── */
.mkp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ── CARD ─────────────────────────────────────────────── */
.mkp-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  display: flex; flex-direction: column;
  position: relative;
}
.mkp-card:hover {
  border-color: var(--brand-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.mkp-card:active { transform: translateY(0); }

.mkp-card-img {
  width: 100%; aspect-ratio: 1;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.mkp-card-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .3s ease;
  padding: 8px;
}
.mkp-card:hover .mkp-card-img img { transform: scale(1.04); }
.mkp-card-img .img-placeholder {
  font-size: 3rem; opacity: .25;
}

.mkp-card-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.mkp-badge {
  padding: 3px 8px; border-radius: 50px;
  font-size: .65rem; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
}
.mkp-badge-new    { background: var(--brand); color: white; }
.mkp-badge-hot    { background: var(--accent); color: white; }
.mkp-badge-sale   { background: var(--green); color: white; }

.mkp-card-body {
  padding: 12px 14px 14px;
  flex: 1; display: flex; flex-direction: column;
}
.mkp-card-cat {
  font-size: .68rem; font-weight: 600;
  color: var(--brand);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 4px;
}
.mkp-card-name {
  font-size: .9rem; font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mkp-card-desc {
  font-size: .75rem; color: var(--muted);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.mkp-card-footer {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  margin-top: auto;
}
.mkp-card-price {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 800;
  color: var(--brand-dark);
}
.mkp-card-price-hidden {
  font-size: .75rem; color: var(--muted); font-style: italic;
}

.mkp-btn-add {
  background: var(--brand);
  color: white; border: none;
  border-radius: 50px;
  padding: 7px 14px;
  font-size: .78rem; font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .12s;
  white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
}
.mkp-btn-add:hover { background: var(--brand-dark); }
.mkp-btn-add:active { transform: scale(.95); }
.mkp-btn-add.in-cart {
  background: var(--green-bg);
  color: var(--green);
}

/* Controle de qty inline no card */
.mkp-qty-ctrl {
  display: flex; align-items: center; gap: 6px;
}
.mkp-qty-btn {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0;
}
.mkp-qty-btn:hover { border-color: var(--brand); color: var(--brand); }
.mkp-qty-num {
  font-weight: 700; font-size: .88rem;
  min-width: 20px; text-align: center;
}

/* ── EMPTY STATE ──────────────────────────────────────── */
.mkp-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 64px 20px;
  color: var(--muted);
}
.mkp-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.mkp-empty-title { font-size: 1.1rem; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.mkp-empty-sub { font-size: .85rem; }

/* ── LOADING ──────────────────────────────────────────── */
.mkp-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 50vh; gap: 16px;
  color: var(--muted); font-size: .85rem; font-weight: 500;
}
.mkp-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SKELETON CARDS ───────────────────────────────────── */
.mkp-skeleton {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.mkp-skel-img {
  width: 100%; aspect-ratio: 1;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.mkp-skel-body { padding: 12px 14px; }
.mkp-skel-line {
  height: 12px; border-radius: 6px; margin-bottom: 8px;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.mkp-skel-line.w60 { width: 60%; }
.mkp-skel-line.w80 { width: 80%; }
.mkp-skel-line.w40 { width: 40%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── DRAWER CARRINHO ──────────────────────────────────── */
.mkp-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 500; display: none;
  backdrop-filter: blur(2px);
}
.mkp-overlay.open { display: block; }

.mkp-drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  background: var(--surface);
  z-index: 501;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.25,.8,.25,1);
  box-shadow: var(--shadow-lg);
}
.mkp-drawer.open { transform: translateX(0); }

.mkp-drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.mkp-drawer-title {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.mkp-drawer-close {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 50%; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2); font-size: 1rem;
  transition: all .15s;
}
.mkp-drawer-close:hover { background: var(--border); }

/* Etapas do carrinho */
.mkp-steps {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mkp-step {
  flex: 1; text-align: center;
  padding: 10px 8px;
  font-size: .72rem; font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.mkp-step.active { color: var(--brand); border-bottom-color: var(--brand); }
.mkp-step.done { color: var(--green); }
.mkp-step-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--border); color: var(--muted);
  font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.mkp-step.active .mkp-step-num { background: var(--brand); color: white; }
.mkp-step.done .mkp-step-num { background: var(--green); color: white; }

/* Painel de itens do carrinho */
.mkp-cart-panel { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.mkp-cart-panel.hidden { display: none; }

.mkp-cart-item {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex; gap: 12px; align-items: flex-start;
}
.mkp-cart-item-img {
  width: 56px; height: 56px; flex-shrink: 0;
  background: var(--bg);
  border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.mkp-cart-item-img img { width: 100%; height: 100%; object-fit: contain; }
.mkp-cart-item-info { flex: 1; min-width: 0; }
.mkp-cart-item-name { font-size: .85rem; font-weight: 700; margin-bottom: 2px; }
.mkp-cart-item-comps { font-size: .72rem; color: var(--muted); margin-bottom: 6px; line-height: 1.35; }
.mkp-cart-item-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mkp-cart-item-price { font-weight: 700; font-size: .9rem; color: var(--brand-dark); }
.mkp-cart-item-del {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 4px; border-radius: 4px;
  transition: color .15s; flex-shrink: 0;
  font-size: .8rem;
}
.mkp-cart-item-del:hover { color: var(--red); }

.mkp-cart-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px; gap: 12px;
  color: var(--muted);
}
.mkp-cart-empty-icon { font-size: 3rem; }
.mkp-cart-empty-text { font-size: .9rem; font-weight: 600; color: var(--text2); }
.mkp-cart-empty-sub { font-size: .8rem; }

/* Footer do drawer */
.mkp-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.mkp-cart-summary {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.mkp-cart-row {
  display: flex; justify-content: space-between;
  font-size: .82rem; color: var(--text2); margin-bottom: 6px;
}
.mkp-cart-row:last-child { margin-bottom: 0; }
.mkp-cart-row.total {
  font-size: 1rem; font-weight: 800;
  color: var(--text); padding-top: 8px;
  border-top: 1px solid var(--border); margin-top: 6px;
}
.mkp-cart-row.total .val { color: var(--brand-dark); }

.mkp-btn-primary {
  width: 100%;
  background: var(--brand);
  color: white; border: none;
  border-radius: 50px;
  padding: 14px;
  font-family: var(--font-body);
  font-size: .95rem; font-weight: 700;
  cursor: pointer;
  transition: background .18s, transform .12s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.mkp-btn-primary:hover { background: var(--brand-dark); }
.mkp-btn-primary:active { transform: scale(.98); }
.mkp-btn-primary:disabled { opacity: .6; cursor: default; transform: none; }

.mkp-btn-secondary {
  width: 100%;
  background: none;
  color: var(--text2); border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 11px;
  font-family: var(--font-body);
  font-size: .88rem; font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.mkp-btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

/* ── FORM DE CHECKOUT ─────────────────────────────────── */
.mkp-checkout-panel { flex: 1; overflow-y: auto; padding: 20px; display: none; flex-direction: column; gap: 16px; }
.mkp-checkout-panel.visible { display: flex; }

.mkp-form-group { display: flex; flex-direction: column; gap: 6px; }
.mkp-form-label {
  font-size: .72rem; font-weight: 700;
  color: var(--text2); text-transform: uppercase; letter-spacing: .06em;
}
.mkp-form-label span { color: var(--red); }
.mkp-form-input {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 16px; color: var(--text);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.mkp-form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,79,216,.1);
  background: var(--surface);
}
.mkp-form-input::placeholder { color: var(--muted); }
.mkp-form-input.error { border-color: var(--red); }

.mkp-delivery-tabs {
  display: flex; gap: 8px;
}
.mkp-delivery-tab {
  flex: 1; padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600;
  color: var(--text2);
  transition: all .18s;
}
.mkp-delivery-tab.active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand);
}

.mkp-geo-btn {
  background: var(--brand-light);
  border: 1.5px solid var(--brand-mid);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .8rem; font-weight: 600;
  color: var(--brand); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .18s;
}
.mkp-geo-btn:hover { background: var(--brand-mid); }
.mkp-geo-status { font-size: .75rem; color: var(--green); font-weight: 500; margin-top: 4px; }
.mkp-geo-status.error { color: var(--red); }

.mkp-form-section {
  font-size: .75rem; font-weight: 700;
  color: var(--brand); text-transform: uppercase;
  letter-spacing: .08em; padding-bottom: 4px;
  border-bottom: 1.5px solid var(--brand-light);
}

/* Erro global */
.mkp-err {
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: .82rem;
  color: var(--red); font-weight: 500; display: none;
}
.mkp-err.visible { display: block; }

/* ── TELA DE SUCESSO ──────────────────────────────────── */
.mkp-success {
  flex: 1; display: none; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px; gap: 12px;
}
.mkp-success.visible { display: flex; }
.mkp-success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  animation: success-pop .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes success-pop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.mkp-success-title {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 800; color: var(--text);
}
.mkp-success-desc { font-size: .88rem; color: var(--text2); line-height: 1.5; max-width: 280px; }
.mkp-success-order {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 20px;
  font-size: .82rem; color: var(--text2);
}
.mkp-success-order strong { color: var(--text); font-family: var(--font-display); font-size: 1rem; }

.mkp-wa-btn {
  background: #25d366; color: white;
  border: none; border-radius: 50px;
  padding: 12px 24px;
  font-size: .9rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  display: flex; align-items: center; gap: 8px;
  transition: background .15s;
}
.mkp-wa-btn:hover { background: #1da851; }

/* ── MODAL COMPLEMENTOS ───────────────────────────────── */
.mkp-modal-overlay {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(15,23,42,.6);
  display: none; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(3px);
  padding: 0;
}
.mkp-modal-overlay.open { display: flex; }
@media (min-width: 600px) {
  .mkp-modal-overlay { align-items: center; padding: 20px; }
}

.mkp-modal {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 520px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modal-up .28s cubic-bezier(.25,.8,.25,1);
}
@media (min-width: 600px) {
  .mkp-modal { border-radius: var(--radius-lg); max-height: 80vh; }
}
@keyframes modal-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.mkp-modal-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 14px; align-items: flex-start;
  flex-shrink: 0;
}
.mkp-modal-img {
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 10px; background: var(--surface2);
  overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.mkp-modal-img img { width: 100%; height: 100%; object-fit: contain; }
.mkp-modal-info { flex: 1; min-width: 0; }
.mkp-modal-name { font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.mkp-modal-price { font-weight: 700; font-size: .9rem; color: var(--brand-dark); }
.mkp-modal-close {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all .15s;
  font-size: .9rem; color: var(--text2);
}
.mkp-modal-close:hover { background: var(--border); }

.mkp-modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; }

.mkp-comp-group { margin-bottom: 20px; }
.mkp-comp-group-title {
  font-weight: 800; font-size: .88rem;
  margin-bottom: 4px; display: flex; align-items: center; gap: 8px;
}
.mkp-comp-req {
  font-size: .65rem; font-weight: 700;
  background: var(--accent-bg); color: var(--accent);
  border-radius: 50px; padding: 2px 8px;
  text-transform: uppercase; letter-spacing: .04em;
}
.mkp-comp-opt {
  font-size: .65rem; font-weight: 700;
  background: var(--surface2); color: var(--muted);
  border-radius: 50px; padding: 2px 8px;
  text-transform: uppercase; letter-spacing: .04em;
}
.mkp-comp-group-sub { font-size: .75rem; color: var(--muted); margin-bottom: 10px; }
.mkp-comp-options { display: flex; flex-direction: column; gap: 6px; }
.mkp-comp-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all .15s;
  background: var(--surface2);
}
.mkp-comp-option:hover { border-color: var(--brand-mid); background: var(--brand-light); }
.mkp-comp-option.selected { border-color: var(--brand); background: var(--brand-light); }
.mkp-comp-option input { accent-color: var(--brand); flex-shrink: 0; }
.mkp-comp-option-name { flex: 1; font-size: .85rem; font-weight: 600; }
.mkp-comp-option-price { font-size: .8rem; font-weight: 700; color: var(--green); }
.mkp-comp-option-price.zero { color: var(--muted); font-weight: 400; }

.mkp-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.mkp-modal-qty {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  margin-bottom: 14px;
}
.mkp-modal-qty-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface2); cursor: pointer;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.mkp-modal-qty-btn:hover { border-color: var(--brand); color: var(--brand); }
.mkp-modal-qty-val { font-weight: 800; font-size: 1.1rem; min-width: 28px; text-align: center; }
.mkp-modal-req-err { font-size: .75rem; color: var(--red); font-weight: 500; margin-bottom: 8px; display: none; }
.mkp-modal-req-err.visible { display: block; }

/* ── TOAST ────────────────────────────────────────────── */
.mkp-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: white; border-radius: 50px;
  padding: 10px 20px;
  font-size: .85rem; font-weight: 600;
  z-index: 900;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-md);
  transition: transform .28s cubic-bezier(.25,.8,.25,1), opacity .28s;
  opacity: 0; pointer-events: none;
  white-space: nowrap;
}
.mkp-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── RESPONSIVO ───────────────────────────────────────── */
@media (max-width: 600px) {
  .mkp-hero { padding: 28px 16px 24px; }
  .mkp-brand-name { font-size: 1rem; max-width: 120px; }
  .mkp-search-wrap { display: none; }
  .mkp-main { padding: 16px 12px 80px; }
  .mkp-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mkp-card-name { font-size: .82rem; }
  .mkp-card-price { font-size: .95rem; }
  .mkp-btn-add { padding: 6px 10px; font-size: .72rem; }
  .mkp-drawer { width: 100vw; }

  /* Barra de busca mobile — abaixo do header */
  .mkp-mobile-search {
    display: block;
    padding: 10px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .mkp-mobile-search .mkp-search-wrap { display: block !important; max-width: 100%; }
}
@media (min-width: 601px) {
  .mkp-mobile-search { display: none; }
}
@media (min-width: 900px) {
  .mkp-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (min-width: 1100px) {
  .mkp-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ── COMPLEMENTOS — tipos texto, data e botões ────────────────── */
.mkp-comp-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  resize: vertical;
  min-height: 72px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  background: var(--surface2);
}
.mkp-comp-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,79,216,.09);
  background: var(--surface);
}
.mkp-comp-select-wrap {
  margin-bottom: 10px;
}
.mkp-comp-select-label {
  display: block;
  font-size: .68rem; font-weight: 700;
  color: var(--text2); text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 5px;
}
.mkp-comp-select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 15px; color: var(--text);
  background: var(--surface2);
  outline: none;
  transition: border-color .18s;
}
.mkp-comp-select:focus { border-color: var(--brand); }

/* Botões de opção (chips) */
.mkp-comp-options {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.mkp-comp-option {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--surface2);
  font-family: var(--font-body);
  font-size: .83rem; font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all .18s;
  display: flex; align-items: center; gap: 6px;
}
.mkp-comp-option:hover {
  border-color: var(--brand-mid);
  color: var(--brand);
  background: var(--brand-light);
}
.mkp-comp-option.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}
.mkp-comp-option .mkp-comp-option-price {
  font-size: .74rem; opacity: .85;
}

/* ── FORMAS DE PAGAMENTO ──────────────────────────────────────── */
.mkp-pay-methods {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 4px;
}
.mkp-pay-method {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  cursor: pointer; text-align: left;
  transition: all .18s; width: 100%;
  font-family: var(--font-body);
}
.mkp-pay-method:hover { border-color: var(--brand-mid); background: var(--brand-light); }
.mkp-pay-method.active {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(26,79,216,.08);
}
.mkp-pay-icon { font-size: 1.3rem; flex-shrink: 0; }
.mkp-pay-name { font-size: .88rem; font-weight: 600; color: var(--text); }

/* Info de pagamento na tela de sucesso */
.mkp-pay-info {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
  width: 100%; max-width: 300px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.mkp-pay-info-title { font-weight: 700; font-size: .95rem; }
.mkp-pay-info-sub { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mkp-pay-info-key {
  font-family: monospace;
  font-size: .9rem; font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-light);
  border: 1.5px solid var(--brand-mid);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  word-break: break-all;
  transition: background .15s;
}
.mkp-pay-info-key:hover { background: var(--brand-mid); }

/* ── BOTÃO WHATSAPP FLUTUANTE ─────────────────────────────────── */
.mkp-wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  background: #25d366; color: white;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4), 0 2px 8px rgba(0,0,0,.15);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.mkp-wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,.5), 0 4px 12px rgba(0,0,0,.2);
}

/* ── BOTÃO PROJETO PERSONALIZADO NO HERO ──────────────────────── */
.mkp-hero-projeto-btn {
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.5);
  color: white; border-radius: 50px;
  padding: 8px 20px;
  font-family: var(--font-body);
  font-size: .85rem; font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  backdrop-filter: blur(4px);
}
.mkp-hero-projeto-btn:hover {
  background: rgba(255,255,255,.28);
  border-color: white;
  transform: translateY(-1px);
}

/* ── UPLOAD DE ARQUIVOS DO PROJETO ────────────────────────────── */
.mkp-pf-wrap {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px;
}
.mkp-pf-thumb {
  position: relative; width: 72px; height: 72px;
  border-radius: 8px; overflow: hidden;
  border: 1.5px solid var(--border);
}
.mkp-pf-media {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.mkp-pf-del {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,.55); color: white;
  border: none; border-radius: 50%;
  width: 18px; height: 18px;
  font-size: .6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mkp-pf-add {
  width: 72px; height: 72px;
  border: 2px dashed var(--border2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted);
  font-size: 1.8rem; font-weight: 300;
  transition: border-color .15s, color .15s;
}
.mkp-pf-add:hover { border-color: var(--brand); color: var(--brand); }

/* ── ACCOUNT DROPDOWN ─────────────────────────────────────────── */
.mkp-account-wrap { position: relative; }

.mkp-orders-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 340px; max-height: 480px;
  display: none; flex-direction: column;
  z-index: 400; overflow: hidden;
}
.mkp-orders-dropdown.open { display: flex; }

.mkp-orders-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: .9rem;
  flex-shrink: 0;
}

#mkp-orders-list-dropdown {
  overflow-y: auto; flex: 1;
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}

.mkp-drop-order {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s;
}
.mkp-drop-order:hover { border-color: var(--brand-mid); }
.mkp-drop-order-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.mkp-drop-order-id { font-size:.72rem; font-weight:700; color:var(--muted); font-family:monospace; }
.mkp-drop-order-status {
  padding: 2px 8px; border-radius: 50px;
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
}
.mkp-drop-order-items { font-size:.78rem; color:var(--text2); margin-bottom:4px; }
.mkp-drop-order-total { font-size:.82rem; font-weight:800; color:var(--brand-dark); }

.mkp-drop-empty {
  padding: 32px 16px; text-align: center;
  color: var(--muted); font-size: .82rem;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.mkp-drop-empty-icon { font-size: 2rem; }

.mkp-drop-loading {
  padding: 24px; text-align: center;
  color: var(--muted); font-size: .82rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* Modal detalhe do pedido (dentro do marketplace) */
.mkp-order-detail-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(15,23,42,.5);
  display: none; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(2px);
}
.mkp-order-detail-overlay.open { display: flex; }
@media(min-width:600px){
  .mkp-order-detail-overlay { align-items: center; padding: 20px; }
}
.mkp-order-detail-modal {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px;
  max-height: 85vh; overflow-y: auto;
  animation: modal-up .28s cubic-bezier(.25,.8,.25,1);
}
@media(min-width:600px){
  .mkp-order-detail-modal { border-radius: var(--radius-lg); }
}
.mkp-order-detail-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.mkp-order-detail-title { font-weight: 800; font-size: 1rem; }
.mkp-order-detail-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.mkp-order-detail-section {
  font-size: .66rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.mkp-order-detail-row {
  display: flex; justify-content: space-between;
  font-size: .83rem; padding: 4px 0;
}
.mkp-order-detail-row.total {
  font-weight: 800; font-size: .95rem;
  padding-top: 8px; border-top: 1.5px solid var(--border);
}
.mkp-order-detail-row.total .val { color: var(--brand-dark); }

/* ── LIGHTBOX ─────────────────────────────────────────────────── */
.mkp-lightbox {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,.92);
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px;
}
.mkp-lightbox.open { display: flex; }

.mkp-lb-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.15); color: white;
  border: none; border-radius: 50%;
  width: 40px; height: 40px; font-size: 1.1rem;
  cursor: pointer; transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.mkp-lb-close:hover { background: rgba(255,255,255,.3); }

.mkp-lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); color: white;
  border: none; border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.8rem;
  cursor: pointer; transition: background .15s;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.mkp-lb-arrow:hover { background: rgba(255,255,255,.3); }
.mkp-lb-prev { left: 16px; }
.mkp-lb-next { right: 16px; }

.mkp-lb-media {
  max-width: min(90vw, 800px);
  max-height: 70vh;
  display: flex; align-items: center; justify-content: center;
}
.mkp-lb-media img {
  max-width: 100%; max-height: 70vh;
  object-fit: contain; border-radius: 8px;
}
.mkp-lb-media video {
  max-width: 100%; max-height: 70vh;
  border-radius: 8px;
}

.mkp-lb-dots {
  display: flex; gap: 6px; margin-top: 14px;
}
.mkp-lb-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35); cursor: pointer;
  transition: background .15s;
  border: none;
}
.mkp-lb-dot.active { background: white; }

.mkp-lb-caption {
  color: rgba(255,255,255,.6); font-size: .8rem;
  margin-top: 8px;
}

/* Card com cursor pointer na imagem */
.mkp-card-img { cursor: zoom-in; }

/* Miniatura de vídeo/gif no card com ícone play */
.mkp-card-media-count {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.55); color: white;
  border-radius: 50px; padding: 2px 8px;
  font-size: .65rem; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
