/* MuncieDeals — Warm Midwest Marketplace Design */

/* ── Reset & Variables ──────────────────────────────────────── */
:root {
  /* Primary — warm amber: golden deals, Indiana harvest warmth */
  --primary: #B45309;
  --primary-hover: #92400E;
  --primary-light: #FEF3C7;
  /* Secondary — deep teal: trust, safety, White River greens */
  --secondary: #0F766E;
  --secondary-hover: #0D5D56;
  --accent: #EA580C;
  --danger: #DC2626;
  --danger-hover: #B91C1C;
  --warning: #D97706;
  --success: #059669;
  /* Warm stone neutrals — cozy, inviting, like a porch in Indiana */
  --bg: #FEFDFB;
  --surface: #FFFFFF;
  --surface-alt: #F5F0EB;
  --text: #292524;
  --text-muted: #78716C;
  --text-light: #A8A29E;
  --border: #E7E5E4;
  --border-hover: #D6D3D1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(41,37,36,0.06);
  --shadow: 0 4px 16px rgba(41,37,36,0.08);
  --shadow-lg: 0 12px 40px rgba(41,37,36,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { line-height: 1.3; color: var(--text); }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.main-content { min-height: calc(100vh - 200px); padding-top: 24px; padding-bottom: 48px; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.navbar-brand { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.navbar-brand:hover { color: var(--primary-hover); }
.navbar-brand .brand-icon { font-size: 1.5rem; }

.navbar-links { display: flex; align-items: center; gap: 8px; }
.navbar-links a {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: all var(--transition); white-space: nowrap;
}
.navbar-links a:hover { color: var(--primary); background: rgba(37,99,235,0.06); }
.navbar-links a.active { color: var(--primary); background: rgba(37,99,235,0.08); }

.nav-badge {
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 600;
  padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); padding: 4px; }

/* ── Search bar removed for storefront mode ─────────────────── */

/* ── Breadcrumbs ────────────────────────────────────────────── */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px; padding: 12px 0;
  font-size: 14px; color: var(--text-muted); flex-wrap: wrap;
}
.breadcrumbs a { color: var(--primary); }
.breadcrumbs .sep { color: var(--text-light); }

/* ── Flash messages ─────────────────────────────────────────── */
.flash-container { padding: 12px 0; }
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: var(--radius-sm);
  margin-bottom: 10px; font-size: 14px; font-weight: 500;
  border: 1px solid transparent;
  animation: flashIn 0.3s ease;
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.flash-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.flash-danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.flash-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.flash .close-flash {
  margin-left: auto; cursor: pointer; background: none; border: none;
  font-size: 18px; opacity: 0.5; color: inherit; padding: 0;
}
.flash .close-flash:hover { opacity: 1; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: all var(--transition); line-height: 1.4;
  text-decoration: none; white-space: nowrap;
}
.btn:disabled, .btn.loading { opacity: 0.65; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-hover); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); color: #fff; }
.btn-outline {
  background: transparent; border: 1.5px solid var(--border);
  color: var(--text); font-weight: 500;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(180,83,9,0.04); }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 8px 12px; }
.btn-ghost:hover { color: var(--primary); background: rgba(180,83,9,0.06); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* Loading spinner inside buttons */
.btn .spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-text { opacity: 0.5; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-flat { border: 1px solid var(--border); }
.card-flat:hover { transform: none; box-shadow: none; }

/* ── Listing Cards (grid) ───────────────────────────────────── */
.listing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.listing-card { display: flex; flex-direction: column; }
.listing-card .card-img {
  position: relative; padding-top: 75%; overflow: hidden; background: var(--surface-alt);
}
.listing-card .card-img img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.3s ease;
}
.listing-card:hover .card-img img { transform: scale(1.05); }
.listing-card .card-img .no-img {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--text-light);
}
.listing-card .card-img .badge-featured {
  position: absolute; top: 10px; left: 10px;
  background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.listing-card .card-img .badge-sold {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; font-weight: 700;
}
.listing-card .card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.listing-card .card-title {
  font-size: 15px; font-weight: 600; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.listing-card .card-title a { color: var(--text); }
.listing-card .card-title a:hover { color: var(--primary); }
.listing-card .card-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.listing-card .card-price {
  font-size: 18px; font-weight: 700; color: var(--secondary);
  margin-top: auto; padding-top: 8px;
}
.listing-card .card-price .barter-tag {
  font-size: 12px; background: #fef3c7; color: #92400e;
  padding: 2px 8px; border-radius: 4px; font-weight: 600; margin-left: 6px;
}

/* ── Listing Detail ─────────────────────────────────────────── */
.listing-detail { display: grid; grid-template-columns: 1fr 380px; gap: 32px; }
.listing-images { position: relative; }
.listing-images .main-image {
  width: 100%; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-alt); cursor: zoom-in;
}
.listing-images .main-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.listing-images .thumb-strip {
  display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px;
}
.listing-images .thumb-strip img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer; transition: border var(--transition); flex-shrink: 0;
}
.listing-images .thumb-strip img:hover, .listing-images .thumb-strip img.active {
  border-color: var(--primary);
}

