/* =====================================================
   Marketplace Perú — CSS Principal
   Tema: Blanco / Claro Premium
   ===================================================== */

/* ── Google Fonts ya importadas desde header ── */

/* ── Variables ── */
:root {
  --bg:        #0f0f12;
  --bg2:       #0f0f12;
  --bg3:       #18181e;
  --card:      #18181e;
  --border:    rgba(255,255,255,.07);
  --border2:   rgba(255,255,255,.11);
  --text:      #f0f0f5;
  --text2:     rgba(240,240,245,.62);
  --muted:     rgba(240,240,245,.36);
  --primary:   #a8ff3e;
  --primary2:  #bcff6a;
  --primary-dk:#8fe02a;
  --secondary: #4f8ef7;
  --secondary2:#6ba3ff;
  --green:     #10b981;
  --green-dk:  #059669;
  --gold:      #f59e0b;
  --red:       #ef4444;
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow:    0 2px 8px rgba(0,0,0,.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
  --transition:.2s ease;
  --navbar-h:  auto;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg2);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
ul, ol { list-style: none; }
input, textarea, select { font-family: var(--font); }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 640px)  { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* ── Tipografía ── */
h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text2); }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: background .3s;
}
.navbar:not(.navbar-transparent),
.navbar.navbar-scrolled {
  position: sticky;
  top: 0;
  background: rgba(15,15,18,.95);
  backdrop-filter: blur(12px);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 70px;
  width: 100%;
  padding: 0 32px;
  box-sizing: border-box;
}
@media (min-width: 1024px) { .navbar-inner { padding: 0 32px; } }
.navbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(168,255,62,.12);
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-search-bar {
  display: none;
  padding: 0 20px 12px;
  max-width: 600px;
  margin: 0 auto;
}
.navbar-search-bar.open {
  display: block;
}
@media (min-width: 1024px) { .navbar-search-bar { padding: 0 32px 12px; } }

/* Hero video */
.hero-video {
  position: relative;
  height: 85vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.4) 0%, rgba(0,0,0,.6) 50%, #0f0f12 100%);
}
.hero-video-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  max-width: 700px;
}
.hero-video-content h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-video-content p {
  font-size: 18px;
  color: rgba(255,255,255,.6);
  margin-bottom: 32px;
}
.hero-video-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 50px;
}
.btn-outline.btn-lg {
  background: transparent;
  border: 2px solid rgba(255,255,255,.3);
  color: #fff;
}
.btn-outline.btn-lg:hover {
  border-color: #fff;
  background: rgba(255,255,255,.08);
}
@media(max-width:768px) {
  .hero-video { height: 70vh; min-height: 400px; }
  .navbar-links { display: none; }
  .hero-video-content { flex-direction: column !important; text-align: center !important; gap: 20px !important; }
  .hero-video-content > div { text-align: center !important; }
  .hero-video-btns { justify-content: center !important; }
  .hero-video-content img { height: 140px !important; }
}

/* Logo */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar-logo .logo-icon { font-size: 1.5rem; }
.navbar-logo .logo-text { color: var(--primary); }

/* Search */
.navbar-search {
  flex: 1;
  max-width: 560px;
  position: relative;
}
.search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg2);
  border: 1.5px solid var(--border2);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(168,255,62,.12);
}
.search-icon {
  margin-left: 14px;
  color: var(--muted);
  flex-shrink: 0;
}
.search-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.search-wrap input::placeholder { color: var(--muted); }
.search-btn {
  background: var(--primary);
  color: #0a0a0a;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.search-btn:hover { background: var(--primary-dk); }

/* Search dropdown autocomplete */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 200;
  overflow: hidden;
}
.search-dropdown.open { display: block; }
.sd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.sd-item:hover { background: var(--bg2); }
.sd-thumb {
  width: 40px; height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}
.sd-info { flex: 1; overflow: hidden; }
.sd-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-price { font-size: 12px; color: var(--primary); font-weight: 600; }

