/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
  overflow-x: hidden;
  display: flex;
  flex-direction: row;
  min-height: 100vh; /* === CAMBIO: usar min-height en lugar de height para evitar recortes en mobile */
}

/* ===== Sidebar ===== */
.sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid #ddd;
  overflow-y: auto;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  padding: 15px;
  z-index: 1000;
}
.sidebar h3 { color: #243447; margin-bottom: 10px; }
.sidebar ul { list-style: none; }
.sidebar ul li { margin-bottom: 10px; }
.sidebar ul li a { text-decoration: none; color: #333; }
.sidebar ul li a:hover { color: #FF9900; font-weight: bold; }

/* ===== Logo en Sidebar ===== */
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.sidebar-logo img {
  max-height: 40px;
  display: block;
}
.sidebar-logo span {
  font-size: 20px;
  font-weight: bold;
  color: #243447;
}

/* ===== Caja de ubicación ===== */
.location-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.location-box h3 {
  margin-bottom: 6px;
  font-size: 15px;
  color: #243447;
}
.location-box p {
  font-size: 13px;
  color: #444;
}
.location-box .change-location {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: #FF9900;
  text-decoration: none;
  font-weight: bold;
}
.location-box .change-location:hover {
  text-decoration: underline;
}

/* ===== Categorías ===== */
#category-list li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
#category-list li:hover {
  background: #f5f5f5;
}
#category-list li.active {
  background: #FF9900;
  color: #fff;
  font-weight: bold;
}

/* ===== Layout principal ===== */
.main-layout {
  flex: 1;
  margin-left: 260px;
  width: calc(100% - 260px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.content {
  flex: 1;
  padding: 20px;
  width: 100%;
  margin-top: 60px; /* === CAMBIO: navbar altura coherente */
}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: #243447;
  color: #fff;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 260px;
  width: calc(100% - 260px);
  height: 50px;
  z-index: 1000;
  flex-wrap: wrap;
}
.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
}
.navbar .nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.navbar .nav-links li a:hover { color: #FF9900; }

/* ===== Hamburguesa (solo móvil) ===== */
.hamburger {
  font-size: 22px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  margin-right: 10px;
  display: none;
}
@media (max-width: 1024px) {
  .hamburger { display: block; }
  .navbar {
    width: 100%;
    left: 0;
  }
  .navbar .nav-links { display: none; }
}
@media (min-width: 1025px) {
  .navbar .nav-links { display: flex !important; }
}

/* ===== Buscadores ===== */
.search-bar-side {
  display: flex; align-items: center;
  background: #E6E6E6; border-radius: 20px;
  padding: 6px 10px; margin-bottom: 15px;
}
.search-bar-side .search-icon { color: #606770; margin-right: 8px; font-size: 16px; }
.search-bar-side input {
  border: none; background: transparent; outline: none; flex: 1;
  font-size: 14px; color: #333;
}
.search-bar-mobile {
  display: none;
  align-items: center;
  background: #E6E6E6;
  border-radius: 20px;
  padding: 6px 10px;
  margin: 10px;
}
.search-bar-mobile .search-icon { color: #606770; margin-right: 8px; font-size: 16px; }
.search-bar-mobile input {
  border: none; background: transparent; outline: none; flex: 1;
  font-size: 14px; color: #333;
}
@media (max-width: 1024px) {
  .search-bar-mobile { display: flex; }
  .search-bar-side { display: none; }
}

/* ===== Botón Publicar ===== */
.publicar-btn { margin-bottom: 20px; }
.publicar-btn a {
  display: block; text-align: center; background: #FF9900; color: #fff;
  font-weight: bold; padding: 10px; border-radius: 6px; text-decoration: none;
}
.publicar-btn a:hover { background: #cc7a00; }

/* ===== Tarjetas ===== */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}
.card {
  background: #fff; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  overflow: hidden; transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 320px; /* === CAMBIO: evitar altura 0 que rompe orden en mobile */
}
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; height: 180px; object-fit: cover; flex-shrink:0; }
.card-content { padding: 15px; flex:1; display:flex; flex-direction:column; }
.card-content h3 { font-size: 16px; margin-bottom: 8px; color: #222; }
.card-content p { font-size: 14px; margin-bottom: 5px; }
.card-content .price { color: #FF9900; font-weight: bold; }

/* ===== Formularios ===== */
form {
  background: #fff; padding: 20px; border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); max-width: 400px; margin: 0 auto;
}
form label { display: block; margin-top: 10px; font-weight: bold; }
form input, form textarea {
  width: 100%; padding: 10px; margin-top: 5px; border: 1px solid #ddd; border-radius: 5px;
}
form button {
  width: 100%; margin-top: 15px; padding: 12px; background: #243447; color: #fff;
  border: none; border-radius: 5px; font-weight: bold; cursor: pointer;
}
form button:hover { background: #1b2834; }

/* ===== Botón Google ===== */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  margin-top: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.google-btn img {
  width: 20px;
  height: 20px;
}
.google-btn:hover {
  background: #f5f5f5;
  color: #FF9900;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 15px 0;
}

/* Olvidaste contraseña */
.forgot {
  margin-top: 15px;
  text-align: center;
  width: 100%;
}
.forgot a {
  font-size: 14px;
  color: #243447;
  text-decoration: none;
  display: inline-block;
}
.forgot a:hover {
  text-decoration: underline;
  color: #FF9900;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  body { flex-direction: column; }
  .sidebar {
    position: fixed; top: 60px; left: 0;
    width: 75%; height: calc(100% - 60px);
    background: #fff;
    transform: translateX(-100%); transition: transform 0.3s ease;
    z-index: 999;
  }
  .sidebar.active { transform: translateX(0); }
  .main-layout { margin-left: 0; width: 100%; }
  .navbar {
    width: 100%; left: 0;
  }
  .content { margin-top: 60px; padding: 10px; }
  .container { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .card { min-height: auto; } /* permitir ajuste */
}
@media (max-width: 480px) {
  .container { grid-template-columns: 1fr !important; }
  .card img { height: 160px; } /* imagen más baja en mobile */
}

/* ===== Modal Ubicación (base) ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: #fff;
  padding: 20px 20px 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.close-modal {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 22px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}
.close-modal:hover { color: #FF9900; }
.modal-content h3 {
  margin-bottom: 15px;
  color: #243447;
}
.modal-content label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}
.modal-content input[type="text"] {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
}
/* Slider */
#radius { width: 100%; margin: 10px 0; }
#radius-value {
  font-size: 14px;
  color: #FF9900;
  font-weight: bold;
  margin-top: -5px;
}

/* ⚠️ AHORA SOLO PARA MODALES QUE NO SON DETALLE */
.modal-content:not(.detalle) button {
  margin-top: 15px;
  width: 100%;
  padding: 10px;
  background: #243447;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
.modal-content:not(.detalle) button:hover { background: #1b2834; }

/* Ajustes visuales del mapa en el modal */
#map {
  width: 100%;
  min-height: 250px;
  border-radius: 6px;
  border: 1px solid #ddd;
  margin-top: 10px;
  margin-bottom: 15px;
}

.publicacion-map {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-top: 10px;
}


/* ===== Footer ===== */
.site-footer {
  text-align: center;
  font-size: 14px;
  color: #666;
  padding: 15px;
  margin-top: 40px;
  background: #f5f5f5;
  border-top: 1px solid #ddd;
}

/* ===== Páginas Legales ===== */
.legal-container {
  background: #fff;
  padding: 30px;
  margin: 30px auto;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.legal-container h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #243447;
  border-bottom: 2px solid #FF9900;
  padding-bottom: 10px;
}
.legal-container h2 {
  font-size: 20px;
  margin-top: 25px;
  margin-bottom: 10px;
  color: #243447;
}
.legal-container p {
  font-size: 15px;
  margin-bottom: 12px;
  color: #333;
  line-height: 1.6;
}
.legal-container ul {
  margin-left: 20px;
  margin-bottom: 15px;
}
.legal-container ul li {
  margin-bottom: 8px;
  font-size: 15px;
}
.legal-container a {
  color: #FF9900;
  text-decoration: none;
  font-weight: bold;
}
.legal-container a:hover {
  text-decoration: underline;
}

/* ===== Anuncio rígido ===== */
.anuncio {
  background: #fff;
  border: 1px solid #ddd;
  margin: 0 0 15px 0;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.anuncio .banner img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* ===== Login & Registro ===== */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f5f5f5;
  padding: 20px;
}
.auth-logo {
  max-width: 160px;
  margin-bottom: 20px;
}
.auth-box {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 380px;
}
.auth-box h2 {
  margin-bottom: 20px;
  color: #243447;
  text-align: center;
}
.auth-box form label {
  font-weight: bold;
  margin-top: 10px;
  display: block;
}
.auth-box form input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
}
.auth-box form button {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  background: #243447;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
.auth-box form button:hover { background: #1b2834; }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 20px 0;
}

/* Google button */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.google-btn img { width: 20px; height: 20px; }
.google-btn:hover {
  background: #f5f5f5;
  color: #FF9900;
}

/* Forgot password */
.forgot { margin-top: 15px; text-align: center; }
.forgot a {
  font-size: 14px;
  color: #243447;
  text-decoration: none;
}
.forgot a:hover { text-decoration: underline; color: #FF9900; }

/* Botón destacado para registrarse (desde login) */
.register-btn {
  display: block;
  text-align: center;
  margin-top: 15px;
  padding: 12px;
  background: #FF9900;
  color: #fff;
  font-weight: bold;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.2s;
}
.register-btn:hover { background: #cc7a00; }

/* ===== Centrado específico para Login y Registro ===== */
body:has(.auth-container) {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f5f5f5;
  flex-direction: column;
  height: auto;
  min-height: 100vh;
}
@media (min-width: 1025px) {
  .auth-container { justify-content: flex-start; height: 100vh; }
  .auth-box {
    max-height: 90vh;
    overflow-y: auto;
    margin-top: 20px;
  }
}

/* ===== Link activo en navbar ===== */
.navbar .nav-links li a.active {
  background: #FF9900;
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
}

/* ===== Mi Cuenta ===== */
.account-container { max-width: 1000px; margin: 0 auto; }
.account-header {
  display: flex; align-items: center; gap: 20px;
  padding: 20px; background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
.account-photo {
  width: 90px; height: 90px;
  border-radius: 50%; object-fit: cover;
}
.badge {
  display: inline-block; margin-top: 8px;
  padding: 4px 12px; border-radius: 20px;
  font-size: 13px; font-weight: bold;
}
.badge.normal { background: #ddd; color: #333; }
.badge.premium { background: gold; color: #000; }
.account-tabs {
  display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.account-tabs .tab {
  background: #f0f0f0; border: none; padding: 10px 16px;
  border-radius: 6px; cursor: pointer; font-weight: bold;
}
.account-tabs .tab.active { background: #FF9900; color: #fff; }
.account-tabs .tab:hover { background: #e0e0e0; }
.tab-content {
  display: none; background: #fff; padding: 20px;
  border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.tab-content.active { display: block; }
.mis-publicaciones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}
.pub-card {
  background: #fff; padding: 12px; border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex; gap: 12px; align-items: center;
}
.pub-card img {
  width: 80px; height: 80px;
  border-radius: 6px; object-fit: cover;
}
.pub-card h4 { margin-bottom: 5px; font-size: 16px; }
.btn-small {
  padding: 6px 10px; font-size: 13px;
  border: none; border-radius: 4px;
  margin-right: 6px; cursor: pointer;
}
.btn-small:hover { opacity: 0.9; }
.btn-small.danger { background: #e63946; color: #fff; }
.btn-small:not(.danger) { background: #243447; color: #fff; }

/* ===== Modal Detalle Publicación (tipo Marketplace) ===== */
.modal-content.detalle {
  max-width: 1400px;
  width: 98%;
  max-height: 95vh;
  padding: 18px 18px 22px;
  display: block;           /* el layout interno se maneja con .detalle-layout */
  overflow: hidden;
}

/* Layout general dentro del modal */
.detalle-layout {
  display: flex;
  gap: 20px;
  width: 100%;
  height: 100%;
}

/* Columna izquierda: fondo difuso + foto + miniaturas */
.detalle-left {
  position: relative;
  flex: 1.4;
  min-width: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* centrado vertical para usar mejor el alto */
  overflow: hidden;
  border-radius: 12px;
}

/* Fondo difuso con la misma imagen */
.detalle-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.15);
  opacity: 0.8;
}

/* Foto principal centrada */
.detalle-photo-main {
  position: relative;
  margin: 0 auto;
  max-width: 520px;
  max-height: 520px;
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}
.detalle-photo-main img#main-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Flechas */
.detalle-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.detalle-arrow-left { left: 10px; }
.detalle-arrow-right { right: 10px; }
.detalle-arrow:hover { background: rgba(0,0,0,0.8); }

/* Contador 1 / N */
.detalle-counter {
  position: relative;
  z-index: 2;
  margin-top: 6px;
  text-align: center;
  font-size: 13px;
  color: #f9fafb;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* Miniaturas */
.detalle-thumbs {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.detalle-thumb {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  background: #111827;
}
.detalle-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detalle-thumb.active {
  border-color: #FF9900;
}

/* Columna derecha: información */
.detalle-right {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  max-height: calc(95vh - 50px);
  overflow-y: auto;
}
.detalle-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #243447;
}
.detalle-price {
  font-size: 24px;
  font-weight: bold;
  color: #FF9900;
  margin-bottom: 12px;
}

/* Bloques de info (Detalles, Ubicación, Vendedor, etc) */
.detalle-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}
.detalle-section h3 {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #111827;
}
.detalle-location {
  font-size: 14px;
  color: #555;
  margin-bottom: 4px;
}
.detalle-description {
  font-size: 15px;
  color: #444;
}

/* Botones acciones arriba (favoritos / compartir) */
.detalle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 4px;
}
.detalle-actions .fav-btn {
  background: #f5f5f5;
  color: #e63946;
  border: 1px solid #ddd;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}
.detalle-actions .fav-btn:hover {
  background: #ffe0e0;
  border-color: #e63946;
}
.detalle-actions .share-btn {
  background: #111827;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}
.detalle-actions .share-btn:hover {
  background: #020617;
}
.detalle-actions .btn-primary,
.detalle-actions a.btn-primary {
  background: #FF9900;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.detalle-actions .btn-primary:hover { background: #cc7a00; }

/* Info vendedor */
.detalle-seller-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.detalle-seller-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.detalle-seller-meta {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.detalle-seller-name {
  font-weight: bold;
  color: #111827;
}
.detalle-seller-extra {
  font-size: 13px;
  color: #6b7280;
}

/* Caja de "Envía un mensaje" */
.detalle-message-box {
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
}
.detalle-message-box p {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 8px;
}
.detalle-message-link {
  display: inline-block;
  background: #FF9900;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
}
.detalle-message-link:hover {
  background: #cc7a00;
}

/* Responsive del modal detalle */
@media (max-width: 900px) {
  .modal-content.detalle {
    max-width: 100%;
    width: 100%;
    max-height: 95vh;
    padding: 14px 10px 18px;
  }
  .detalle-layout {
    flex-direction: column;
    height: auto;
  }
  .detalle-left {
    min-width: 0;
    border-radius: 10px;
  }
  .detalle-right {
    max-height: none;
  }
}

/* ===== Conversaciones (Mensajes) ===== */
/* ===== Chat / mensajes ===== */
.chat-container {
  display: flex;
  /* sin altura fija, que la página pueda scrollear */
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}



.chat-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  overflow: hidden;
}

.messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f9fafb;
}

.message-form {
  border-top: 1px solid #e5e7eb;
  padding: 10px 14px;
  background: #fff;
}

.chat-list {
  width: 280px;
  border-right: 1px solid #ddd;
  overflow-y: auto;
  background: #fafafa;
}
.search-messages {
  padding: 10px;
  border-bottom: 1px solid #eee;
}
.search-messages input {
  width: 100%; padding: 8px 12px;
  border-radius: 20px; border: 1px solid #ddd;
  font-size: 14px;
}
.conversation {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-bottom: 1px solid #eee;
  cursor: pointer;

/* Botón de eliminar chat */
.conversation-delete {
  margin-left: auto;
  border: none;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  color: #999;
  padding: 4px 6px;
  border-radius: 999px;
}

.conversation-delete:hover {
  background: #ffe4e4;
  color: #e63946;
}

}
.conversation:hover { background: #f5f5f5; }
.avatars { display: flex; align-items: center; gap: 6px; }
.user-circle {
  width: 36px; height: 36px;
  border-radius: 50%; background: #243447;
  color: #fff; font-size: 14px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.product-circle {
  width: 36px; height: 36px;
  border-radius: 50%; overflow: hidden; position: relative;
}
.product-circle img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.product-circle .badge {
  position: absolute; top: -4px; right: -4px;
  background: red; color: #fff; font-size: 12px;
  padding: 2px 6px; border-radius: 50%; font-weight: bold;
}
.conversation-info h4 { margin: 0; font-size: 15px; font-weight: bold; }
.conversation-info p {
  margin: 0; font-size: 13px; color: #666;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-box {
  flex: 1; display: flex; flex-direction: column;
}
.chat-header {
  padding: 15px; border-bottom: 1px solid #ddd; font-weight: bold;
}
.messages {
  flex: 1; padding: 15px; overflow-y: auto; background: #fff;
}
.message { margin-bottom: 12px; }
.message .bubble {
  display: inline-block; padding: 8px 14px;
  border-radius: 18px; background: #eee; max-width: 70%;
}
.message.self { text-align: right; }
.message.self .bubble {
  background: #FF9900; color: #fff;
}
.message-form {
  display: flex;
  border-top: 1px solid #ddd;
  background: #fff;
  padding: 14px;
}

.message-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 15px;
}

.message-form button {
  background: #243447;
  color: #fff;
  border: none;
  padding: 12px 22px;
  margin-left: 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.message-form button:hover { background: #1b2834; }

/* ===== Responsive Chat ===== */
@media (max-width: 768px) {
  .chat-container { flex-direction: column; }
  .chat-list { width: 100%; max-height: 200px; }
  .chat-box { flex: 1; }
}

/* ========================= NUEVO: Perfil IG =========================== */
/* ===================================================================== */
.profile-header {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.profile-avatar-wrap { display:flex; align-items:center; justify-content:center; }
.profile-avatar {
  width: 140px; height: 140px; border-radius: 50%; object-fit: cover;
  border: 3px solid #eee; background: #fafafa;
}
.profile-meta {}
.profile-userline { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.profile-username { color:#666; font-weight:bold; }
.profile-bio { margin: 8px 0 12px; color:#444; }
.profile-stats { display:flex; gap:16px; flex-wrap:wrap; color:#243447; }
.profile-stats strong { color:#000; }
.profile-actions { margin-top: 10px; display:flex; gap:10px; flex-wrap:wrap; }
.profile-actions .btn {
  padding: 10px 16px; border-radius: 8px; border:1px solid #ddd;
  background:#fff; cursor:pointer; font-weight:bold;
}
.profile-actions .btn.primary { background:#FF9900; color:#fff; border:none; }
.profile-actions .btn.danger { background:#e63946; color:#fff; border:none; }

.profile-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.profile-grid .grid-item {
  position: relative; width: 100%; padding-top: 100%;
  background:#eee; border-radius: 8px; overflow:hidden; cursor:pointer;
}
.profile-grid .grid-item img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
}

@media (max-width: 768px) {
  .profile-header {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-stats { justify-content:center; }
  .profile-actions { justify-content:center; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Páginas sin sidebar */
body.no-sidebar .navbar { left: 0; width: 100%; }
body.no-sidebar .main-layout { margin-left: 0; width: 100%; }

.clear-filters-btn {
  width: 100%;
  background: #f3f3f3;
  border: 1px solid #ccc;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 14px;
}

.clear-filters-btn:hover {
  background: #eaeaea;
}

/* Texto de resumen de resultados */
.results-info {
  font-size: 14px;
  color: #555;
  margin: 10px 0 15px 0;
}
.admin-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
  gap:10px;
}
.admin-tag {
  padding:4px 10px;
  border-radius:999px;
  background:#111827; /* azul oscuro institucional */
  color:#fff;
  font-size:12px;
  font-weight:bold;
}
.admin-pubs-table {
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 2px 6px rgba(0,0,0,0.08);
}
.admin-pubs-table th,
.admin-pubs-table td {
  padding:10px 12px;
  border-bottom:1px solid #eee;
  font-size:13px;
}
.admin-pubs-table th {
  background:#f3f4f6;
  text-align:left;
}
.admin-badge {
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  background:#e5e7eb;
}
.admin-delete-btn {
  border:none;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  background:#fee2e2;
  color:#b91c1c;
  cursor:pointer;
}
.admin-delete-btn:hover {
  background:#fecaca;
}
.seller-info-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 8px;
  border-radius: 10px;
  background: #f4f4f4;
  transition: background 0.2s;
}

.seller-info-link:hover {
  background: #e0e0e0;
}

.seller-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.seller-name {
  font-weight: 600;
  color: #111;
  margin: 0;
}

.seller-username {
  margin: 0;
  color: #666;
  font-size: 13px;
}

.seller-nopublic {
  margin: 0;
  color: #999;
  font-size: 13px;
}
/* Fix visual del input del chat */
.message-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
  background: #ffffff;
  pointer-events: auto;
}

.message-form button {
  padding: 10px 24px;
  border-radius: 999px;
}
