/* ═══════════════════════════════════════════════════════════════
   TREG — Design System & Styles
   Premium light-mode marketplace
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors — Light Theme */
  --c-bg: #f5f7fa;
  --c-bg-raised: #ffffff;
  --c-bg-card: #ffffff;
  --c-surface: #f0f2f5;
  --c-border: #e8ecf1;
  --c-border-hover: #cbd5e1;

  --c-text: #1a1a2e;
  --c-text-muted: #5a6577;
  --c-text-dim: #94a3b8;

  --c-primary: #00897b;
  --c-primary-glow: rgba(0, 137, 123, .2);
  --c-primary-dark: #00695c;
  --c-accent: #6366f1;
  --c-accent-glow: rgba(99, 102, 241, .12);
  --c-warning: #f59e0b;
  --c-danger: #ef4444;
  --c-danger-glow: rgba(239, 68, 68, .1);

  --c-grad-1: linear-gradient(135deg, #00d084 0%, #00897b 100%);
  --c-grad-2: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --c-grad-hero: none;

  /* Glass — now clean surfaces */
  --glass-bg: rgba(255, 255, 255, .95);
  --glass-blur: 12px;
  --glass-border: 1px solid #e8ecf1;

  /* Typography */
  --f-body: 'Inter', system-ui, -apple-system, sans-serif;
  --f-display: 'Outfit', 'Inter', system-ui, sans-serif;

  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;
  --fs-4xl: 2.5rem;
  --fs-5xl: 3.5rem;

  /* Spacing */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadows — light theme */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .1);
  --shadow-glow: 0 0 20px var(--c-primary-glow);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-normal: 250ms ease;
  --t-slow: 400ms cubic-bezier(.4, 0, .2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-body);
  font-size: var(--fs-md);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--c-text);
}

img {
  max-width: 100%;
  display: block;
}

/* ─── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-text-dim);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.header__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  height: 64px;
}

/* Logo */
.logo {
  display: flex;
  align-items: baseline;
  text-decoration: none;
}

.logo__treg {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #1a1a2e;
}

.logo__dot {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #00d084;
}

.logo__in {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #1a1a2e;
}

/* Nav Tabs (center) */
.nav-tabs {
  display: flex;
  gap: var(--sp-8);
  margin: 0 auto;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--c-text-dim);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 2px solid transparent;
  transition: all var(--t-fast);
}

.nav-tab svg {
  stroke: var(--c-text-dim);
  transition: stroke var(--t-fast);
}

.nav-tab:hover {
  color: var(--c-primary);
}

.nav-tab:hover svg {
  stroke: var(--c-primary);
}

.nav-tab--active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}

.nav-tab--active svg {
  stroke: var(--c-primary);
}

/* Header Actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.header__notif-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Notification Panel Integration */
.notif-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: -10px;
  width: 380px;
  background: #ffffff;
  border-radius: var(--r-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
  z-index: 1000;
  display: none !important;
  overflow: hidden;
  transform-origin: top right;
  animation: notifAppear .3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-panel.notif-panel--open {
  display: block !important;
}

@keyframes notifAppear {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.notif-panel__header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.notif-panel__header h3 {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.notif-panel__list {
  max-height: 450px;
  overflow-y: auto;
}

/* Ensuring buttons are uniform */
.header__actions .btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════
   SEARCH SECTION
   ═══════════════════════════════════════════════════════════════ */
.search-section {
  margin-top: 64px;
  background: #eef1f6;
  padding: var(--sp-8) var(--sp-6);
}

.search-section__inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.search-field {
  flex: 1;
  padding: var(--sp-4) var(--sp-6);
  position: relative;
}

.search-field__icon {
  position: absolute;
  left: var(--sp-6);
  top: 14px;
  color: var(--c-text-dim);
}

.search-field__label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--c-text-dim);
  margin-bottom: 2px;
  padding-left: 28px;
}

.search-field__input {
  width: 100%;
  border: none;
  outline: none;
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  color: var(--c-text);
  background: transparent;
  padding-left: 28px;
}

.search-field__input::placeholder {
  color: var(--c-text-dim);
}

.search-divider {
  width: 1px;
  height: 40px;
  background: var(--c-border);
  flex-shrink: 0;
}

.search-submit {
  flex-shrink: 0;
  padding: var(--sp-5) var(--sp-10);
  background: #1a1a2e;
  color: #fff;
  border: none;
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all var(--t-fast);
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
}

.search-submit:hover {
  background: #2d2d44;
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORY PILLS
   ═══════════════════════════════════════════════════════════════ */
.categories {
  margin-bottom: var(--sp-6);
}

.categories__pills {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: center;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-5);
  background: transparent;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-full);
  color: var(--c-text-muted);
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}

.category-pill:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.category-pill--active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.category-pill--trending {
  background: transparent;
  border-color: #f97316;
  color: #f97316;
  font-weight: 600;
}

.category-pill--trending:hover {
  background: #f97316;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  line-height: 1.4;
}

.btn--primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--c-primary-glow);
}

.btn--primary:hover {
  background: var(--c-primary-dark);
  box-shadow: 0 4px 16px var(--c-primary-glow);
  transform: translateY(-1px);
}

.btn--admin {
  margin: 20px auto;
  max-width: 300px;
  justify-content: center;
  background: var(--c-grad-1);
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  box-shadow: 0 4px 15px var(--c-primary-glow);
}

.btn--admin:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--c-primary-glow);
}

.btn--outline {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-border);
}

.btn--outline:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.btn--ghost {
  background: transparent;
  color: var(--c-text-muted);
}

.btn--ghost:hover {
  color: var(--c-text);
  background: var(--c-surface);
}

.btn--icon {
  background: transparent;
  color: var(--c-text-muted);
  padding: var(--sp-2);
  border-radius: var(--r-md);
  position: relative;
}

.btn--icon:hover {
  color: var(--c-text);
  background: var(--c-surface);
}

.btn--danger {
  background: transparent;
  color: var(--c-danger);
  border: 1px solid rgba(239, 68, 68, .3);
}

.btn--danger:hover {
  background: var(--c-danger-glow);
}

.btn--sm {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xs);
}

.btn--lg {
  padding: var(--sp-3) var(--sp-8);
  font-size: var(--fs-md);
  border-radius: var(--r-lg);
}

.btn--block {
  width: 100%;
  justify-content: center;
}

.btn--ai {
  background: var(--c-accent-glow);
  color: var(--c-accent);
  border: 1px solid rgba(99, 102, 241, .3);
  margin-top: var(--sp-2);
}

.btn--ai:hover {
  background: rgba(99, 102, 241, .3);
}

/* Badge */
.badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--c-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  animation: badgePop .3s ease;
}

@keyframes badgePop {
  0% {
    transform: scale(0);
  }

  60% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

/* ═══════════════════════════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════════════════════════ */
.avatar {
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--c-grad-1);
  position: relative;
}

.avatar--sm {
  width: 36px;
  height: 36px;
  font-size: var(--fs-sm);
}

.avatar--md {
  width: 48px;
  height: 48px;
  font-size: var(--fs-lg);
}

.avatar--lg {
  width: 80px;
  height: 80px;
  font-size: var(--fs-2xl);
}

.avatar__initials {
  color: #fff;
  font-weight: 600;
  font-family: var(--f-display);
}

.avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.avatar-btn {
  padding: 2px !important;
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: calc(80px + var(--sp-20)) var(--sp-6) var(--sp-20);
  overflow: hidden;
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--c-grad-hero);
  z-index: 0;
}

.hero__bg::after {
  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='%2394a3b8' fill-opacity='0.03'%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");
  opacity: .5;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-block;
  padding: var(--sp-1) var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  color: var(--c-primary);
  font-weight: 500;
  margin-bottom: var(--sp-6);
  animation: fadeInUp .6s ease;
}

.hero__title {
  font-family: var(--f-display);
  font-size: var(--fs-5xl);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--sp-4);
  animation: fadeInUp .6s ease .1s both;
}

