/* ==========================================================================
   RE-CIRCULAR: Modern Pastel Design System
   Estética moderna, editorial y descansada para comercio circular
   ========================================================================== */

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

:root {
  /* Paleta Pastel Salvia (Economía Circular, Like New, Escrow Seguro) */
  --sage-bg: #F0F6F3;
  --sage-light: #E1EFE8;
  --sage-border: #C8DFD4;
  --sage-primary: #457B69;
  --sage-dark: #274D41;
  --sage-badge: #D4EAE0;

  /* Paleta Pastel Lavanda / Periwinkle (IA Concierge, Swipe, Video Proof) */
  --lavender-bg: #F4F5FD;
  --lavender-light: #E6E8FC;
  --lavender-border: #CDD2F9;
  --lavender-primary: #585CE5;
  --lavender-dark: #373A9E;
  --lavender-badge: #DFE2FA;

  /* Paleta Pastel Terracota / Coral (Subastas Flash, Alertas amigables, Sniper) */
  --coral-bg: #FDF3F0;
  --coral-light: #FBE5DF;
  --coral-border: #F7C6B8;
  --coral-primary: #D66549;
  --coral-dark: #9E3E26;
  --coral-badge: #F8D6CE;

  /* Paleta Pastel Ámbar / Mostaza (Desgaste 70-90%, Good condition) */
  --amber-bg: #FEFBF0;
  --amber-light: #FDF3D0;
  --amber-border: #F8E2A1;
  --amber-primary: #B58110;
  --amber-dark: #785203;

  /* Paleta Base Arena / Crema Neutro (Fondos orgánicos y relajantes) */
  --sand-canvas: #F8F7F4;
  --sand-card: #FFFFFF;
  --sand-elevated: #FDFDFD;
  --sand-border: #E8E5DC;
  --sand-muted: #F2EFE8;

  /* Tipografía Carbón Suave (Legibilidad sin dureza de negro puro) */
  --text-main: #1C232B;
  --text-muted: #576474;
  --text-soft: #8594A6;
  --text-on-dark: #FFFFFF;

  /* Sombras Suaves */
  --shadow-sm: 0 2px 8px rgba(28, 35, 43, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(28, 35, 43, 0.07), 0 2px 6px -1px rgba(28, 35, 43, 0.04);
  --shadow-lg: 0 20px 40px -8px rgba(28, 35, 43, 0.1), 0 6px 12px -2px rgba(28, 35, 43, 0.05);
  --shadow-pastel-sage: 0 10px 25px -5px rgba(69, 123, 105, 0.18);
  --shadow-pastel-lavender: 0 10px 25px -5px rgba(88, 92, 229, 0.2);
  --shadow-pastel-coral: 0 10px 25px -5px rgba(214, 101, 73, 0.2);

  /* Bordes Redondeados Modernos */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset y Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--sand-canvas);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  padding-bottom: 90px; /* Espacio para bottom bar en mobile/desktop */
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Contenedor Principal */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 640px) {
  .app-container {
    padding: 0 14px;
  }
}

/* Header Superior */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 244, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sand-border);
  transition: var(--transition-normal);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}

.brand-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--sage-light), var(--lavender-light));
  border: 1px solid var(--sage-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--sage-dark);
  box-shadow: var(--shadow-sm);
}

.brand-logo .logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.brand-logo .logo-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--sage-bg);
  color: var(--sage-primary);
  border: 1px solid var(--sage-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 4px;
  text-transform: uppercase;
}

/* Barra de Búsqueda Pastel */
.search-wrapper {
  flex: 1;
  max-width: 580px;
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--sand-card);
  border: 1.5px solid var(--sand-border);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--lavender-primary);
  box-shadow: 0 0 0 4px var(--lavender-light), var(--shadow-sm);
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  padding: 4px 10px;
  color: var(--text-main);
  font-size: 14px;
}

.search-bar input::placeholder {
  color: var(--text-soft);
}

.search-action-btn {
  background: var(--sand-muted);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-action-btn:hover {
  background: var(--lavender-light);
  color: var(--lavender-primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sand-card);
  border: 1px solid var(--sand-border);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.header-action-btn:hover {
  background: var(--sand-muted);
  border-color: var(--sand-border);
  transform: translateY(-1px);
}

.header-action-btn.active {
  background: var(--sage-light);
  border-color: var(--sage-border);
  color: var(--sage-dark);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral-primary);
  position: absolute;
  top: 6px;
  right: 6px;
}

/* Sub-header de Filtros y Conmutador de Vistas */
.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 14px;
  gap: 16px;
  flex-wrap: wrap;
}

