/* Importar fuente Lato */
@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Lato", sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

.marketplace-map-container {
  padding: 1rem 0;
  font-family: "Lato", sans-serif;
}

/* Título principal */
.marketplace__title {
  margin: 0px 0 24px 0;
  color: #4f4f4f;
  text-align: center;
  font-family: "Monstro Solid", "Lato", sans-serif;
  font-size: 56px;
  font-weight: 900;
  line-height: 100%;
}

.marketplace__title b {
  color: #1a5c98;
  font-family: "Monstro Solid", "Lato", sans-serif;
  font-size: 56px;
  font-weight: 900;
  line-height: 100%;
}

/* FILTROS - Diseño horizontal simple como en la imagen */
.marketplace-filters {
  background: #fff;
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
  margin: 0 2rem 0.5rem 2rem;
  border: 1px solid #e5e7eb;
}

.filters-title {
  display: none; /* Ocultar completamente el título */
}

.filters-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: auto;
}

.filter-label {
  display: none; /* Ocultar todos los labels */
}

.filter-select {
  padding: 0.5rem 0.75rem;
  padding-right: 2rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: "Lato", sans-serif;
  background: #fff;
  color: #374151;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1em 1em;
  min-width: 140px;
}

.filter-select:focus {
  outline: none;
  border-color: #1a5c98;
  box-shadow: 0 0 0 3px rgba(26, 92, 152, 0.1);
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-direction: row;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: "Lato", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  border: 1px solid transparent;
}

.filter-btn--primary {
  background: #e6e6e6;
  color: #1a5c98;
  border: 1px solid #d1d5db;
}

.filter-btn--primary:hover {
  background: #d1d5db;
  border-color: #1a5c98;
  color: #16497b;
}

.filter-btn--secondary {
  background: #fff;
  color: #6b7280;
  border: 1px solid #d1d5db;
  min-width: 40px;
  padding: 0.5rem;
}

.filter-btn--secondary:hover {
  background: #f9fafb;
  color: #374151;
  border-color: #9ca3af;
}

/* Botón desplegable para móvil/tablet */
.filters-toggle-btn {
  display: none;
  width: 100%;
  background: #ffffff;
  color: #1a5c98;
  border: 1px solid rgba(26, 92, 152, 0.25);
  padding: 0.875rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: "Lato", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.filters-toggle-btn:hover {
  background: #f1f5f9;
  color: #1a5c98;
}

.filters-toggle-btn .toggle-icon {
  transition: transform 0.2s ease;
}

.filters-toggle-btn.active .toggle-icon {
  transform: rotate(180deg);
}

/* TOGGLE DE VISTA MAPA/LISTA - Iconos compactos en línea con filtros */
.view-toggle-inline {
  display: flex;
  gap: 2px;
  align-items: center;
}

.view-btn-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #d1d5db;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  gap: 4px;
}

.view-btn-inline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
  text-decoration: none;
}

.view-btn-inline--active {
  background: #1a5c98;
  border-color: #1a5c98;
  color: #fff;
}

.view-btn-inline--active:hover {
  background: #16497b;
  border-color: #16497b;
  color: #fff;
}

.view-btn-inline .material-symbols-outlined {
  font-size: 18px;
}

/* Ocultar texto en desktop */
.view-btn-text {
  display: none;
}

/* Tooltips para los botones de vista */
.view-btn-inline::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
}

.view-btn-inline::before {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 4px solid #1f2937;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1001;
  pointer-events: none;
}

.view-btn-inline:hover::after,
.view-btn-inline:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Separador vertical entre alternador de vista y filtros */
.filters-separator-vertical {
  width: 1px;
  height: 24px;
  background: #e5e7eb;
  align-self: center;
}

/* LAYOUT PRINCIPAL - Desktop: mapa como enfoque principal */
.marketplace-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  height: 70vh;
  min-height: 500px;
  padding: 0 2rem;
  max-width: none;
  margin: 0;
}

/* PANEL DE ANUNCIOS */
.marketplace-listings {
  background: white;
  border-radius: 16px;
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.listings-header {
  display: none;
}

.listings-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  font-family: "Lato", sans-serif;
  margin: 0;
}

