/* ================================================================
   MiBuy — Design System & Custom Styles
   ITECA3-12 | Felix Gomera
   Stack: Bootstrap 5 + Vanilla CSS
   ================================================================ */

/* ── 1. DESIGN TOKENS ───────────────────────────────────────────── */
:root {
  --primary:        #1B4332;
  --primary-light:  #2D6A4F;
  --primary-dark:   #133124;
  --accent:         #F4A11D;
  --accent-dark:    #d4881a;
  --surface:        #F8F9FA;
  --card-bg:        #FFFFFF;
  --text-main:      #1A1A1A;
  --text-muted:     #6C757D;
  --danger:         #DC3545;
  --success:        #198754;
  --info:           #0dcaf0;
  --border:         #DEE2E6;
  --shadow-sm:      0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.14);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.18);
  --radius-card:    12px;
  --radius-btn:     8px;
  --radius-pill:    50px;
  --radius-input:   8px;
  --transition:     all 0.2s ease;
  --font-display:   'Poppins', sans-serif;
  --font-body:      'Inter', sans-serif;
}

/* ── 2. BASE RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
}

a { color: inherit; }
a:hover { color: var(--accent); }

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

/* ── 3. TYPOGRAPHY UTILITIES ─────────────────────────────────────── */
.font-display  { font-family: var(--font-display); }
.text-primary-brand { color: var(--primary) !important; }
.text-accent   { color: var(--accent) !important; }
.fw-600        { font-weight: 600; }

/* ── 4. NAVBAR ──────────────────────────────────────────────────── */
.mibuy-navbar {
  background: var(--primary) !important;
  border-bottom: 3px solid var(--primary-light);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  z-index: 1050;
  padding: 0.6rem 0;
}

.brand-logo { border-radius: 6px; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}
.brand-accent { color: var(--accent); }

/* Search */
.search-form { max-width: 520px; }

.search-input {
  border: none;
  border-radius: var(--radius-btn) 0 0 var(--radius-btn) !important;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
  transition: var(--transition);
}
.search-input::placeholder { color: rgba(255,255,255,0.55); }
.search-input:focus {
  background: rgba(255,255,255,0.22);
  color: #fff;
  box-shadow: none;
  outline: 2px solid var(--accent);
}

.btn-search {
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0 !important;
  padding: 0.55rem 1rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-search:hover { background: var(--accent-dark); color: #fff; }

/* Nav icon buttons */
.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 1.25rem;
  transition: var(--transition);
}
.nav-icon-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.badge-pill {
  position: absolute;
  top: 0; right: 0;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* User avatar button */
.nav-user-btn {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-pill);
  padding: 4px 10px 4px 4px;
  color: #fff;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
}
.nav-user-btn:hover { background: rgba(255,255,255,0.2); }
.nav-user-btn::after { margin-left: 4px; }

.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-avatar-placeholder {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-username { font-weight: 500; font-size: 0.875rem; }

/* Dropdown */
.mibuy-dropdown {
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-width: 200px;
  padding: 0.5rem 0;
}
.mibuy-dropdown .dropdown-item {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  transition: var(--transition);
}
.mibuy-dropdown .dropdown-item:hover {
  background: var(--surface);
  color: var(--primary);
}

/* Sell Now CTA */
.btn-sell {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.875rem;
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.45rem 1rem;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-sell:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244,161,29,0.4);
}

/* ── 5. CATEGORY NAV BAR ─────────────────────────────────────────── */
.category-nav {
  position: fixed;
  top: 70px;
  left: 0; right: 0;
  z-index: 1040;
  background: var(--primary-light);
  border-bottom: 1px solid var(--primary-dark);
  overflow: hidden;
}
.category-nav-inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 1rem;
}
.category-nav-inner::-webkit-scrollbar { display: none; }

.cat-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  flex-shrink: 0;
}
.cat-link:hover, .cat-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── 6. MOBILE DRAWER ────────────────────────────────────────────── */
.mibuy-drawer {
  background: var(--primary-dark);
  width: 280px !important;
}
.mibuy-drawer .offcanvas-header {
  background: var(--primary);
  border-bottom: 1px solid var(--primary-light);
  padding: 1rem 1.25rem;
}
.mibuy-drawer .offcanvas-body { padding: 1rem 0; }
.mibuy-drawer .brand-name { font-size: 1.4rem; }

.drawer-nav { display: flex; flex-direction: column; }
.drawer-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  border-radius: 0;
}
.drawer-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--accent);
}

/* ── 7. LISTING CARDS ─────────────────────────────────────────────── */
.listing-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
}
.listing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface);
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.listing-card:hover .card-img-wrap img {
  transform: scale(1.04);
}