.view-switcher-pill {
  display: flex;
  background: var(--sand-muted);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--sand-border);
}

.view-switcher-pill button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.view-switcher-pill button.active {
  background: var(--sand-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Filtros Pastel de Desgaste y Tipo */
.filter-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-pills-row::-webkit-scrollbar {
  display: none;
}

.pastel-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.pastel-filter-chip.all {
  background: var(--sand-card);
  border-color: var(--sand-border);
  color: var(--text-main);
}
.pastel-filter-chip.all.active {
  background: var(--text-main);
  color: #fff;
}

.pastel-filter-chip.sage {
  background: var(--sage-bg);
  border-color: var(--sage-border);
  color: var(--sage-dark);
}
.pastel-filter-chip.sage.active {
  background: var(--sage-primary);
  color: #fff;
}

.pastel-filter-chip.amber {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber-dark);
}
.pastel-filter-chip.amber.active {
  background: var(--amber-primary);
  color: #fff;
}

.pastel-filter-chip.coral {
  background: var(--coral-bg);
  border-color: var(--coral-border);
  color: var(--coral-dark);
}
.pastel-filter-chip.coral.active {
  background: var(--coral-primary);
  color: #fff;
}

.pastel-filter-chip.lavender {
  background: var(--lavender-bg);
  border-color: var(--lavender-border);
  color: var(--lavender-dark);
}
.pastel-filter-chip.lavender.active {
  background: var(--lavender-primary);
  color: #fff;
}

/* Banner de Notificación / Escrow Activo */
.escrow-alert-banner {
  background: linear-gradient(90deg, var(--sage-bg), var(--lavender-bg));
  border: 1px solid var(--sage-border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.escrow-alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.escrow-icon-box {
  width: 36px;
  height: 36px;
  background: var(--sage-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--sage-dark);
  flex-shrink: 0;
}

.escrow-alert-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.escrow-alert-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

.btn-pill-action {
  background: var(--sage-dark);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-pill-action:hover {
  background: var(--sage-primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   GRID DE PRODUCTOS (VISTA AMAZON/MARKETPLACE MODERNO)
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0 40px;
}

.product-card {
  background: var(--sand-card);
  border: 1px solid var(--sand-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sage-border);
}

/* Imagen y Badges de Producto */
.product-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--sand-muted);
  overflow: hidden;
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card-image {
  transform: scale(1.04);
}

/* Badges sobre la imagen */
.card-badges-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.wear-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.wear-badge.like-new {
  background: rgba(225, 239, 232, 0.95);
  color: var(--sage-dark);
  border: 1px solid var(--sage-border);
}

.wear-badge.good {
  background: rgba(253, 243, 208, 0.95);
  color: var(--amber-dark);
  border: 1px solid var(--amber-border);
}

.wear-badge.fair {
  background: rgba(251, 229, 223, 0.95);
  color: var(--coral-dark);
  border: 1px solid var(--coral-border);
}

.owners-pill {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  border: 1px solid var(--sand-border);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

/* Badges flotantes inferiores en imagen */
.card-badges-bottom {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.floating-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.floating-tag.proof-verified {
  background: rgba(230, 232, 252, 0.95);
  color: var(--lavender-dark);
  border: 1px solid var(--lavender-border);
}

.floating-tag.flash-auction {
  background: rgba(251, 229, 223, 0.95);
  color: var(--coral-dark);
  border: 1px solid var(--coral-border);
  animation: pulse-subtle 2s infinite ease-in-out;
}

.floating-tag.buy-back {
  background: rgba(225, 239, 232, 0.95);
  color: var(--sage-dark);
  border: 1px solid var(--sage-border);
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(0.98); }
}

/* Cuerpo de la Tarjeta */
.product-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.product-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.product-title:hover {
  color: var(--sage-primary);
}

/* Fila de Precios */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}

.current-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
}

.original-price {
  font-size: 13px;
  color: var(--text-soft);
  text-decoration: line-through;
}

.savings-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--sage-primary);
  background: var(--sage-bg);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

/* Barra de Subasta Flash si aplica */
.auction-status-box {
  background: var(--coral-bg);
  border: 1px dashed var(--coral-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.auction-timer-pill {
  font-weight: 800;
  color: var(--coral-dark);
  font-family: 'Outfit', monospace;
}

/* Vendedor & Ubicación */
.seller-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--sand-muted);
  font-size: 12px;
  color: var(--text-muted);
}

.seller-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.seller-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* Acciones de la Tarjeta */
.card-actions-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.btn-primary-action {
  flex: 1;
  background: var(--text-main);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary-action:hover {
  background: var(--sage-primary);
  transform: translateY(-1px);
}

.btn-compare-action {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--sand-muted);
  border: 1px solid var(--sand-border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.btn-compare-action:hover {
  background: var(--lavender-light);
  border-color: var(--lavender-border);
  color: var(--lavender-primary);
}

.btn-compare-action.in-arena {
  background: var(--lavender-primary);
  border-color: var(--lavender-primary);
  color: #fff;
}

/* ==========================================================================
   ARENA DE COMPARACIÓN (DRAWER FLOTANTE INFERIOR)
   ========================================================================== */
.comparison-arena-floating {
  position: fixed;
  bottom: 80px; /* Sobre la bottom bar */
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 980px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--sand-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 90;
  transition: var(--transition-bounce);
  overflow: hidden;
}

.comparison-arena-floating.collapsed .arena-body {
  display: none;
}

.arena-header {
  padding: 12px 18px;
  background: linear-gradient(90deg, var(--lavender-bg), var(--sage-bg));
  border-bottom: 1px solid var(--sand-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.arena-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.arena-badge-count {
  background: var(--lavender-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.arena-body {
  padding: 18px;
  max-height: 480px;
  overflow-y: auto;
}

.comparison-table-wrapper {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 12px 0;
}

.comparison-table th {
  padding: 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 140px;
  vertical-align: middle;
}

.comparison-table td {
  padding: 12px 16px;
  background: var(--sand-card);
  border: 1px solid var(--sand-border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 13.5px;
  vertical-align: middle;
}

.arena-product-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.arena-product-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--sand-border);
}

.arena-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: var(--coral-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ==========================================================================
   MODO SWIPE & REFINE (AI TINDER / RECOMENDACIÓN)
   ========================================================================== */
.swipe-mode-container {
  max-width: 520px;
  margin: 20px auto 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ai-learning-cloud {
  width: 100%;
  background: linear-gradient(135deg, var(--lavender-bg), var(--sage-bg));
  border: 1px solid var(--lavender-border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}

.ai-cloud-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lavender-dark);
  margin-bottom: 8px;
}

.ai-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-tag-learned {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--lavender-border);
  color: var(--lavender-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Stack de Tarjetas Swipe */
.swipe-card-stack {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swipe-card {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--sand-card);
  border: 1px solid var(--sand-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  user-select: none;
}

.swipe-card-media {
  position: relative;
  width: 100%;
  height: 62%;
  background: var(--sand-muted);
}

.swipe-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swipe-card-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.swipe-action-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.swipe-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition-bounce);
}

.swipe-btn:hover {
  transform: scale(1.1);
}

.swipe-btn.dislike {
  background: var(--coral-light);
  color: var(--coral-primary);
  border: 1.5px solid var(--coral-border);
}

.swipe-btn.superlike {
  background: var(--lavender-light);
  color: var(--lavender-primary);
  border: 1.5px solid var(--lavender-border);
}

.swipe-btn.like {
  background: var(--sage-light);
  color: var(--sage-primary);
  border: 1.5px solid var(--sage-border);
}

/* ==========================================================================
   RADAR DE PROXIMIDAD (MAPA INTERACTIVO)
   ========================================================================== */
.radar-container {
  background: var(--sand-card);
  border: 1px solid var(--sand-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
}

.radar-map-canvas {
  position: relative;
  width: 100%;
  height: 420px;
  background: linear-gradient(135deg, #EEF4F1 0%, #F5F3ED 50%, #ECEBF8 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--sand-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-sweep {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 1px dashed var(--sage-border);
  pointer-events: none;
}

.radar-sweep::before {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  top: 60px;
  left: 60px;
  border-radius: 50%;
  border: 1px dashed var(--lavender-border);
}

.radar-sweep::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  top: 120px;
  left: 120px;
  border-radius: 50%;
  border: 1px solid var(--sage-primary);
  background: rgba(69, 123, 105, 0.08);
}

.radar-center-user {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.user-pulse-dot {
  width: 16px;
  height: 16px;
  background: var(--sage-primary);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(69, 123, 105, 0.25);
}

.radar-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform var(--transition-bounce);
  z-index: 12;
}

.radar-pin:hover {
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 20;
}

.radar-pin-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid var(--sand-border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* ==========================================================================
   FEED VERTICAL DE REELS / DESCUBRIR (10-15s VIDEO)
   ========================================================================== */
.reels-feed-container {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 10px 0;
}

.reel-card {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 680px;
  background: #000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.3) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  color: #fff;
}

.reel-top-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reel-bottom-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reel-product-card-cta {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ==========================================================================
   MODAL FLOTANTE Y "LIBRO DE VIDA" CRONOLÓGICO
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 35, 43, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--sand-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--sand-border);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition-bounce);
}

.modal-overlay.active .modal-window {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--sand-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--sand-card);
  z-index: 10;
}

.modal-close-btn {
  background: var(--sand-muted);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--coral-light);
  color: var(--coral-primary);
}

/* Línea de Vida (Life Book Timeline) */
.lifebook-timeline {
  position: relative;
  padding-left: 28px;
  margin: 16px 0;
}

.lifebook-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--sage-border);
}

.lifebook-entry {
  position: relative;
  margin-bottom: 18px;
}

.lifebook-entry::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sage-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px var(--sage-light);
}

.lifebook-date {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--sage-dark);
}

.lifebook-event {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 2px;
}

.lifebook-owner {
  font-size: 12px;
  color: var(--text-muted);
}

/* Calculadora Buy-Back */
.buyback-calculator {
  background: var(--sage-bg);
  border: 1px solid var(--sage-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 16px 0;
}

.buyback-slider {
  width: 100%;
  accent-color: var(--sage-primary);
  margin: 12px 0;
}

/* ==========================================================================
   VENTANA DE VENDER (+) CON ESCANEO IA Y VIDEO-PROOF
   ========================================================================== */
.sell-wizard-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--sand-muted);
  border-bottom: 1px solid var(--sand-border);
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-soft);
}