.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: #fff;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  transition: background var(--transition), color var(--transition);
}
.nav-icon-btn:hover { background: rgba(168,255,62,.2); color: var(--primary); }

.badge-dot {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 50px;
  margin-left: 4px;
}

/* Avatar button */
.nav-user-menu { position: relative; }
.nav-avatar-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  border: none;
  cursor: pointer;
  padding: 4px 8px 4px 4px;
  border-radius: 50px;
  transition: background var(--transition);
  color: #fff;
}
.nav-avatar-btn:hover { background: rgba(168,255,62,.2); }
.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.nav-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 700;
}

/* User dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 300;
  overflow: hidden;
}
.user-dropdown.open { display: block; animation: dropIn .15s ease; }
@keyframes dropIn { from { opacity:0; transform: translateY(-6px); } to { opacity:1; transform: translateY(0); } }
.user-dropdown-header { padding: 14px 16px; }
.ud-name { display: block; font-weight: 600; font-size: 14px; color: var(--text); }
.ud-email { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ud-divider { height: 1px; background: var(--border); }
.ud-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text2);
  transition: background var(--transition), color var(--transition);
}
.ud-item:hover { background: var(--bg2); color: var(--text); }
.ud-admin { color: var(--secondary); }
.ud-logout { color: var(--red); }

.navbar-publish { display: none; }
@media (min-width: 768px) { .navbar-publish { display: inline-flex; align-items: center; gap: 6px; } }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1024px) { .hamburger { display: none; } }

/* Desktop: ocultar hamburguesa y mostrar nav-icons */
@media (max-width: 1023px) {
  .navbar-search { display: none; }
  .nav-icon-btn  { display: none; }
}
@media (min-width: 1024px) {
  .hamburger { display: none; }
  .navbar-search { display: block; }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-h);
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 900;
  overflow-y: auto;
}
.mobile-menu.open { display: block; animation: slideDown .2s ease; }
@keyframes slideDown { from { opacity:0; transform: translateY(-10px); } to { opacity:1; transform: translateY(0); } }
.mobile-menu-inner { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.mobile-search {
  display: flex;
  border: 1.5px solid var(--border2);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 12px;
}
.mobile-search input { flex:1; border:none; padding: 10px 16px; outline:none; font-size:14px; }
.mobile-search button { background: var(--primary); color:#fff; border:none; padding: 10px 14px; cursor:pointer; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text2);
  font-weight: 500;
  transition: background var(--transition);
}
.mobile-nav-link:hover, .mobile-nav-link.active { background: var(--bg2); color: var(--primary); }

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 850;
}
.overlay.open { display: block; }

/* ── Navbar: necesita border-color explícito en dark ── */
.search-wrap { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.badge-dot { border-color: var(--bg); }
.search-dropdown { background: #1e1e26; }
.sd-item:hover { background: rgba(255,255,255,.05); }
.user-dropdown { background: #1e1e26; }

/* =====================================================
   BOTONES
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.btn-primary  { background: var(--primary); color: #0a0a0a; border-color: var(--primary); font-weight: 700; }
.btn-primary:hover  { background: var(--primary-dk); border-color: var(--primary-dk); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(168,255,62,.35); }
.btn-secondary  { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.btn-secondary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #0a0a0a; }
.btn-ghost { background: transparent; color: var(--text2); border-color: transparent; }
.btn-ghost:hover { background: var(--bg2); color: var(--text); }
.btn-whatsapp { background: #25D366; color: #fff; border-color: #25D366; }
.btn-whatsapp:hover { background: #1ebe5d; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #dc2626; }
.btn-sm  { padding: 7px 14px; font-size: 13px; }
.btn-lg  { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* =====================================================
   BADGES DE CONDICIÓN
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.badge-nuevo     { background: rgba(16,185,129,.18); color: #34d399; }
.badge-seminuevo { background: rgba(245,158,11,.18); color: #fbbf24; }
.badge-usado     { background: rgba(255,255,255,.08); color: rgba(240,240,245,.6); }
.badge-featured  { background: rgba(245,158,11,.18); color: #fbbf24; }
.badge-primary   { background: rgba(168,255,62,.18); color: var(--primary2); }
.badge-secondary { background: rgba(79,142,247,.18); color: var(--secondary2); }

/* =====================================================
   PRODUCT CARDS
   ===================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px)  { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 768px)  { .products-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
@media (min-width: 1280px) { .products-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; } }

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.07);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,.55), 0 2px 10px rgba(0,0,0,.3);
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.14);
}

/* ── Image area ── */
.product-card-img {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg3);
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.06); }

/* Title overlay on hover */
.card-title-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
  opacity: 0;
  transition: opacity .25s ease;
}
.product-card:hover .card-title-overlay { opacity: 1; }
.card-title-overlay span {
  font-size: 12px;
  color: rgba(255,255,255,.9);
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Condition badge (top-left) */
.card-badge-condition {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
}

/* Fav button */
.card-fav-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,.6);
}
.card-fav-btn:hover, .card-fav-btn.active { color: var(--red); border-color: var(--red); }
.card-fav-btn.active svg { fill: var(--red); }