.listings-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.listings-grid {
  display: grid;
  gap: 1rem;
}

/* ESTILOS PARA VISTA DE LISTA */
.publication-grid {
  display: grid;
  gap: 1.5rem;
  padding: 2rem;
  width: 100%;
  margin: 0;
}

/* Sistema de grid fluido y progresivo */
/* Móvil pequeño */
@media (max-width: 480px) {
  .publication-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }
}

/* Móvil grande */
@media (min-width: 481px) and (max-width: 640px) {
  .publication-grid {
    grid-template-columns: 1fr;
    padding: 1.25rem;
    gap: 1.25rem;
  }
}

/* Tablet pequeña */
@media (min-width: 641px) and (max-width: 768px) {
  .publication-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    padding: 1.5rem;
    gap: 1.5rem;
  }
}

/* Tablet grande */
@media (min-width: 769px) and (max-width: 1024px) {
  .publication-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    padding: 1.5rem;
    gap: 1.5rem;
  }
}

/* Desktop pequeño */
@media (min-width: 1025px) and (max-width: 1200px) {
  .publication-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    padding: 2rem;
    gap: 1.5rem;
  }
}

/* Desktop mediano */
@media (min-width: 1201px) and (max-width: 1400px) {
  .publication-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    padding: 2rem;
    gap: 1.75rem;
  }
}

/* Desktop grande */
@media (min-width: 1401px) and (max-width: 1600px) {
  .publication-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    padding: 2rem;
    gap: 2rem;
  }
}

/* Desktop ultra ancho */
@media (min-width: 1601px) and (max-width: 1920px) {
  .publication-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    padding: 2.5rem;
    gap: 2rem;
  }
}

/* Pantallas 4K y superiores */
@media (min-width: 1921px) {
  .publication-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    padding: 3rem;
    gap: 2rem;
  }
}

/* Ajustes responsivos para las tarjetas individuales - SOLO PARA VISTA DE LISTA */
.publication-grid .publication-card {
  width: 100%;
  min-height: fit-content;
  display: flex;
  flex-direction: column;
}

/* Optimización de imagen para diferentes tamaños - SOLO PARA VISTA DE LISTA */
.publication-grid .publication-card .publication-image {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

/* Ajustes progresivos para las tarjetas según el tamaño de pantalla - SOLO PARA VISTA DE LISTA */
@media (min-width: 1401px) {
  .publication-grid .publication-card {
    min-height: 380px;
  }

  .publication-grid .publication-card .publication-image {
    height: 200px;
  }

  .publication-grid .publication-card .publication-title {
    font-size: 1.05rem;
  }

  .publication-grid .publication-card .publication-price {
    font-size: 1.15rem;
  }
}

@media (min-width: 1601px) {
  .publication-grid .publication-card {
    min-height: 400px;
  }

  .publication-grid .publication-card .publication-image {
    height: 220px;
  }

  .publication-grid .publication-card .publication-title {
    font-size: 1.1rem;
  }

  .publication-grid .publication-card .publication-price {
    font-size: 1.2rem;
  }
}

@media (min-width: 1921px) {
  .publication-grid .publication-card {
    min-height: 420px;
  }

  .publication-grid .publication-card .publication-image {
    height: 240px;
  }

  .publication-grid .publication-card .publication-title {
    font-size: 1.15rem;
  }

  .publication-grid .publication-card .publication-price {
    font-size: 1.25rem;
  }
}

/* PANEL DEL MAPA */
.marketplace-map {
  background: white;
  border-radius: 16px;
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  position: relative;
}

.map-header {
  display: none;
}

.map-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  font-family: "Lato", sans-serif;
  margin: 0;
}

.map-container {
  height: 100%;
  background: #f0f0f0;
  font-family: "Lato", sans-serif;
}

/* Estilos específicos para Leaflet */
#map-container {
  height: 100%;
  border-radius: 16px;
}

/* Controles de zoom más suaves */
.leaflet-control-zoom a {
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1px solid #e6e6e6 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  color: #333 !important;
}

