
@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;500;600;700;800&display=swap');

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

:root {
  --green: #748B75;
  --green-dark: #5E6D5A;
  --rose: #AA767C;
  --bg: #F8F5F1;
  --text: #30292F;
  --text-light: #6B7280;
  --border: #E2DED9;
  --white: #FFFFFF;
  --card-bg: #FFFFFF;
  --shadow: 0 1px 3px rgba(48,41,47,0.08);
  --radius: 10px;
  --radius-sm: 6px;
}

html { height: 100%; scrollbar-gutter: stable; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
h1,h2,h3,h4,h5,h6 { font-family: 'League Spartan', sans-serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ─── Header ──────────────────────────────────────────────────── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px; max-width: 1280px; margin: 0 auto;
}
.header-logo { flex-shrink: 0; display: flex; align-items: center; }
.header-logo img { height: 44px; width: auto; }

.header-search {
  flex: 1; max-width: 540px;
  display: flex; align-items: center;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 8px; overflow: hidden; transition: border-color .2s;
}
.header-search:focus-within { border-color: var(--green); }
.header-search input {
  flex: 1; border: none; outline: none; padding: 11px 16px;
  font-size: 14px; background: transparent; color: var(--text);
}
.header-search input::placeholder { color: #b5aea9; }
.header-search button {
  background: none; border: none; cursor: pointer;
  padding: 0 14px; color: var(--text-light);
  display: flex; align-items: center; height: 44px;
}
.header-search button:hover { color: var(--green); }

.inpage-search {
  display: flex; align-items: center;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; overflow: hidden; transition: border-color .2s;
  margin-bottom: 20px;
}
.inpage-search:focus-within { border-color: var(--green); }
.inpage-search input {
  flex: 1; border: none; outline: none; padding: 13px 18px;
  font-size: 15px; background: transparent; color: var(--text);
  font-family: inherit;
}
.inpage-search input::placeholder { color: #b5aea9; }
.inpage-search button {
  background: none; border: none; cursor: pointer;
  padding: 0 16px; color: var(--text-light);
  display: flex; align-items: center; height: 48px;
}
.inpage-search button:hover { color: var(--green); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: 'League Spartan', sans-serif; font-weight: 600;
  border: none; cursor: pointer; transition: all .18s;
  text-decoration: none; white-space: nowrap; line-height: 1;
  border-radius: 8px;
}
.btn-primary { background: var(--green); color: #fff; padding: 11px 22px; font-size: 15px; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border); padding: 10px 20px; font-size: 15px;
}
.btn-outline:hover { border-color: var(--text); }
.btn-dark { background: var(--text); color: #F3F3F3; padding: 11px 22px; font-size: 15px; }
.btn-dark:hover { background: #3d3039; }
.btn-sell {
  background: var(--text); color: #fff; border: 1.5px solid var(--text);
  border-radius: 999px; padding: 7px 18px; font-size: 13px; font-weight: 700;
  letter-spacing: .01em; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; transition: background .15s, border-color .15s;
  font-family: inherit;
}
.btn-sell:hover { background: #3d3039; border-color: #3d3039; color: #fff; }
.btn-donate {
  background: transparent; color: var(--text); border: 1.5px solid var(--text);
  border-radius: 999px; padding: 7px 18px; font-size: 13px; font-weight: 700;
  letter-spacing: .01em; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; transition: background .15s, border-color .15s, color .15s;
  font-family: inherit;
}
.btn-donate:hover { background: var(--text); color: #fff; }
.btn-rose { background: var(--rose); color: #fff; padding: 11px 22px; font-size: 15px; }
.btn-rose:hover { background: #8f5f65; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 14px; }

.avatar-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'League Spartan', sans-serif; font-weight: 700;
  font-size: 14px; border: none; cursor: pointer; flex-shrink: 0;
}

/* ─── Category Bar ────────────────────────────────────────────── */
.listings-page-header { margin-bottom: 24px; }
.listings-page-header h1 { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.listings-page-sub { color: var(--text-light); font-size: 15px; }
.listings-filter-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px; flex-wrap: nowrap;
}
.cat-pills-scroll {
  display: flex; gap: 6px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.cat-pills-scroll::-webkit-scrollbar { display: none; }
.listings-filter-row .sort-select { flex-shrink: 0; }

/* Sort icon button (mobile only) */
.sort-icon-btn-wrap { position: relative; flex-shrink: 0; display: none; }
.sort-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--white);
  cursor: pointer; transition: border-color .15s;
}
.sort-icon-btn:hover { border-color: var(--text); }
.sort-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.1);
  z-index: 300; min-width: 180px; overflow: hidden;
}
.sort-dropdown.hidden { display: none; }
.sort-drop-opt {
  display: block; width: 100%; text-align: left;
  padding: 11px 16px; border: none; background: none;
  font-size: 14px; font-family: var(--font); cursor: pointer; color: var(--text);
}
.sort-drop-opt:hover { background: var(--bg); }
.sort-drop-opt.active { color: var(--green); font-weight: 600; }

@media (max-width: 640px) {
  .sort-select { display: none !important; }
  .sort-icon-btn-wrap { display: block; }
}

.category-bar {
  background: var(--bg); border-bottom: 1px solid var(--border);
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }
.category-bar-inner {
  display: flex; gap: 6px; padding: 10px 24px;
  max-width: 1280px; margin: 0 auto;
}
.cat-pill {
  display: inline-flex; align-items: center;
  padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1.5px solid var(--border);
  background: var(--white); color: var(--text); transition: all .15s;
  white-space: nowrap; flex-shrink: 0; letter-spacing: .01em;
}
.cat-pill:hover { border-color: var(--text); }
.cat-pill.active { background: var(--text); color: #fff; border-color: var(--text); }

/* ─── Listings ────────────────────────────────────────────────── */
.listings-section { padding: 24px 0 72px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.section-header h2 { font-size: 20px; font-weight: 700; }
.result-count { font-size: 13px; color: var(--text-light); margin-left: 8px; font-weight: 400; }

.sort-select {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 13px; background: var(--white);
  color: var(--text); cursor: pointer; outline: none; font-family: inherit;
}
.sort-select:focus { border-color: var(--green); }

/* Card grid — 5 columns desktop, scales down */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px 14px;
  align-items: start;
}

/* ─── Listing Card (Depop-style) ──────────────────────────────── */
.listing-card {
  background: transparent; cursor: pointer;
  display: flex; flex-direction: column;
  min-width: 0;
}
.listing-card:hover .card-img img { transform: scale(1.03); }

.card-img {
  aspect-ratio: 3/4; border-radius: var(--radius);
  overflow: hidden; background: #ece9e4; margin-bottom: 10px;
  position: relative;
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.card-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 40px; color: #c2baB2;
}

.card-body { padding: 0 2px; min-width: 0; }
.card-top-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 2px; min-width: 0; overflow: hidden;
}
.card-brand {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-light);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-size {
  font-size: 11px; font-weight: 600; color: var(--text-light);
  flex-shrink: 0; margin-left: 6px;
}
.card-title {
  font-size: 13px; color: var(--text); font-weight: 400;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 5px; line-height: 1.4;
}
.card-price-row {
  display: flex; align-items: center; justify-content: space-between;
}
.card-price {
  font-family: 'League Spartan', sans-serif; font-weight: 700;
  font-size: 15px; color: var(--text);
}
.card-like-btn {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--text-light); font-size: 17px; line-height: 1;
  transition: all .15s; display: flex; align-items: center;
}
.card-like-btn:hover { color: var(--rose); transform: scale(1.15); }
.card-like-btn.liked { color: var(--rose); }
.card-location {
  font-size: 11px; color: var(--text-light); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── Avatar Dropdown ─────────────────────────────────────────── */
.avatar-dropdown {
  position: fixed; z-index: 400;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 32px rgba(48,41,47,.14);
  min-width: 190px; padding: 6px; opacity: 0; pointer-events: none;
  transform: translateY(-6px); transition: opacity .15s, transform .15s;
}
.avatar-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.dd-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 10px 12px; border-radius: 7px;
  font-size: 14px; font-weight: 500; color: var(--text);
  background: none; border: none; cursor: pointer; text-align: left;
  text-decoration: none; transition: background .12s;
}
.dd-item:hover { background: #f5f2ee; }
.dd-signout { color: #c0392b; }
.dd-signout:hover { background: #fef2f2; }
.dd-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ─── Card Like Overlay ───────────────────────────────────────── */
.card-like-overlay {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  z-index: 2;
}
.card-like-btn {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.9); border: none; cursor: pointer;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text-light); transition: all .15s;
  box-shadow: 0 1px 4px rgba(48,41,47,.18);
}
.card-like-btn:hover { background: #fff; transform: scale(1.1); color: var(--rose); }
.card-like-btn.liked { color: var(--rose); }
.card-like-count {
  font-size: 11px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.55); line-height: 1;
}

/* ─── Skeleton ────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #e8e4df 25%, #f0ece7 50%, #e8e4df 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skeleton-card { border-radius: var(--radius); }
.skeleton-img { aspect-ratio: 3/4; border-radius: var(--radius); margin-bottom: 10px; }
.skeleton-line { height: 12px; border-radius: 4px; margin-bottom: 6px; }

.empty-state { text-align: center; padding: 80px 20px; color: var(--text-light); grid-column: 1/-1; }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; color: var(--text); }

.load-more-wrap { text-align: center; padding: 36px 0 0; }

/* ─── Auth Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(48,41,47,0.5);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg); border-radius: 16px; width: 100%; max-width: 420px;
  padding: 36px 32px; position: relative; transform: translateY(12px);
  transition: transform .2s; box-shadow: 0 8px 40px rgba(48,41,47,.22);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; font-size: 18px; cursor: pointer;
  color: var(--text-light); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.modal-close:hover { background: var(--border); }
.modal h2 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { font-size: 14px; color: var(--text-light); margin-bottom: 22px; }
.tab-row {
  display: flex; border-bottom: 1.5px solid var(--border); margin-bottom: 22px;
}
.tab-btn {
  flex: 1; padding: 10px; font-family: 'League Spartan', sans-serif;
  font-weight: 600; font-size: 15px; background: none; border: none;
  cursor: pointer; color: var(--text-light); border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px; transition: color .2s;
}
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: var(--text); letter-spacing: .03em; text-transform: uppercase; }
.form-input {
  width: 100%; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 11px 14px; font-size: 15px; background: rgba(255,255,255,0.8);
  color: var(--text); outline: none; transition: border-color .2s; font-family: inherit;
}
.form-input:focus { border-color: var(--green); }
.form-input::placeholder { color: #b5aea9; }
.form-error { font-size: 13px; color: #c0392b; margin-top: 6px; }
.form-success { font-size: 13px; color: var(--green); margin-top: 6px; }
.auth-msg { font-size: 13px; margin-top: 14px; text-align: center; color: var(--text-light); }
.auth-msg a { color: var(--rose); font-weight: 600; cursor: pointer; }
.auth-msg a:hover { text-decoration: underline; }

/* ─── Listing Detail ─────────────────────────────────k��────────── */
.listing-detail { padding: 28px 0 80px; }
.listing-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; }
.gallery-main {
  position: relative;
  aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden;
  background: #ece9e4; margin-bottom: 10px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-heart-overlay { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; align-items: center; gap: 5px; z-index: 2; }
.detail-heart-btn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.92); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.13); transition: transform .15s; color: var(--text-light); }
.detail-heart-btn:hover { transform: scale(1.1); }
.detail-heart-btn.liked { color: var(--rose); }
.detail-heart-count { font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.38); border-radius: 10px; padding: 1px 7px; min-width: 22px; text-align: center; }
.price-currency { font-size: 14px; font-weight: 500; color: var(--text-light); margin-left: 5px; vertical-align: middle; }
.header-likes-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--text-light); transition: color .15s, background .15s; text-decoration: none; }
.header-likes-btn:hover { color: var(--rose); background: #f0ebe6; }
.header-likes-btn.has-likes { color: var(--rose); }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  width: 68px; flex-shrink: 0; border-radius: 6px; overflow: hidden;
  cursor: pointer; border: 2px solid transparent; transition: border-color .2s; aspect-ratio: 1;
}
.gallery-thumb.active { border-color: var(--text); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.listing-info h1 { font-size: 26px; font-weight: 800; margin-bottom: 4px; line-height: 1.25; }
.listing-price { font-family: 'League Spartan', sans-serif; font-weight: 800; font-size: 30px; color: var(--text); margin-bottom: 20px; }
.listing-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: #f0ede8; border-radius: 6px; padding: 5px 12px;
  font-size: 13px; font-weight: 500; color: var(--text);
}
.tag span { color: var(--text-light); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.listing-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.listing-actions .btn { font-size: 15px; padding: 14px 24px; border-radius: 8px; }
.listing-section { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.listing-section:last-child { border-bottom: none; }
.listing-section h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-light); }
.listing-section p { font-size: 15px; line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.seller-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: #f5f2ee; border-radius: 8px;
}
.seller-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--green);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'League Spartan', sans-serif; font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.seller-info { flex: 1; min-width: 0; }
.seller-name { font-weight: 700; font-size: 14px; }
.seller-loc { font-size: 12px; color: var(--text-light); margin-top: 1px; }