/* ── Body area ── */
.product-card-body {
  padding: 14px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Stats row: condición left | precio right */
.card-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.card-stat-left { text-align: left; }
.card-stat-right { text-align: right; }
.card-stat-left strong,
.card-stat-right strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.card-stat-left span,
.card-stat-right span {
  font-size: 10px;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

/* NFT-style pill buy button */
.card-buy-btn {
  display: block;
  text-align: center;
  padding: 11px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(168,255,62,.07);
  border: 1px solid rgba(168,255,62,.2);
  text-decoration: none;
  transition: all .2s ease;
  letter-spacing: .01em;
}
.card-buy-btn:hover {
  background: var(--primary);
  color: #0a0a0a;
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(168,255,62,.4);
}

/* Legacy selectors — kept for other pages */
.product-card-title { display: none; }
.product-card-price  { display: none; }
.product-card-meta   { display: none; }
.product-card-district { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =====================================================
   SECCIONES / LAYOUT
   ===================================================== */
.section { padding: 40px 0; }
.section-sm { padding: 24px 0; }
.section-lg { padding: 64px 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title { font-size: 1.375rem; font-weight: 800; letter-spacing: -.022em; color: var(--text); }
.section-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1.5px solid var(--border2);
  border-radius: 50px;
  transition: all var(--transition);
}
.section-link:hover { border-color: var(--primary); background: rgba(168,255,62,.1); }

/* =====================================================
   HERO — NFT Dark 3-Column
   ===================================================== */
.hero {
  background: #0f0f12;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: none;
}
/* Big decorative background letters */
.hero-bg-word {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(9rem, 20vw, 17rem);
  font-weight: 900;
  color: rgba(255,255,255,.032);
  letter-spacing: -.02em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; left: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(168,255,62,.08) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px; right: -60px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(100,120,200,.07) 0%, transparent 65%);
  pointer-events: none;
}

/* 3-column grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 48px;
  padding: 64px 0;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* ── LEFT: Stats verticales ── */
.hero-col-left {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.hero-stat-v strong {
  display: block;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -.035em;
  line-height: 1;
  margin-bottom: 5px;
}
.hero-stat-v span {
  font-size: 13px;
  color: rgba(255,255,255,.38);
  font-weight: 500;
  letter-spacing: .1px;
}

/* ── CENTER: Imagen circular ── */
.hero-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hero-center-top-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 10px;
  color: rgba(255,255,255,.28);
  text-transform: uppercase;
  letter-spacing: .9px;
  font-weight: 600;
}
.hero-circle {
  width: 270px; height: 270px;
  border-radius: 50%;
  overflow: hidden;
  background: #1b1b21;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow:
    0 0 0 8px rgba(255,255,255,.025),
    0 0 60px rgba(168,255,62,.12),
    inset 0 0 30px rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-circle img { width: 100%; height: 100%; object-fit: cover; }
.hero-circle-placeholder {
  font-size: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  background: radial-gradient(circle, #1e1e2a 0%, #0f0f14 100%);
}
.hero-center-bottom-label {
  font-size: 10px;
  color: rgba(255,255,255,.28);
  text-transform: uppercase;
  letter-spacing: .9px;
  font-weight: 600;
}

/* ── RIGHT: Texto + CTA ── */
.hero-col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-end;
  text-align: right;
}
.hero-right-tag {
  font-size: 10px;
  color: rgba(255,255,255,.28);
  text-transform: uppercase;
  letter-spacing: .9px;
  font-weight: 600;
}
.hero-right-desc {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  line-height: 1.75;
  max-width: 250px;
  margin: 0;
}
.hero-search-mini {
  display: flex;
  width: 100%;
  max-width: 270px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50px;
  overflow: hidden;
  background: rgba(255,255,255,.05);
  transition: border-color .2s;
}
.hero-search-mini:focus-within { border-color: rgba(168,255,62,.4); }
.hero-search-mini input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  color: #fff;
  outline: none;
}
.hero-search-mini input::placeholder { color: rgba(255,255,255,.28); }
.hero-search-mini button {
  background: var(--primary);
  color: #0a0a0a;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: opacity .2s;
  flex-shrink: 0;
}
.hero-search-mini button:hover { opacity: .85; }
.hero-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #0f0f12;
  padding: 12px 26px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.hero-explore-btn:hover {
  background: #f0f1f5;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}

/* Feature strip responsive */
@media (max-width: 768px) {
  .feature-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
    padding: 44px 0;
  }
  .hero-col-left {
    flex-direction: row;
    justify-content: center;
    gap: 32px;
    order: 2;
  }
  .hero-col-center { order: 1; }
  .hero-col-right {
    align-items: center;
    text-align: center;
    order: 3;
  }
  .hero-circle { width: 200px; height: 200px; }
  .hero-right-desc { max-width: 100%; }
  .hero-search-mini { max-width: 100%; }
}
@media (max-width: 480px) {
  .hero-col-left { flex-direction: column; gap: 18px; align-items: center; }
  .hero-circle { width: 160px; height: 160px; }
  .hero-bg-word { font-size: 7rem; }
}

/* =====================================================
   CATEGORY CHIPS
   ===================================================== */

/* =====================================================
   CATEGORY CHIPS
   ===================================================== */
.categories-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 14px 20px 18px;
  margin: -14px -20px -18px;
  scrollbar-width: none;
}
.categories-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  cursor: pointer;
  transition: all .18s ease;
  text-decoration: none;
}
.cat-chip::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  opacity: .7;
  transition: opacity .18s;
}
.cat-chip:hover, .cat-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(168,255,62,.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(168,255,62,.2);
}
.cat-chip:hover::before, .cat-chip.active::before { opacity: 1; }
.cat-chip .emoji { display: none; }