.hero__highlight {
  background: var(--c-grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: var(--fs-lg);
  color: var(--c-text-muted);
  max-width: 540px;
  margin: 0 auto var(--sp-8);
  animation: fadeInUp .6s ease .2s both;
}

.hero__actions {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  margin-bottom: var(--sp-12);
  animation: fadeInUp .6s ease .3s both;
}

.hero__stats {
  display: flex;
  gap: var(--sp-12);
  justify-content: center;
  animation: fadeInUp .6s ease .4s both;
}

.hero__stat {
  text-align: center;
}

.hero__stat-num {
  display: block;
  font-family: var(--f-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  background: var(--c-grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__stat-label {
  font-size: var(--fs-sm);
  color: var(--c-text-dim);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */
.main {
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6) var(--sp-20);
}

.section-title {
  font-family: var(--f-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-6);
}

/* ─── Categories ──────────────────────────────────────────────── */
.categories {
  margin-bottom: var(--sp-16);
}

.categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--sp-4);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-3);
  background: var(--c-bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t-normal);
  text-align: center;
}

.category-card:hover {
  border-color: var(--c-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.category-card--active {
  border-color: var(--c-primary);
  background: rgba(16, 185, 129, .08);
}

.category-card__icon {
  font-size: 2rem;
}

.category-card__name {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-muted);
}

/* ─── Listings ────────────────────────────────────────────────── */
.listings-section {
  margin-bottom: var(--sp-8);
}

.listings__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.listings__title-block {}

.listings__accent-line {
  width: 40px;
  height: 3px;
  background: var(--c-primary);
  border-radius: 2px;
  margin-bottom: var(--sp-2);
}

.listings__main-title {
  font-family: var(--f-display);
  font-size: var(--fs-4xl);
  font-weight: 800;
  color: var(--c-text);
  line-height: 1.2;
  margin-bottom: var(--sp-1);
}

.listings__subtitle {
  font-size: var(--fs-sm);
  color: var(--c-text-dim);
}

.listings__subtitle-highlight {
  color: var(--c-primary);
  font-weight: 700;
  letter-spacing: .5px;
}

/* Sort Tabs */
.listings__sort-tabs {
  display: flex;
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  overflow: hidden;
}

.sort-tab {
  padding: var(--sp-2) var(--sp-5);
  background: transparent;
  border: none;
  font-family: var(--f-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .8px;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
}

.sort-tab:hover {
  color: var(--c-text);
}

.sort-tab--active {
  background: var(--c-text);
  color: #fff;
}

.listings__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-6);
}

/* ─── Listing Card (light theme) ─────────────────────────────── */
.listing-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--t-normal);
  animation: fadeInUp .4s ease both;
  position: relative;
}

.listing-card:hover {
  border-color: var(--c-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Card image area */
.listing-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--c-surface);
}

.listing-card__image-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f2f5, #e4e8ee);
  font-size: 3rem;
}

/* Wishlist heart — rounded square */
.listing-card__wishlist {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 230, 235, .85);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #9ca3af;
  transition: all var(--t-fast);
  z-index: 2;
}

.listing-card__wishlist:hover {
  color: #ef4444;
  background: rgba(255, 255, 255, .95);
}

.listing-card__wishlist--saved {
  color: #ef4444;
}

/* Price badge overlay — rounded pill, green */
.listing-card__price-badge {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  padding: 6px var(--sp-4);
  background: #22c55e;
  color: #fff;
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  border-radius: var(--r-full);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(34, 197, 94, .3);
}

.listing-card__price-badge--rent {
  background: #f97316;
  box-shadow: 0 2px 8px rgba(249, 115, 22, .3);
}

/* YOUR LISTING tag — green with person icon */
.listing-card__owner-tag {
  position: absolute;
  top: 56px;
  left: var(--sp-3);
  padding: 4px var(--sp-3);
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(34, 197, 94, .25);
}

.listing-card__owner-tag svg {
  width: 12px;
  height: 12px;
}

/* Type badges at bottom of image — dark navy pills with icons */
.listing-card__type-badges {
  position: absolute;
  bottom: calc(100% - 220px + 12px);
  left: var(--sp-3);
  display: flex;
  gap: var(--sp-1);
  z-index: 2;
}

.listing-type-pill {
  padding: 4px var(--sp-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.listing-type-pill--sale {
  background: #1e293b;
  color: #fff;
}

.listing-type-pill--barter {
  background: #1e293b;
  color: #fff;
}

.listing-type-pill--rental {
  background: #6366f1;
  color: #fff;
}

/* Distance — green pill */
.listing-card__distance {
  position: absolute;
  bottom: calc(100% - 220px + 12px);
  right: var(--sp-3);
  padding: 4px var(--sp-3);
  background: #22c55e;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  border-radius: var(--r-full);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 6px rgba(34, 197, 94, .25);
}

/* Card body */
.listing-card__body {
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
}

.listing-card__title {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
  color: var(--c-text);
  line-height: 1.3;
}

/* Meta row: condition pill + owner label */
.listing-card__meta-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.listing-card__condition-pill {
  display: inline-block;
  padding: 4px var(--sp-3);
  background: var(--c-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.listing-card__owned-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-dim);
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Description text */
.listing-card__desc {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.55;
  margin-bottom: var(--sp-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bottom bar — private label + share */
.listing-card__bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-border);
}

.listing-card__private-label {
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: .5px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.listing-card__private-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: #22c55e;
  flex-shrink: 0;
}

.listing-card__seller-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-muted);
}

.listing-card__share-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3);
  background: transparent;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-muted);
  letter-spacing: .3px;
  cursor: pointer;
  transition: all var(--t-fast);
}

.listing-card__share-btn:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-glow);
}

/* Legacy styles hidden */
.listing-card__badges {
  display: none;
}

.listing-card__category {
  display: none;
}

.listing-card__footer {
  display: none;
}

.listing-card__condition {
  display: none;
}

/* ─── Listing Card Price (standalone, hidden in new layout) ──── */
.listing-card__price {
  display: none;
}

.listing-card__price span {
  display: none;
}

.listing-card__price--trade {
  display: none;
}

/* ─── Listing Card Seller Info ───────────────────────────────── */
.listing-card__seller-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.listing-card__seller-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text);
}

.listing-card__seller-id {
  font-size: 10px;
  color: var(--c-text-dim);
  letter-spacing: .3px;
}

/* ─── Listing Card Actions Row ───────────────────────────────── */
.listing-card__actions-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.listing-card__msg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
}

.listing-card__msg-btn:hover {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--c-primary-glow);
  transform: scale(1.1);
}

/* Listings empty */
.listings__empty {
  text-align: center;
  padding: var(--sp-16) var(--sp-4);
  color: var(--c-text-dim);
}

.listings__empty svg {
  margin: 0 auto var(--sp-4);
  opacity: .4;
}

.listings__empty p {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-2);
}