.leaflet-control-zoom a:hover {
  background: #f8f9fa !important;
  border-color: #d1d5db !important;
}

/* Tooltip limpio y minimalista */
.leaflet-tooltip {
  background: #ffffff !important;
  border: 1px solid #e6e6e6 !important;
  color: #222 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  padding: 6px 10px !important;
  font-weight: 500 !important;
  font-family: "Lato", sans-serif !important;
  font-size: 0.875rem !important;
}

/* Popup minimalista */
.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid #e6e6e6 !important;
}

.leaflet-popup-tip {
  background: #ffffff !important;
  border: 1px solid #e6e6e6 !important;
}

/* Estilos para popup content */
.marker-popup .popup-info p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 14px;
  color: #666;
}

.marker-popup .popup-info .material-symbols-outlined {
  font-size: 16px;
  color: #1a5c98;
}

/* Botón de pantalla completa */
.fullscreen-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  background: white;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-btn:hover {
  background: #f5f5f5;
  transform: scale(1.05);
}

.fullscreen-btn .material-symbols-outlined {
  font-size: 20px;
  color: #1a5c98;
}

/* Estilos para pantalla completa */
.map-container.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: white;
}

.map-container.fullscreen #map {
  width: 100% !important;
  height: 100% !important;
}

.map-container.fullscreen .fullscreen-btn .material-symbols-outlined {
  content: "fullscreen_exit";
}

/* ESTILOS PARA MARKERS PERSONALIZADOS */
.custom-location-marker {
  background: none !important;
  border: none !important;
}

.marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: transform 0.2s ease;
}

.marker-pin:hover {
  transform: scale(1.1);
}

