/* ============================================
   PRIME SOFT MARKETPLACE - Mobile First CSS
   ============================================ */

/* ── Variables ── */
:root {
  --navy:    #0d1b3e;
  --blue:    #1a56ff;
  --sky:     #0ea5e9;
  --green:   #25d366;
  --bg:      #f0f4ff;
  --white:   #ffffff;
  --border:  #e8ecf5;
  --muted:   #6b7280;
  --text:    #0d1b3e;
  --text2:   #374151;
  --rad:     14px;
  --shadow:  0 4px 20px rgba(26,86,255,.10);
  --shadow2: 0 16px 48px rgba(26,86,255,.14);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); font-family: 'Plus Jakarta Sans', sans-serif; color: var(--text); -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── HERO ── */
.mkt-hero {
  background: linear-gradient(145deg, var(--navy) 0%, #1a2c6e 55%, var(--blue) 100%);
  padding: 80px 16px 40px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.mkt-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M0 0h20v20H0zm20 20h20v20H20z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.mkt-hero-inner { position: relative; z-index: 2; max-width: 680px; margin: 0 auto; }
.mkt-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
.mkt-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  color: white;
  line-height: 1.2;
  margin-bottom: 12px;
}
.mkt-hero h1 span { color: #93c5fd; }
.mkt-hero p { color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.7; margin-bottom: 20px; }

/* Search Bar */
.mkt-search {
  background: white;
  border-radius: 12px;
  padding: 6px 6px 6px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  margin-bottom: 14px;
}
.mkt-search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  min-width: 0;
}
.mkt-search input::placeholder { color: var(--muted); }
.mkt-search button {
  background: var(--blue);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.mkt-post-link { color: rgba(255,255,255,.75); font-size: 13px; }
.mkt-post-link strong { color: white; }

/* ── FILTERS ── */
.mkt-section { padding: 16px; }
.pills-wrap {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}
/* horizontal scroll on mobile */
.pills-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  flex-wrap: nowrap;
}
.pills-scroll::-webkit-scrollbar { display: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 13px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  flex-shrink: 0;
}
.pill:hover, .pill.on { background: var(--blue); color: white; border-color: var(--blue); }
.pill-cnt {
  background: rgba(0,0,0,.07);
  color: inherit;
  padding: 1px 7px;
  border-radius: 50px;
  font-size: 11px;
}
.pill.on .pill-cnt { background: rgba(255,255,255,.2); }

/* ── RESULTS BAR ── */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 16px 14px;
  flex-wrap: wrap;
}
.results-bar span { font-size: 13px; color: var(--muted); }
.results-bar strong { color: var(--text); }

/* ── GRID ── */
.mkt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 12px 16px;
}