/* ═══════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal__card {
  background: var(--c-bg-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.97);
  transition: transform var(--t-slow);
}

.modal.active .modal__card {
  transform: translateY(0) scale(1);
}

.modal__card--sm {
  max-width: 440px;
}

.modal__card--md {
  max-width: 600px;
}

.modal__card--lg {
  max-width: 900px;
}

.modal__card--right {
  position: fixed;
  right: var(--sp-4);
  top: 80px;
  bottom: var(--sp-4);
  max-width: 400px;
  border-radius: var(--r-lg);
}

.modal__close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  font-size: var(--fs-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  z-index: 5;
}

.modal__close:hover {
  background: var(--c-danger-glow);
  color: var(--c-danger);
}

.modal__header {
  padding: var(--sp-8) var(--sp-8) var(--sp-2);
}

.modal__header h2 {
  font-family: var(--f-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
}

.modal__header p {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  margin-top: var(--sp-1);
}

.modal__header .btn {
  position: absolute;
  right: var(--sp-16);
  top: var(--sp-8);
}

.modal__body {
  padding: var(--sp-6) var(--sp-8) var(--sp-8);
}

/* ─── Form Styles ─────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--sp-4);
}

.form-group--flex {
  flex: 1;
}

.form-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-1);
}

.form-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--fs-md);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--c-text-dim);
}

.form-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-glow);
}

.form-input--textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
  margin-top: var(--sp-1);
  display: block;
}

.form-row {
  display: flex;
  gap: var(--sp-4);
}

.form-row .form-group {
  flex: 1;
}

select.form-input {
  cursor: pointer;
}

select.form-input option {
  background: var(--c-bg-raised);
  color: var(--c-text);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--c-primary);
  width: 18px;
  height: 18px;
}

.auth-card {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  padding: 40px 48px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .04);
  transform: translateY(20px) scale(.97);
  transition: transform var(--t-slow);
}

.modal.active .auth-card {
  transform: translateY(0) scale(1);
}

/* ─── Auth Brand ──────────────────────────────────────────────── */
.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-brand__logo {
  font-family: var(--f-display);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.auth-brand__treg {
  color: #1a1a2e;
}

.auth-brand__dot {
  color: #00bcd4;
}

.auth-brand__in {
  color: #1a1a2e;
}

.auth-brand__tagline {
  font-size: .7rem;
  letter-spacing: 5px;
  color: #00bcd4;
  font-weight: 500;
  text-transform: uppercase;
}

/* ─── Auth Tabs ───────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: #f1f3f5;
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  font-family: var(--f-body);
  font-size: .95rem;
  font-weight: 600;
  color: #aab0b8;
  border-radius: 50px;
  cursor: pointer;
  transition: all .25s ease;
}

.auth-tab--active {
  background: #ffffff;
  color: #00bcd4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

/* ─── Auth Form ───────────────────────────────────────────────── */
.auth-form {
  margin-bottom: 24px;
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #3a3f47;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.auth-input {
  width: 100%;
  padding: 14px 18px;
  background: #f1f3f5;
  border: 2px solid transparent;
  border-radius: 12px;
  color: #1a1a2e;
  font-family: var(--f-body);
  font-size: .95rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
}

.auth-input::placeholder {
  color: #b0b5bd;
}

.auth-input:focus {
  border-color: #00bcd4;
  box-shadow: 0 0 0 3px rgba(0, 188, 212, .12);
  background: #fff;
}

/* ─── Auth Submit Button ──────────────────────────────────────── */
.auth-submit-btn {
  width: 100%;
  padding: 15px 0;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #00bcd4, #29b6f6);
  color: #fff;
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 6px 20px rgba(0, 188, 212, .35);
  margin-top: 6px;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 188, 212, .45);
  background: linear-gradient(135deg, #00acc1, #039be5);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

/* ─── Auth Divider ────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.auth-divider__line {
  flex: 1;
  height: 1px;
  background: #e0e3e8;
}

.auth-divider__text {
  font-size: .65rem;
  letter-spacing: 2px;
  color: #b0b5bd;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Auth Social Buttons ─────────────────────────────────────── */
.auth-social {
  display: flex;
  gap: 12px;
}

.auth-social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  border: 1.5px solid #e0e3e8;
  border-radius: 12px;
  background: #fff;
  color: #3a3f47;
  font-family: var(--f-body);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
}

.auth-social-btn:hover {
  border-color: #c8ccd2;
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

/* ─── Auth Modal Override for Light BG ────────────────────────── */
#authModal {
  background: linear-gradient(160deg, #e8f5f9 0%, #f0f4f8 40%, #f8f9fb 100%);
}

/* ─── Image Upload ────────────────────────────────────────────── */
.image-upload {
  border: 2px dashed var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.image-upload:hover {
  border-color: var(--c-primary);
}

.image-upload__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-8);
  color: var(--c-text-dim);
  font-size: var(--fs-sm);
}

.image-upload__preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

/* ─── Item Detail ─────────────────────────────────────────────── */
.item-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  padding: 0 !important;
}

.item-detail__image {
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  overflow: hidden;
  min-height: 360px;
  background: var(--c-surface);
}

.item-detail__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-detail__info {
  padding: var(--sp-8) var(--sp-8) var(--sp-8) 0;
}

.item-detail__badges {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.item-detail__info h2 {
  font-family: var(--f-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.item-detail__category {
  font-size: var(--fs-sm);
  color: var(--c-text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin-bottom: var(--sp-4);
}

.item-detail__description {
  color: var(--c-text-muted);
  margin-bottom: var(--sp-6);
  line-height: 1.7;
}

.item-detail__meta {
  display: flex;
  gap: var(--sp-6);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: var(--sp-6);
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.meta-value {
  font-weight: 600;
  color: var(--c-text);
}

.item-detail__owner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.item-detail__owner-name {
  font-weight: 600;
  display: block;
}

.item-detail__owner-loc {
  font-size: var(--fs-sm);
  color: var(--c-text-dim);
}

.item-detail__actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* ─── Trade Summary ───────────────────────────────────────────── */
.trade-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--c-surface);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-6);
}

.trade-summary__side {
  flex: 1;
}

.trade-summary__label {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-text-dim);
  margin-bottom: var(--sp-2);
}

.trade-summary__arrow {
  color: var(--c-primary);
  flex-shrink: 0;
}

.trade-summary__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.trade-summary__item img {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  object-fit: cover;
  background: var(--c-bg);
}

/* ─── Rental ──────────────────────────────────────────────────── */
.rental-item-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--c-surface);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-6);
}

.rental-item-preview img {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  object-fit: cover;
}

.rental-cost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4);
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(16, 185, 129, .2);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
  font-weight: 500;
}

.rental-cost strong {
  font-size: var(--fs-xl);
  color: var(--c-primary);
}

/* ─── Profile ─────────────────────────────────────────────────── */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}

.profile-stats {
  display: flex;
  gap: var(--sp-6);
  justify-content: center;
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--c-surface);
  border-radius: var(--r-md);
}

.profile-listings,
.profile-offers {
  margin-top: var(--sp-6);
}

.profile-listings h3,
.profile-offers h3 {
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-4);
}

.profile-listings__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-3);
}

.profile-listing-mini {
  padding: var(--sp-3);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  position: relative;
}

.profile-listing-mini__title {
  font-weight: 500;
  margin-bottom: var(--sp-1);
}

.profile-listing-mini__actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

/* ─── Notifications ───────────────────────────────────────────── */
.notif-list {
  max-height: 60vh;
  overflow-y: auto;
}

.notif-empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
  color: var(--c-text-dim);
}

.notif-empty svg {
  margin: 0 auto var(--sp-4);
  opacity: .4;
}

.notif-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
  transition: background var(--t-fast);
}

.notif-item:hover {
  background: var(--c-surface);
}

.notif-item--unread {
  background: rgba(16, 185, 129, .04);
}

.notif-item--unread::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--c-primary);
  border-radius: var(--r-full);
  flex-shrink: 0;
  margin-top: var(--sp-2);
}

.notif-item__content {
  flex: 1;
}

.notif-item__text {
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.notif-item__text strong {
  color: var(--c-text);
}

.notif-item__time {
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
  margin-top: var(--sp-1);
}

.notif-item__actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

/* ─── Terms ───────────────────────────────────────────────────── */
.terms-content {
  max-height: 65vh;
  overflow-y: auto;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.8;
}

.terms-content h3 {
  font-family: var(--f-display);
  color: var(--c-text);
  font-size: var(--fs-lg);
  margin: var(--sp-6) 0 var(--sp-3);
}

.terms-content h3:first-child {
  margin-top: 0;
}

.terms-content p {
  margin-bottom: var(--sp-3);
}

/* ═══════════════════════════════════════════════════════════════
   CHAT PANEL
   ═══════════════════════════════════════════════════════════════ */
.chat-panel {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  width: 380px;
  background: var(--c-bg-raised);
  border-left: 1px solid var(--c-border);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--t-slow);
}

.chat-panel.open {
  transform: translateX(0);
}

.chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-border);
}

.chat-panel__header h3 {
  font-family: var(--f-display);
  font-weight: 600;
}

.chat-panel__conversations {
  flex: 1;
  overflow-y: auto;
}

.chat-empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
  color: var(--c-text-dim);
}

.chat-empty p {
  font-weight: 500;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-1);
}

.chat-conv-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background var(--t-fast);
}

.chat-conv-item:hover {
  background: var(--c-surface);
}

.chat-conv-item--unread {
  background: rgba(16, 185, 129, .04);
}

.chat-conv-item__info {
  flex: 1;
  min-width: 0;
}

.chat-conv-item__name {
  font-weight: 600;
  font-size: var(--fs-sm);
}