/* Force all emojis to white */
.icon-white,
.filter-option .icon-white,
select option {
  filter: grayscale(1) brightness(10);
}

/* Cat cards NFT style */
.cat-card-nft {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.cat-card-nft:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(168,255,62,.15);
}
.cat-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(168,255,62,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: background .2s;
}
.cat-card-nft:hover .cat-card-icon {
  background: rgba(168,255,62,.22);
}
.cat-card-name {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}
.cat-card-count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* =====================================================
   FILTROS SIDEBAR (Explorar)
   ===================================================== */
.explore-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 1024px) {
  .explore-layout {
    grid-template-columns: 260px 1fr;
  }
}

.filters-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.filters-header h3 { font-size: 15px; }
.filters-clear { font-size: 13px; color: var(--secondary); cursor: pointer; font-weight: 600; }
.filters-clear:hover { text-decoration: underline; }
.filter-group { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: none; }
.filter-group h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .4px; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--text2);
}
.filter-option input[type="radio"],
.filter-option input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
.filter-option:hover { color: var(--primary); }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input { flex:1; min-width:0; }
.price-range span { font-size: 13px; color: var(--muted); flex-shrink: 0; }

/* =====================================================
   TOOLBAR (explorar)
   ===================================================== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar-count { font-size: 14px; color: var(--muted); }
.toolbar-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text2);
}
.toolbar-sort select {
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  outline: none;
}
.toolbar-sort select:focus { border-color: var(--primary); }

/* =====================================================
   PAGINACIÓN
   ===================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border2);
  background: var(--card);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(168,255,62,.08); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.disabled { opacity: .4; cursor: not-allowed; }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.form-label .req { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: var(--bg3);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(168,255,62,.15);
  background: var(--bg3);
}
.form-control::placeholder { color: var(--muted); }
.form-control.is-error { border-color: var(--red); }
.form-control.is-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--muted); }
.form-error { font-size: 12px; color: var(--red); }

/* Radio/Checkbox custom */
.radio-group, .check-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.radio-card {
  position: relative;
  flex: 1;
  min-width: 80px;
}
.radio-card input { position: absolute; opacity: 0; }
.radio-card label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid var(--border2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
  transition: all var(--transition);
}
.radio-card input:checked + label {
  border-color: var(--primary);
  background: rgba(168,255,62,.10);
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary) inset;
}
.radio-card input:checked + label * { color: var(--primary) !important; }
.radio-card label .emoji { font-size: 20px; }

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info h4 { font-size: 14px; font-weight: 600; }
.toggle-info p { font-size: 12px; color: var(--muted); }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border2);
  border-radius: 24px;
  transition: .2s;
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* Char counter */
.char-counter { font-size: 12px; color: var(--muted); text-align: right; }
.char-counter.warn { color: var(--gold); }
.char-counter.danger { color: var(--red); }