/* ── CARD ── */
.mkt-card {
  background: white;
  border-radius: var(--rad);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
.mkt-card:active { transform: scale(.98); }
.mkt-card-img {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.mkt-card-img img { width: 100%; height: 100%; object-fit: cover; }
.mkt-card-img .cat-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mkt-card-body { padding: 11px; flex: 1; display: flex; flex-direction: column; }
.mkt-cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  margin-bottom: 6px;
}
.mkt-card-title {
  font-family: 'Fraunces', serif;
  font-size: .82rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 6px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mkt-card-stat {
  font-size: 10px;
  color: var(--muted);
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-card-stat strong { color: var(--text); }
.mkt-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  margin-top: auto;
}
.mkt-price {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
}
.mkt-price-sub { font-size: 9px; color: var(--muted); margin-top: 2px; }
.mkt-city { font-size: 10px; color: var(--muted); text-align: right; }
.mkt-views { font-size: 9px; color: #c4c9d4; margin-top: 2px; }

/* ── EMPTY STATE ── */
.mkt-empty {
  text-align: center;
  background: white;
  border-radius: 18px;
  padding: 48px 20px;
  border: 1.5px solid var(--border);
  margin: 0 12px 20px;
}
.mkt-empty .ico { font-size: 3rem; margin-bottom: 12px; }
.mkt-empty h3 { font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 900; margin-bottom: 8px; }
.mkt-empty p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

/* ── CTA BOTTOM ── */
.mkt-cta {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  color: white;
  margin: 0 12px 32px;
}
.mkt-cta h2 { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 900; margin-bottom: 8px; }
.mkt-cta p { color: rgba(255,255,255,.75); font-size: 13px; margin-bottom: 18px; }
.mkt-cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-white { background: white; color: var(--blue); padding: 11px 22px; border-radius: 50px; font-weight: 700; font-size: 13px; }
.btn-wa { background: var(--green); color: white; padding: 11px 22px; border-radius: 50px; font-weight: 700; font-size: 13px; }

/* ── SELL PAGE ── */
.sell-wrap { max-width: 800px; margin: 0 auto; padding: 80px 12px 48px; }
.sell-header { text-align: center; margin-bottom: 22px; }
.sell-header h1 { font-family: 'Fraunces', serif; font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 900; color: var(--text); margin: 8px 0; }
.sell-header p { color: var(--muted); font-size: 13px; }
.sell-card { background: white; border-radius: 16px; padding: 20px; border: 1.5px solid var(--border); margin-bottom: 14px; box-shadow: 0 2px 8px rgba(26,86,255,.05); }
.sell-step { display: flex; align-items: center; gap: 10px; font-family: 'Fraunces', serif; font-size: 1rem; font-weight: 900; color: var(--text); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1.5px solid #f1f5f9; }
.sell-snum { width: 28px; height: 28px; background: linear-gradient(135deg, var(--blue), var(--sky)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.sell-inp { width: 100%; background: white; border: 1.5px solid var(--border); border-radius: 11px; padding: 12px 14px; font-family: inherit; font-size: 14px; color: var(--text); outline: none; transition: border-color .2s; }
.sell-inp:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,255,.07); }
.sell-lbl { display: block; font-size: 11px; font-weight: 700; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.sell-fg { margin-bottom: 13px; }
.sell-fg:last-child { margin-bottom: 0; }
.sell-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sell-g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.sell-preview { background: linear-gradient(135deg, var(--blue), var(--sky)); color: white; border-radius: 11px; padding: 12px 15px; font-weight: 700; font-size: 13px; margin-top: 10px; min-height: 44px; display: flex; align-items: center; word-break: break-word; }
.sell-slug { background: #f0f4ff; border-radius: 9px; padding: 9px 13px; font-size: 11px; color: var(--muted); margin-top: 7px; word-break: break-all; }
.sell-slug strong { color: var(--blue); }
.extra-box { background: #eff6ff; border: 1.5px solid #bfdbfe; border-radius: 12px; padding: 14px; margin-top: 12px; }
.extra-box .etag { font-size: 11px; font-weight: 700; color: #1d4ed8; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.pbox { aspect-ratio: 1; border: 2px dashed var(--border); border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; background: #f8fafc; transition: all .2s; overflow: hidden; position: relative; }
.pbox:hover, .pbox:active { border-color: var(--blue); background: #eff6ff; }
.pbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.pbox .pover { position: absolute; inset: 0; background: rgba(26,86,255,.5); display: none; align-items: center; justify-content: center; color: white; font-size: 18px; border-radius: 9px; }
.pbox:hover .pover { display: flex; }
.pbox-label { font-size: 10px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.terms-box { background: #fffbeb; border: 1.5px solid #fde68a; border-radius: 13px; padding: 13px 15px; margin-bottom: 13px; }
.terms-box label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 12px; color: #92400e; line-height: 1.6; }
.sell-submit { width: 100%; background: linear-gradient(135deg, var(--blue), var(--sky)); color: white; border: none; border-radius: 12px; padding: 15px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.sell-note { text-align: center; color: var(--muted); font-size: 11px; margin-top: 9px; }
.sell-success { text-align: center; background: white; border-radius: 20px; padding: 40px 20px; border: 1.5px solid #bbf7d0; }

/* ── LISTING DETAIL ── */
.lst-wrap { max-width: 1040px; margin: 0 auto; padding: 78px 12px 40px; }
.lst-breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.lst-breadcrumb a { color: var(--blue); }
.lst-grid { display: flex; flex-direction: column; gap: 14px; }
.lst-box { background: white; border-radius: 15px; padding: 18px; border: 1.5px solid var(--border); margin-bottom: 0; }
.lst-main-img { width: 100%; height: 220px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.lst-thumbs { display: flex; gap: 8px; margin-top: 9px; overflow-x: auto; scrollbar-width: none; }
.lst-thumbs::-webkit-scrollbar { display: none; }
.lst-thumb { width: 60px; height: 54px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border); cursor: pointer; flex-shrink: 0; transition: border-color .2s; }
.lst-thumb.on, .lst-thumb:hover { border-color: var(--blue); }
.lst-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.lst-tag { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; }
.lst-title { font-family: 'Fraunces', serif; font-size: clamp(1.2rem, 4vw, 1.6rem); font-weight: 900; color: var(--text); margin-bottom: 10px; line-height: 1.3; }
.lst-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.lst-srow { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; gap: 10px; }
.lst-srow:last-child { border: none; }
.lst-srow span { color: var(--muted); flex-shrink: 0; }
.lst-srow strong { text-align: right; }
.lst-section-title { font-family: 'Fraunces', serif; font-weight: 900; font-size: .95rem; color: var(--text); margin-bottom: 12px; }
.lst-desc { color: var(--text2); font-size: 13px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.lst-office { background: linear-gradient(135deg, var(--navy), var(--blue)); border-radius: 14px; padding: 18px; color: white; }
.lst-office h3 { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.lst-office p { font-size: 12px; opacity: .8; margin-bottom: 10px; }
.lst-office .info { font-size: 11px; opacity: .7; }
/* Sidebar / Price box - stacks below on mobile */
.lst-sidebar { display: flex; flex-direction: column; gap: 12px; }
.lst-price-box { background: white; border-radius: 15px; padding: 18px; border: 1.5px solid var(--border); box-shadow: var(--shadow); }
.lst-price-lbl { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 4px; }
.lst-price { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 900; color: var(--blue); line-height: 1; }
.lst-price-type { font-size: 11px; color: var(--muted); margin-top: 3px; }
.lst-seller-name { font-weight: 600; color: var(--text2); font-size: 14px; }
.lst-seller-city { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wa-btn { background: var(--green); color: white; padding: 13px 20px; border-radius: 50px; font-weight: 700; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; width: 100%; transition: all .2s; }
.wa-btn:active { transform: scale(.97); background: #128c7e; }
.lst-share { display: flex; gap: 8px; margin-top: 9px; }
.lst-share a, .lst-share button { flex: 1; text-align: center; padding: 9px; border-radius: 9px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; font-family: inherit; }
.safety-box { background: #fff7ed; border: 1.5px solid #fed7aa; border-radius: 13px; padding: 14px; }
.safety-box h4 { font-weight: 700; color: #c2410c; margin-bottom: 7px; font-size: 12px; }
.safety-box ul { font-size: 12px; color: #92400e; line-height: 1.9; padding-left: 14px; }
.lst-back { display: block; text-align: center; color: var(--muted); font-size: 12px; text-decoration: none; margin-top: 4px; }

/* ── TABLET 600px+ ── */
@media (min-width: 600px) {
  .mkt-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0 16px 20px; }
  .mkt-card-img { height: 110px; }
  .mkt-card-title { font-size: .88rem; }
  .sell-g2 { grid-template-columns: 1fr 1fr; }
  .sell-g3 { grid-template-columns: 1fr 1fr; }
  .lst-main-img { height: 280px; }
}

/* ── DESKTOP 900px+ ── */
@media (min-width: 900px) {
  .mkt-hero { padding: 100px 24px 56px; }
  .mkt-section { padding: 20px 24px; }
  .pills-scroll { flex-wrap: wrap; overflow: visible; }
  .results-bar { padding: 0 24px 16px; }
  .mkt-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0 20px 24px; }
  .mkt-card-img { height: 130px; }
  .mkt-card-body { padding: 14px; }
  .mkt-card-title { font-size: .92rem; }
  .mkt-cta, .mkt-empty { margin: 0 20px 32px; }
  .sell-wrap { padding: 90px 20px 60px; }
  .sell-g3 { grid-template-columns: 1fr 1fr 1fr; }
  .lst-wrap { padding: 90px 20px 50px; }
  .lst-grid { flex-direction: row; align-items: flex-start; }
  .lst-main-col { flex: 1; min-width: 0; }
  .lst-sidebar { width: 320px; flex-shrink: 0; position: sticky; top: 88px; }
  .lst-main-img { height: 320px; }
  /* Cards desktop hover */
  .mkt-card:hover { transform: translateY(-5px); box-shadow: var(--shadow2); border-color: rgba(26,86,255,.3); }
}

/* ── LARGE 1200px+ ── */
@media (min-width: 1200px) {
  .mkt-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Nav fix for mobile ── */
@media (max-width: 768px) {
  .navbar.scrolled { padding: 10px 0; }
}