.chat-conv-item__last {
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-item__time {
  font-size: 10px;
  color: var(--c-text-dim);
}

.chat-conv-item__unread {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--c-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Messages View */
.chat-panel__messages {
  position: absolute;
  inset: 0;
  background: var(--c-bg-raised);
  display: flex;
  flex-direction: column;
}

.chat-messages__header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}

.chat-messages__user {
  font-weight: 600;
  font-size: var(--fs-sm);
}

.chat-messages__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.chat-msg {
  max-width: 80%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  font-size: var(--fs-sm);
  line-height: 1.5;
  animation: fadeInUp .2s ease;
}

.chat-msg--sent {
  align-self: flex-end;
  background: var(--c-primary);
  color: #fff;
  border-bottom-right-radius: var(--r-sm);
}

.chat-msg--received {
  align-self: flex-start;
  background: var(--c-surface);
  border-bottom-left-radius: var(--r-sm);
}

.chat-msg__time {
  font-size: 10px;
  opacity: .6;
  margin-top: var(--sp-1);
  display: block;
}

.chat-messages__input {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--c-border);
}

.chat-messages__input .form-input {
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 80px;
  right: var(--sp-4);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  pointer-events: none;
}

.toast {
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-bg-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  max-width: 360px;
  pointer-events: auto;
  animation: toastIn .3s ease;
  border-left: 3px solid var(--c-primary);
}

.toast--error {
  border-left-color: var(--c-danger);
}

.toast__text {
  font-size: var(--fs-sm);
}

.toast__close {
  background: none;
  border: none;
  color: var(--c-text-dim);
  cursor: pointer;
  font-size: var(--fs-lg);
  padding: 0;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.toast--out {
  animation: toastOut .3s ease forwards;
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--c-bg-raised);
  border-top: 1px solid var(--c-border);
  margin-top: var(--sp-20);
}

.footer__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6) var(--sp-6);
}

.footer__brand {
  margin-bottom: var(--sp-8);
}

.footer__tagline {
  color: var(--c-text-dim);
  font-size: var(--fs-sm);
  margin-top: var(--sp-2);
}

.footer__links {
  display: flex;
  gap: var(--sp-16);
  margin-bottom: var(--sp-8);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer__col h4 {
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-2);
}

.footer__col a {
  font-size: var(--fs-sm);
  color: var(--c-text-dim);
}

.footer__col a:hover {
  color: var(--c-primary);
}

.footer__bottom {
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
}

/* ─── Offer Items in Profile ─────────────────────────────────── */
.offer-item {
  padding: var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-3);
  background: var(--c-surface);
}

.offer-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}

.offer-item__type {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
}

.offer-item__type--trade {
  background: rgba(16, 185, 129, .15);
  color: var(--c-primary);
}

.offer-item__type--rental {
  background: var(--c-accent-glow);
  color: var(--c-accent);
}

.offer-item__status {
  font-size: var(--fs-xs);
  font-weight: 500;
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
}

.offer-item__status--pending {
  background: rgba(245, 158, 11, .15);
  color: var(--c-warning);
}

.offer-item__status--accepted {
  background: rgba(16, 185, 129, .15);
  color: var(--c-primary);
}

.offer-item__status--declined {
  background: var(--c-danger-glow);
  color: var(--c-danger);
}

.offer-item__details {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.offer-item__actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero__title {
    font-size: var(--fs-4xl);
  }

  .hero__stats {
    gap: var(--sp-6);
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .header__inner {
    padding: var(--sp-2) var(--sp-3);
  }

  .search-bar {
    margin: 0 var(--sp-2);
  }

  .search-bar__input {
    font-size: 16px;
  }

  .btn span {
    display: none;
  }

  .btn--primary span,
  .btn--outline span,
  .btn--block span {
    display: inline;
  }

  .main {
    padding: var(--sp-4) var(--sp-3) var(--sp-12);
  }

  .listings__grid {
    grid-template-columns: 1fr;
  }

  .categories__grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--sp-2);
  }

  .item-detail {
    grid-template-columns: 1fr;
  }

  .item-detail__image {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    min-height: 220px;
  }

  .item-detail__info {
    padding: var(--sp-5);
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .chat-panel {
    width: 100%;
  }

  .modal__card--right {
    right: 0;
    max-width: 100%;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }

  .footer__links {
    flex-direction: column;
    gap: var(--sp-6);
  }

  .trade-summary {
    flex-direction: column;
  }

  .trade-summary__arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: var(--fs-3xl);
  }

  .hero {
    padding: calc(70px + var(--sp-12)) var(--sp-4) var(--sp-12);
  }

  .modal__card {
    border-radius: var(--r-lg);
  }

  .modal__header {
    padding: var(--sp-6) var(--sp-6) var(--sp-2);
  }

  .modal__body {
    padding: var(--sp-4) var(--sp-6) var(--sp-6);
  }
}

/* ─── Utility: stagger animations ─────────────────────────────── */
.listing-card:nth-child(1) {
  animation-delay: .05s;
}

.listing-card:nth-child(2) {
  animation-delay: .10s;
}

.listing-card:nth-child(3) {
  animation-delay: .15s;
}

.listing-card:nth-child(4) {
  animation-delay: .20s;
}

.listing-card:nth-child(5) {
  animation-delay: .25s;
}

.listing-card:nth-child(6) {
  animation-delay: .30s;
}

.listing-card:nth-child(7) {
  animation-delay: .35s;
}

.listing-card:nth-child(8) {
  animation-delay: .40s;
}

/* ─── Shimmer / loading ───────────────────────────────────────── */
.shimmer {
  background: linear-gradient(90deg, var(--c-surface) 25%, var(--c-border) 50%, var(--c-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ─── Pulse dot ───────────────────────────────────────────────── */
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--c-primary);
  border-radius: var(--r-full);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .5;
    transform: scale(1.3);
  }
}

/* ═══════════════════════════════════════════════════════════════
   LIST ITEM MODAL (CUSTOM DESIGN)
   ═══════════════════════════════════════════════════════════════ */
.modal__content--list-item {
  max-width: 520px;
  padding: 0;
  overflow: hidden;
  border-radius: 32px;
}

.list-item-header {
  padding: var(--sp-6) var(--sp-8);
  border-bottom: 1px solid var(--c-border);
}

.list-item-header__title {
  font-family: var(--f-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: var(--sp-1);
}

.list-item-header__subtitle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--c-text-dim);
}

.list-item-form {
  padding: var(--sp-6) var(--sp-8);
  max-height: 70vh;
  overflow-y: auto;
}

/* Scrollbar specifically for this modal */
.list-item-form::-webkit-scrollbar {
  width: 6px;
}

.list-item-form::-webkit-scrollbar-track {
  background: transparent;
}

.list-item-form::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 10px;
}

.list-form-section {
  margin-bottom: var(--sp-6);
}

.list-form-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--c-text-dim);
  margin-bottom: var(--sp-3);
  text-transform: uppercase;
}

.list-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.list-type-card {
  cursor: pointer;
  position: relative;
}

.list-type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.list-type-card__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-2);
  border: 1.5px solid var(--c-border);
  border-radius: 16px;
  border-radius: var(--r-xl);
  color: var(--c-text-dim);
  transition: all var(--t-fast);
  background: #fff;
}

.list-type-card__content span {
  font-size: 12px;
  font-weight: 700;
}

.list-type-card:hover .list-type-card__content {
  border-color: var(--c-border-hover);
}

.list-type-card input:checked+.list-type-card__content {
  border-color: #00bcd4;
  background: #f0fbfe;
  color: #00bcd4;
}

.list-photo-box {
  width: 140px;
  height: 140px;
  border: 2px dashed var(--c-border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #fff;
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}

.list-photo-box:hover {
  border-color: var(--c-border-hover);
  background: #f8fafc;
}

.list-photo-box__placeholder svg {
  color: var(--c-border-hover);
}

.list-form-input {
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  font-family: var(--f-body);
  font-size: var(--fs-md);
  color: var(--c-text);
  font-weight: 600;
  transition: all var(--t-fast);
}

.list-form-input::placeholder {
  color: var(--c-text-dim);
  font-weight: 500;
}

.list-form-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.list-submit-btn {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  font-size: var(--fs-md);
  border-radius: 16px;
}

/* Additional chat panel content styles */

.chat-panel__header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}

.chat-panel__header h3 {
  flex: 1;
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin: 0;
}