/* ─── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-light); margin-bottom: 22px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-light); transition: color .2s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { font-weight: 600; color: var(--text); }

/* ─── Sell Page ───────────────────────────────────────────────── */
.sell-page { padding: 36px 0 72px; max-width: 680px; margin: 0 auto; }
.sell-page h1 { font-size: 30px; font-weight: 800; margin-bottom: 6px; }
.sell-page .page-sub { font-size: 15px; color: var(--text-light); margin-bottom: 28px; }
.sell-card { background: var(--white); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; border: 1px solid var(--border); }
.sell-card h2 { font-size: 14px; font-weight: 700; margin-bottom: 18px; text-transform: uppercase; letter-spacing: .05em; color: var(--text); }
.photo-upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 6px; }
.photo-slot {
  aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  border: 1.5px dashed var(--border); display: flex; align-items: center;
  justify-content: center; cursor: pointer; position: relative;
  background: #faf8f5; transition: border-color .2s;
}
.photo-slot:hover { border-color: var(--green); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .add-icon { font-size: 22px; color: var(--text-light); }
.photo-slot .remove-btn {
  position: absolute; top: 4px; right: 4px;
  background: rgba(48,41,47,0.75); color: #fff; border: none;
  border-radius: 50%; width: 20px; height: 20px; font-size: 11px;
  cursor: pointer; display: none; align-items: center; justify-content: center;
}
.photo-slot:hover .remove-btn { display: flex; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 11px 14px; font-size: 15px; background: rgba(255,255,255,0.8);
  color: var(--text); outline: none; transition: border-color .2s;
  font-family: inherit; resize: vertical; min-height: 96px;
}
.form-textarea:focus { border-color: var(--green); }
.form-textarea::placeholder { color: #b5aea9; }
.form-select {
  width: 100%; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 11px 14px; font-size: 15px; background: rgba(255,255,255,0.8);
  color: var(--text); outline: none; transition: border-color .2s; cursor: pointer;
  appearance: none; font-family: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.form-select:focus { border-color: var(--green); }
.char-count { font-size: 12px; color: var(--text-light); text-align: right; margin-top: 3px; }
.input-prefix {
  display: flex; align-items: center; border: 1.5px solid var(--border);
  border-radius: 8px; overflow: hidden; background: rgba(255,255,255,0.8);
  transition: border-color .2s;
}
.input-prefix:focus-within { border-color: var(--green); }
.prefix-label { padding: 11px 13px; font-size: 14px; color: var(--text-light); border-right: 1.5px solid var(--border); background: #f5f2ee; font-weight: 600; }
.input-prefix input { flex: 1; border: none; outline: none; padding: 11px 14px; font-size: 15px; background: transparent; color: var(--text); font-family: inherit; }
.input-prefix input::placeholder { color: #b5aea9; }
.form-select:has(> option[value=""]:checked) { color: #b5aea9; }

/* ─── Auth Gate ───────────────────────────────────────────────── */
.auth-gate { text-align: center; padding: 64px 24px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); }
.auth-gate .gate-icon { font-size: 48px; margin-bottom: 16px; }
.auth-gate h2 { font-size: 24px; margin-bottom: 8px; }
.auth-gate p { font-size: 15px; color: var(--text-light); margin-bottom: 24px; max-width: 360px; margin-left: auto; margin-right: auto; }
.auth-gate .gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ─── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 12px 22px; border-radius: 24px;
  font-size: 14px; font-weight: 500; z-index: 999; opacity: 0;
  transition: all .3s; white-space: nowrap; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: #c0392b; }

/* ─── Footer ──────────────────────────────────────────────────── */
.site-footer { background: var(--text); color: rgba(255,255,255,0.65); padding: 56px 0 0; margin-top: 60px; }
.footer-app-section {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}
.footer-app-text h3 { font-family: 'League Spartan', sans-serif; font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.footer-app-text p { font-size: 14px; line-height: 1.6; max-width: 380px; }
.footer-app-btns { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.app-store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--text); border-radius: 10px;
  padding: 10px 18px; transition: opacity .2s; text-decoration: none;
}
.app-store-btn:hover { opacity: 0.88; }
.app-store-btn .store-icon { font-size: 22px; display: flex; align-items: center; }
.app-store-btn .store-name { font-family: 'League Spartan', sans-serif; font-weight: 700; font-size: 15px; color: var(--text); }

.footer-links-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
  padding: 40px 0 36px;
}
.footer-brand img { height: 36px; filter: brightness(0) invert(1); margin-bottom: 12px; }
.footer-about { font-size: 14px; line-height: 1.7; }
.footer-col h4 { font-family: 'League Spartan', sans-serif; font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color .2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 0; font-size: 12px; text-align: center; }

/* ─── Location Autocomplete ───────────────────────────────────── */
.location-wrap { position: relative; }
.location-suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 300;
  background: var(--white); border: 1.5px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(48,41,47,.12); overflow: hidden;
  max-height: 220px; overflow-y: auto;
}
.loc-suggestion {
  padding: 11px 14px; font-size: 14px; cursor: pointer;
  border-bottom: 1px solid var(--border); transition: background .12s;
  display: flex; align-items: center; gap: 8px;
}
.loc-suggestion:last-child { border-bottom: none; }
.loc-suggestion:hover { background: #f5f2ee; }
.loc-suggestion svg { flex-shrink: 0; color: var(--text-light); }

/* ─── Shipping Toggle ─────────────────────────────────────────── */
.shipping-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.shipping-toggle-label { font-weight: 700; font-size: 15px; }
.shipping-status { font-size: 13px; color: var(--text-light); }
.toggle-switch { position: relative; width: 46px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #c8c2bb; border-radius: 26px;
  cursor: pointer; transition: background .2s;
}
.toggle-slider::before {
  content: ''; position: absolute; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ─── Bundle Options ──────────────────────────────────────────── */
.bundle-option {
  border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 16px;
  cursor: pointer; margin-bottom: 10px; transition: border-color .15s, background .15s;
  display: flex; align-items: flex-start; gap: 12px;
}
.bundle-option:hover { border-color: #b0b0a0; }
.bundle-option.selected { border-color: var(--green); background: #f4f7f4; }
.bundle-option-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0; margin-top: 2px;
  transition: border-color .15s; position: relative;
}
.bundle-option.selected .bundle-option-radio {
  border-color: var(--green); border-width: 5px;
}
.bundle-option-text h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.bundle-option-text p { font-size: 12px; color: var(--text-light); line-height: 1.4; }
.bundle-extra { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: none; }
.bundle-extra.visible { display: block; }

/* ─── Footer Social ───────────────────────────────────────────── */
.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.1); display: flex; align-items: center;
  justify-content: center; color: rgba(255,255,255,0.7); transition: all .2s;
}
.footer-social a:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ─── Profile Page ────────────────────────────────────────────── */
.profile-page { max-width: 680px; margin: 0 auto; padding: 36px 0 80px; }
.profile-page h1 { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.profile-page .page-sub { font-size: 15px; color: var(--text-light); margin-bottom: 28px; }
.profile-avatar-section {
  display: flex; align-items: center; gap: 20px; margin-bottom: 24px;
  padding: 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
}
.profile-avatar-lg {
  width: 72px; height: 72px; border-radius: 50%; background: var(--green);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'League Spartan', sans-serif; font-weight: 700; font-size: 28px;
  flex-shrink: 0; overflow: hidden;
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-info { flex: 1; }
.profile-avatar-info p { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.save-banner {
  position: sticky; bottom: 20px; z-index: 100; text-align: center;
  pointer-events: none;
}
.save-banner .save-btn-wrap { display: inline-block; pointer-events: all; }

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .listing-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 960px) {
  .listing-grid { grid-template-columns: repeat(3, 1fr); }
  .listing-detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-link�-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header-inner { padding: 10px 16px; gap: 10px; }
  .header-logo img { height: 36px; }
  .btn-outline.hide-mobile { display: none; }
  .listing-grid { grid-template-columns: repeat(2, 1fr); gap: 12px 10px; }
  .footer-app-section { flex-direction: column; gap: 20px; }
  .footer-links-grid { grid-template-columns: 1fr; gap: 24px; }
  .sell-page { padding: 20px 0 60px; }
  .form-row { grid-template-columns: 1fr; }
  .photo-upload-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-app-btns { flex-direction: column; }
}

/* ─── Brand Bubbles ───────────────────────────────── */
.brand-bubbles-wrap { display: flex; flex-direction: column; gap: 14px; }
.brand-add-row { display: flex; gap: 8px; }
.brand-add-row .form-input { flex: 1; }
.brand-add-btn {
  flex-shrink: 0; width: 40px; height: 44px;
  background: var(--green); color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.brand-add-btn:hover { background: var(--green-dark); }
.brand-bubbles { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-bubble {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  border: 1.5px solid var(--border); background: #fff; color: var(--text);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  user-select: none;
}
.brand-bubble:hover { border-color: var(--green); }
.brand-bubble.selected { background: var(--green); border-color: var(--green); color: #fff; }
.brand-bubble .bubble-remove {
  display: none; font-size: 16px; line-height: 1; margin-left: 2px;
  opacity: .7;
}
.brand-bubble.custom-bubble .bubble-remove { display: inline; }

/* ─── Size preference chips ────────────────────────── */
.size-pref-group { margin-bottom: 20px; }
.size-pref-group:last-child { margin-bottom: 0; }
.size-pref-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-light); margin-bottom: 8px;
}
.size-chip-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: flex-start; }
.size-divider {
  flex-basis: 100%; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-light);
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
}
.size-divider:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.size-chip {
  padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--text); cursor: pointer; font-family: var(--font);
  transition: all .15s; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 2px;
}
.size-chip:hover { border-color: var(--text); }
.size-chip.selected { background: var(--text); color: #fff; border-color: var(--text); }
.chip-main { font-size: 13px; font-weight: 600; white-space: nowrap; line-height: 1; }
.chip-eq { font-size: 10px; color: var(--text-light); white-space: nowrap; line-height: 1; display: none; }
.size-chip:hover .chip-eq { display: block; }

/* ─── Header nav links ────────────────────────────── */
.header-nav-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none;
  padding: 6px 10px; border-radius: var(--radius-sm); transition: color .15s, background .15s;
  white-space: nowrap;
}
.header-nav-link:hover { color: var(--green); background: rgba(116,139,117,.08); }
.header-nav-link svg { flex-shrink: 0; }
@media (max-width: 640px) { .header-nav-label { display: none; } }

/* ─── Donation Spots Page ─────────────────────────── */
.spots-page { padding: 32px 0 80px; }
.spots-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.spot-chip {
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--border);
  background: #fff; color: var(--text); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.spot-chip:hover { border-color: var(--green); }
.spot-chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.spots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.spot-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; gap: 14px; align-items: flex-start;
  transition: box-shadow .15s; cursor: default;
}
.spot-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.spot-logo {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  background: var(--bg); flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 20px; font-weight: 700; color: var(--green);
  border: 1px solid var(--border); overflow: hidden;
}
.spot-logo img { width: 100%; height: 100%; object-fit: cover; }
.spot-info { flex: 1; min-width: 0; }
.spot-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.spot-address { font-size: 13px; color: var(--text-light); margin-bottom: 6px; line-height: 1.4; }
.spot-distance { font-size: 12px; color: var(--text-light); display: block; margin-bottom: 4px; }
.spots-featured-section { margin-bottom: 20px; grid-column: 1 / -1; }
.spots-featured-label {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--green); margin-bottom: 12px;
}
.spots-featured-cards { display: flex; flex-direction: column; gap: 10px; }
.spots-section-title {
  font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--text);
  grid-column: 1 / -1;
}
.spot-type-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(116,139,117,.12); color: var(--green); letter-spacing: .02em;
}
.spot-type-badge.mosque { background: rgba(170,118,124,.12); color: var(--rose); }
/* ─── Donation Spots Action Row ─────────────────────── */
.spots-search-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.spots-search-row .inpage-search { flex: 1; margin-bottom: 0; }
.spots-action-btn {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--white); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.spots-action-btn:hover { border-color: var(--green); background: var(--green); color: #fff; }
.spots-action-btn.active { border-color: var(--green); background: var(--green); color: #fff; }

/* ─── Modals ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--bg); border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.modal-header h2 { font-size: 18px; font-weight: 700; margin: 0; }
.modal-close-btn {
  background: none; border: none; cursor: pointer; color: var(--text-light);
  display: flex; align-items: center; padding: 4px;
  transition: color .15s;
}
.modal-close-btn:hover { color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  display: flex; gap: 10px; padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.modal-footer .btn { flex: 1; }

/* Report modal — centered popup (donation spots + messages) */
.report-modal { align-items: center; justify-content: center; padding: 20px; }
.report-modal .report-modal-box {
  width: 100%; max-width: 360px; border-radius: 16px;
  max-height: 85vh; padding: 0; box-shadow: 0 24px 48px rgba(0,0,0,.2);
}
.report-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
}
.report-modal-header h2 { font-size: 18px; font-weight: 700; margin: 0; }
.report-modal-body { padding: 20px 24px; }
.report-label {
  display: block; font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 10px;
}
.report-reason-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.report-chip {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--white); font-size: 14px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all .15s; color: var(--text);
}
.report-chip:hover { border-color: var(--text-light); }
.report-chip.selected {
  background: var(--text); color: #fff; border-color: var(--text);
}
.report-details-input {
  width: 100%; min-height: 100px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; resize: vertical;
}
.report-details-input:focus { outline: none; border-color: var(--green); }
.report-modal-footer { padding: 16px 24px 20px; border-top: 1px solid var(--border); }
.report-submit-btn { width: 100%; padding: 14px; font-size: 15px; font-weight: 600; }
.report-spot-body { display: flex; flex-direction: column; gap: 0; padding: 8px 0; }
.report-spot-opt {
  display: block; width: 100%; text-align: left; padding: 14px 24px;
  font-size: 15px; color: var(--text); background: none; border: none;
  cursor: pointer; font-family: inherit;
  transition: background .12s;
}
.report-spot-opt:hover { background: var(--bg); }
.report-spot-opt:not(:last-child) { border-bottom: 1px solid var(--border); }
.report-spot-cancel {
  width: 100%; padding: 12px; font-size: 15px; font-weight: 600;
  color: var(--rose); background: none; border: none; cursor: pointer;
  font-family: inherit; border-radius: var(--radius);
}
.report-spot-cancel:hover { background: rgba(170,118,124,.08); }

