/* ── MarketplaceCSS — HomePros Houston ── */

/* Gallery grid */
.gallery-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:12px; }
.gallery-pair { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.gallery-img-wrap { position:relative; border-radius:12px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.08); }
.gallery-badge { position:absolute; top:8px; left:8px; font-size:9px; font-weight:700; padding:3px 9px; border-radius:999px; letter-spacing:.5px; text-transform:uppercase; }
.before-badge { background:rgba(0,0,0,.65); color:#fff; }
.after-badge { background:#0D9E6E; color:#fff; }
.gallery-caption { grid-column:1/-1; font-size:12px; color:var(--ink3); padding:4px 0 8px; line-height:1.4; }

/* Pro badges */
.mkt-badges { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:16px; }
.mkt-badge { padding:5px 10px; border-radius:999px; font-size:11px; font-weight:600; }
.mkt-badge-green { background:#E6F7F2; color:#0A7A55; }
.mkt-badge-blue { background:#EFF6FF; color:#1D4ED8; }
.mkt-badge-purple { background:#F5F3FF; color:#6D28D9; }
.mkt-badge-teal { background:#F0FDFA; color:#0F766E; }

/* Empty state */
.mkt-empty { text-align:center; padding:40px 20px; color:var(--ink3); font-size:15px; font-weight:600; }

/* Pro card hover enhancement (not in critical CSS) */
.mkt-pro-card { transition: border-color .15s, box-shadow .15s; }
.mkt-pro-card:hover { border-color: var(--brand); box-shadow: 0 4px 16px rgba(13,158,110,.15); transform: translateY(-1px); }

/* Trust score pill on pro card */
.ts-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--brand-light); color: var(--brand-dark);
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: var(--r99);
}
.ts-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* Pro profile page */
.pro-profile-hero {
  padding: 0 0 100px;
  max-width: 620px;
  margin: 0 auto;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--ink3);
  font-size: 13px; font-weight: 600; font-family: inherit;
  padding: 14px 16px; cursor: pointer; transition: color .15s;
}
.back-btn:hover { color: var(--brand); }
.profile-top {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 0 16px 16px; border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; flex-shrink: 0; letter-spacing: -.5px;
}
.profile-name {
  font-family: 'DM Serif Display', serif; font-size: 22px;
  color: var(--ink); letter-spacing: -.5px; margin-bottom: 2px; font-weight: 400;
}
.profile-sub { font-size: 13px; color: var(--ink3); margin-bottom: 8px; }
.stats-row {
  display: flex; gap: 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin: 0 0 16px;
}
.stat-box {
  flex: 1; padding: 14px 8px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat-box:last-child { border-right: none; }
.stat-val {
  font-family: 'DM Serif Display', serif; font-size: 22px;
  color: var(--brand); line-height: 1.1;
}
.stat-lbl { font-size: 10px; color: var(--ink3); margin-top: 3px; font-weight: 500; }
.bio-text {
  font-size: 14px; color: var(--ink2); line-height: 1.75;
  padding: 16px; background: var(--surface3); border-radius: var(--r12);
  margin: 0 16px;
}
.ba-gallery {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 6px; margin: 0 16px 16px;
}
.ba-cell {
  border-radius: var(--r8); padding: 14px 6px;
  text-align: center; font-size: 9px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase;
}
.book-bar {
  position: fixed; bottom: 57px; left: 0; right: 0; z-index: 90;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 12px rgba(0,0,0,.08);
}
.book-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; max-width: 620px; margin: 0 auto;
}
.btn-book-lg {
  padding: 11px 20px; background: var(--brand); color: #fff;
  border: none; border-radius: var(--r99); font-size: 14px;
  font-weight: 700; font-family: inherit; cursor: pointer;
  transition: background .15s; white-space: nowrap;
}

/* Chat page */
.chat-page-wrap {
  max-width: 620px; margin: 0 auto;
  padding: 20px 16px 80px;
}
.chat-page-title {
  font-family: 'DM Serif Display', serif; font-size: 24px;
  color: var(--ink); letter-spacing: -.5px; margin-bottom: 6px; font-weight: 400;
}
.chat-page-sub {
  font-size: 14px; color: var(--ink3); margin-bottom: 20px; line-height: 1.6;
}
.chat-window {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r16); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.chat-header {
  background: var(--brand); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.25); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.chat-hd-name { font-size: 14px; font-weight: 700; color: #fff; }
.chat-hd-status { font-size: 11px; color: rgba(255,255,255,.82); display: flex; align-items: center; gap: 5px; }
.chat-online-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #4ade80;
  display: inline-block; animation: pulse 2s ease-in-out infinite;
}
.chat-messages {
  min-height: 160px; max-height: 320px; overflow-y: auto;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.msg { max-width: 84%; }
.msg.bot .msg-content, .msg.bot { align-self: flex-start; }
.msg.user { align-self: flex-end; }
.msg.bot { background: var(--surface2); border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-size: 14px; line-height: 1.6; color: var(--ink); }
.msg.user { background: var(--brand); color: #fff; border-radius: 18px 18px 4px 18px; padding: 10px 14px; font-size: 14px; line-height: 1.6; }
.chat-quick {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 16px; border-top: 1px solid var(--border);
}
.qbtn {
  padding: 6px 12px; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r99); font-size: 12px; font-weight: 600;
  font-family: inherit; color: var(--ink2); cursor: pointer; transition: all .12s;
}
.qbtn:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }
.chat-input-row {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--border2);
  border-radius: var(--r99); font-size: 14px; font-family: inherit;
  outline: none; background: var(--surface2); transition: border-color .15s;
}
.chat-input:focus { border-color: var(--brand); background: var(--surface); }
.chat-send {
  padding: 10px 18px; background: var(--brand); color: #fff;
  border: none; border-radius: var(--r99); font-size: 13px;
  font-weight: 700; font-family: inherit; cursor: pointer;
}
.chat-disclaimer {
  text-align: center; font-size: 11px; color: var(--ink4);
  margin-top: 12px; line-height: 1.5;
}
.typing-dots { display: flex; gap: 4px; padding: 6px 0; }
.td {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink4); animation: bounce .9s infinite;
}
.td:nth-child(2) { animation-delay: .15s; }
.td:nth-child(3) { animation-delay: .30s; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 40%{transform:translateY(-6px)} }

/* Register page */
.reg-page { max-width: 620px; margin: 0 auto; padding: 20px 16px 80px; }
.reg-hd { text-align: center; margin-bottom: 24px; }
.reg-title { font-family: 'DM Serif Display', serif; font-size: 26px; color: var(--ink); letter-spacing: -.5px; font-weight: 400; margin: 8px 0 4px; }
.reg-sub { font-size: 13px; color: var(--ink3); }

/* Desktop layout improvements */
@media (min-width: 640px) {
  .pro-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .pro-profile-hero { padding: 0 0 120px; }
  .hero { padding: 48px 24px 0; }
}

@media (min-width: 640px) {
  .bottom-nav {
    max-width: 480px; margin: 0 auto;
    border-radius: 20px 20px 0 0;
    left: 50%; transform: translateX(-50%);
  }
}