.chat-panel__partner-name {
  flex: 1;
  font-family: var(--f-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--c-text);
}

.chat-panel__conversations {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-2);
}

.chat-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
  color: var(--c-text-muted);
}

.chat-panel__empty p {
  font-weight: 600;
  margin: 0 0 var(--sp-1);
}

/* Conversation List Items */
.chat-conv-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background var(--t-fast);
}

.chat-conv-item:hover {
  background: var(--c-surface);
}

.chat-conv-item--unread {
  background: rgba(0, 188, 212, .06);
}

.chat-conv-item__info {
  flex: 1;
  min-width: 0;
}

.chat-conv-item__name {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--c-text);
}

.chat-conv-item__last {
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-item__time {
  font-size: 10px;
  color: var(--c-text-dim);
  white-space: nowrap;
}

.chat-conv-item__time {
  font-size: 10px;
  color: var(--c-text-dim);
  white-space: nowrap;
}

.chat-conv-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-1);
}

.chat-conv-item__delete-btn {
  background: transparent;
  border: none;
  color: var(--c-text-dim);
  padding: 4px;
  cursor: pointer;
  opacity: 0;
  transition: all var(--t-fast);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-conv-item:hover .chat-conv-item__delete-btn {
  opacity: 1;
}

.chat-conv-item__delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.chat-conv-item__unread {
  background: var(--c-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Messages Area */
.chat-panel__messages {
  position: relative;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.chat-panel__messages-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.chat-msg {
  max-width: 80%;
  font-size: var(--fs-sm);
  line-height: 1.5;
  position: relative;
  animation: msgFadeIn .2s ease-out;
  display: flex;
  flex-direction: column;
}

@keyframes msgFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-msg--sent {
  align-self: flex-end;
}

.chat-msg--sent .chat-msg__bubble {
  background: var(--c-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg--received {
  align-self: flex-start;
}

.chat-msg--received .chat-msg__bubble {
  background: var(--c-surface);
  color: var(--c-text);
  border-bottom-left-radius: 4px;
}

.chat-msg__bubble {
  position: relative;
  padding: var(--sp-2) var(--sp-3);
  border-radius: 16px;
}

.chat-msg__delete {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #fff;
  border: 1px solid var(--c-border);
  color: var(--c-text-dim);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all var(--t-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
  z-index: 5;
  padding: 0;
}

.chat-msg:hover .chat-msg__delete {
  opacity: 1;
}

.chat-msg__delete:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  transform: scale(1.1);
}

.chat-msg--sent .chat-msg__delete {
  right: auto;
  left: -8px;
}

.chat-msg__time {
  display: block;
  font-size: 9px;
  opacity: .7;
  margin-top: 2px;
  text-align: right;
}

.chat-header-clear-btn {
  margin-left: auto;
  color: var(--c-text-dim) !important;
  opacity: 0.6;
}

.chat-header-clear-btn:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  opacity: 1;
}

@media (hover: none) {
  .chat-msg__delete {
    opacity: 0.5 !important;
  }
  .chat-conv-item__delete-btn {
    opacity: 0.6 !important;
  }
}

/* Chat Input */
.chat-panel__input {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  gap: var(--sp-2);
  align-items: center;
}

.chat-panel__input .form-input {
  flex: 1;
  border-radius: 20px;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
}

.chat-panel__input .btn {
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Actions row on card */
.listing-card__actions-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════════════════ */
.profile-page {
  max-width: 520px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4) var(--sp-12);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  animation: fadeInUp .4s ease;
}

.profile-page__card {
  background: var(--c-bg-raised);
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .06);
  position: relative;
}

/* Avatar */
.profile-page__avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: var(--sp-4);
}

.profile-page__avatar {
  width: 160px;
  height: 160px;
  border-radius: 28px;
  background: linear-gradient(135deg, #e8edf3 0%, #d5dce6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.profile-page__avatar-initials {
  font-family: var(--f-display);
  font-size: 64px;
  font-weight: 800;
  color: var(--c-primary);
  text-transform: uppercase;
}

.profile-page__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-page__avatar-edit {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--c-bg-raised);
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast);
  box-shadow: 0 2px 8px rgba(0, 188, 212, .3);
}

.profile-page__avatar-edit:hover {
  transform: scale(1.1);
  background: var(--c-primary-dark, #0097a7);
}

/* Name */
.profile-page__name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-1);
}

.profile-page__name {
  font-family: var(--f-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--c-text);
}

.profile-page__verified-badge {
  color: #10b981;
  display: flex;
  align-items: center;
}

/* Bio */
.profile-page__bio {
  font-size: var(--fs-md);
  color: var(--c-text-dim);
  font-style: italic;
  margin: 0 0 var(--sp-5);
  line-height: 1.5;
}

/* Badges */
.profile-page__badges {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.profile-page__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.profile-page__badge--location {
  background: rgba(0, 188, 212, .1);
  color: var(--c-primary);
}

.profile-page__badge--date {
  background: var(--c-surface);
  color: var(--c-text-dim);
}

/* TREG ID */
.profile-page__tregid {
  margin-top: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface);
  border-radius: var(--r-md);
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.profile-page__tregid-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--c-text-dim);
}

.profile-page__tregid-value {
  font-family: var(--f-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: 1.5px;
}

/* Stats */
.profile-page__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.profile-page__stat {
  background: var(--c-bg-raised);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}

.profile-page__stat-num {
  display: block;
  font-family: var(--f-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--c-primary);
}

.profile-page__stat-label {
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Edit Toggle */
.profile-page__edit-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-bg-raised);
  border: 2px dashed var(--c-border);
  border-radius: var(--r-lg);
  color: var(--c-text-dim);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.profile-page__edit-toggle:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: rgba(0, 188, 212, .04);
}

/* Edit Section */
.profile-page__edit-section {
  background: var(--c-bg-raised);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
  animation: fadeInUp .3s ease;
}

/* Sign Out */
.profile-page__signout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-4);
  background: rgba(239, 83, 80, .06);
  border: 1px solid rgba(239, 83, 80, .2);
  border-radius: var(--r-lg);
  color: #ef5350;
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.profile-page__signout:hover {
  background: #ef5350;
  color: #fff;
  border-color: #ef5350;
}

/* ─── Profile Activity Dashboard ─────────────────────────────── */
.profile-activity {
  background: var(--c-bg-raised);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
}

.profile-activity__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-border);
}

.profile-activity__title {
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
}

.profile-activity__tag {
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(16, 185, 129, .1);
  padding: 4px 10px;
  border-radius: var(--r-full);
}

.profile-activity__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

.activity-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--c-bg);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  transition: transform var(--t-fast);
}

.activity-card:hover {
  transform: translateX(4px);
  border-color: var(--c-primary);
}

.activity-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-card__icon--blue { background: rgba(0, 188, 212, .1); color: var(--c-primary); }
.activity-card__icon--green { background: rgba(16, 185, 129, .1); color: #10b981; }
.activity-card__icon--purple { background: rgba(99, 102, 241, .1); color: var(--c-accent); }

.activity-card__content {
  display: flex;
  flex-direction: column;
}

.activity-card__value {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--c-text);
}

.activity-card__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCT DETAIL MODAL
   ═══════════════════════════════════════════════════════════════ */

.detail-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 2rem;
}

.detail-modal__overlay.active {
  opacity: 1;
}

.detail-modal__container {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.detail-modal__overlay.active .detail-modal__container {
  transform: scale(1) translateY(0);
}

.detail-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: #333;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.detail-modal__close:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: rotate(90deg);
}

/* Layout: image left, info right */
.detail-modal__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 768px) {
  .detail-modal__layout {
    grid-template-columns: 1fr;
  }
}

/* Image Section */
.detail-modal__image-section {
  position: relative;
  background: #f1f5f9;
  border-radius: 20px 0 0 0;
  overflow: hidden;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .detail-modal__image-section {
    border-radius: 20px 20px 0 0;
    min-height: 250px;
  }
}

.detail-modal__image {
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
}

.detail-modal__placeholder {
  font-size: 100px;
  opacity: 0.3;
}