/* Condition Badge */
.condition-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}
.badge--new         { background: var(--success); color: #fff; }
.badge--used        { background: var(--accent);  color: var(--primary-dark); }
.badge--refurbished { background: #0d6efd;        color: #fff; }

/* Wishlist Button */
.wishlist-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  color: var(--text-muted);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.wishlist-btn:hover, .wishlist-btn.active {
  background: #fff;
  color: var(--danger);
  transform: scale(1.1);
}
.wishlist-btn.active { color: var(--danger); }

/* Card Body */
.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-category {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.card-actions .btn { flex: 1; font-size: 0.82rem; padding: 6px; }

/* ── 8. HERO SECTION ─────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #3a856e 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 560px;
}
.btn-hero-primary {
  background: var(--accent);
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}
.btn-hero-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244,161,29,0.45);
}
.btn-hero-outline {
  border: 2px solid rgba(255,255,255,0.7);
  color: #fff;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: var(--radius-btn);
  padding: 0.73rem 1.75rem;
  font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
}

/* ── 9. CATEGORY GRID (Homepage) ──────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 767px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.category-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-light);
  color: var(--primary);
}
.category-card i {
  font-size: 2rem;
  color: var(--primary);
  transition: var(--transition);
}
.category-card:hover i { color: var(--accent); }
.category-card-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── 10. TRUST BANNER ────────────────────────────────────────────── */
.trust-banner {
  background: var(--primary);
  color: #fff;
  padding: 2rem 0;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.trust-item i {
  font-size: 2.2rem;
  color: var(--accent);
}
.trust-item h6 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0;
}
.trust-item p { font-size: 0.8rem; opacity: 0.8; margin: 0; }

/* ── 11. SECTION HEADERS ─────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 6px;
}
.section-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
}
.section-link:hover { color: var(--accent); }

/* ── 12. LISTING DETAIL PAGE ─────────────────────────────────────── */
.gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-card);
  cursor: zoom-in;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumb {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  flex-shrink: 0;
}
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--primary); }

.listing-price-lg {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}
.seller-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
}
.seller-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
}
.seller-avatar-placeholder {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── 13. DASHBOARD ────────────────────────────────────────────────── */
.dashboard-wrap { max-width: 1200px; margin: 0 auto; }

.nav-tabs.mibuy-tabs { border-bottom: 2px solid var(--border); }
.nav-tabs.mibuy-tabs .nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-family: var(--font-display);
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 0.75rem 1.25rem;
  transition: var(--transition);
  margin-bottom: -2px;
}
.nav-tabs.mibuy-tabs .nav-link:hover { color: var(--primary); }
.nav-tabs.mibuy-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: none;
}

/* Stat Cards */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon {
  width: 54px; height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-icon.green  { background: rgba(27,67,50,0.1);  color: var(--primary); }
.stat-icon.amber  { background: rgba(244,161,29,0.15); color: var(--accent-dark); }
.stat-icon.blue   { background: rgba(13,110,253,0.1);  color: #0d6efd; }
.stat-icon.red    { background: rgba(220,53,69,0.1);   color: var(--danger); }

.stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ── 14. ADMIN SIDEBAR ────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 118px);
}
.admin-sidebar {
  width: 240px;
  background: var(--primary-dark);
  color: #fff;
  flex-shrink: 0;
  padding: 1.5rem 0;
  position: sticky;
  top: 118px;
  height: calc(100vh - 118px);
  overflow-y: auto;
}
.admin-sidebar-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 0.75rem 1.25rem 0.25rem;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 1.25rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav-link:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.admin-nav-link.active {
  background: rgba(244,161,29,0.12);
  color: var(--accent);
  border-left-color: var(--accent);
}
.admin-nav-link i { font-size: 1.1rem; flex-shrink: 0; }

.admin-content {
  flex: 1;
  padding: 2rem;
  overflow-x: auto;
}
.admin-page-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

@media (max-width: 991px) {
  .admin-sidebar {
    position: fixed;
    left: -240px;
    top: 118px;
    z-index: 1030;
    transition: left 0.25s ease;
    height: calc(100vh - 118px);
  }
  .admin-sidebar.open { left: 0; }
  .admin-content { padding: 1.25rem; }
}

/* ── 15. FORMS ────────────────────────────────────────────────────── */
.mibuy-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 2rem;
}

.form-control, .form-select {
  border-radius: var(--radius-input);
  border: 1.5px solid var(--border);
  padding: 0.6rem 0.9rem;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(27,67,50,0.12);
}