.step-indicator.active {
  color: var(--sage-dark);
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sand-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.step-indicator.active .step-number {
  background: var(--sage-primary);
  color: #fff;
}

.ai-scan-zone {
  border: 2px dashed var(--lavender-border);
  background: var(--lavender-bg);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.ai-scan-zone:hover {
  background: var(--lavender-light);
  border-color: var(--lavender-primary);
}

/* ==========================================================================
   CHAT ANTIFRAUDE Y AI CONCIERGE
   ========================================================================== */
.chat-window-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  border: 1px solid var(--sand-border);
  border-radius: var(--radius-xl);
  background: var(--sand-card);
  overflow: hidden;
  height: 600px;
  box-shadow: var(--shadow-sm);
  margin: 20px 0;
}

@media (max-width: 768px) {
  .chat-window-container {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 520px;
  }
  .chat-sidebar {
    display: none; /* Toggleable in mobile */
  }
}

.chat-sidebar {
  border-right: 1px solid var(--sand-border);
  background: var(--sand-muted);
  overflow-y: auto;
}

.chat-conversation-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--sand-border);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  gap: 12px;
}

.chat-conversation-item:hover, .chat-conversation-item.active {
  background: var(--sand-card);
}

.chat-main-area {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages-scroll {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--sand-canvas);
}