.detail-modal__price {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  color: #fff;
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

/* Info Section */
.detail-modal__info-section {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-modal__badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.detail-modal__badge {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.detail-modal__badge--trade {
  background: #e8f5e9;
  color: #2e7d32;
}

.detail-modal__badge--rent {
  background: #e3f2fd;
  color: #1565c0;
}

.detail-modal__badge--sale {
  background: #fff3e0;
  color: #e65100;
}

.detail-modal__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.3;
}

.detail-modal__meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-modal__condition {
  background: #f0f4f8;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-modal__category {
  color: #64748b;
  font-size: 0.85rem;
}

.detail-modal__description {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Owner Card */
.detail-modal__owner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.detail-modal__owner-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.detail-modal__owner-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-modal__owner-info strong {
  font-size: 0.95rem;
  color: #1a1a2e;
}

.detail-modal__owner-info span {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Action Buttons */
.detail-modal__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.detail-modal__action-btn {
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.detail-modal__action-btn--primary {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  color: #fff;
  border-color: transparent;
}

.detail-modal__action-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 188, 212, 0.35);
}

.detail-modal__action-btn--outline {
  background: transparent;
  color: #00bcd4;
  border-color: #00bcd4;
}

.detail-modal__action-btn--outline:hover {
  background: rgba(0, 188, 212, 0.08);
}

.detail-modal__action-btn--chat {
  background: #1a1a2e;
  color: #fff;
}

.detail-modal__action-btn--chat:hover {
  background: #2a2a4e;
  transform: translateY(-2px);
}

.detail-modal__action-btn--danger {
  background: transparent;
  color: #ef5350;
  border-color: #ef5350;
}

.detail-modal__action-btn--danger:hover {
  background: #ef5350;
  color: #fff;
}

/* Similar Products */
.detail-modal__similar {
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid #e2e8f0;
}

.detail-modal__similar h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 1rem 0;
}

.detail-similar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .detail-similar__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.detail-similar__card {
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-similar__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: #00bcd4;
}

.detail-similar__img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.detail-similar__placeholder {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: #e8ecf1;
  opacity: 0.4;
}

.detail-similar__info {
  padding: 10px 12px;
}

.detail-similar__info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-similar__price {
  font-size: 0.8rem;
  font-weight: 700;
  color: #00bcd4;
}

/* --- Multi-Photo Grid --- */
.list-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.list-photo-box {
  aspect-ratio: 1;
  background: var(--c-surface);
  border: 2px dashed var(--c-border);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: all .2s ease;
}

.list-photo-box:hover {
  border-color: var(--c-primary);
  background: rgba(var(--c-primary-rgb), 0.05);
  transform: translateY(-2px);
}

.list-photo-box--add {
  order: 99;
}

.list-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-photo-box__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.list-photo-box__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--c-text-dim);
}


/* --- Detail Modal Gallery --- */
.detail-modal__gallery {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
}

.detail-modal__gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--c-surface);
}

.detail-modal__gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-modal__gallery-thumbs {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  scrollbar-width: thin;
}

.detail-modal__thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--r-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s ease;
  flex-shrink: 0;
}

.detail-modal__thumb:hover {
  transform: translateY(-2px);
}

.detail-modal__thumb.active {
  border-color: var(--c-primary);
}