/* Primary Button */
.btn-primary-brand {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.65rem 1.5rem;
  transition: var(--transition);
  cursor: pointer;
}
.btn-primary-brand:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(27,67,50,0.35);
}

/* ── 16. TABLES ───────────────────────────────────────────────────── */
.mibuy-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.mibuy-table th {
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border);
}
.mibuy-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.875rem;
}
.mibuy-table tbody tr:last-child td { border-bottom: none; }
.mibuy-table tbody tr:hover { background: rgba(27,67,50,0.03); }

/* ── 17. STATUS BADGES ────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-active     { background: rgba(25,135,84,0.12);  color: var(--success); }
.status-pending    { background: rgba(244,161,29,0.15); color: var(--accent-dark); }
.status-sold       { background: rgba(13,110,253,0.12); color: #0d6efd; }
.status-removed    { background: rgba(220,53,69,0.12);  color: var(--danger); }
.status-confirmed  { background: rgba(13,202,240,0.12); color: #0dcaf0; }
.status-shipped    { background: rgba(111,66,193,0.12); color: #6f42c1; }
.status-completed  { background: rgba(25,135,84,0.12);  color: var(--success); }
.status-cancelled  { background: rgba(220,53,69,0.12);  color: var(--danger); }
.status-buyer      { background: rgba(13,110,253,0.12); color: #0d6efd; }
.status-seller     { background: rgba(244,161,29,0.15); color: var(--accent-dark); }
.status-admin      { background: rgba(27,67,50,0.12);   color: var(--primary); }
.status-banned     { background: rgba(220,53,69,0.12);  color: var(--danger); }

/* ── 18. MESSAGES ─────────────────────────────────────────────────── */
.convo-list { list-style: none; padding: 0; margin: 0; }
.convo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.convo-item:hover { background: var(--surface); }
.convo-item.unread { background: rgba(27,67,50,0.04); }
.convo-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.convo-avatar-placeholder {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.convo-preview {
  flex: 1;
  min-width: 0;
}
.convo-name { font-weight: 600; font-size: 0.9rem; }
.convo-snippet {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.convo-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

.message-thread { display: flex; flex-direction: column; gap: 12px; padding: 1rem 0; }
.msg-bubble {
  max-width: 70%;
  padding: 0.65rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.msg-bubble.sent {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.msg-bubble.received {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.msg-time {
  font-size: 0.68rem;
  opacity: 0.65;
  margin-top: 3px;
  display: block;
}

/* ── 19. SEARCH / FILTER ──────────────────────────────────────────── */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}
.filter-chip a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9em;
}
.filter-chip a:hover { color: #fff; }

/* Pagination */
.pagination .page-link {
  color: var(--primary);
  border-color: var(--border);
  border-radius: var(--radius-btn) !important;
  margin: 0 2px;
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ── 20. REVIEWS ──────────────────────────────────────────────────── */
.review-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.star-rating i { font-size: 1rem; }

/* ── 21. FOOTER ───────────────────────────────────────────────────── */
.mibuy-footer {
  background: #1A1A1A;
  color: rgba(255,255,255,0.8);
  margin-top: auto;
}
.footer-brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: #fff; }
.footer-text  { font-size: 0.875rem; color: rgba(255,255,255,0.6); line-height: 1.6; }
.footer-heading { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links li { font-size: 0.875rem; }
.footer-links a { color: rgba(255,255,255,0.65); text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-social {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
}
.footer-social:hover { background: var(--accent); color: var(--primary-dark); }
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  margin: 3px 4px 3px 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 0;
}
.footer-copyright { font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.footer-legal { font-size: 0.8rem; color: rgba(255,255,255,0.45); text-decoration: none; transition: var(--transition); }
.footer-legal:hover { color: var(--accent); }

/* ── 22. ACCESSIBILITY & FOCUS ────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip to main content */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  border-radius: 0 0 var(--radius-btn) 0;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── 23. ANIMATIONS ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .listing-card { animation: fadeInUp 0.3s ease both; }
  .stat-card    { animation: fadeInUp 0.25s ease both; }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Staggered grid */
  .listing-grid .col:nth-child(2) .listing-card { animation-delay: 0.05s; }
  .listing-grid .col:nth-child(3) .listing-card { animation-delay: 0.10s; }
  .listing-grid .col:nth-child(4) .listing-card { animation-delay: 0.15s; }
}

/* ── 24. UTILITIES ────────────────────────────────────────────────── */
.listing-grid { --bs-gutter-x: 1.25rem; --bs-gutter-y: 1.25rem; }
.section-pad  { padding: 3rem 0; }
.no-image-placeholder {
  width: 100%; height: 100%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.5rem;
}
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.empty-state p { font-size: 1rem; }