/* Tips modal */
.tips-list { display: flex; flex-direction: column; gap: 24px; }
.tip-item { display: flex; flex-direction: column; gap: 6px; }
.tip-icon { color: var(--green); margin-bottom: 2px; }
.tip-item h3 { font-size: 16px; font-weight: 700; margin: 0; }
.tip-item p { font-size: 14px; color: var(--text-light); margin: 0; line-height: 1.55; }

/* Submit spot form */
.submit-spot-form .form-group { margin-bottom: 14px; }
.spot-type-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.spot-type-chip {
  padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--white); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all .15s; user-select: none;
}
.spot-type-chip.selected { background: var(--green); color: #fff; border-color: var(--green); }

/* Sell page tips button */
.sell-tips-btn {
  background: none; border: 1.5px solid var(--border); color: var(--text-light);
  border-radius: 50%; width: 32px; height: 32px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; transition: border-color .15s, color .15s;
  vertical-align: middle; margin-left: 10px;
}
.sell-tips-btn:hover { border-color: var(--green); color: var(--green); }

.spot-card-actions {
  flex-shrink: 0; display: flex; align-items: center; gap: 4px; align-self: center;
}
.spot-arrow-btn {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--border); background: #fff; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: border-color .15s, background .15s, color .15s;
}
.spot-arrow-btn:hover { border-color: var(--green); background: var(--green); color: #fff; }
.spot-card-menu-wrap { position: relative; }
.spot-card-menu-btn {
  width: 34px; height: 34px; border: 1.5px solid var(--border); border-radius: 50%;
  background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-light); transition: color .15s, background .15s, border-color .15s;
}
.spot-card-menu-btn:hover { color: var(--text); border-color: var(--border); background: var(--bg); }
.spot-card-dropdown {
  position: absolute; right: 0; top: 100%; margin-top: 4px; z-index: 100;
  min-width: 140px; background: var(--white); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); border: 1px solid var(--border);
  display: none; overflow: hidden;
}
.spot-card-dropdown.open { display: block; }
.spot-card-dropdown-opt {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  font-size: 14px; color: var(--text); background: none; border: none;
  cursor: pointer; font-family: inherit; transition: background .12s;
}
.spot-card-dropdown-opt:hover { background: rgba(0,0,0,.05); }
.spots-empty { text-align: center; padding: 60px 20px; color: var(--text-light); grid-column: 1/-1; }
/* Spots pagination */
.spots-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; margin-top: 36px; flex-wrap: wrap;
}
.sp-pg-btn {
  min-width: 38px; height: 38px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--white);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, color .15s; padding: 0 10px;
}
.sp-pg-btn:hover:not(.disabled) { border-color: var(--green); color: var(--green); }
.sp-pg-btn.active { background: var(--text); border-color: var(--text); color: #fff; }
.sp-pg-btn.disabled { opacity: .35; cursor: default; }
.sp-pg-arrow { padding: 0; }
.sp-pg-ellipsis { padding: 0 6px; color: var(--text-light); font-size: 15px; line-height: 38px; }

/* ─── Messages Page ───────────────────────────────── */
.messages-page { padding: 24px 0; }
.messages-layout { display: grid; grid-template-columns: 360px 1fr; gap: 0;
  height: calc(100vh - 110px);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.messages-sidebar { border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.messages-sidebar-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.messages-sidebar-header h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.msg-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.msg-tab {
  padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: #fff; color: var(--text); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.msg-tab:hover { border-color: var(--green); }
.msg-tab.active { background: var(--green); border-color: var(--green); color: #fff; }
.thread-list { overflow-y: auto; flex: 1; }
.thread-item {
  display: flex; gap: 12px; padding: 14px 20px; cursor: pointer;
  transition: background .12s; align-items: flex-start;
  border-bottom: 1px solid var(--border);
}
.thread-item:hover { background: var(--bg); }
.thread-item.active { background: rgba(116,139,117,.08); }
.thread-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--green);
  color: #fff; font-size: 16px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.thread-avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-meta { flex: 1; min-width: 0; }
.thread-username { font-size: 14px; font-weight: 600; color: var(--text); }
.thread-item-name { font-size: 12px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.thread-preview { font-size: 13px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.thread-time { font-size: 12px; color: var(--text-light); flex-shrink: 0; }
.thread-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--bg); }
.messages-main { display: flex; flex-direction: column; overflow: hidden; }
.messages-main-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 14px; flex-direction: column; gap: 12px; }
.chat-header { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.chat-header-menu-wrap { position: relative; margin-left: auto; }
.chat-header-menu-btn {
  width: 36px; height: 36px; border: none; background: none; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-light); transition: color .15s, background .15s;
}
.chat-header-menu-btn:hover { color: var(--text); background: rgba(0,0,0,.06); }
.chat-header-dropdown {
  position: absolute; right: 0; top: 100%; margin-top: 4px; z-index: 100;
  min-width: 180px; background: var(--white); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); border: 1px solid var(--border);
  padding: 4px 0; display: none;
}
.chat-header-dropdown.open { display: block; }
.chat-header-dropdown-opt {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  font-size: 14px; color: var(--text); background: none; border: none;
  cursor: pointer; font-family: inherit; transition: background .1s;
}
.chat-header-dropdown-opt:hover { background: rgba(0,0,0,.05); }
.chat-header-dropdown-delete { color: #dc3546; }
.chat-header-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.chat-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-header-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.chat-header-link:hover .chat-header-name { color: var(--green); }
.chat-header-name { font-size: 15px; font-weight: 600; transition: color .15s; }
.chat-header-listing { font-size: 12px; color: var(--text-light); }
.chat-product-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 22px;
  border-bottom: 1px solid var(--border); background: var(--bg);
  text-decoration: none; color: inherit; flex-shrink: 0;
  transition: background .15s;
}
.chat-product-card:hover { background: rgba(0,0,0,.03); }
.chat-product-img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.chat-product-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-product-title { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-product-price { font-size: 13px; font-weight: 600; color: var(--green); }
.chat-product-arrow { flex-shrink: 0; color: var(--text-light); }
.chat-messages-area { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble {
  max-width: 72%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5;
  word-break: break-word;
}
.chat-bubble.mine { background: var(--green); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-bubble.theirs { background: var(--bg); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-bubble-time { font-size: 11px; opacity: .6; margin-top: 4px; display: block; }
.chat-input-area { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; flex-shrink: 0; }
.chat-input-area textarea {
  flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 14px; font-family: inherit; resize: none;
  background: var(--bg); color: var(--text);
}
.chat-input-area textarea:focus { border-color: var(--green); outline: none; }
.chat-send-btn {
  background: var(--green); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 10px 18px; cursor: pointer; font-size: 14px; font-weight: 600; transition: background .15s;
  align-self: flex-end;
}
.chat-send-btn:hover { background: var(--green-dark); }
@media (max-width: 768px) {
  .messages-layout { grid-template-columns: 1fr; display: flex; flex-direction: column; }
  .messages-sidebar { border-right: none; border-bottom: 1px solid var(--border); flex: 0 0 auto; max-height: 45%; }
  .messages-main { display: none; flex: 1; min-height: 0; }
  .messages-main.visible { display: flex; flex: 1; }
  .spots-grid { grid-template-columns: 1fr; }
}

/* ─── User Profile Page (TikTok layout) ───────────────── */
.user-profile-page { max-width: 1280px; margin: 0 auto; padding: 0 0 80px; }
.up-profile-top-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
}
.up-profile-top-row .user-profile-name { flex: 1; min-width: 0; }
.up-gear-profile {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-light); text-decoration: none; transition: border-color .15s, color .15s;
  margin-left: auto;
}
.up-gear-profile:hover { border-color: var(--text); color: var(--text); }
.user-profile-header {
  display: flex; flex-direction: row; align-items: flex-start;
  gap: 32px; padding: 40px 24px 32px;
  border-bottom: 1.5px solid var(--border);
}
/* TikTok layout: avatar LEFT (big), username + stats to the right */
.user-profile-header.up-tiktok-layout {
  display: flex; flex-direction: row; align-items: flex-start;
  gap: 32px; padding: 32px 24px 28px;
}
.up-avatar-wrap { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.up-avatar-wrap.up-avatar-large {
  width: 160px; height: 160px;
}
.user-profile-avatar {
  width: 100%; height: 100%; border-radius: 50%; background: var(--green);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'League Spartan', sans-serif; font-weight: 700; font-size: 56px;
  overflow: hidden;
}
.up-avatar-large .user-profile-avatar { font-size: 64px; }
.user-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.up-avatar-cam {
  position: absolute; bottom: 6px; right: 6px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--green);
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--bg); cursor: pointer; text-decoration: none;
  color: #fff;
}
.up-tiktok-layout .up-profile-info { flex: 1; padding-top: 0; gap: 14px; }
.up-profile-info { display: flex; flex-direction: column; gap: 12px; flex: 1; padding-top: 4px; }
.up-profile-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-profile-name { font-size: 26px; font-weight: 800; margin: 0; line-height: 1.1; }
.up-gear-btn {
  width: 36px; height: 36px; border-radius: 50%; background: none; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-light);
  text-decoration: none; transition: border-color .15s, color .15s; flex-shrink: 0;
}
.up-gear-btn:hover { border-color: var(--text); color: var(--text); }
.up-stats { display: flex; gap: 24px; align-items: center; }
.up-stat {
  display: flex; flex-direction: row; align-items: baseline; gap: 6px;
  background: none; border: none; cursor: pointer; font-family: var(--font);
  padding: 4px 8px; border-radius: 8px; transition: background .15s;
}
.up-stat:hover { background: rgba(0,0,0,.04); }
.up-stat-num { font-size: 18px; font-weight: 800; color: var(--text); }
.up-stat-label { font-size: 13px; color: var(--text-light); font-weight: 500; }
.up-stat-likes { cursor: default; }
.up-stat-likes:hover { background: none; }
.up-profile-location { font-size: 14px; color: var(--text-light); line-height: 1.4; }
/* Primary / secondary action buttons (TikTok-style) */
.btn-up-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  background: var(--green); color: #fff; border: none; cursor: pointer;
  text-decoration: none; font-family: var(--font); transition: background .15s;
}
.btn-up-primary:hover { background: var(--green-dark); color: #fff; }
.btn-up-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  background: transparent; color: var(--text); border: 1.5px solid var(--border);
  cursor: pointer; font-family: var(--font); transition: border-color .15s, background .15s;
}
.btn-up-secondary:hover:not(:disabled) { border-color: var(--text); background: rgba(0,0,0,.03); }
.btn-up-secondary:disabled { opacity: .5; cursor: not-allowed; }
/* Follow list modal */
.follow-list-modal .modal-box { max-width: 400px; max-height: 520px; display: flex; flex-direction: column; }
.follow-list-title { font-size: 17px; font-weight: 700; }
.follow-list-body { flex: 1; overflow-y: auto; margin-top: 16px; }
.follow-list-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text);
}
.follow-list-item:last-child { border-bottom: none; }
.follow-list-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--green);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; overflow: hidden; flex-shrink: 0;
}
.follow-list-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.follow-list-name { font-size: 14px; font-weight: 600; }
.follow-list-item:hover .follow-list-name { color: var(--green); }
/* Offer quick-pick chips */
.offer-chip {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 8px; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--white); cursor: pointer; font-family: var(--font);
  transition: border-color .15s, background .15s;
}
.offer-chip:hover { border-color: var(--green); }
.offer-chip.recommended { border-color: var(--green); background: #f0f5f0; }
.offer-chip.active { border-color: var(--green); background: var(--green); }
.offer-chip.active .offer-chip-price { color: #fff; }
.offer-chip.active .offer-chip-sub { color: rgba(255,255,255,.8); }
.offer-chip-price { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1; }
.offer-chip-sub { font-size: 11px; color: var(--green); font-weight: 600; line-height: 1; }
.offer-chip.active .offer-chip-sub { color: rgba(255,255,255,.85); }
.user-profile-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.user-profile-actions .btn-up-primary,
.user-profile-actions .btn-up-secondary { flex: 1; min-width: 120px; }
.user-profile-tabs {
  display: flex; gap: 8px; border-bottom: 1.5px solid var(--border); padding: 0 24px;
}
.up-tab {
  padding: 14px 32px; font-size: 14px; font-weight: 600; color: var(--text-light);
  background: none; border: none; cursor: pointer; border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px; transition: color .15s, border-color .15s;
  font-family: var(--font);
}
.up-tab:hover { color: var(--text); }
.up-tab.active { color: var(--text); border-bottom-color: var(--text); }
.up-tab-content { display: none; }
.up-tab-content.active { display: block; }
.up-empty { text-align: center; padding: 48px 20px; color: var(--text-light); font-size: 14px; }
/* Profile shop grid — match main shop listing-grid */
.up-listing-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px 14px;
  align-items: start;
}
.up-listing-tile {
  position: relative; aspect-ratio: 3/4; overflow: hidden;
  background: #ece9e4; border-radius: var(--radius); display: block; text-decoration: none;
}
.up-listing-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s;
}
.up-listing-tile:hover img { opacity: .88; }
.up-tile-no-img {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--text-light); font-size: 32px; border-radius: inherit;
}
.up-tile-price {
  position: absolute; bottom: 8px; left: 8px;
  color: #fff; font-size: 13px; font-weight: 700;
  text-shadow: 0 1px 5px rgba(0,0,0,.55); pointer-events: none;
}
.up-tile-heart {
  position: absolute; top: 7px; right: 7px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.88); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s; z-index: 2; padding: 0;
}
.up-tile-heart:hover { background: #fff; transform: scale(1.1); }
.up-tile-heart svg { pointer-events: none; color: var(--text-light); }
.up-tile-heart.liked svg { fill: var(--rose); stroke: var(--rose); color: var(--rose); }
/* Orders list inside tabs */
.up-order-item {
  padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.seller-row a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 12px; }
.seller-row a:hover .seller-name { color: var(--green); }
.seller-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
@media (max-width: 1200px) {
  .up-listing-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 960px) {
  .up-listing-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .user-profile-header { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 16px 24px; }
  .user-profile-header.up-tiktok-layout { flex-direction: column; align-items: center; text-align: center; }
  .up-tiktok-layout .up-profile-info { align-items: center; }
  .up-tiktok-layout .up-stats { justify-content: center; }
  .up-tiktok-layout .user-profile-actions { justify-content: center; }
  .up-avatar-wrap.up-avatar-large { width: 140px; height: 140px; }
  .up-avatar-large .user-profile-avatar { font-size: 56px; }
  .up-listing-grid { grid-template-columns: repeat(2, 1fr); gap: 12px 10px; }
  .user-profile-tabs { padding: 0 16px; }
}

/* ─── Sold item overlay ───────────────────────────────── */
.card-sold-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.52);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; border-radius: inherit;
}
.card-sold-label {
  color: #fff; font-weight: 800; font-size: 16px;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-family: var(--font); text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.up-tile-sold-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.52);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; border-radius: inherit;
}
.up-tile-sold-label {
  color: #fff; font-weight: 800; font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-family: var(--font); text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* ─── Liked items pagination ──────────────────────────── */
.liked-pagination {
  display: flex; justify-content: center; gap: 6px;
  padding: 32px 0 8px; flex-wrap: wrap;
}

/* ─── Social auth buttons ─────────────────────────────── */
.social-auth-btns { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 2px; }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--white);
  cursor: pointer; font-family: var(--font); font-weight: 600;
  font-size: 14px; color: var(--text); transition: border-color .15s, background .15s;
  text-decoration: none; line-height: 1;
}
.btn-social:hover { border-color: #bbb; background: #fafafa; }
.btn-social-apple { background: #000; color: #fff; border-color: #000; }
.btn-social-apple:hover { background: #1a1a1a; border-color: #1a1a1a; }
.btn-social-apple .apple-logo { flex-shrink: 0; display: block; }
.social-auth-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-light); font-size: 12px; font-weight: 500;
  margin: 14px 0 10px; letter-spacing: .03em;
}
.social-auth-divider::before, .social-auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