/* Image upload */
.img-upload-area {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg2);
}
.img-upload-area:hover { border-color: var(--primary); background: rgba(168,255,62,.06); }
.img-upload-area.dragover { border-color: var(--primary); background: rgba(168,255,62,.10); }
.img-upload-icon { font-size: 36px; margin-bottom: 10px; }
.img-upload-text { font-size: 14px; color: var(--text2); }
.img-upload-text strong { color: var(--primary); }
.img-upload-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.img-previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.img-preview-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.img-preview-item img { width:100%; height:100%; object-fit:cover; }
.img-preview-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

/* =====================================================
   CARD GENÉRICA
   ===================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-body { padding: 24px; }
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 { font-size: 15px; }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity:0; transform: scale(.95) translateY(10px); }
  to { opacity:1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; }
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--bg2); color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn .3s ease;
  max-width: 340px;
  min-width: 200px;
}
@keyframes toastIn {
  from { opacity:0; transform: translateX(40px); }
  to   { opacity:1; transform: translateX(0); }
}
.toast.removing { animation: toastOut .3s ease forwards; }
@keyframes toastOut {
  to { opacity:0; transform: translateX(40px); }
}
.toast-success { background: var(--green); }
.toast-error   { background: var(--red); }
.toast-warning { background: var(--gold); color: var(--text); }
.toast-info    { background: var(--secondary); }
.toast-icon { font-size: 18px; flex-shrink: 0; }

/* Flash messages */
.flash-container { max-width: 1280px; margin: 12px auto 0; padding: 0 20px; }
@media (min-width: 1024px) { .flash-container { padding: 0 32px; } }
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 8px;
}
.flash-icon { font-size: 16px; flex-shrink: 0; }
.flash-success { background: #d1fae5; color: #065f46; border-left: 3px solid var(--green); }
.flash-error   { background: #fee2e2; color: #991b1b; border-left: 3px solid var(--red); }
.flash-warning { background: #fef3c7; color: #92400e; border-left: 3px solid var(--gold); }
.flash-info    { background: #dbeafe; color: #1e40af; border-left: 3px solid var(--secondary); }

/* =====================================================
   SKELETON LOADING
   ===================================================== */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f1f3f4 25%, #e9ecef 50%, #f1f3f4 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skeleton-img  { aspect-ratio: 4/3; }
.skeleton-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 14px; border-radius: 4px; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-40 { width: 40%; }

/* =====================================================
   PRODUCTO — DETALLE
   ===================================================== */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 1024px) {
  .product-detail-grid { grid-template-columns: 1fr 380px; }
}

/* Galería */
.gallery-main {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
}
.gallery-main img { width:100%; height:100%; object-fit:contain; background: var(--bg3); }
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}
.gallery-thumb {
  flex-shrink: 0;
  width: 72px; height: 56px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition);
  background: var(--bg3);
}
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width:100%; height:100%; object-fit:cover; }