/* --- Photo Count Badge --- */
.listing-card__photo-count {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 2px var(--sp-2);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 10px;
  font-weight: 600;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Trades Page (Screenshot Match Redesign) ──────────────────────────────────────────────── */
.trades-page {
  max-width: 1100px;
  margin: 140px auto 80px !important;
  padding: 0 var(--sp-8);
  animation: fadeIn 0.5s ease-out;
  background: #f8fbff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.trades-page__header-wrapper {
  margin-bottom: 32px;
}

.trades-page__title {
  font-family: var(--f-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.trades-page__subtitle {
  color: #64748b;
  font-size: 1.1rem;
  font-weight: 400;
}

/* Tabs: Pill Style with Counts */
.trades-page__tabs-container {
  margin-top: 24px;
}

.trades-page__tabs {
  display: flex;
  gap: 12px;
  align-items: center;
}

.trades-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  background: #ffffff;
  color: #64748b;
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.trades-tab[data-trades-filter="incoming"] svg {
  width: 16px;
  height: 16px;
}

.trades-tab--active {
  background: #26baaf !important;
  color: #ffffff !important;
}

.trades-tab__count {
  background: #e2e8f0;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 4px;
}

.trades-tab--active .trades-tab__count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Main Body Card */
.trades-page__body-card {
  margin-top: 40px;
}

.trades-page__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Pixel-Perfect Trade Card */
.trade-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 24px;
  border: 1px solid #f1f5f9;
}

.trade-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trade-card__proposer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trade-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.trade-card__avatar-badge {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 20px;
  height: 20px;
  background: #26baaf;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border: 2px solid #fff;
}

.trade-card__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trade-card__proposer-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.trade-card__verified-badge {
  background: #26baaf;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.trade-card__id {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
}

.trade-card__menu {
  color: #94a3b8;
  cursor: pointer;
}

/* Card Body: 3-column Layout */
.trade-card__body {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 32px;
  align-items: start;
}

.trade-card__image-container {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
}

.trade-card__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trade-card__image-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.trade-card__details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trade-card__detail-row {
  display: flex;
  gap: 8px;
}

.trade-card__detail-label {
  color: #94a3b8;
  font-weight: 500;
}

.trade-card__detail-value {
  color: #1e293b;
  font-weight: 700;
}

.trade-card__actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trade-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.trade-card__btn--accept {
  background: #26baaf;
  color: #fff;
  grid-column: span 1;
}

.trade-card__btn--reject {
  background: #ffeaea;
  color: #ef4444;
  grid-column: span 1;
}

.trade-card__btn--chat,
.trade-card__btn--secondary {
  background: #f1f5f9;
  color: #64748b;
  grid-column: span 1;
}

.trade-card__btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.trade-card__status-pill {
  grid-column: span 2;
  padding: 12px;
  text-align: center;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
}

.trade-card__status-pill--accepted { background: #f0fdf4; color: #16a34a; }
.trade-card__status-pill--declined { background: #fef2f2; color: #dc2626; }
.trade-card__status-pill--pending { background: #fffbeb; color: #d97706; }

@media (max-width: 1024px) {
  .trade-card__body {
    grid-template-columns: 1fr;
  }
  .trade-card__actions-grid {
    max-width: 400px;
  }
}

.trade-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border: 4px solid #fff;
}

.trade-card__proposer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trade-card__proposed-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.trade-card__proposer-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a1a2e;
}

/* Exchange Section */
.trade-card__exchange-section {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: center;
}

.trade-card__item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border-radius: 24px;
  padding: 10px 20px 10px 10px;
  min-width: 160px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.trade-card__item-img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.trade-card__item-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.trade-card__item-meta {
  display: flex;
  flex-direction: column;
}

.trade-card__item-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.trade-card__item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.trade-card__swap-icon {
  color: #f59e0b;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Action Section */
.trade-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 160px;
}

.trade-card__accept-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trade-card__accept-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
  filter: brightness(1.1);
}

.trade-card__decline-btn {
  background: transparent;
  color: #ef4444;
  border: 2px solid #ef4444;
  border-radius: 16px;
  padding: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trade-card__decline-btn:hover {
  background: #fef2f2;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

.trade-card__chat-btn {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(49, 46, 129, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.trade-card__chat-btn:hover {
  background: linear-gradient(135deg, #312e81, #3730a3);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(49, 46, 129, 0.35);
}

.trade-card__status-pill {
  padding: 12px 20px;
  border-radius: 16px;
  text-align: center;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.trade-card__status-pill--pending { background: #fffbeb; color: #92400e; border: 1px solid #fef3c7; }
.trade-card__status-pill--accepted { background: #f0fdf4; color: #15803d; border: 1px solid #dcfce7; }
.trade-card__status-pill--declined { background: #fef2f2; color: #b91c1c; border: 1px solid #fee2e2; }
/* Responsive: Stack on small screens */
@media (max-width: 768px) {
  .trade-card {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }

  .trade-card__proposer {
    min-width: auto;
  }

  .trade-card__exchange-section {
    flex-wrap: wrap;
    justify-content: center;
  }

  .trade-card__actions {
    flex-direction: row;
    min-width: auto;
  }

  .trade-card__accept-btn,
  .trade-card__decline-btn,
  .trade-card__chat-btn {
    flex: 1;
  }
}

/* Empty State */
.trades-page__empty {
  text-align: center;
  padding: var(--sp-20) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trades-page__empty-icon-wrapper {
  width: 80px;
  height: 80px;
  background: #f8fafc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  margin-bottom: var(--sp-4);
}

/* Responsive: Stack on small screens */
@media (max-width: 768px) {
  .trade-card {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }

  .trade-card__proposer {
    min-width: auto;
  }

  .trade-card__exchange-section {
    flex-wrap: wrap;
    justify-content: center;
  }

  .trade-card__actions {
    flex-direction: row;
    min-width: auto;
  }

  .trade-card__accept-btn,
  .trade-card__decline-btn,
  .trade-card__chat-btn {
    flex: 1;
  }
}

/* Empty State */
.trades-page__empty {
  text-align: center;
  padding: var(--sp-20) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trades-page__empty-icon-wrapper {
  width: 80px;
  height: 80px;
  background: #f8fafc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  margin-bottom: var(--sp-4);
}

#tradesEmptyText {
  font-size: 1.16rem;
  font-weight: 500;
  color: #94A3B8;
  letter-spacing: 0.5px;
  background: #f8fafc;
  padding: 12px 28px;
  border-radius: 100px;
  display: inline-block !important;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .trades-page__header-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-8);
  }
}



/* --- Rental Cost Display --- */
.rental-cost {
  margin-top: var(--sp-6);
  padding: var(--sp-4);
  background: var(--c-surface);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--c-border);
}

.rental-cost__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rental-cost__input {
  background: transparent;
  border: none;
  font-family: var(--f-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--c-primary);
  width: 100%;
  padding: 0;
  outline: none;
}

.rental-cost__input::-webkit-inner-spin-button,
.rental-cost__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   INSTALL BANNER & PROMPT
   ═══════════════════════════════════════════════════════════════ */
.install-banner {
  position: fixed;
  bottom: -120px;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: var(--sp-4) var(--sp-6);
  transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.install-banner--visible {
  bottom: 0;
}

.install-banner__content {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-xl);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 188, 212, 0.1);
}

.install-banner__icon {
  flex-shrink: 0;
}

.install-banner__icon img {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.install-banner__text {
  flex: 1;
  min-width: 0;
}

.install-banner__title {
  display: block;
  color: #fff;
  font-family: var(--f-display);
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: 2px;
}

.install-banner__subtitle {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--fs-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.install-banner__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.install-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  border: none;
  cursor: pointer;
  font-family: var(--f-body);
  font-weight: 700;
  border-radius: var(--r-md);
  transition: all 0.2s ease;
}

.install-banner__btn--install {
  background: linear-gradient(135deg, #00bcd4, #10b981);
  color: #fff;
  padding: var(--sp-2) var(--sp-5);
  font-size: var(--fs-xs);
  letter-spacing: 0.5px;
  border-radius: var(--r-full);
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.install-banner__btn--install:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

.install-banner__btn--install:active {
  transform: translateY(0);
}

.install-banner__btn--close {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  padding: var(--sp-2);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
}

.install-banner__btn--close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Header Install Button */
.header-install-btn {
  animation: installPulse 3s ease-in-out infinite;
}

@keyframes installPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3); }
  50% { box-shadow: 0 2px 20px rgba(0, 188, 212, 0.5); }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .install-banner__content {
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
  }

  .install-banner__icon img {
    width: 40px;
    height: 40px;
  }

  .install-banner__title {
    font-size: var(--fs-sm);
  }

  .install-banner__subtitle {
    font-size: 10px;
  }
}

/* Professional Dashboard Button in Profile */
.profile-page__admin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-3);
  margin-top: var(--sp-4);
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.profile-page__admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  filter: brightness(1.1);
}

.profile-page__admin-btn svg {
  opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL RESPONSIVE STYLES (MOBILE & TABLET)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tablet (≤992px) ─────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero__title { font-size: var(--fs-4xl); }
  .hero__stats { gap: var(--sp-6); }
  .nav-tabs { gap: var(--sp-4); }
  
  .listings__main-title { font-size: var(--fs-3xl); }
  .listings__grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* ─── Mobile (≤768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {

  /* === HEADER === */
  .header__inner { 
    padding: 0 var(--sp-3); 
    height: 56px;
    justify-content: space-between;
    gap: var(--sp-2);
  }
  .logo__img { height: 28px; }

  /* Hide GET APP / header install button on mobile */
  .header-install-btn,
  #headerInstallBtn { 
    display: none !important; 
  }

  /* Compact NEW button — icon only on small screens */
  #globalNewListingBtn {
    padding: 6px 10px !important;
    margin-right: 4px !important;
    font-size: 0 !important;  /* hide text */
  }
  #globalNewListingBtn svg {
    margin-right: 0 !important;
    width: 18px;
    height: 18px;
  }

  /* Compact header action buttons */
  .header__actions {
    gap: var(--sp-1);
  }
  .header__actions .btn--icon {
    width: 36px;
    height: 36px;
  }
  .header__actions .btn--icon svg {
    width: 20px;
    height: 20px;
  }
  .avatar--sm {
    width: 32px;
    height: 32px;
  }

  /* Sign In button smaller on mobile */
  #signInBtn {
    padding: 6px 12px;
    font-size: var(--fs-xs);
    border-radius: var(--r-md);
  }

  /* === BOTTOM NAVIGATION === */
  .nav-tabs { 
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    padding: var(--sp-1) 0;
    z-index: 1000;
    margin: 0;
    justify-content: space-around;
    gap: 0;
  }
  .nav-tab {
    flex: 1;
    padding: var(--sp-1) 0;
    border-bottom: none;
    border-top: 2px solid transparent;
    font-size: 9px;
    min-width: 0;
  }
  .nav-tab svg {
    width: 20px;
    height: 20px;
  }
  .nav-tab--active {
    border-bottom: none;
    border-top-color: var(--c-primary);
  }

  /* Body padding for bottom nav */
  body {
    padding-bottom: 56px;
  }

  /* === SEARCH SECTION === */
  .search-section {
    padding: var(--sp-4) var(--sp-3);
    margin-top: 56px;
  }
  .search-section__inner {
    flex-direction: column;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
  }
  .search-divider {
    width: calc(100% - 2rem);
    height: 1px;
    margin: 0 auto;
  }
  .search-field {
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
  }
  .search-field__label { font-size: 9px; }
  .search-field__input { font-size: 14px; }
  .search-submit {
    width: 100%;
    padding: var(--sp-3) var(--sp-6);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    font-size: var(--fs-xs);
  }

  /* === HERO === */
  .hero { 
    padding: calc(56px + var(--sp-8)) var(--sp-4) var(--sp-8); 
  }
  .hero__title { 
    font-size: var(--fs-3xl); 
  }
  .hero__subtitle { font-size: var(--fs-sm); }
  .hero__stats {
    flex-direction: row;
    gap: var(--sp-4);
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero__stat-num { font-size: var(--fs-2xl); }
  .hero__badge { font-size: var(--fs-xs); }
  .hero__actions {
    flex-direction: column;
    align-items: center;
    gap: var(--sp-3);
  }

  /* === MAIN & CONTENT === */
  .main { 
    padding: var(--sp-4) var(--sp-3) calc(var(--sp-16) + 56px); 
  }

  /* Category pills — horizontal scroll on mobile */
  .categories { margin-bottom: var(--sp-4); }
  .categories__pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: var(--sp-2);
    gap: var(--sp-2);
  }
  .categories__pills::-webkit-scrollbar { display: none; }
  .category-pill {
    flex-shrink: 0;
    font-size: var(--fs-xs);
    padding: var(--sp-1) var(--sp-3);
  }

  .categories__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-2);
  }

  /* Listings header */
  .listings__main-title {
    font-size: var(--fs-2xl);
  }
  .listings__header {
    gap: var(--sp-2);
  }
  .listings__sort-tabs {
    border-radius: var(--r-lg);
  }
  .sort-tab {
    padding: var(--sp-1) var(--sp-3);
    font-size: 10px;
  }

  /* Listings grid */
  .listings__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  /* Listing card */
  .listing-card__image,
  .listing-card__image-placeholder {
    height: 200px;
  }
  .listing-card__title { font-size: 1.1rem; }

  /* === MODALS === */
  .modal { padding: var(--sp-2); }
  .modal__card {
    border-radius: var(--r-lg);
    max-height: 95vh;
  }
  .modal__card--sm,
  .modal__card--md { max-width: 100%; }
  .modal__card--lg { max-width: 100%; }
  .modal__card--right {
    right: 0;
    top: 56px;
    max-width: 100%;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  .modal__header {
    padding: var(--sp-5) var(--sp-4) var(--sp-2);
  }
  .modal__header h2 { font-size: var(--fs-xl); }
  .modal__body {
    padding: var(--sp-4);
  }
  .modal__close {
    top: var(--sp-3);
    right: var(--sp-3);
  }

  /* Auth card */
  .auth-card {
    padding: 28px 20px;
    border-radius: 20px;
    max-width: 100%;
  }
  .auth-brand__logo { font-size: 2rem; }

  /* List item modal */
  .modal__content--list-item {
    max-width: 100%;
    border-radius: var(--r-xl);
  }
  .list-item-header { padding: var(--sp-4) var(--sp-5); }
  .list-item-header__title { font-size: var(--fs-xl); }
  .list-item-form { padding: var(--sp-4) var(--sp-5); }
  .list-type-grid { 
    grid-template-columns: repeat(3, 1fr); 
    gap: var(--sp-2);
  }
  .list-type-card__content {
    padding: var(--sp-3) var(--sp-1);
    border-radius: var(--r-lg);
  }
  .list-type-card__content span { font-size: 11px; }
  .list-photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-2);
  }
  .list-form-input {
    padding: var(--sp-3) var(--sp-4);
    border-radius: 12px;
    font-size: var(--fs-sm);
  }

  /* Item detail modal */
  .item-detail {
    grid-template-columns: 1fr;
  }
  .item-detail__image {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    min-height: 220px;
  }
  .item-detail__info {
    padding: var(--sp-4);
  }
  .item-detail__meta {
    flex-wrap: wrap;
    gap: var(--sp-3);
  }

  /* Detail modal */
  .detail-modal__overlay { padding: 0; }
  .detail-modal__container {
    border-radius: 0;
    max-height: 100vh;
    max-width: 100%;
  }
  .detail-modal__layout { grid-template-columns: 1fr; }
  .detail-modal__image-section {
    border-radius: 0;
    min-height: 250px;
  }
  .detail-modal__image { min-height: 250px; }
  .detail-modal__info-section { padding: var(--sp-5); }
  .detail-modal__title { font-size: 1.3rem; }
  .detail-modal__actions { flex-direction: column; }
  .detail-modal__action-btn { min-width: 100%; }
  .detail-modal__similar { padding: var(--sp-4); }
  .detail-similar__grid { grid-template-columns: repeat(2, 1fr); }

  /* === NOTIFICATIONS === */
  .notif-panel {
    position: fixed;
    top: 56px;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    max-height: calc(100vh - 56px - 56px);
  }
  .notif-panel__list { max-height: calc(100vh - 56px - 56px - 60px); }

  /* === CHAT PANEL === */
  .chat-panel {
    width: 100%;
    top: 56px;
  }
  .chat-panel__messages {
    position: relative;
  }

  /* === TOAST === */
  .toast-container {
    top: auto;
    bottom: 68px;
    right: var(--sp-3);
    left: var(--sp-3);
  }
  .toast { max-width: 100%; }

  /* === FORM === */
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .form-input { font-size: 16px; } /* prevent iOS zoom */

  /* === FOOTER === */
  .footer__links {
    flex-direction: column;
    gap: var(--sp-6);
  }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .footer__inner { padding: var(--sp-8) var(--sp-4) var(--sp-4); }

  /* === TRADES === */
  .trade-summary {
    flex-direction: column;
  }
  .trade-summary__arrow {
    transform: rotate(90deg);
  }

  /* === PROFILE === */
  .profile-page {
    padding: var(--sp-4) var(--sp-3) var(--sp-8);
  }
  .profile-page__card {
    padding: var(--sp-6) var(--sp-4);
  }
  .profile-page__avatar {
    width: 120px;
    height: 120px;
    border-radius: 24px;
  }
  .profile-page__avatar-initials { font-size: 48px; }
  .profile-page__name { font-size: 1.4rem; }
  .profile-page__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-2);
  }
  .profile-page__stat { padding: var(--sp-3); }
  .profile-page__stat-num { font-size: var(--fs-lg); }
  .profile-page__stat-label { font-size: 10px; }

  /* Trade cards */
  .trades-page { 
    margin: 80px auto 80px !important;
    padding: 0 var(--sp-4);
  }
  .trades-page__title { font-size: 1.6rem; }
  .trades-page__tabs { flex-wrap: wrap; gap: 8px; }
  .trades-tab { 
    padding: 8px 16px; 
    font-size: 0.85rem; 
  }
  .trade-card { padding: 20px; }
  .trade-card__exchange-section {
    flex-direction: column;
    gap: 12px;
  }
  .trade-card__item-card { min-width: auto; width: 100%; }
  .trade-card__actions { flex-direction: column; width: 100%; }
  .trade-card__accept-btn,
  .trade-card__decline-btn,
  .trade-card__chat-btn { width: 100%; }

  /* Install banner mobile */
  .install-banner { padding: var(--sp-3); }
  .install-banner__content { gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
}