.listing-sidebar { display: flex; flex-direction: column; gap: 16px; }
.listing-sidebar .price-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center;
}
.listing-sidebar .price-box .price {
  font-size: 2.2rem; font-weight: 700; color: var(--secondary);
}
.listing-sidebar .price-box .barter-note {
  display: inline-block; margin-top: 8px; background: #fef3c7; color: #92400e;
  padding: 4px 12px; border-radius: 6px; font-weight: 600; font-size: 14px;
}
.listing-sidebar .action-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.listing-sidebar .seller-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.listing-sidebar .seller-box .seller-name {
  font-weight: 600; font-size: 16px;
}
.listing-sidebar .seller-box .seller-rating { color: var(--warning); font-size: 14px; margin-top: 4px; }
.listing-sidebar .seller-box .seller-since { color: var(--text-muted); font-size: 13px; }

.listing-body { padding-top: 16px; }
.listing-body h1 { font-size: 1.6rem; margin-bottom: 12px; }
.listing-body .meta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; font-size: 14px; color: var(--text-muted); }
.listing-body .meta-row span { display: flex; align-items: center; gap: 4px; }
.listing-body .description { font-size: 15px; line-height: 1.8; white-space: pre-wrap; }
.listing-body .extra-fields { margin-top: 16px; }
.listing-body .extra-fields dt { font-weight: 600; font-size: 14px; color: var(--text-muted); }
.listing-body .extra-fields dd { margin-bottom: 10px; margin-left: 0; font-size: 15px; }

/* ── Share buttons ──────────────────────────────────────────── */
.share-buttons {
  display: flex; gap: 8px; margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.share-buttons .share-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: opacity var(--transition); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); text-decoration: none;
}
.share-buttons .share-btn:hover { opacity: 0.8; border-color: var(--primary); color: var(--primary); }

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92); align-items: center; justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }
.lightbox .lb-close {
  position: absolute; top: 20px; right: 20px; font-size: 36px; color: #fff;
  cursor: pointer; background: none; border: none; line-height: 1;
}
.lightbox .lb-nav {
  position: absolute; top: 50%; font-size: 48px; color: #fff; cursor: pointer;
  background: rgba(255,255,255,0.15); border: none; border-radius: 50%;
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition); transform: translateY(-50%);
}
.lightbox .lb-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }

/* ── Offer forms & detail ───────────────────────────────────── */
.offer-type-tabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.offer-type-tabs label {
  flex: 1; padding: 10px; text-align: center; cursor: pointer; font-weight: 500; font-size: 14px;
  background: var(--surface-alt); transition: all var(--transition); border-right: 1px solid var(--border);
}
.offer-type-tabs label:last-child { border-right: none; }
.offer-type-tabs input[type="radio"] { display: none; }
.offer-type-tabs input[type="radio"]:checked + label,
.offer-type-tabs label.active { background: var(--primary); color: #fff; }

.offer-fields { margin-top: 12px; }
.offer-fields .field-group { display: none; margin-top: 8px; }
.offer-fields .field-group.active { display: block; }

/* Conversation / Messages */
.conversation { display: flex; flex-direction: column; gap: 12px; max-height: 500px; overflow-y: auto; padding: 16px; }
.msg { display: flex; flex-direction: column; max-width: 75%; }
.msg.msg-mine { align-self: flex-end; }
.msg .msg-bubble {
  padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5;
}
.msg.msg-mine .msg-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.msg-other .msg-bubble { background: var(--surface-alt); color: var(--text); border-bottom-left-radius: 4px; }
.msg .msg-meta { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.msg.msg-mine .msg-meta { text-align: right; }

.msg-input-row { display: flex; gap: 8px; padding: 12px 0; }
.msg-input-row textarea { flex: 1; min-height: 48px; resize: vertical; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.form-group .hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="url"],
input[type="search"], select, textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
  transition: border var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(180,83,9,0.1);
}
textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
select { cursor: pointer; }

/* ── Checkbox / toggle ──────────────────────────────────────── */
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.form-check label { font-weight: 500; font-size: 14px; cursor: pointer; }

/* ── Image upload ───────────────────────────────────────────── */
.image-upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 32px; text-align: center; cursor: pointer;
  transition: all var(--transition); background: var(--surface-alt);
}
.image-upload-zone:hover, .image-upload-zone.drag-over {
  border-color: var(--primary); background: rgba(180,83,9,0.04);
}
.image-upload-zone .upload-icon { font-size: 40px; color: var(--text-light); margin-bottom: 8px; }
.image-upload-zone p { font-size: 14px; color: var(--text-muted); }
.image-upload-zone input[type="file"] { display: none; }