/* Seller card */
.seller-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.seller-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.seller-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.seller-avatar-placeholder {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}
.seller-name { font-weight: 700; font-size: 16px; }
.seller-since { font-size: 12px; color: var(--muted); }

/* Stars */
.stars { display: flex; gap: 2px; color: var(--gold); }
.star-empty { color: var(--border2); }

/* Verified badges */
.verify-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg3);
  color: var(--text2);
}
.verify-badge.ok { background: #d1fae5; color: #065f46; }

/* Acciones producto */
.product-actions { display: flex; flex-direction: column; gap: 10px; }

/* Stats row */
.stats-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 16px 0;
  font-size: 13px;
  color: var(--muted);
}
.stat-item { display: flex; align-items: center; gap: 5px; }

/* =====================================================
   MENSAJES / CHAT
   ===================================================== */
.messages-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  min-height: 500px;
}
@media (min-width: 768px) {
  .messages-layout { grid-template-columns: 280px 1fr; }
}

.conv-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.conv-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
}
.conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}
.conv-item:hover, .conv-item.active { background: var(--bg2); }
.conv-item.unread .conv-name { font-weight: 700; }
.conv-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary);
  flex-shrink: 0;
}
.conv-avatar-placeholder {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.conv-meta { flex:1; overflow:hidden; }
.conv-name { font-size: 14px; font-weight: 500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-preview { font-size: 12px; color: var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-time { font-size: 11px; color: var(--muted); white-space:nowrap; }

.chat-area { display: flex; flex-direction: column; }
.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg2);
}
.message-bubble {
  display: flex;
  gap: 10px;
  max-width: 75%;
}
.message-bubble.mine {
  margin-left: auto;
  flex-direction: row-reverse;
}
.bubble-text {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 100%;
}
.message-bubble.theirs .bubble-text {
  background: var(--card);
  color: var(--text);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow);
}
.message-bubble.mine .bubble-text {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble-time { font-size: 11px; color: var(--muted); align-self: flex-end; white-space: nowrap; }
.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--card);
}
.chat-input-area textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 100px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
}
.chat-input-area textarea:focus { border-color: var(--primary); }
.chat-send-btn {
  width: 40px; height: 40px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
}
.chat-send-btn:hover { background: var(--primary-dk); }

/* =====================================================
   PERFIL / DASHBOARD
   ===================================================== */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 1024px) {
  .profile-layout { grid-template-columns: 260px 1fr; }
}
.profile-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.profile-sidebar-top {
  padding: 28px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.profile-big-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin: 0 auto 12px;
}
.profile-big-initial {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.profile-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text2);
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.profile-nav a:hover, .profile-nav a.active {
  background: var(--bg2);
  color: var(--primary);
  border-left-color: var(--primary);
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-card .stat-val { font-size: 2rem; font-weight: 800; color: var(--text); display: block; }
.stat-card .stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* =====================================================
   MAPA (Leaflet)
   ===================================================== */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 280px;
}
.map-container .leaflet-container { height: 100%; }

