/* ===================== */
/* DÓNDE COMPRAR - BASE  */
/* ===================== */

:root {
  --jasic-red: #d40000;
  --jasic-red-dark: #b80000;
  --surface: #111;
  --surface-2: #161616;
  --line: rgba(255,255,255,0.10);
  --text-soft: rgba(255,255,255,0.75);
  --text-muted: rgba(255,255,255,0.5);
}

.dc-hero,
.dc-section,
.dc-cta {
  background-color: #000;
  color: #fff;
}

/* ===================== */
/* HERO */
/* ===================== */

.dc-hero {
  position: relative;
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* halo rojo sutil detrás del título */
.dc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(212,0,0,0.28), transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 100%, rgba(212,0,0,0.10), transparent 70%);
}

/* grilla técnica de fondo */
.dc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 40%, transparent 100%);
}

.dc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(212,0,0,0.5);
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ff5a5a;
  margin-bottom: 22px;
}

.dc-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jasic-red);
  box-shadow: 0 0 0 4px rgba(212,0,0,0.25);
}

.dc-hero h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.dc-hero p {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-soft);
}

/* ===================== */
/* STATS */
/* ===================== */

.dc-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 45px;
}

.dc-stat {
  min-width: 160px;
  padding: 18px 26px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

.dc-stat strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
}

.dc-stat span {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ===================== */
/* MAPA NACIONAL */
/* ===================== */

.dc-map-section {
  background: #000;
  padding: 40px 0 10px;
}

.dc-map-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 30px 80px -40px rgba(212,0,0,0.35);
}

#dc-map {
  height: 560px;
  width: 100%;
  background: #0b0b0b;
}

/* Mosaicos OSM en modo oscuro (invertidos + rotación de tono) */
.dc-tiles-dark {
  filter: invert(1) hue-rotate(180deg) brightness(0.82) contrast(0.95) saturate(0.55) grayscale(0.25);
}

