/*
 * Red de tiendecitas — el directorio público en conboxi.com (`/tiendecitas`),
 * las páginas que arma backend/src/services/store-directory-render.js.
 *
 * La barra, el pie, los botones y las migas vienen de css/root-blog.css (la
 * cara de la landing); acá va sólo lo propio del directorio. En un ARCHIVO y no
 * en un <style>: la página lleva una CSP sin 'unsafe-inline' (ROOT_BLOG_CSP).
 * Mobile-first: una columna; desde 720 px, tarjetas a dos y la ficha en dos.
 */

.td-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 28px;
}
.td-countries [aria-current="page"] {
  background: var(--cnb-graphite);
  color: var(--cnb-text-inverse);
  border-color: var(--cnb-graphite);
}

.td-group { margin: 0 0 36px; }
.td-group__title {
  font-size: 22px;
  margin: 0 0 14px;
}
.td-group__title a { color: inherit; text-decoration: none; }
.td-group__title a:hover { color: var(--cnb-primary-dark); }

.td-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
@media (min-width: 720px) {
  .td-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.td-card {
  background: var(--cnb-surface);
  border: 1px solid rgb(var(--n-200, 226 232 240));
  border-radius: 16px;
  padding: 18px 20px;
}
.td-card__name {
  font-size: 18px;
  margin: 0 0 4px;
}
.td-card__name a { color: var(--cnb-text-primary); text-decoration: none; }
.td-card__name a:hover { color: var(--cnb-primary-dark); text-decoration: underline; }
.td-card__place {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cnb-text-secondary);
}
.td-card__addr {
  margin: 0;
  font-size: 14px;
  color: var(--cnb-text-secondary);
}

.td-empty {
  background: var(--cnb-surface);
  border: 1px dashed rgb(var(--n-300, 203 213 225));
  border-radius: 16px;
  padding: 24px;
  color: var(--cnb-text-secondary);
}

.td-join {
  margin: 40px 0 8px;
  padding: 28px 24px;
  border-radius: 20px;
  background: var(--cnb-graphite);
  color: var(--cnb-text-inverse);
}
.td-join__title { margin: 0 0 8px; font-size: 22px; }
.td-join p { margin: 0 0 14px; max-width: 60ch; }
.td-join p:last-child { margin-bottom: 0; }

.td-store__place {
  margin: -6px 0 24px;
  font-size: 18px;
  color: var(--cnb-text-secondary);
}
.td-store__grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 720px) {
  .td-store__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.td-panel {
  background: var(--cnb-surface);
  border: 1px solid rgb(var(--n-200, 226 232 240));
  border-radius: 16px;
  padding: 20px;
}
.td-panel__title { margin: 0 0 10px; font-size: 18px; }
.td-panel p { margin: 0 0 6px; }
.td-how { margin-top: 16px; }
.td-how ol { margin: 0; padding-left: 20px; }
.td-how li { margin: 0 0 6px; }
.td-muted { color: var(--cnb-text-secondary); }

.td-maps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px !important;
}

.td-hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.td-hours th {
  text-align: left;
  font-weight: 600;
  padding: 6px 12px 6px 0;
  white-space: nowrap;
}
.td-hours td { padding: 6px 0; font-variant-numeric: tabular-nums; }
.td-hours tr + tr { border-top: 1px solid rgb(var(--n-100, 241 245 249)); }

/* Aire entre la barra y el contenido (el índice tiene el hero; la ficha, no). */
.td-top { padding-top: 1.75rem; }
.td-crumbs--dark, .td-crumbs--dark a { color: #C7CEDB; }

/* PR 10a — la calificación pública de la tienda (con 5 o más; si no, «Nueva»). */
.td-rating { margin: .25rem 0; font-size: .9rem; color: var(--cnb-text-primary); }
.td-rating__stars { color: #B45309; }
.td-rating__new {
  display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 999px;
  padding: .1rem .5rem; background: #EEF2FF; color: #3730A3; margin-right: .25rem;
}
.td-rating--new { color: var(--cnb-text-secondary, #4B5563); }

/* PR 10b — las insignias de la tienda (mismos colores que la app). */
.td-badges { list-style: none; padding: 0; margin: .4rem 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.td-badge {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 700;
  border-radius: 999px; padding: .15rem .55rem .15rem .2rem; background: #F3F4F6; color: #1F2937;
}
.td-badge__mark {
  min-width: 1.15rem; height: 1.15rem; padding: 0 .2rem; border-radius: 999px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: .65rem;
}
.td-badge--cero_perdidas .td-badge__mark { background: #047857; }
.td-badge--entrega_rapida .td-badge__mark { background: #0369A1; }
.td-badge--entregas_100 .td-badge__mark,
.td-badge--entregas_500 .td-badge__mark,
.td-badge--entregas_1000 .td-badge__mark { background: #B45309; }
.td-badge--abre_domingos .td-badge__mark { background: #6D28D9; }
.td-badge--top_zona .td-badge__mark { background: #BE123C; }