/* =====================================================
   ADMIN PANEL
   ===================================================== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--navbar-h));
  gap: 0;
}
@media (max-width: 1023px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-sidebar {
  background: #0a0a0d;
  color: #fff;
  padding: 24px 0;
  border-right: 1px solid rgba(255,255,255,.06);
}
.admin-sidebar .admin-logo {
  padding: 0 20px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 14px;
  color: rgba(255,255,255,.7);
  transition: all var(--transition);
}
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a.active {
  background: rgba(168,255,62,.1);
  color: var(--primary);
  border-right: 2px solid var(--primary);
}
.admin-nav a span, .admin-nav a { filter: none; }
.admin-main { padding: 32px; background: var(--bg); }
.admin-header { margin-bottom: 28px; }
.admin-header h1 { font-size: 1.5rem; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 32px; }
.admin-stat-card {
  background: #18181e;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  padding: 20px 24px;
}
.admin-stat-card .val { font-size: 2rem; font-weight: 800; display: block; }
.admin-stat-card .lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }
.admin-stat-card.primary .val { color: var(--primary); }
.admin-stat-card.secondary .val { color: var(--secondary); }
.admin-stat-card.green .val { color: var(--green); }
.admin-stat-card.gold .val { color: var(--gold); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg2); }

/* =====================================================
   CTA SECTION
   ===================================================== */
.cta-section {
  background: #0a0a0d;
  color: #fff;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.06);
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(168,255,62,.12) 0%, transparent 65%);
  pointer-events: none;
}
.cta-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.cta-section > .container { position: relative; z-index: 1; }
.cta-section h2 { color: #fff; margin-bottom: 12px; font-size: clamp(1.75rem, 3.5vw, 2.75rem); letter-spacing: -.03em; font-weight: 900; }
.cta-section p  { color: rgba(255,255,255,.5); margin-bottom: 36px; font-size: 1.05rem; }
.cta-section .btn { background: var(--primary); color: #0a0a0a; border-color: transparent; font-weight: 700; }
.cta-section .btn:hover { background: var(--primary-dk); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(168,255,62,.45); }
.cta-section .btn-ghost { background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); border: 1.5px solid rgba(255,255,255,.15); }
.cta-section .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }

/* =====================================================
   UTILIDADES
   ===================================================== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.fw-bold { font-weight: 700; }
.fw-600  { font-weight: 600; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { margin-bottom: 20px; }

/* Alert */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 3px solid var(--secondary); }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 3px solid var(--gold); }
.alert-success { background: #d1fae5; color: #065f46; border-left: 3px solid var(--green); }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 3px solid var(--red); }

/* Main content offset */
.main-content { min-height: calc(100vh - var(--navbar-h) - 300px); }

/* Footer */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 48px 0 0;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.footer-desc { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  color: var(--text2);
  transition: all var(--transition);
}
.social-link.social-wa:hover { background: #25D366; color: #fff; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; color: var(--text); }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 14px; color: var(--muted); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: 13px;
  color: var(--muted);
}
.footer-version { font-size: 12px; }

/* =====================================================
   RESPONSIVE AJUSTES
   ===================================================== */
@media (max-width: 639px) {
  .section     { padding: 28px 0; }
  .section-lg  { padding: 40px 0; }
  .hero        { padding: 40px 0 32px; }
  .stats-grid  { grid-template-columns: repeat(2,1fr); }
  .hero-search-loc { display: none; }
  .modal       { border-radius: var(--radius); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* =====================================================
   Phosphor Icons — utilidades de tamaño
   ===================================================== */
i[class*="ph-"] { display: inline-flex; line-height: 1; vertical-align: middle; }
.ph-xs  { font-size: 11px; }
.ph-sm  { font-size: 14px; }
.ph-md  { font-size: 16px; }
.ph-lg  { font-size: 18px; }
.ph-xl  { font-size: 20px; }
.ph-2xl { font-size: 24px; }
.ph-3xl { font-size: 32px; }
.btn i[class*="ph-"] { font-size: 1.1em; }
.nav-icon-btn i[class*="ph-"] { font-size: 20px; }
.card-fav-btn i[class*="ph-"] { font-size: 16px; }
.fav-toggle-btn.active i[class*="ph-"] { color: var(--red); }
.stat-item i[class*="ph-"] { font-size: 14px; }
.search-icon { font-size: 18px; color: var(--muted); }