/* Leaflet: controles al estilo del sitio */
.leaflet-container { font-family: inherit; }
.leaflet-bar { border: 1px solid rgba(255,255,255,0.15) !important; box-shadow: none !important; }
.leaflet-bar a {
  background: #111 !important;
  color: #fff !important;
  border-bottom-color: rgba(255,255,255,0.12) !important;
}
.leaflet-bar a:hover { background: #1a1a1a !important; }
.leaflet-control-attribution {
  background: rgba(0,0,0,0.6) !important;
  color: rgba(255,255,255,0.45) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: rgba(255,255,255,0.65) !important; }
.leaflet-popup-content-wrapper {
  background: #161616;
  color: #fff;
  border: 1px solid rgba(212,0,0,0.5);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.leaflet-popup-content { margin: 12px 16px; font-size: 0.9rem; line-height: 1.4; }
.leaflet-popup-tip { background: #161616; }
.leaflet-tooltip {
  background: #161616; color: #fff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; font-size: 0.8rem;
}
.leaflet-tooltip-top::before { border-top-color: rgba(255,255,255,0.2); }

/* Punto rojo con pulso */
.dc-marker { background: transparent; border: 0; }
.dc-marker-dot {
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--jasic-red);
  border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(212,0,0,0.6);
  animation: dc-pulse 2.4s ease-out infinite;
  transition: transform 0.2s ease;
}
.dc-marker:hover .dc-marker-dot,
.dc-marker.is-active .dc-marker-dot {
  transform: scale(1.5);
  animation: none;
  box-shadow: 0 0 0 6px rgba(212,0,0,0.35);
}
@keyframes dc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(212,0,0,0.6); }
  70%  { box-shadow: 0 0 0 14px rgba(212,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(212,0,0,0); }
}

.dc-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-soft);
}
.dc-map-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 7px;
  border: 2px solid #fff;
  vertical-align: -1px;
}
.dc-map-legend .dot.red  { background: var(--jasic-red); }
.dc-map-legend .dot.blue { background: #3b82f6; }
.dc-map-legend .hint { margin-left: auto; color: var(--text-muted); }

/* ===================== */
/* INDICADOR DE CERCANÍA */
/* ===================== */

.dc-near {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.dc-near svg { width: 15px; height: 15px; flex: none; }
.dc-near.ok  { color: var(--text-soft); }
.dc-near.ok svg { color: var(--jasic-red); }
.dc-near strong { color: #fff; }
.dc-near small { color: var(--text-muted); }
.dc-near.loading svg { animation: dc-spin 1.6s linear infinite; }
.dc-near.gps { color: var(--text-soft); }
.dc-near.gps svg { color: #3b82f6; }

.dc-geo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0 0;
  padding: 9px 16px;
  background: transparent;
  border: 1px solid rgba(59,130,246,0.6);
  border-radius: 30px;
  color: #8ec0ff;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dc-geo svg { width: 15px; height: 15px; }
.dc-geo:hover { background: rgba(59,130,246,0.12); color: #fff; border-color: #3b82f6; }
.dc-geo:disabled { opacity: 0.6; cursor: wait; }
.dc-geo.loading svg { animation: dc-spin 1.2s linear infinite; }
@keyframes dc-spin { to { transform: rotate(360deg); } }

/* Ordenar por ciudad ingresada */
.dc-ciudad {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.dc-ciudad label { white-space: nowrap; }
.dc-ciudad input {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 280px;
  height: 38px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 30px;
  color: #fff;
  font: inherit;
}
.dc-ciudad input::placeholder { color: var(--text-muted); }
.dc-ciudad input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-color: #3b82f6; }
.dc-ciudad button {
  height: 38px;
  padding: 0 16px;
  background: var(--jasic-red);
  border: none;
  border-radius: 30px;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.dc-ciudad button:hover { filter: brightness(1.1); }

.dc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.dc-card-top .dc-card-badge { margin-bottom: 0; }
.dc-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.dc-km {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
}
.dc-card.nearest .dc-km { color: #ff6b6b; }
.dc-card.nearest { border-color: rgba(212,0,0,0.45); }

.dc-card-social {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.dc-card-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-soft);
  transition: all 0.2s ease;
}
.dc-card-social a:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.06); }
.dc-card-social svg { width: 15px; height: 15px; }

/* ===================== */
/* BARRA DE FILTROS */
/* ===================== */

.dc-toolbar-wrap {
  position: sticky;
  top: 90px;              /* altura del header */
  z-index: 900;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.dc-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
}

.dc-search {
  position: relative;
}

.dc-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  pointer-events: none;
}

.dc-search input,
.dc-select select {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dc-select {
  position: relative;
}

.dc-select select {
  padding-left: 16px;
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.dc-select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.dc-select select option {
  background: #111;
  color: #fff;
}

.dc-search input::placeholder {
  color: var(--text-muted);
}

.dc-search input:focus-visible,
.dc-select select:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-color: var(--jasic-red);
  box-shadow: 0 0 0 3px rgba(212,0,0,0.2);
}

.dc-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dc-chip {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 30px;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dc-chip:hover {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

.dc-chip.active {
  background: var(--jasic-red);
  border-color: var(--jasic-red);
  color: #fff;
}

/* ===================== */
/* RESULTADOS + MAPA */
/* ===================== */

.dc-section {
  padding: 50px 0 90px;
}

.dc-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.dc-results-head h2 {
  font-size: 1.5rem;
}

.dc-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.dc-count strong {
  color: #fff;
}


/* ---------- Lista ---------- */

.dc-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dc-empty {
  grid-column: 1 / -1;
}

.dc-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 26px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  animation: dc-in 0.4s ease both;
}

@keyframes dc-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dc-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--jasic-red);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dc-card:hover,
.dc-card.active {
  background: var(--surface-2);
  border-color: rgba(212,0,0,0.5);
  transform: translateY(-3px);
}

.dc-card:hover::before,
.dc-card.active::before {
  opacity: 1;
}

.dc-card-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.dc-card-badge.oficial   { background: rgba(212,0,0,0.18); color: #ff6b6b; }
.dc-card-badge.venta     { background: rgba(255,255,255,0.08); color: var(--text-soft); }
.dc-card-badge.servicio  { background: rgba(0,160,255,0.15); color: #6ec6ff; }

.dc-card h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.dc-card-loc {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.dc-card-detail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.93rem;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.dc-card-detail svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  stroke: var(--jasic-red);
}

.dc-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.dc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.dc-btn svg {
  width: 16px;
  height: 16px;
}

.dc-btn.wa {
  background: #25d366;
  color: #062b14;
}

.dc-btn.wa:hover {
  background: #1fb85a;
}

.dc-btn.ghost {
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.dc-btn.ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.06);
}

/* ---------- Vacío ---------- */

.dc-empty {
  padding: 60px 30px;
  text-align: center;
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 18px;
  color: var(--text-soft);
}

.dc-empty strong {
  display: block;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 8px;
}

.dc-empty a {
  color: var(--jasic-red);
  font-weight: 600;
}

/* ===================== */
/* CTA FINAL */
/* ===================== */

.dc-cta {
  padding: 90px 0;
  text-align: center;
  background: linear-gradient(135deg, #0b0b0b, #000);
  border-top: 1px solid var(--line);
}

.dc-cta h2 {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.dc-cta p {
  max-width: 600px;
  margin: 0 auto 30px;
  color: var(--text-soft);
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */

@media (max-width: 1000px) {
  .dc-list {
    grid-template-columns: 1fr;
  }

  .dc-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .dc-chips {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  /* el header pasa a dos filas en mobile: liberamos el sticky */
  .dc-toolbar-wrap {
    position: static;
  }
}

@media (max-width: 600px) {
  #dc-map { height: 380px; }
  .dc-map-section { padding-top: 24px; }
  .dc-map-legend .hint { display: none; }

  .dc-hero {
    padding: 70px 0 60px;
  }

  .dc-hero h1 {
    font-size: 2.1rem;
  }

  .dc-stat {
    min-width: 0;
    flex: 1 1 40%;
    padding: 14px 18px;
  }

  .dc-stat strong {
    font-size: 1.5rem;
  }

  .dc-toolbar {
    grid-template-columns: 1fr;
  }

  .dc-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .dc-card-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dc-section {
    padding: 40px 0 70px;
  }

  .dc-cta h2 {
    font-size: 1.8rem;
  }
}

/* ===================== */
/* FOOTER (esta página)  */
/* ===================== */

.footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Botón "Ver en el mapa" (acceso por teclado a cada punto, ACC-07) */
button.dc-btn { background: transparent; font-family: inherit; cursor: pointer; }
.dc-ver svg { stroke: currentColor; fill: none; }
.dc-btn { min-height: 44px; }