/* ESTILOS PARA BOTONES DE ZOOM - Quitar margen */
.leaflet-control-zoom {
  margin: 0 !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-zoom a {
  margin: 0 !important;
  border: none !important;
  background: white !important;
  color: #333 !important;
  font-weight: bold !important;
  font-size: 16px !important;
  line-height: 1 !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.leaflet-control-zoom a:hover {
  background: #f5f5f5 !important;
  color: #1a5c98 !important;
}

/* ESTILOS PARA CLUSTERING DE MARCADORES */
.marker-cluster {
  background-clip: padding-box;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.marker-cluster div,
.marker-cluster .cluster-inner {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  text-align: center;
  border-radius: 50%;
  font: 12px "Lato", "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-weight: bold;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
}

.marker-cluster span {
  line-height: 1;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.marker-cluster-small {
  background-color: #1a5c98;
}
.marker-cluster-small div,
.marker-cluster-small .cluster-inner {
  background-color: #1a5c98;
}

.marker-cluster-medium {
  background-color: #1a5c98;
}
.marker-cluster-medium div,
.marker-cluster-medium .cluster-inner {
  background-color: #1a5c98;
}

.marker-cluster-large {
  background-color: #1a5c98;
}
.marker-cluster-large div,
.marker-cluster-large .cluster-inner {
  background-color: #1a5c98;
}

/* Animación para clusters */
.marker-cluster {
  transition: all 0.3s ease;
}

.marker-cluster:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Sobrescribir estilos por defecto de MarkerCluster */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: all 0.3s ease-out;
}

/* ESTILOS DE LAS TARJETAS - Copiados del archivo original */
.publication-card {
  max-width: 100%;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  font-family: "Lato", sans-serif;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.publication-card__wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.publication-card__image {
  position: relative;
  overflow: hidden;
  height: 200px;
  width: 100%;
}

.publication-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.publication-card__tags {
  position: absolute;
  bottom: 15px;
  right: 15px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 12px;
  font-size: 0.75rem;
  border-radius: 999px;
  font-weight: 500;
  background: #e2e8f0;
  color: #1e293b;
  white-space: nowrap;
  font-family: "Lato", sans-serif;
}

.tag--sex {
  background: #f1f5f9;
  color: #334155;
}

.tag--breed {
  background: #e9f3fb;
  color: #1a5c98;
}

.tag--type {
  background: #fef3c7;
  color: #d97706;
}

.publication-card__content {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}

.publication-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.publication-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  font-family: "Lato", sans-serif;
  flex: 1;
  line-height: 1.3;
  word-break: break-word;
  min-width: 0;
}

.publication-card__price-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex-shrink: 0;
  min-width: 80px;
}

.price-group__total {
  color: #1a5c98;
  font-weight: bold;
  font-size: 0.9375rem;
  font-family: "Lato", sans-serif;
  white-space: nowrap;
}

.price-group__per-kg {
  font-size: 0.8125rem;
  color: #64748b;
  font-family: "Lato", sans-serif;
  white-space: nowrap;
}

.publication-card__location,
.publication-card__origin {
  font-size: 0.8125rem;
  color: #4b5563;
  font-family: "Lato", sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
}

.publication-card__actions {
  padding: 1rem 1.25rem 1.5rem;
  margin-top: auto;
}

.btn-view-cattle {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 12px 0;
  background-color: #1a5c98;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: "Lato", sans-serif;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-view-cattle:hover {
  background-color: #16497b;
  color: #fff;
}

/* ESTILOS COMPACTOS PARA VISTA DE MAPA */
.marketplace-layout .marketplace-listings .publication-card {
  margin-bottom: 0.75rem;
}

.marketplace-layout .marketplace-listings .publication-card__image {
  height: 140px; /* Reducido de 200px */
}

.marketplace-layout .marketplace-listings .publication-card__content {
  padding: 0.5rem 1rem; /* Reducido de 1rem 1.25rem */
  gap: 0.2rem; /* Reducido de 0.625rem */
}

.marketplace-layout .marketplace-listings .publication-card__header {
  margin-bottom: 0.375rem; /* Reducido de 0.5rem */
  gap: 0.5rem; /* Reducido de 0.75rem */
}

.marketplace-layout .marketplace-listings .publication-card__title {
  font-size: 0.875rem; /* Reducido de 0.9375rem */
  line-height: 1.25; /* Reducido de 1.3 */
}

.marketplace-layout .marketplace-listings .publication-card__location,
.marketplace-layout .marketplace-listings .publication-card__origin {
  font-size: 0.75rem; /* Reducido de 0.8125rem */
  gap: 4px; /* Reducido de 6px */
}

.marketplace-layout .marketplace-listings .publication-card__location svg,
.marketplace-layout .marketplace-listings .publication-card__origin svg {
  width: 12px; /* Reducido de 16px para location, mantenido 12px para origin */
  height: 12px;
}

.marketplace-layout .marketplace-listings .publication-card__actions {
  padding: 0.2rem 0.5rem 0.5rem; /* Reducido de 1rem 1.25rem 1.5rem */
}

.marketplace-layout .marketplace-listings .btn-view-cattle {
  padding: 8px 0; /* Reducido de 12px 0 */
  font-size: 0.8125rem; /* Reducido de 0.875rem */
}

.marketplace-layout .marketplace-listings .price-group__total {
  font-size: 0.875rem; /* Reducido de 0.9375rem */
}

.marketplace-layout .marketplace-listings .price-group__per-kg {
  font-size: 0.75rem; /* Reducido de 0.8125rem */
}

.marketplace-layout .marketplace-listings .tag {
  padding: 3px 8px; /* Reducido de 4px 12px */
  font-size: 0.6875rem; /* Reducido de 0.75rem */
}

/* Optimizar espaciado del panel de listings */
.marketplace-layout .marketplace-listings .listings-content {
  padding: 0.75rem; /* Reducido de 1rem */
}

.marketplace-layout .marketplace-listings .listings-grid {
  gap: 0.75rem; /* Reducido de 1rem */
}

/* RESPONSIVE DESIGN */

/* Tablet y móvil */
@media (max-width: 1024px) {
  .marketplace__title {
    font-size: 44px;
  }

  .marketplace__title b {
    font-size: 44px;
  }

  /* Filtros como modal en móvil/tablet */
  .marketplace-filters {
    padding: 0;
    margin: 0 0.5rem 0.5rem 0.5rem;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    border: none;
  }

  .filters-toggle-btn {
    display: inline-flex;
  }

  .marketplace-filters .filters-content {
    background: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem; /* Reducido el padding */
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: none;
  }

  .marketplace-filters.show .filters-content {
    display: block;
  }

  .filters-title {
    display: none; /* Mantener oculto en móvil también */
  }

  .filters-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .filter-group {
    min-width: auto;
  }

  .filter-select {
    min-width: auto;
  }

  .filter-actions {
    margin-left: 0;
    justify-content: flex-start;
  }

  .filter-btn {
    flex: 0 0 auto;
  }

  /* Toggle de vista en móvil/tablet - botones con texto que ocupan todo el ancho */
  .view-toggle-inline {
    gap: 4px;
    width: 100%;
  }

  .view-btn-inline {
    width: auto;
    height: 40px; /* Altura más compacta */
    flex: 1; /* Ocupar todo el ancho disponible entre ambos */
    padding: 0 12px;
    justify-content: center;
  }

  .view-btn-inline .material-symbols-outlined {
    font-size: 18px;
  }

  /* Mostrar texto en móvil/tablet */
  .view-btn-text {
    display: inline;
    font-size: 14px;
    font-weight: 500;
    font-family: "Lato", sans-serif;
  }

  .filters-separator-vertical {
    display: none; /* Ocultar separador en móvil/tablet */
  }

  /* Ocultar tooltips en dispositivos táctiles para evitar problemas de UX */
  .view-btn-inline::after,
  .view-btn-inline::before {
    display: none;
  }

  .view-btn {
    min-width: 80px;
    padding: 0.5rem 0.75rem;
  }

  /* Layout: solo mapa en móvil/tablet */
  .marketplace-layout {
    grid-template-columns: 1fr;
    height: 60vh;
    padding: 0 0.5rem;
  }

  .marketplace-listings {
    display: none;
  }

  .marketplace-map {
    order: 1;
  }
}

@media (max-width: 768px) {
  .marketplace__title {
    font-size: 36px;
  }

  .marketplace__title b {
    font-size: 36px;
  }

  .marketplace-filters .filters-content {
    padding: 1rem 1.5rem;
  }

  .filter-actions {
    flex-direction: row;
  }

  .filter-btn {
    min-width: auto;
  }

  .marketplace-layout {
    height: 50vh;
    gap: 1rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .marketplace__title {
    font-size: 28px;
  }

  .marketplace__title b {
    font-size: 28px;
  }

  .publication-card__header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .publication-card__price-group {
    align-items: flex-start;
    text-align: left;
    min-width: auto;
  }
}

.leaflet-control-container .leaflet-top {
  top: 10px;
}

.leaflet-control-container .leaflet-left {
  left: 10px;
}

.leaflet-control-zoom.leaflet-bar.leaflet-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Estilos específicos para el control de capas de Leaflet */
.leaflet-control-layers {
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2) !important;
  background: #fff !important;
  border-radius: 5px !important;
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-layers-toggle {
  background-position: 50% 50% !important;
  background-repeat: no-repeat !important;
  background-color: white !important;
  border-radius: 4px !important;
}

.leaflet-control-layers-expanded {
  padding: 6px 10px 6px 6px !important;
  color: #333 !important;
  background: #fff !important;
}

.leaflet-control-layers-list {
  margin: 0 !important;
  padding: 0 !important;
}

.leaflet-control-layers-selector {
  margin-top: 2px !important;
  position: relative !important;
  top: 1px !important;
  width: auto !important;
  height: auto !important;
  display: inline !important;
  cursor: pointer !important;
}

.leaflet-control-layers label {
  display: block !important;
  padding: 5px !important;
  margin-bottom: 0 !important;
  font-weight: normal !important;
  font-size: 13px !important;
  cursor: pointer !important;
  border-radius: 3px !important;
}

.leaflet-control-layers label:hover {
  background-color: #f4f4f4 !important;
}

.leaflet-control-layers input[type="radio"] {
  width: auto !important;
  height: auto !important;
  margin-right: 5px !important;
  vertical-align: middle !important;
  cursor: pointer !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: 1px solid #999 !important;
}

.leaflet-control-layers span {
  vertical-align: middle !important;
  font-size: 13px !important;
  color: #333 !important;
}