.image-previews {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px;
}
.image-previews .preview-item {
  position: relative; width: 100px; height: 100px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.image-previews .preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-previews .preview-item .remove-preview {
  position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.6);
  color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px;
  font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
/* Existing images in edit */
.existing-images { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.existing-images .img-thumb {
  position: relative; width: 100px; height: 100px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.existing-images .img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.existing-images .img-thumb .delete-img {
  position: absolute; top: 4px; right: 4px; background: var(--danger); color: #fff;
  border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 12px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; }
.pagination a, .pagination span {
  padding: 8px 14px; border-radius: 6px; font-size: 14px; font-weight: 500;
}
.pagination a { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; }

.result-count { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

/* ── Notifications ──────────────────────────────────────────── */
.notification-list { display: flex; flex-direction: column; gap: 8px; }
.notification-item {
  display: flex; gap: 14px; padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.notification-item.unread { background: #FEF3C7; border-color: #FDE68A; }
.notification-item .notif-icon { font-size: 24px; flex-shrink: 0; }
.notification-item .notif-body { flex: 1; }
.notification-item .notif-title { font-weight: 600; font-size: 14px; }
.notification-item .notif-text { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.notification-item .notif-time { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ── Profile ────────────────────────────────────────────────── */
.profile-card {
  max-width: 600px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
}
.profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-header .avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700;
}

/* ── Seller Profile (public) ────────────────────────────────── */
.seller-header {
  display: flex; align-items: center; gap: 20px; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 24px;
}
.seller-header .seller-avatar {
  width: 80px; height: 80px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700;
}
.seller-header .seller-info h2 { margin-bottom: 4px; }

/* ── Stars / Reviews ────────────────────────────────────────── */
.stars { color: var(--warning); font-size: 16px; display: inline-flex; gap: 2px; }
.stars .empty { color: var(--text-light); }

.star-input { display: flex; gap: 4px; font-size: 28px; cursor: pointer; }
.star-input .star { color: var(--text-light); transition: color 0.15s; cursor: pointer; }
.star-input .star.active, .star-input .star:hover { color: var(--warning); }
.star-input .star:hover ~ .star { color: var(--text-light); }

.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-item {
  padding: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.review-item .review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-item .reviewer-name { font-weight: 600; }
.review-item .review-date { font-size: 13px; color: var(--text-muted); }
.review-item .review-text { font-size: 14px; line-height: 1.6; margin-top: 8px; color: var(--text-muted); }

/* ── Offer status badges ────────────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-accepted { background: #d1fae5; color: #065f46; }
.status-declined { background: #fecaca; color: #991b1b; }
.status-completed { background: #dbeafe; color: #1e40af; }
.status-expired { background: #f3f4f6; color: #6b7280; }

/* ── Seller Dashboard (table) ───────────────────────────────── */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-muted); font-size: 13px; background: var(--surface-alt); }
td a { font-weight: 500; }

/* ── Admin ──────────────────────────────────────────────────── */
.admin-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.admin-tabs a {
  padding: 12px 20px; font-weight: 600; font-size: 14px;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all var(--transition);
}
.admin-tabs a:hover { color: var(--primary); }
.admin-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 20px; text-align: center;
}
.stat-card .stat-num { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Report modal ───────────────────────────────────────────── */
.report-modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.5); align-items: center; justify-content: center;
}
.report-modal.active { display: flex; }
.report-modal .modal-content {
  background: var(--surface); border-radius: var(--radius); padding: 32px;
  max-width: 480px; width: 90%; max-height: 90vh; overflow-y: auto;
}
.report-modal .modal-content h3 { margin-bottom: 16px; }

/* ── Favorites ──────────────────────────────────────────────── */
.fav-btn {
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--text-light); transition: color var(--transition);
}
.fav-btn:hover, .fav-btn.active { color: #ef4444; }

/* ── Storefront hero ─────────────────────────────────────────── */
.hero-storefront {
  text-align: center; padding: 64px 20px 56px;
  background: linear-gradient(135deg, #FEF3C7 0%, #F0FDFA 40%, #FFF7ED 100%);
  border-radius: var(--radius); margin-bottom: 32px;
  border: 1px solid rgba(180,83,9,0.08);
}
.hero-storefront h1 {
  font-size: 2.6rem; margin-bottom: 16px; line-height: 1.15;
}
.hero-storefront p {
  font-size: 1.15rem; color: var(--text-muted); max-width: 520px;
  margin: 0 auto 28px;
}
.hero-btns {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* Featured showcase — larger cards for handpicked items */
.featured-showcase {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}

/* Listing count badge */
.listing-count {
  font-size: 14px; color: var(--text-muted); font-weight: 500;
  background: var(--surface-alt); padding: 4px 12px; border-radius: 20px;
}

/* Sell CTA banner */
.sell-cta {
  margin-top: 16px;
}
.sell-cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #B45309, #0F766E); color: #fff;
  padding: 32px 40px; border-radius: var(--radius); gap: 24px;
  flex-wrap: wrap;
}
.sell-cta-inner h2 { margin: 0 0 6px; font-size: 1.4rem; color: #fff; }
.sell-cta-inner p { margin: 0; opacity: 0.9; font-size: 15px; }
.sell-cta-inner .btn { white-space: nowrap; background: #fff; color: var(--primary); border-color: #fff; }
.sell-cta-inner .btn:hover { background: #F5F0EB; }

/* Empty storefront */
.empty-storefront {
  text-align: center; padding: 60px 20px;
}
.empty-storefront .empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-storefront h2 { margin-bottom: 8px; }
.empty-storefront p { color: var(--text-muted); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* How it works */
.how-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px;
  text-align: center;
}
.how-step {
  padding: 24px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.how-step .how-icon { font-size: 36px; margin-bottom: 12px; }
.how-step h3 { margin-bottom: 8px; font-size: 1.1rem; }
.how-step p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* Trust badges row */
.trust-row {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 24px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border);
}
.trust-row span {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--secondary);
}
.trust-row span i { font-size: 16px; }

@media (max-width: 768px) {
  .hero-storefront h1 { font-size: 1.8rem; }
  .hero-storefront { padding: 36px 16px 32px; }
  .sell-cta-inner { padding: 24px; flex-direction: column; text-align: center; }
  .how-grid { grid-template-columns: 1fr; }
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 32px 0; margin-top: 48px;
  background: var(--surface);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 32px;
}
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.footer-col a { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  text-align: center; padding-top: 20px; margin-top: 20px;
  border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted);
}

/* ── Verification page ──────────────────────────────────────── */
.verify-card {
  max-width: 480px; margin: 60px auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px;
}
.verify-card .verify-icon { font-size: 48px; margin-bottom: 16px; }
.code-input {
  font-size: 28px; text-align: center; letter-spacing: 10px;
  max-width: 240px; margin: 16px auto;
}

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-card {
  max-width: 440px; margin: 48px auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
}
.auth-card h2 { text-align: center; margin-bottom: 24px; }
.auth-card .divider { text-align: center; margin: 16px 0; color: var(--text-muted); font-size: 14px; }
.auth-card .alt-link { text-align: center; margin-top: 20px; font-size: 14px; }

/* ── Offers list ────────────────────────────────────────────── */
.offer-list { display: flex; flex-direction: column; gap: 12px; }
.offer-card {
  display: flex; gap: 16px; align-items: center;
  padding: 16px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border var(--transition);
}
.offer-card:hover { border-color: var(--primary); }
.offer-card .offer-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.offer-card .offer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.offer-card .offer-info { flex: 1; }
.offer-card .offer-title { font-weight: 600; font-size: 15px; }
.offer-card .offer-meta { font-size: 13px; color: var(--text-muted); }

/* ── Saved search ────────────────────────────────────────────── */
.saved-search-list { display: flex; flex-direction: column; gap: 8px; }
.saved-search-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.saved-search-item .search-info { font-weight: 500; }
.saved-search-item .search-category { color: var(--text-muted); font-size: 13px; }

/* ── TOS / Privacy ──────────────────────────────────────────── */
.legal-content { max-width: 720px; margin: 0 auto; }
.legal-content h1 { margin-bottom: 24px; }
.legal-content h2 { margin-top: 24px; margin-bottom: 12px; font-size: 1.25rem; }
.legal-content p { margin-bottom: 12px; font-size: 15px; line-height: 1.8; }
.legal-content ul { margin: 12px 0 12px 24px; font-size: 15px; }
.legal-content ul li { margin-bottom: 6px; }

/* ── Category-specific fields ───────────────────────────────── */
.category-fields { 
  display: none; padding: 16px; background: var(--surface-alt);
  border-radius: var(--radius-sm); margin-top: 12px; border: 1px dashed var(--border);
}
.category-fields.active { display: block; }
.category-fields .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Empty states ───────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { color: var(--text); margin-bottom: 8px; }
.empty-state p { max-width: 400px; margin: 0 auto 20px; }

/* ── Loading overlay ────────────────────────────────────────── */
.page-loader {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(255,255,255,0.7);
  align-items: center; justify-content: center;
}
.page-loader.active { display: flex; }
.page-loader .loader-spin {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .listing-detail { grid-template-columns: 1fr; }
  .listing-sidebar { order: -1; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 0.95rem; }
  .listing-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .listing-card .card-price { font-size: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; gap: 20px; }
  .category-fields .field-row { grid-template-columns: 1fr; }

  /* Mobile nav */
  .nav-toggle { display: block; }
  .navbar-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px 20px; box-shadow: var(--shadow);
  }
  .navbar-links.open { display: flex; }
  .navbar-links a { width: 100%; padding: 10px 14px; }

  .nav-search { max-width: 100%; width: 100%; order: 10; margin-top: 8px; }
  .navbar .container { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .auth-card, .profile-card, .verify-card { padding: 24px 16px; margin: 24px 12px; }
  .hero { padding: 32px 16px; }
  .listing-grid { grid-template-columns: 1fr; }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .navbar, .footer, .flash-container, .btn, .nav-search { display: none !important; }
  body { background: #fff; }
  .card { border: 1px solid #ccc; box-shadow: none; }
}

/* ── Enhanced Listing Cards ─────────────────────────────────── */
.listing-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}
.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(41,37,36,0.12);
  border-color: var(--border-hover);
}
.listing-card.card-sold {
  opacity: 0.65;
  pointer-events: auto;
}
.listing-card.card-sold .card-image { position: relative; }
.listing-card.card-sold .card-image::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(41,37,36,0.35);
}
.listing-card.card-sold .card-price {
  text-decoration: line-through;
  color: var(--text-muted);
}
.listing-card .card-price {
  color: var(--primary);
}

/* ── Text Accent (warm gradient text) ───────────────────────── */
.text-accent {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Accent Divider ─────────────────────────────────────────── */
.accent-divider {
  width: 60px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin: 16px auto 24px;
}

/* ── Safety Card ────────────────────────────────────────────── */
.safety-card {
  background: linear-gradient(135deg, #F0FDFA 0%, #ECFDF5 100%);
  border: 1px solid #99F6E4;
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px 0;
}
.safety-card h3 { color: var(--secondary); margin-bottom: 12px; }
.safety-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.safety-card ul { margin: 8px 0 0 20px; font-size: 14px; }
.safety-card ul li { margin-bottom: 6px; color: var(--text-muted); }
.safety-card ul li strong { color: var(--text); }

/* ── Trust Badges (inline) ──────────────────────────────────── */
.trust-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.trust-badge-verified { background: #ECFDF5; color: #065F46; }
.trust-badge-phone { background: #F0F9FF; color: #0369A1; }
.trust-badge-new { background: #FEF3C7; color: #92400E; }
.trust-badge-trusted { background: #F0FDFA; color: #0F766E; }

/* ── Commitment Checkbox ────────────────────────────────────── */
.commitment-check {
  background: #FFFBEB; border: 1px solid #FDE68A;
  border-radius: var(--radius-sm); padding: 14px 16px;
  margin: 12px 0 16px;
}
.commitment-check label {
  font-size: 13px; font-weight: 600; color: #92400E;
  cursor: pointer; display: flex; align-items: flex-start; gap: 8px;
}
.commitment-check input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0;
  accent-color: var(--primary);
}

/* ── Safe Meetup Spots List ─────────────────────────────────── */
.meetup-spots {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-top: 16px;
}
.meetup-spot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; transition: all var(--transition);
}
.meetup-spot:hover { border-color: var(--secondary); background: #F0FDFA; }
.meetup-spot .spot-icon { font-size: 20px; flex-shrink: 0; }
.meetup-spot .spot-name { font-weight: 600; }
.meetup-spot .spot-detail { font-size: 12px; color: var(--text-muted); }

/* ── Feature Highlights (homepage) ──────────────────────────── */
.feature-highlights {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; margin: 32px 0;
}
.feature-highlight {
  display: flex; gap: 14px; padding: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all var(--transition);
}
.feature-highlight:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.feature-highlight .fh-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.fh-icon-gold { background: #FEF3C7; }
.fh-icon-teal { background: #CCFBF1; }
.fh-icon-green { background: #DCFCE7; }
.fh-icon-rose { background: #FFE4E6; }
.feature-highlight h3 { font-size: 15px; margin-bottom: 4px; }
.feature-highlight p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ── Callout Boxes ──────────────────────────────────────────── */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 20px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 14px;
}
.callout i { font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.callout-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.callout-info { background: #F0FDFA; border: 1px solid #99F6E4; color: #0F766E; }
.callout-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.callout-danger { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }

/* ── Navbar warm accent ─────────────────────────────────────── */
.navbar { border-bottom: 2px solid var(--primary-light); }
.navbar-brand { color: var(--primary) !important; font-weight: 800; letter-spacing: -0.5px; }

/* Sign Up button — high contrast for navbar visibility */
.btn-signup { background: #292524; color: #FFFFFF !important; font-weight: 700; }
.btn-signup:hover { background: #0F766E; color: #FFFFFF !important; }

/* ── Hero enhancements ──────────────────────────────────────── */
.hero-storefront h1 { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.5px; }
.hero-storefront .hero-subtitle {
  font-size: 1.1rem; color: var(--text-muted); max-width: 540px;
  margin: 0 auto 12px; line-height: 1.6;
}
.hero-storefront .hero-tagline {
  font-size: 0.95rem; color: var(--text-light);
  margin-bottom: 28px; font-style: italic;
}

/* ── Section title warm underline ───────────────────────────── */
.section-title {
  position: relative; display: inline-block; padding-bottom: 8px;
}
.section-title::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 40px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* ── Enhanced footer ────────────────────────────────────────── */
.footer { background: #FAF8F5; }

/* ── Safe meetup banner (shows on offer accepted) ───────────── */
.safe-meetup-banner {
  background: linear-gradient(135deg, #F0FDFA 0%, #FEF3C7 100%);
  border: 1px solid #99F6E4;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
  display: flex; gap: 16px; align-items: flex-start;
}
.safe-meetup-banner .smb-icon {
  font-size: 28px; flex-shrink: 0; margin-top: 2px;
}
.safe-meetup-banner h4 { margin: 0 0 8px; color: var(--secondary); font-size: 15px; }
.safe-meetup-banner p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.safe-meetup-banner ul {
  margin: 8px 0 0 16px; font-size: 13px; color: var(--text-muted);
}
.safe-meetup-banner ul li { margin-bottom: 4px; }

/* ── Step badges (how it works page) ────────────────────────── */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 700;
  margin-right: 8px; vertical-align: middle;
}

/* ── Content block typography ───────────────────────────────── */
.content-block h2 { color: var(--text); margin-top: 28px; margin-bottom: 12px; }
.content-block p { font-size: 15px; line-height: 1.8; margin-bottom: 14px; color: var(--text-muted); }
.content-block ul { margin-bottom: 14px; }
.content-block li { margin-bottom: 8px; line-height: 1.6; }

/* ── Feature list (about page) ──────────────────────────────── */
.feature-list { list-style: none; padding: 0; margin: 16px 0; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 15px; line-height: 1.6;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li i { color: var(--secondary); margin-top: 4px; flex-shrink: 0; }

/* ── How-section (how it works page) ────────────────────────── */
.how-section {
  padding: 20px 0; border-bottom: 1px solid var(--border);
}
.how-section:last-of-type { border-bottom: none; }
.how-section h2 { display: flex; align-items: center; margin-bottom: 8px; }

/* ── Auth card enhancements ─────────────────────────────────── */
.auth-card { border-top: 3px solid var(--primary); }
.auth-card h1, .auth-card h2 { color: var(--text); }

/* ── Price emphasis ─────────────────────────────────────────── */
.listing-sidebar .price-box .price { color: var(--primary); }

/* ── Badge for card trades ──────────────────────────────────── */
.badge-trade {
  position: absolute; bottom: 10px; left: 10px;
  background: #0F766E; color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
}

/* ── Warm-glow card images ──────────────────────────────────── */
.listing-card .card-image {
  position: relative; padding-top: 75%; overflow: hidden;
  background: var(--surface-alt);
}
.listing-card .card-image img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.3s ease;
}
.listing-card:hover .card-image img { transform: scale(1.05); }
.listing-card .card-image .card-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--text-light);
}
.listing-card .card-image .card-badge {
  position: absolute; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-sold { top: 10px; left: 10px; background: var(--danger); color: #fff; }
.badge-featured { top: 10px; right: 10px; background: var(--primary); color: #fff; }

/* ── Container utility ──────────────────────────────────────── */
.container-sm { max-width: 720px; margin: 0 auto; }

/* ── Phone verification badge on profile ────────────────────── */
.verify-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
}
.verify-badge-yes { background: #ECFDF5; color: #065F46; }
.verify-badge-no { background: #FEF2F2; color: #991B1B; }

/* ── Responsive additions ───────────────────────────────────── */
@media (max-width: 768px) {
  .hero-storefront h1 { font-size: 2rem; }
  .feature-highlights { grid-template-columns: 1fr; }
  .meetup-spots { grid-template-columns: 1fr; }
  .safe-meetup-banner { flex-direction: column; gap: 12px; }
}
@media (max-width: 480px) {
  .hero-storefront h1 { font-size: 1.6rem; }
}

/* ── Production mobile polish ───────────────────────────────── */
/* Touch-friendly targets */
@media (max-width: 768px) {
  .btn { min-height: 44px; min-width: 44px; }
  .navbar-links a { padding: 12px 16px; font-size: 16px; }
  .form-group input, .form-group select, .form-group textarea { font-size: 16px; }
  .listing-sidebar { position: static; }
  .price-box { position: sticky; top: 70px; z-index: 10; }
  .offer-card { flex-direction: column; align-items: stretch; }
  .conversation { max-height: 400px; overflow-y: auto; }
  .msg-input-row { position: sticky; bottom: 0; background: var(--surface); padding: 8px 0; }
  .safe-meetup-banner { padding: 16px; }
  .safe-meetup-banner ul { padding-left: 16px; }
}

/* Prevent zoom on input focus (iOS) */
@media screen and (max-width: 768px) {
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], input[type="tel"], textarea, select {
    font-size: 16px !important;
  }
}

/* Better action buttons on mobile */
@media (max-width: 480px) {
  .btn-lg { padding: 14px 24px; font-size: 16px; }
  .btn-block { width: 100%; }
  .listing-card { border-radius: 12px; }
  .card-body { padding: 10px 12px; }
  .card-price { font-size: 18px; }
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Better focus styles for accessibility */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Loading state for buttons */
.btn[disabled], .btn.loading {
  opacity: 0.6;
  pointer-events: none;
}
