/*
 * tiendas.css · estilos compartidos de las paginas de /tiendas/
 * Rediseño: contraste real, pesos DM Sans 400/500/600, jerarquia por peso y tamaño.
 * Paleta base: fondo claro, negro #0a0a09, oro #C4A96B (solo acento decorativo,
 * nunca texto sobre claro porque el oro da ~2.2:1 y reprueba 4.5:1).
 * El bloque del mapa D3 se conserva sin cambios.
 */
:root {
  --white:  #FAFAFA;
  --cream:  #F1EEE8;
  --beige:  #E8E4DD;
  --ink:    #0a0a09;              /* texto principal, negro real */
  --muted:  #4a4a48;             /* texto secundario, minimo permitido (~8:1) */
  --gold:   #C4A96B;
  --line:   rgba(10,10,9,0.15);   /* bordes que sí se ven */
  --line-strong: rgba(10,10,9,0.28);
  --sans:   'DM Sans', system-ui, sans-serif;
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }
html, body { overscroll-behavior: none; }
body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
::selection { background: rgba(196,169,107,0.35); color: var(--ink); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 48px;
  background: rgba(250,250,250,0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

/* ── LAYOUT ── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.page-head { padding: 150px 0 56px; border-bottom: 1px solid var(--line); }
main { min-height: 60vh; }

.breadcrumb {
  font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 26px;
}
.breadcrumb a { color: var(--ink); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 8px; color: var(--muted); }
.breadcrumb .current { color: var(--muted); }

/* Eyebrow: negro + regla dorada decorativa (el oro no va como texto sobre claro). */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 20px; display: block;
}
.eyebrow::after {
  content: ""; display: block; width: 30px; height: 2px;
  background: var(--gold); margin-top: 12px;
}

h1.title {
  font-family: var(--sans); font-weight: 600; font-style: normal;
  font-size: clamp(44px, 7vw, 84px); line-height: 1.02; letter-spacing: -0.025em;
  color: var(--ink);
}
.bluf {
  font-size: clamp(18px, 2vw, 21px); font-weight: 400; line-height: 1.55; color: var(--ink);
  max-width: 640px; margin-top: 26px;
}

/* ── SECTIONS ── */
.section { padding: 68px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 30px; display: block;
}

/* ── CITY / STORE GRID ── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-strong); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white); padding: 34px 30px; display: flex; flex-direction: column;
  min-height: 200px; transition: background 0.2s;
}
a.card:hover { background: var(--cream); }
.card-city { font-family: var(--sans); font-weight: 600; font-size: 27px; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
.card-store-name { font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.card-meta { font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 10px; line-height: 1.55; }
.card-count {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); margin-top: auto; padding-top: 24px;
}
.card-arrow { margin-top: auto; padding-top: 24px; font-size: 14px; font-weight: 500; color: var(--ink); letter-spacing: 0.03em; }

/* ── STORE DETAIL ── */
.store-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; }
.store-main { }
.prose { font-size: 17px; font-weight: 400; line-height: 1.7; color: var(--ink); max-width: 640px; }
.prose p { margin-bottom: 18px; }

/* Info práctica: lo más legible de la página (dirección, local, teléfono, horario). */
.info-block { border: 1px solid var(--line-strong); padding: 8px 30px; background: var(--cream); }
.info-row { padding: 20px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 7px;
}
.info-value { font-size: 19px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.info-value a { color: var(--ink); border-bottom: 1px solid var(--line-strong); }
.info-value a:hover { border-color: var(--ink); }
.pendiente { color: var(--muted); font-weight: 400; font-style: italic; }

.btn {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 16px 30px; border: 1.5px solid var(--ink); color: var(--ink);
  transition: background 0.2s, color 0.2s; margin-top: 24px;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn.disabled { border-color: var(--line); color: var(--muted); pointer-events: none; }

/* ── BRAND GRID (/marcas/) ── */
/* Reposo: nombre + país, retícula uniforme en las 41 (sin logo). Hover: el nombre se
   desvanece y el logo aparece en su lugar (crossfade 0.3s); el país queda fijo. Móvil
   (sin hover): el logo reemplaza al nombre cuando existe. Logo normalizado por ancho
   (alto acotado) y forzado a negro real con filter: brightness(0). */
.marca-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.marca {
  background: var(--white); min-height: 168px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 30px 22px; text-align: center;
  transition: background 0.25s ease;
}
.marca:hover { background: var(--cream); }
.marca-link { text-decoration: none; color: inherit; cursor: pointer; }

/* Zona de intercambio: nombre y logo ocupan el mismo lugar; uno cruza al otro. */
.marca-swap { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 34px; }
.marca-nombre { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); transition: opacity 0.3s ease, color 0.25s ease; }
.marca-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: auto; height: auto; max-width: 120px; max-height: 32px; object-fit: contain;
  filter: brightness(0);
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.marca-pais {
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); transition: color 0.25s ease;
}
.marca-link:hover .marca-pais { color: var(--ink); }
/* Celdas sin logo: el nombre reacciona al hover (las que sí tienen logo lo intercambian). */
.marca-link:not(.marca-has-logo):hover .marca-nombre { color: var(--gold); }
/* Hover en celdas con logo: nombre fuera, logo dentro. */
.marca-has-logo:hover .marca-nombre { opacity: 0; }
.marca-has-logo:hover .marca-logo { opacity: 1; }