.chat-bubble {
  max-width: 70%;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
}

.chat-bubble.buyer {
  align-self: flex-end;
  background: var(--text-main);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.seller {
  align-self: flex-start;
  background: var(--sand-card);
  border: 1px solid var(--sand-border);
  border-bottom-left-radius: 4px;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--lavender-bg), var(--lavender-light));
  border: 1px solid var(--lavender-border);
  color: var(--lavender-dark);
}

.antifraud-warning-pill {
  align-self: center;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber-dark);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}

.chat-input-bar {
  padding: 14px 18px;
  background: var(--sand-card);
  border-top: 1px solid var(--sand-border);
  display: flex;
  gap: 10px;
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR (5 PESTAÑAS)
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--sand-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
  z-index: 80;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.03);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  position: relative;
}

.bottom-nav-item:hover {
  color: var(--text-main);
}

.bottom-nav-item.active {
  color: var(--sage-dark);
}

.bottom-nav-item.active .nav-icon-wrap {
  background: var(--sage-light);
  color: var(--sage-dark);
  transform: translateY(-2px);
}

.nav-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-bounce);
}

.bottom-nav-item.sell-action-btn .nav-icon-wrap {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--sage-primary), var(--lavender-primary));
  color: #fff;
  box-shadow: var(--shadow-pastel-sage);
  transform: translateY(-8px);
}

.bottom-nav-item.sell-action-btn:hover .nav-icon-wrap {
  transform: translateY(-12px) scale(1.06);
}

/* Utilities */
.text-sage { color: var(--sage-primary); }
.text-coral { color: var(--coral-primary); }
.text-lavender { color: var(--lavender-primary); }
.bg-sage-light { background: var(--sage-light); }
.bg-coral-light { background: var(--coral-light); }
.bg-lavender-light { background: var(--lavender-light); }
.badge-verified {
  background: var(--sage-bg);
  border: 1px solid var(--sage-border);
  color: var(--sage-dark);
}