/* ─── Small Mobile (≤480px) ───────────────────────────────────── */
@media (max-width: 480px) {
  .header__inner { height: 50px; padding: 0 var(--sp-2); }
  .logo__img { height: 24px; }

  .hero { padding: calc(50px + var(--sp-6)) var(--sp-3) var(--sp-6); }
  .hero__title { font-size: var(--fs-2xl); }
  .hero__subtitle { font-size: var(--fs-xs); }

  .search-section { margin-top: 50px; padding: var(--sp-3) var(--sp-2); }

  .main { padding: var(--sp-3) var(--sp-2) calc(var(--sp-12) + 56px); }

  .listings__main-title { font-size: var(--fs-xl); }
  .listing-card__image,
  .listing-card__image-placeholder { height: 180px; }
  .listing-card__title { font-size: 1rem; }
  .listing-card__body { padding: var(--sp-3); }

  .categories__grid { grid-template-columns: 1fr; }

  .modal__card { border-radius: var(--r-md); }
  .modal__header { padding: var(--sp-4) var(--sp-4) var(--sp-1); }
  .modal__body { padding: var(--sp-3); }

  .auth-card { padding: 24px 16px; border-radius: 16px; }
  .auth-brand__logo { font-size: 1.8rem; }

  .profile-page__avatar { width: 100px; height: 100px; border-radius: 20px; }
  .profile-page__avatar-initials { font-size: 40px; }
  .profile-page__name { font-size: 1.2rem; }

  .trades-page__title { font-size: 1.3rem; }
  .trade-card { padding: 16px; border-radius: 16px; }

  .nav-tab { font-size: 8px; }
  .nav-tab svg { width: 18px; height: 18px; }

  body { padding-bottom: 50px; }

  /* Bottom nav safe area for notched phones */
  .nav-tabs {
    padding-bottom: max(var(--sp-1), env(safe-area-inset-bottom));
  }
}

/* ─── Touch device optimizations ──────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn { min-height: 44px; }
  .btn--sm { min-height: 36px; }
  .btn--icon { min-width: 44px; min-height: 44px; }
  .nav-tab { min-height: 48px; }
  .category-pill { min-height: 36px; }
  .sort-tab { min-height: 36px; }
  
  /* Prevent text selection on interactive elements */
  .btn, .nav-tab, .category-pill, .listing-card, .sort-tab {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
  }
  
  /* Disable hover transforms on touch (they feel janky) */
  .listing-card:hover { transform: none; }
  .category-card:hover { transform: none; }
}

/* ─── Landscape mobile ────────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: calc(56px + var(--sp-4)) var(--sp-4) var(--sp-4); }
  .hero__title { font-size: var(--fs-2xl); }
  .hero__stats { display: none; }
  .search-section { padding: var(--sp-2) var(--sp-3); }
  .nav-tabs { padding: var(--sp-1) 0; }
  body { padding-bottom: 44px; }
}