/* Móvil / dispositivos sin hover: el logo se muestra siempre cuando existe. */
@media (hover: none) {
  .marca-has-logo .marca-nombre { opacity: 0; }
  .marca-has-logo .marca-logo { opacity: 1; }
}
@media (max-width: 900px) { .marca-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .marca-grid { grid-template-columns: 1fr; } }

/* ── MARCA PAGE (/marcas/{marca}/) ── */
/* Las imágenes se incluyen solo si el archivo existe (ver build-tiendas.mjs).
   Si falta, no se emite el bloque, así que la sección queda completa sin hueco. */
.maison { max-width: 720px; }
.marca-hero { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--beige); }
.marca-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.editorial-band { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--beige); }
.editorial-band img { width: 100%; height: 100%; object-fit: cover; display: block; }
.col-list { display: grid; gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); }
.col-item { background: var(--white); }
.col-item.has-media { display: grid; grid-template-columns: 40% 1fr; }
.col-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--beige); }
.col-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.col-text { padding: 28px 30px; }
.col-text h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 8px; }
.col-text p { font-size: 16px; font-weight: 400; line-height: 1.6; color: var(--ink); }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); padding: 26px 0; }
.faq-item h3 { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.faq-item p { font-size: 16px; font-weight: 400; line-height: 1.6; color: var(--ink); max-width: 720px; }
.obs-list { border-top: 1px solid var(--line); }
.obs-item { border-bottom: 1px solid var(--line); padding: 24px 0; }
.obs-item h3 { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.obs-item p { font-size: 16px; line-height: 1.6; max-width: 720px; }
@media (max-width: 768px) { .col-item.has-media { grid-template-columns: 1fr; } }

/* ── MARCA × CIUDAD (/marcas/{marca}/{ciudad}/) ── */
/* Sección local compacta pero informativa: por tienda, la zona de la ciudad que cubre,
   cómo llegar y a quién le conviene, más una línea de datos (local, horario, teléfono,
   Maps). Compacta a propósito para que el grueso único por marca (BLUF y FAQs) pese más. */
.local-lead { font-size: 17px; line-height: 1.7; color: var(--ink); max-width: 720px; margin-bottom: 22px; }
.nota-disponibilidad { font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 640px; margin-top: 26px; }
.local-list { display: grid; gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); }
.local-item { background: var(--white); padding: 22px 28px; }
.local-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.local-nombre { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.local-zona { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.local-desc { font-size: 15px; line-height: 1.6; color: var(--ink); max-width: 660px; margin-bottom: 12px; }
.local-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 14px; font-size: 13px; color: var(--muted); }
.local-meta a { color: var(--ink); border-bottom: 1px solid var(--line-strong); }
.local-meta a:hover { border-color: var(--ink); }
a.local-nombre { text-decoration: none; }
a.local-nombre:hover { color: var(--gold); }

/* H2 real por sección (señal SEO), con el eyebrow .section-label como kicker arriba. */
.section-title { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; color: var(--ink); margin: 6px 0 20px; max-width: 760px; }
.text-link { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line-strong); }
.text-link:hover { border-color: var(--ink); color: var(--gold); }

/* Marcas comparables en la misma ciudad (enlazado interno del cluster). */
.rel-brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); }
.rel-brand { background: var(--white); padding: 24px 22px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; transition: background 0.2s; }
.rel-brand:hover { background: var(--cream); }
.rel-brand-name { font-size: 18px; font-weight: 600; color: var(--ink); }
.rel-brand:hover .rel-brand-name { color: var(--gold); }
.rel-brand-city { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) { .rel-brand-grid { grid-template-columns: 1fr; } }

/* ── GALLERY (fotos reales) ── */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.gallery a.gphoto { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--beige); }
.gallery a.gphoto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease-smooth); }
.gallery a.gphoto:hover img { transform: scale(1.03); }

/* ── EMBED MAP ── */
.map-embed { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line-strong); margin-top: 12px; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(0.1); }

/* ── D3 HUB MAP (sin cambios) ── */
#mexico-map { width: 100%; }
.mexico-svg { width: 100%; max-width: 760px; margin: 0 auto; display: block; }
.city-pulse { animation: mapPulse 2.5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mapPulse { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(4); opacity: 0; } }
/* Los puntos siempre visibles; las etiquetas solo en hover/focus para que no colisionen
   en el centro del país. Los nombres también están en las cards de abajo. */
.mexico-svg .map-label { opacity: 0; transition: opacity 0.18s var(--ease-smooth); pointer-events: none; }
.mexico-svg .map-city:hover .map-label,
.mexico-svg .map-city:focus-within .map-label,
.mexico-svg .map-city:focus .map-label { opacity: 1; }

/* ── FOOTER ── */
footer { background: var(--ink); color: rgba(255,255,255,0.72); padding: 64px 48px 40px; margin-top: 96px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-logo { font-family: var(--sans); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; color: var(--white); margin-bottom: 16px; }
.footer-nap { font-style: normal; font-size: 14px; font-weight: 400; line-height: 1.9; color: rgba(255,255,255,0.72); }
.footer-nap a { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.3); }
.footer-nap a:hover { border-color: #fff; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.18);
  font-size: 13px; color: rgba(255,255,255,0.55);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .store-layout { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  nav { padding: 16px 24px; }
  .nav-links { gap: 18px; }
  .wrap { padding: 0 24px; }
  .page-head { padding: 120px 0 44px; }
  .card-grid, .card-grid.cols-2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  footer { padding: 48px 24px 32px; }
}
