/* ==========================================================================
   Córdoba Mecánicos - Estilos del tema hijo (mobile-first)
   Breakpoints: 480 / 768 / 1024
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base y overrides de Astra
   -------------------------------------------------------------------------- */
body.cmec,
body.cmec button,
body.cmec input,
body.cmec select,
body.cmec textarea {
  font-family: var(--cmec-font);
}

body.cmec {
  background: var(--cmec-bg);
  color: var(--cmec-text);
  font-size: var(--cmec-fs-body);
  font-weight: 400;
  line-height: var(--cmec-lh-body);
  -webkit-font-smoothing: antialiased;
}

body.cmec h1,
body.cmec h2,
body.cmec h3,
body.cmec h4 {
  font-family: var(--cmec-font);
  color: var(--cmec-heading);
  margin: 0;
  line-height: 1.25;
}

body.cmec a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.cmec img {
  max-width: 100%;
  height: auto;
}

body.cmec #content,
body.cmec #content .ast-container,
body.cmec.ast-page-builder-template #content .ast-container {
  max-width: none;
  padding: 0;
  margin: 0;
}

body.cmec #page {
  overflow-x: clip;
}

/* Astra pone ".site-content .ast-container { display: flex }" desde tablet, así
   que <main> es un ítem flex y se encogía al ancho de su hijo más ancho
   (.cmec-container, 1180px). Se lo obliga a ocupar todo el ancho disponible.
   No se toca "display": en resultados main también es la grilla .cmec-results. */
body.cmec .cmec-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 100%;
}

body.cmec .skip-link:focus {
  z-index: 1000;
}

.cmec-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cmec-container {
  width: 100%;
  max-width: calc(var(--cmec-container) + (var(--cmec-gutter) * 2));
  margin: 0 auto;
  padding-left: var(--cmec-gutter);
  padding-right: var(--cmec-gutter);
}

.cmec-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   2. Botones
   -------------------------------------------------------------------------- */
.cmec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--cmec-radius);
  cursor: pointer;
  font-family: var(--cmec-font);
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cmec-btn:focus-visible {
  outline: 2px solid var(--cmec-accent);
  outline-offset: 2px;
}

/* Variantes con selector compuesto (.cmec-btn.cmec-btn--x = 0,2,0): la mayoría
   son <a> y "body.cmec a { color: inherit }" (0,1,2) le ganaba a la clase sola,
   por lo que el texto salía gris en vez de blanco. */

/* Primario: Sumá tu taller */
.cmec-btn.cmec-btn--primary {
  background: var(--cmec-primary);
  color: var(--cmec-white);
  font-size: var(--cmec-btn-primary-fs);
  font-weight: 600;
  padding: 9px 20px;
  min-height: 36px;
}

.cmec-btn.cmec-btn--primary:hover,
.cmec-btn.cmec-btn--primary:focus {
  background: var(--cmec-primary-hover);
  color: var(--cmec-white);
}

/* Secundario: Buscar / acciones */
.cmec-btn.cmec-btn--accent {
  background: var(--cmec-accent);
  color: var(--cmec-white);
  font-size: var(--cmec-btn-accent-fs);
  font-weight: 700;
  height: var(--cmec-control-h);
  padding: 0 40px;
}

.cmec-btn.cmec-btn--accent:hover,
.cmec-btn.cmec-btn--accent:focus {
  background: var(--cmec-accent-hover);
  color: var(--cmec-white);
}

/* Ghost: Ingresar */
.cmec-btn.cmec-btn--ghost {
  background: var(--cmec-white);
  color: var(--cmec-heading);
  border-color: var(--cmec-line);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  min-height: 36px;
}

.cmec-btn.cmec-btn--ghost:hover,
.cmec-btn.cmec-btn--ghost:focus {
  border-color: var(--cmec-heading);
  color: var(--cmec-heading);
}

/* WhatsApp: siempre verde */
.cmec-btn.cmec-btn--whatsapp {
  background: var(--cmec-whatsapp);
  color: var(--cmec-white);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  min-height: 36px;
}

.cmec-btn.cmec-btn--whatsapp:hover,
.cmec-btn.cmec-btn--whatsapp:focus {
  background: var(--cmec-whatsapp-hover);
  color: var(--cmec-white);
}

.cmec-btn.cmec-btn--icon {
  width: var(--cmec-control-h);
  padding: 0;
  font-size: 22px;
}

.cmec-btn.cmec-btn--block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   3. Encabezados de sección
   -------------------------------------------------------------------------- */
.cmec-section {
  padding: var(--cmec-section-y-m) 0;
}

.cmec-section--white {
  background: var(--cmec-white);
}

.cmec-section--dark {
  background: var(--cmec-dark);
  color: var(--cmec-white);
}

.cmec-section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.cmec-section__label {
  display: block;
  font-size: var(--cmec-fs-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cmec-accent);
  margin-bottom: 10px;
}

.cmec-section__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--cmec-heading);
}

.cmec-section--dark .cmec-section__title {
  color: var(--cmec-white);
}

.cmec-section__subtitle {
  font-size: var(--cmec-fs-sub);
  font-weight: 300;
  color: var(--cmec-muted);
  margin: 10px 0 0;
}

.cmec-section--dark .cmec-section__subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.cmec-sep {
  display: block;
  width: 100px;
  height: 0;
  margin: 18px auto 0;
  border: 0;
  border-top: 1px dashed #b5b5b5;
}

.cmec-section--dark .cmec-sep {
  border-top-color: rgba(255, 255, 255, 0.35);
}

.cmec-section__foot {
  text-align: center;
  margin-top: 40px;
}

/* --------------------------------------------------------------------------
   4. Grillas
   -------------------------------------------------------------------------- */
.cmec-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  gap: var(--cmec-gap);
}

.cmec-grid > * {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.cmec-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  background: var(--cmec-white);
  box-shadow: 0 1px 0 var(--cmec-line);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.cmec-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body.admin-bar .cmec-header {
  top: 46px;
}

.cmec-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--cmec-header-h-m);
}

.cmec-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cmec-dark);
  white-space: nowrap;
  line-height: 1;
}

.cmec-logo span {
  color: var(--cmec-accent);
}

.cmec-logo img {
  display: block;
  max-height: 48px;
  width: auto;
}

.cmec-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmec-header__actions .cmec-btn--ghost,
.cmec-header__actions .cmec-btn--primary {
  display: none;
}

.cmec-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cmec-dark);
  font-size: 26px;
  cursor: pointer;
  border-radius: var(--cmec-radius);
}

.cmec-burger .cmec-icon--close {
  display: none;
}

.cmec-burger[aria-expanded="true"] .cmec-icon--menu {
  display: none;
}

.cmec-burger[aria-expanded="true"] .cmec-icon--close {
  display: inline-block;
}

/* Navegación (móvil: panel desplegable) */
.cmec-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--cmec-white);
  border-top: 1px solid var(--cmec-line);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  padding: 10px var(--cmec-gutter) 20px;
  max-height: calc(100vh - var(--cmec-header-h-m));
  overflow-y: auto;
}

.cmec-nav.is-open {
  display: block;
}

.cmec-menu,
.cmec-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cmec-menu li {
  position: relative;
}

/* Header sólido: enlaces #252525, activo coral. Con "body.cmec" delante para
   superar a "body.cmec a { color: inherit }" (0,1,2), que hacía heredar #353535. */
body.cmec .cmec-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--cmec-heading);
  border-bottom: 1px solid var(--cmec-line);
}

body.cmec .cmec-menu a:hover,
body.cmec .cmec-menu .current-menu-item > a,
body.cmec .cmec-menu .current-menu-ancestor > a {
  color: var(--cmec-accent);
}

.cmec-menu__caret {
  font-size: 12px;
  color: var(--cmec-muted);
  transition: transform 0.2s ease;
}

.cmec-menu .sub-menu {
  display: none;
  padding-left: 14px;
}

.cmec-menu li.is-open > .sub-menu {
  display: block;
}

.cmec-menu li.is-open > a .cmec-menu__caret {
  transform: rotate(180deg);
}

body.cmec .cmec-menu .sub-menu a {
  font-weight: 500;
  color: var(--cmec-text);
}

.cmec-nav__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
}

.cmec-nav__actions .cmec-btn {
  width: 100%;
}

/* Header transparente sobre el hero (home) */
body.cmec-home .cmec-header {
  position: fixed;
  background: transparent;
  box-shadow: none;
}

body.cmec-home .cmec-header:not(.is-scrolled):not(.is-open) .cmec-logo,
body.cmec-home .cmec-header:not(.is-scrolled):not(.is-open) .cmec-burger {
  color: var(--cmec-white);
}

body.cmec-home .cmec-header:not(.is-scrolled):not(.is-open) .cmec-logo span {
  color: var(--cmec-accent);
}

/* "Ingresar" sobre la foto: borde blanco al 50 % y texto blanco. */
body.cmec-home .cmec-header:not(.is-scrolled):not(.is-open) .cmec-btn--ghost {
  background: var(--cmec-ghost);
  color: var(--cmec-white);
  border-color: rgba(255, 255, 255, 0.5);
}

body.cmec-home .cmec-header:not(.is-scrolled):not(.is-open) .cmec-btn--ghost:hover,
body.cmec-home .cmec-header:not(.is-scrolled):not(.is-open) .cmec-btn--ghost:focus {
  background: rgba(255, 255, 255, 0.25);
  color: var(--cmec-white);
  border-color: var(--cmec-white);
}

body.cmec-home .cmec-header.is-scrolled,
body.cmec-home .cmec-header.is-open {
  background: var(--cmec-white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   6. Hero + buscador
   -------------------------------------------------------------------------- */
/* Full-bleed: el fondo va de borde a borde del viewport (el ancho lo da main);
   el contenido queda limitado por .cmec-container (1140px + gutters). */
.cmec-hero {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--cmec-hero-h);
  display: flex;
  align-items: center;
  padding: calc(var(--cmec-header-h-m) + 50px) 0 60px;
  background-color: var(--cmec-dark);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--cmec-white);
  text-align: center;
}

.cmec-hero--default {
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

.cmec-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cmec-overlay);
}

.cmec-hero--default::before {
  background: rgba(0, 0, 0, 0.25);
}

.cmec-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* Selectores compuestos a propósito: "body.cmec h1" (y los de Astra) tienen
   más especificidad que una clase sola y pintaban el título casi negro. */
.cmec-hero .cmec-hero__title {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.cmec-hero .cmec-hero__subtitle {
  font-size: 16px;
  font-weight: 300;
  color: #fff;
  opacity: 0.92;
  margin: 14px auto 0;
  max-width: 640px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.cmec-hero__search {
  max-width: 900px;
  margin: 36px auto 0;
}

.cmec-hero__search .cmec-search {
  gap: 12px;
}

/* Formulario de búsqueda (hero y barra de resultados) */
.cmec-search {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.cmec-search__field {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.cmec-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.cmec-search input[type="text"],
.cmec-search input[type="search"],
.cmec-search select {
  width: 100%;
  height: var(--cmec-control-h);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--cmec-radius);
  background: var(--cmec-white);
  color: var(--cmec-text);
  font-family: var(--cmec-font);
  font-size: 15px;
  font-weight: 400;
  line-height: var(--cmec-control-h);
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.cmec-search input::placeholder {
  color: #8f8f8f;
  opacity: 1;
}

.cmec-search input:focus,
.cmec-search select:focus {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 0 0 3px rgba(253, 73, 86, 0.18);
}

.cmec-search select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.cmec-search__submit {
  flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   7. Rubros
   -------------------------------------------------------------------------- */
/* Grilla propia de la sección: 1 col <= 560, 2 <= 900, 3 <= 1160, 4 >= 1160 */
.cmec-grid--rubros {
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
}

.cmec-rubro {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--cmec-white);
  border-radius: var(--cmec-radius);
  box-shadow: var(--cmec-shadow);
  overflow: hidden;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cmec-rubro:hover {
  transform: translateY(-3px);
  box-shadow: var(--cmec-shadow-hover);
}

/* Foto arriba, 4:3. Sin foto: mismo alto, fondo gris e ícono coral centrado. */
.cmec-rubro__media {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f4f4f4;
}

.cmec-rubro .cmec-rubro__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cmec-rubro__media--empty .cmec-icon {
  font-size: 56px;
  color: var(--cmec-accent);
}

.cmec-rubro__body {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  padding: 18px 20px;
}

.cmec-rubro__icon {
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
  color: var(--rubro-color, var(--cmec-rubro-0));
}

.cmec-rubro__text {
  flex: 1 1 auto;
  min-width: 0;
}

.cmec-rubro__name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cmec-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmec-rubro__count {
  display: block;
  font-size: 13px;
  line-height: 1.3;
  color: var(--cmec-muted);
  margin-top: 2px;
}

/* Botón circular de 34px, a la derecha del cuerpo, nunca encima del texto. */
.cmec-rubro__arrow {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 1px solid var(--cmec-line);
  border-radius: 50%;
  background: var(--cmec-white);
  color: var(--cmec-heading);
  font-size: 16px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cmec-rubro:hover .cmec-rubro__arrow {
  background: var(--cmec-accent);
  border-color: var(--cmec-accent);
  color: var(--cmec-white);
}

/* --------------------------------------------------------------------------
   8. Tarjeta de anuncio
   -------------------------------------------------------------------------- */
.cmec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cmec-white);
  border-radius: var(--cmec-radius);
  box-shadow: var(--cmec-shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cmec-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--cmec-shadow-hover);
}

.cmec-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #eef0f2;
  overflow: hidden;
}

/* "body.cmec img { height: auto }" pesa más que una clase sola; se refuerza
   el selector para que la imagen (o el placeholder) cubra siempre el bloque. */
.cmec-card .cmec-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cmec-card:hover .cmec-card__media img {
  transform: scale(1.03);
}

.cmec-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--cmec-accent);
  color: var(--cmec-white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cmec-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 22px 25px 25px;
}

/* Rubro en mayúsculas 12px/600 con el color de la paleta por término.
   Selector compuesto: "body.cmec a { color: inherit }" le ganaba a la clase sola. */
.cmec-card .cmec-card__rubro {
  position: relative;
  z-index: 1;
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--rubro-color, var(--cmec-rubro-0));
}

.cmec-card .cmec-card__rubro:hover {
  color: var(--cmec-accent);
}

.cmec-card__title {
  font-size: var(--cmec-fs-h3);
  font-weight: 500;
  color: var(--cmec-title);
  margin: 4px 0 10px;
}

.cmec-card__title a {
  color: inherit;
}

.cmec-card__title a:hover {
  color: var(--cmec-accent);
}

.cmec-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cmec-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: var(--cmec-fs-small);
  color: var(--cmec-muted);
}

.cmec-card__score {
  font-weight: 600;
  color: var(--cmec-accent);
}

.cmec-card__reviews--none {
  font-size: 13px;
  color: var(--cmec-muted);
}

.cmec-card__aside {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}

.cmec-stars {
  display: inline-flex;
  gap: 1px;
  color: var(--cmec-accent);
  font-size: 15px;
  line-height: 1;
}

.cmec-stars .cmec-icon--star-outline {
  opacity: 0.9;
}

.cmec-card__address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  font-size: var(--cmec-fs-small);
  color: var(--cmec-text);
  line-height: 1.4;
}

.cmec-card__address .cmec-icon {
  font-size: 16px;
  color: var(--cmec-muted);
  margin-top: 1px;
}

.cmec-card__address span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Botón redondo de WhatsApp. Selector compuesto: es un <a> y la clase sola
   perdía el color frente a "body.cmec a". */
.cmec-card .cmec-card__wa {
  position: relative;
  z-index: 1;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cmec-whatsapp);
  color: var(--cmec-white);
  font-size: 18px;
  flex: 0 0 auto;
}

.cmec-card .cmec-card__wa:hover,
.cmec-card .cmec-card__wa:focus {
  background: var(--cmec-whatsapp-hover);
  color: var(--cmec-white);
}

/* Variante horizontal (vista lista en resultados) */
.cmec-card--row {
  flex-direction: row;
}

.cmec-card--row .cmec-card__media {
  flex: 0 0 38%;
  aspect-ratio: auto;
  min-height: 190px;
}

.cmec-card--row .cmec-card__body {
  padding: 22px 25px;
}

/* --------------------------------------------------------------------------
   9. Franja CTA
   -------------------------------------------------------------------------- */
/* Full-bleed: solo fondo oscuro, texto a la izquierda y botón verde a la derecha.
   Sin bordes ni pseudo-elementos (se anulan explícitamente por si algún CSS
   externo los agrega). */
.cmec-cta {
  width: 100%;
  background-color: var(--cmec-dark);
  color: var(--cmec-white);
  padding: 60px 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 0;
  outline: 0;
  box-shadow: none;
}

.cmec-cta::before,
.cmec-cta::after,
.cmec-cta__inner::before,
.cmec-cta__inner::after {
  content: none;
}

.cmec-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  border: 0;
}

/* Compuesto: "body.cmec h2" (0,1,2) pintaba el título casi negro sobre el fondo oscuro. */
.cmec-cta .cmec-cta__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--cmec-white);
}

.cmec-cta__text {
  font-size: 15px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.72);
  margin: 8px 0 0;
  max-width: 560px;
}

.cmec-cta .cmec-btn--primary {
  padding: 15px 28px;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   10. Zonas (chips)
   -------------------------------------------------------------------------- */
.cmec-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Chip de zona. Selector compuesto: es un <a> y la clase sola perdía color y
   borde frente a los estilos de enlace del tema padre. */
.cmec-chips .cmec-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--cmec-line);
  border-radius: var(--cmec-radius-pill);
  background: var(--cmec-white);
  color: var(--cmec-heading);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.cmec-chips .cmec-chip:hover,
.cmec-chips .cmec-chip:focus {
  border-color: var(--cmec-accent);
  color: var(--cmec-accent);
}

.cmec-chip .cmec-icon {
  font-size: 15px;
  color: var(--cmec-muted);
}

.cmec-chip__count {
  font-size: 12px;
  color: var(--cmec-muted);
}

/* --------------------------------------------------------------------------
   11. Cómo funciona
   -------------------------------------------------------------------------- */
.cmec-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cmec-step {
  text-align: center;
  padding: 0 10px;
}

.cmec-step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--cmec-white);
  box-shadow: var(--cmec-shadow);
  color: var(--cmec-accent);
  font-size: 32px;
  margin-bottom: 20px;
}

.cmec-step__label {
  display: block;
  font-size: var(--cmec-fs-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cmec-muted);
  margin-bottom: 6px;
}

.cmec-step__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--cmec-title);
}

.cmec-step__text {
  font-size: 14px;
  color: var(--cmec-muted);
  margin: 8px auto 0;
  max-width: 300px;
}

/* --------------------------------------------------------------------------
   12. Novedades (blog)
   -------------------------------------------------------------------------- */
.cmec-post {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cmec-white);
  border-radius: var(--cmec-radius);
  box-shadow: var(--cmec-shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cmec-post:hover {
  transform: translateY(-3px);
  box-shadow: var(--cmec-shadow-hover);
}

.cmec-post__media {
  display: block;
  aspect-ratio: 16 / 11;
  background: #eef0f2;
  overflow: hidden;
  position: relative;
}

.cmec-post__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cmec-post__body {
  padding: 22px 25px 25px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.cmec-post__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--cmec-title);
}

.cmec-post__title a {
  color: inherit;
}

.cmec-post__title a:hover {
  color: var(--cmec-accent);
}

.cmec-post__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cmec-post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  color: var(--cmec-muted);
}

.cmec-post__meta .cmec-icon {
  color: var(--cmec-accent);
  font-size: 14px;
}

.cmec-post__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cmec-muted);
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.cmec-footer {
  background: var(--cmec-dark);
  color: #c9c9c9;
  padding-top: 60px;
}

.cmec-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.cmec-footer .cmec-logo {
  color: var(--cmec-white);
}

.cmec-footer__desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--cmec-muted);
  margin: 20px 0 0;
  max-width: 300px;
}

body.cmec .cmec-footer .cmec-footer__title,
body.cmec .cmec-footer h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--cmec-white);
  margin-bottom: 20px;
}

.cmec-footer__list,
.cmec-footer__list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cmec-footer__list a {
  display: inline-block;
  padding: 6px 0;
  font-size: 14px;
  color: #c9c9c9;
}

.cmec-footer__list a:hover {
  color: var(--cmec-white);
}

.cmec-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cmec-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cmec-dark-2);
  color: var(--cmec-white);
  font-size: 18px;
}

.cmec-footer__social a:hover {
  background: var(--cmec-accent);
  color: var(--cmec-white);
}

.cmec-footer__social a.is-whatsapp:hover {
  background: var(--cmec-whatsapp);
}

.cmec-footer__note {
  font-size: 13px;
  color: var(--cmec-muted);
  margin: 0;
}

.cmec-footer__bottom {
  margin-top: 50px;
  border-top: 1px solid var(--cmec-dark-2);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--cmec-muted);
}

/* --------------------------------------------------------------------------
   14. Vistas de listado: resultados, rubro y zona
   Estructura (de arriba hacia abajo):
   - .cmec-archive__head (solo rubro/zona) dentro de .cmec-container
   - .cmec-results__bar coral a todo el ancho del viewport
   - .cmec-listing__body (.cmec-container) con la grilla .cmec-results:
     listado (toolbar, chips, tarjetas, paginación) + mapa sticky
   -------------------------------------------------------------------------- */
.cmec-listing {
  background: var(--cmec-bg);
  padding-bottom: 60px;
}

/* Encabezado del archivo: 40px debajo del header fijo para que el título no
   se pegue al logo. */
.cmec-archive__head {
  padding: 40px 0 28px;
}

.cmec-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--cmec-muted);
}

.cmec-breadcrumb li + li::before {
  content: "/";
  margin: 0 8px;
  color: #c4c4c4;
}

/* Selector compuesto: "body.cmec a" (0,1,2) le gana a una clase sola. */
body.cmec .cmec-breadcrumb a {
  color: var(--cmec-muted);
}

body.cmec .cmec-breadcrumb a:hover,
body.cmec .cmec-breadcrumb a:focus {
  color: var(--cmec-accent);
}

.cmec-breadcrumb [aria-current="page"] {
  color: var(--cmec-text);
}

/* H1 32-36px/700 #252525. Compuesto para pesar más que "body.cmec h1". */
.cmec-archive__head .cmec-archive__title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--cmec-heading);
  overflow-wrap: anywhere;
}

.cmec-archive__head .cmec-archive__subtitle {
  margin: 10px 0 0;
  max-width: 720px;
  font-size: var(--cmec-fs-sub);
  font-weight: 300;
  line-height: 1.5;
  color: var(--cmec-muted);
}

/* Barra coral full-bleed. El formulario queda centrado por .cmec-container. */
.cmec-results__bar {
  background: var(--cmec-accent);
  padding: 20px 0;
}

.cmec-results__bar .cmec-search input:focus,
.cmec-results__bar .cmec-search select:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.cmec-results__bar .cmec-search__submit .cmec-btn {
  background: var(--cmec-white);
  color: var(--cmec-accent);
}

.cmec-results__bar .cmec-search__submit .cmec-btn:hover {
  background: #ffe9eb;
}

.cmec-listing__body {
  padding-top: 30px;
}

/* Grilla listado + mapa. "align-items: start" es lo que permite que el mapa
   sea sticky dentro de su celda (si se estira, no tiene a dónde pegarse). */
.cmec-results {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--cmec-gap);
}

.cmec-results__list {
  min-width: 0;
}

.cmec-results__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 24px;
}

.cmec-results__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  min-width: 0;
}

.cmec-results__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-left: auto;
}

.cmec-results__views {
  display: inline-flex;
  gap: 6px;
}

/* Selector compuesto: son <a> y "body.cmec a" pisaba el color. */
body.cmec .cmec-results__views a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cmec-line);
  border-radius: var(--cmec-radius);
  background: var(--cmec-white);
  color: var(--cmec-muted);
  font-size: 18px;
}

body.cmec .cmec-results__views a.is-active,
body.cmec .cmec-results__views a:hover,
body.cmec .cmec-results__views a:focus-visible {
  color: var(--cmec-white);
  background: var(--cmec-heading);
  border-color: var(--cmec-heading);
}

.cmec-results__summary .cmec-results__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--cmec-heading);
  min-width: 0;
}

.cmec-results__count {
  font-size: 14px;
  font-weight: 400;
  color: var(--cmec-muted);
  margin: 0;
  white-space: nowrap;
}

.cmec-results__sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--cmec-text);
}

.cmec-results__sort-label {
  color: var(--cmec-muted);
  white-space: nowrap;
}

.cmec-results__sort select {
  height: 36px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--cmec-line);
  border-radius: var(--cmec-radius);
  background-color: var(--cmec-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--cmec-text);
  font-family: var(--cmec-font);
  font-size: 14px;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* Chips de subrubros (archivo de rubro) */
.cmec-subrubros {
  margin: -6px 0 24px;
}

.cmec-chips--start {
  justify-content: flex-start;
}

.cmec-chips .cmec-chip.is-active {
  background: var(--cmec-heading);
  border-color: var(--cmec-heading);
  color: var(--cmec-white);
}

.cmec-chips .cmec-chip.is-active .cmec-chip__count,
.cmec-chips .cmec-chip.is-active .cmec-icon {
  color: rgba(255, 255, 255, 0.7);
}

.cmec-results__grid {
  margin-bottom: 36px;
}

.cmec-results__grid--list {
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
}

.cmec-results__map {
  position: relative;
  min-height: 380px;
  background: #e9ecef;
  border-radius: var(--cmec-radius);
  box-shadow: var(--cmec-shadow);
  overflow: hidden;
}

.cmec-map {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cmec-map__note {
  position: absolute;
  z-index: 500;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--cmec-white);
  color: var(--cmec-text);
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--cmec-radius);
  box-shadow: var(--cmec-shadow);
  white-space: nowrap;
}

/* Pin de Leaflet (divIcon) */
.cmec-pin {
  background: transparent;
  border: 0;
}

.cmec-pin__dot {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--cmec-accent);
  border: 3px solid var(--cmec-white);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.cmec-pin__dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--cmec-white);
}

.cmec-popup .leaflet-popup-content-wrapper {
  border-radius: var(--cmec-radius);
  box-shadow: var(--cmec-shadow);
  padding: 0;
  overflow: hidden;
}

.cmec-popup .leaflet-popup-content {
  margin: 0;
  width: 240px !important;
  font-family: var(--cmec-font);
}

.cmec-popup__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cmec-popup__body {
  padding: 12px 14px 14px;
}

.cmec-popup__rubro {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cmec-popup__title {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--cmec-title);
  margin: 3px 0 4px;
}

.cmec-popup__addr {
  font-size: 12px;
  color: var(--cmec-muted);
  margin: 0;
}

/* Paginación */
.cmec-pagination {
  display: flex;
  justify-content: center;
}

.cmec-pagination ul.page-numbers {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cmec-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--cmec-radius);
  background: var(--cmec-white);
  color: var(--cmec-heading);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cmec-pagination a.page-numbers:hover {
  color: var(--cmec-accent);
}

.cmec-pagination .page-numbers.current {
  background: var(--cmec-accent);
  color: var(--cmec-white);
}

.cmec-pagination .page-numbers.dots {
  background: transparent;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   15. Estado vacío
   -------------------------------------------------------------------------- */
.cmec-empty {
  text-align: center;
  background: var(--cmec-white);
  border-radius: var(--cmec-radius);
  box-shadow: var(--cmec-shadow);
  padding: 50px 24px;
  max-width: 560px;
  margin: 0 auto;
}

.cmec-empty .cmec-icon {
  font-size: 44px;
  color: var(--cmec-muted);
  margin-bottom: 14px;
}

.cmec-empty__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--cmec-heading);
}

.cmec-empty__text {
  font-size: 14px;
  color: var(--cmec-muted);
  margin: 8px auto 0;
  max-width: 400px;
}

.cmec-empty .cmec-btn {
  margin-top: 22px;
}

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 480px) {
  .cmec-grid--2,
  .cmec-grid--3,
  .cmec-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .cmec-hero .cmec-hero__title {
    font-size: 36px;
  }
}

/* Grilla de rubros (breakpoints propios del brief v2) */
@media (min-width: 561px) {
  .cmec-grid--rubros {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 901px) {
  .cmec-grid--rubros {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1160px) {
  .cmec-grid--rubros {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) {
  .cmec-section {
    padding: var(--cmec-section-y) 0;
  }

  .cmec-section__title {
    font-size: var(--cmec-fs-h2);
  }

  /* 600px de alto (min-height en tokens) con el contenido centrado. */
  .cmec-hero {
    padding: 96px 0 120px;
  }

  .cmec-hero .cmec-hero__title {
    font-size: var(--cmec-fs-h1);
  }

  .cmec-search {
    flex-direction: row;
  }

  .cmec-search__field--rubro {
    flex-basis: 44%;
  }

  .cmec-search__field--zona {
    flex-basis: 36%;
  }

  .cmec-results__bar .cmec-search__field--rubro,
  .cmec-results__bar .cmec-search__field--zona,
  .cmec-results__bar .cmec-search__field--q {
    flex-basis: 0;
  }

  .cmec-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .cmec-cta__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cmec-cta .cmec-cta__title {
    font-size: var(--cmec-fs-h2);
  }

  .cmec-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cmec-archive__head {
    padding-top: 40px;
  }

  .cmec-archive__head .cmec-archive__title {
    font-size: 36px;
  }
}

@media (min-width: 1024px) {
  .cmec-header__inner {
    min-height: var(--cmec-header-h);
  }

  body.admin-bar .cmec-header {
    top: 32px;
  }

  .cmec-logo {
    font-size: 22px;
  }

  .cmec-burger {
    display: none;
  }

  .cmec-header__actions .cmec-btn--ghost,
  .cmec-header__actions .cmec-btn--primary {
    display: inline-flex;
  }

  .cmec-nav {
    display: flex;
    position: static;
    flex: 1 1 auto;
    justify-content: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    max-height: none;
    overflow: visible;
  }

  .cmec-nav__actions {
    display: none;
  }

  .cmec-menu {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  body.cmec .cmec-menu a {
    padding: 10px 14px;
    border: 0;
  }

  /* Header transparente sobre el hero: enlaces blancos al 92 %, hover blanco con
     subrayado coral, ítem activo coral. Al scrollear (.is-scrolled) vuelven los
     colores del header sólido. */
  body.cmec-home .cmec-header:not(.is-scrolled) .cmec-menu > li > a {
    color: var(--cmec-white);
    opacity: 0.92;
    text-decoration: none;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--cmec-accent);
  }

  body.cmec-home .cmec-header:not(.is-scrolled) .cmec-menu > li > a:hover,
  body.cmec-home .cmec-header:not(.is-scrolled) .cmec-menu > li > a:focus-visible {
    color: var(--cmec-white);
    opacity: 1;
    text-decoration-line: underline;
  }

  body.cmec-home .cmec-header:not(.is-scrolled) .cmec-menu > li.current-menu-item > a,
  body.cmec-home .cmec-header:not(.is-scrolled) .cmec-menu > li.current-menu-ancestor > a {
    color: var(--cmec-accent);
    opacity: 1;
  }

  .cmec-menu .sub-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    padding: 8px 0;
    background: var(--cmec-white);
    border-radius: var(--cmec-radius);
    box-shadow: var(--cmec-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 50;
  }

  .cmec-menu li:hover > .sub-menu,
  .cmec-menu li:focus-within > .sub-menu,
  .cmec-menu li.is-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  body.cmec .cmec-menu .sub-menu a {
    padding: 9px 18px;
    font-size: 14px;
    color: var(--cmec-text);
    justify-content: flex-start;
  }

  body.cmec .cmec-menu .sub-menu a:hover {
    color: var(--cmec-accent);
    background: #fafafa;
  }

  .cmec-menu li.is-open > a .cmec-menu__caret {
    transform: none;
  }

  .cmec-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .cmec-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .cmec-footer__grid {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
  }

  /* Listado (2 columnas de tarjetas) a la izquierda, mapa a la derecha.
     Dentro del contenedor de 1140px: ~650px de tarjetas y ~460px de mapa. */
  .cmec-results {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  /* El mapa queda pegado 20px debajo del header y ocupa el alto disponible. */
  .cmec-results__map {
    position: sticky;
    top: calc(var(--cmec-header-h) + 20px);
    height: calc(100vh - var(--cmec-header-h) - 40px);
    min-height: 520px;
  }

  body.admin-bar .cmec-results__map {
    top: calc(var(--cmec-header-h) + 32px + 20px);
    height: calc(100vh - var(--cmec-header-h) - 32px - 40px);
  }

  .cmec-results__grid.cmec-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .cmec-card--row {
    flex-direction: column;
  }

  .cmec-card--row .cmec-card__media {
    flex-basis: auto;
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
}

/* --------------------------------------------------------------------------
   17. Ficha del taller (/taller/<slug>/)
   Estructura: encabezado (breadcrumb, H1, meta), galería, grilla de dos
   columnas (contenido + aside sticky de 360px) y "Otros talleres".
   Mobile-first: columna única y botón de WhatsApp fijo abajo.
   -------------------------------------------------------------------------- */
.cmec-single {
  background: var(--cmec-bg);
  padding-bottom: 100px; /* deja lugar al botón fijo de WhatsApp en móvil */
}

.cmec-single__head {
  padding: 28px 0 20px;
}

/* Compuesto para pesar más que "body.cmec h1". */
.cmec-single__head .cmec-single__title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--cmec-heading);
  overflow-wrap: anywhere;
}

.cmec-single__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--cmec-muted);
}

body.cmec .cmec-single__rubro,
body.cmec .cmec-single__zona,
body.cmec .cmec-single__rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cmec-text);
}

body.cmec .cmec-single__rubro {
  color: var(--rubro-color, var(--cmec-rubro-0));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.cmec .cmec-single__rubro:hover,
body.cmec .cmec-single__zona:hover,
body.cmec .cmec-single__rating:hover {
  color: var(--cmec-accent);
}

.cmec-single__meta .cmec-icon {
  font-size: 16px;
  color: var(--cmec-muted);
}

.cmec-single__rubro .cmec-icon {
  color: inherit;
}

.cmec-single__score {
  font-weight: 600;
  color: var(--cmec-accent);
}

.cmec-single__reviews {
  color: var(--cmec-muted);
}

.cmec-single__badges {
  display: inline-flex;
  gap: 6px;
}

.cmec-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--cmec-accent);
  color: var(--cmec-white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.cmec-badge--new {
  background: var(--cmec-primary);
}

/* Galería: foto principal 16:9 y tira de miniaturas debajo (móvil). */
.cmec-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.cmec-gallery__item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--cmec-radius);
  background: #eef0f2;
}

.cmec-gallery .cmec-gallery__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

a.cmec-gallery__item:hover img {
  transform: scale(1.03);
}

a.cmec-gallery__item:focus-visible {
  outline: 2px solid var(--cmec-accent);
  outline-offset: 2px;
}

.cmec-gallery__item--main {
  aspect-ratio: 16 / 9;
}

.cmec-gallery__item--thumb {
  aspect-ratio: 4 / 3;
}

.cmec-gallery__item--hidden {
  display: none;
}

.cmec-gallery__thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.cmec-gallery__more {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--cmec-white);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* Grilla de dos columnas */
.cmec-single__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: var(--cmec-gap);
  margin-top: 30px;
}

.cmec-single__main > * + *,
.cmec-single__aside > * + * {
  margin-top: 20px;
}

/* Tarjeta blanca con la sombra del sitio */
.cmec-panel {
  background: var(--cmec-white);
  border-radius: var(--cmec-radius);
  box-shadow: var(--cmec-shadow);
  padding: 22px 20px;
}

.cmec-panel .cmec-panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--cmec-heading);
  margin-bottom: 16px;
}

.cmec-panel__title .cmec-icon {
  font-size: 20px;
  color: var(--cmec-accent);
}

/* Descripción */
.cmec-single__content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--cmec-text);
}

.cmec-single__content p {
  margin: 0 0 1em;
}

.cmec-single__content > :last-child {
  margin-bottom: 0;
}

.cmec-single__content img {
  border-radius: var(--cmec-radius);
}

/* Servicios (chips) */
.cmec-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cmec-services li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--cmec-radius-pill);
  background: var(--cmec-field);
  color: var(--cmec-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.cmec-services .cmec-icon {
  font-size: 15px;
  color: var(--cmec-primary);
}

/* Horarios (tabla simple) */
.cmec-hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cmec-hours th,
.cmec-hours td {
  padding: 10px 0;
  border-bottom: 1px solid var(--cmec-line);
  vertical-align: top;
  text-align: left;
}

.cmec-hours tr:last-child th,
.cmec-hours tr:last-child td {
  border-bottom: 0;
}

.cmec-hours th {
  width: 45%;
  padding-right: 16px;
  font-weight: 600;
  color: var(--cmec-heading);
}

/* Mapa de un solo pin */
.cmec-single__map-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--cmec-text);
}

.cmec-single__map-address .cmec-icon {
  font-size: 16px;
  color: var(--cmec-muted);
  margin-top: 2px;
}

.cmec-single__map {
  position: relative;
  height: 280px;
  border-radius: var(--cmec-radius);
  overflow: hidden;
  background: #e9ecef;
}

.cmec-single__map-link {
  margin: 12px 0 0;
  font-size: 13px;
}

body.cmec .cmec-single__map-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cmec-muted);
}

body.cmec .cmec-single__map-link a:hover {
  color: var(--cmec-accent);
}

/* Reseñas */
.cmec-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid #bfe8d2;
  border-radius: var(--cmec-radius);
  background: #eefbf4;
  color: #1d6b43;
  font-size: 14px;
}

.cmec-notice .cmec-icon {
  font-size: 18px;
  margin-top: 1px;
}

.cmec-reviews__summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--cmec-line);
}

.cmec-reviews__avg {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  color: var(--cmec-heading);
}

.cmec-reviews__summary .cmec-stars {
  font-size: 20px;
}

.cmec-reviews__count {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--cmec-muted);
}

.cmec-reviews__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cmec-review {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--cmec-line);
}

.cmec-review:last-child {
  border-bottom: 0;
}

.cmec-review__avatar {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cmec-field);
  color: var(--cmec-heading);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

.cmec-review__body {
  flex: 1 1 auto;
  min-width: 0;
}

.cmec-review__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.cmec-review__author {
  font-size: 15px;
  font-weight: 600;
  color: var(--cmec-heading);
}

.cmec-review__date {
  font-size: 13px;
  color: var(--cmec-muted);
}

.cmec-review__text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cmec-text);
  overflow-wrap: anywhere;
}

.cmec-review__text p {
  margin: 0 0 0.6em;
}

.cmec-review__text p:last-child {
  margin-bottom: 0;
}

.cmec-reviews__empty {
  margin: 0;
  font-size: 14px;
  color: var(--cmec-muted);
}

/* Formulario de reseña */
.cmec-review-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--cmec-line);
}

.cmec-review-form .cmec-review-form__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--cmec-heading);
  margin-bottom: 14px;
}

.cmec-review-form .cmec-field {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.cmec-review-form .cmec-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cmec-heading);
}

.cmec-review-form input[type="text"],
.cmec-review-form input[type="email"],
.cmec-review-form textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--cmec-line);
  border-radius: var(--cmec-radius);
  background: var(--cmec-white);
  color: var(--cmec-text);
  font-family: var(--cmec-font);
  font-size: 15px;
  line-height: 1.4;
  box-shadow: none;
  outline: none;
}

.cmec-review-form textarea {
  height: auto;
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.cmec-review-form input:focus,
.cmec-review-form textarea:focus {
  border-color: var(--cmec-accent);
  box-shadow: 0 0 0 3px rgba(253, 73, 86, 0.18);
}

.cmec-review-form .cmec-field--2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

/* Selector de estrellas: orden invertido en el DOM (5..1) con row-reverse,
   así "input:checked ~ label" pinta las estrellas menores. */
.cmec-starpick {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
}

.cmec-starpick input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.cmec-starpick label {
  display: inline-flex;
  cursor: pointer;
  color: #d4d4d4;
  font-size: 30px;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}

.cmec-starpick label .cmec-icon {
  display: block;
  width: 1em;
  height: 1em;
}

.cmec-starpick input:checked ~ label,
.cmec-starpick label:hover,
.cmec-starpick label:hover ~ label {
  color: var(--cmec-accent);
}

.cmec-starpick label:hover {
  transform: scale(1.08);
}

.cmec-starpick input:focus-visible + label {
  outline: 2px solid var(--cmec-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.cmec-starpick__text {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--cmec-muted);
}

.cmec-starpick__text.is-set {
  color: var(--cmec-heading);
  font-weight: 500;
}

.cmec-review-form__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--cmec-muted);
}

.cmec-review-form__note .cmec-icon {
  font-size: 16px;
  color: var(--cmec-primary);
  margin-top: 1px;
}

.cmec-review-form__login {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--cmec-radius);
  background: var(--cmec-field);
  font-size: 14px;
}

.cmec-review-form .cmec-btn--accent {
  height: 48px;
  padding: 0 28px;
}

/* Honeypot: fuera de la vista, pero presente en el DOM. */
.cmec-review-form .cmec-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Aside: contacto y dueño. Botones iguales en tamaño. */
.cmec-contact__actions,
.cmec-owner__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cmec-contact .cmec-btn,
.cmec-owner .cmec-btn {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
}

.cmec-contact .cmec-btn .cmec-icon,
.cmec-owner .cmec-btn .cmec-icon {
  font-size: 20px;
}

.cmec-contact__list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--cmec-line);
}

.cmec-contact__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cmec-line);
  font-size: 14px;
  line-height: 1.45;
}

.cmec-contact__list li > .cmec-icon {
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--cmec-accent);
  margin-top: 2px;
}

.cmec-contact__list li > div {
  min-width: 0;
}

.cmec-contact__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cmec-muted);
}

body.cmec .cmec-contact__list a {
  color: var(--cmec-heading);
  font-weight: 500;
  overflow-wrap: anywhere;
}

body.cmec .cmec-contact__list a:hover {
  color: var(--cmec-accent);
}

.cmec-contact__social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

body.cmec .cmec-contact__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cmec-field);
  color: var(--cmec-heading);
  font-size: 18px;
}

body.cmec .cmec-contact__social a:hover,
body.cmec .cmec-contact__social a:focus-visible {
  background: var(--cmec-accent);
  color: var(--cmec-white);
}

.cmec-contact__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--cmec-muted);
}

.cmec-contact__note .cmec-icon {
  font-size: 15px;
  margin-top: 1px;
}

.cmec-owner__text {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--cmec-muted);
}

body.cmec .cmec-owner__report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--cmec-muted);
}

body.cmec .cmec-owner__report:hover {
  color: var(--cmec-accent);
}

/* Otros talleres */
.cmec-single__related {
  margin-top: 50px;
}

.cmec-single__related .cmec-section__head {
  max-width: none;
  margin: 0 0 24px;
  text-align: left;
}

.cmec-single__related .cmec-section__title {
  font-size: 24px;
}

.cmec-single__related .cmec-sep {
  margin-left: 0;
}

/* Botón de WhatsApp fijo abajo (móvil) */
.cmec-wa-fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  padding: 10px var(--cmec-gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--cmec-white);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.cmec-wa-fixed .cmec-btn {
  width: 100%;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
}

.cmec-wa-fixed .cmec-btn .cmec-icon {
  font-size: 20px;
}

/* Lightbox propio */
.cmec-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 48px;
  background: rgba(0, 0, 0, 0.92);
}

.cmec-lightbox[hidden] {
  display: none;
}

.cmec-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
  max-width: 100%;
  max-height: 100%;
}

.cmec-lightbox .cmec-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--cmec-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cmec-lightbox__caption {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.cmec-lightbox__btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--cmec-white);
  font-size: 24px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cmec-lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cmec-lightbox__btn:focus-visible {
  outline: 2px solid var(--cmec-white);
  outline-offset: 2px;
}

.cmec-lightbox__btn[hidden] {
  display: none;
}

.cmec-lightbox__close {
  top: 12px;
  right: 12px;
}

.cmec-lightbox__prev,
.cmec-lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.cmec-lightbox__prev {
  left: 8px;
}

.cmec-lightbox__next {
  right: 8px;
}

body.cmec-lightbox-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   18. Páginas índice: /rubros/ y /zonas/
   -------------------------------------------------------------------------- */
.cmec-indice {
  background: var(--cmec-bg);
  padding-bottom: 60px;
}

.cmec-indice__groups {
  margin-top: 50px;
}

.cmec-indice .cmec-indice__heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--cmec-heading);
  margin-bottom: 20px;
}

.cmec-indice__block {
  margin-top: 40px;
}

.cmec-indice .cmec-indice__block-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--cmec-heading);
  margin-bottom: 18px;
}

.cmec-indice__group {
  background: var(--cmec-white);
  border-radius: var(--cmec-radius);
  box-shadow: var(--cmec-shadow);
  padding: 20px;
}

.cmec-indice__group + .cmec-indice__group {
  margin-top: 16px;
}

.cmec-indice .cmec-indice__group-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--cmec-heading);
  margin-bottom: 14px;
}

.cmec-indice__group-title .cmec-icon {
  font-size: 20px;
  color: var(--rubro-color, var(--cmec-rubro-0));
}

body.cmec .cmec-indice__group-title a,
body.cmec .cmec-indice__block-title a {
  color: var(--cmec-heading);
}

body.cmec .cmec-indice__group-title a:hover,
body.cmec .cmec-indice__block-title a:hover {
  color: var(--cmec-accent);
}

.cmec-indice__group-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--cmec-muted);
}

.cmec-indice__empty {
  margin: 0;
  font-size: 14px;
  color: var(--cmec-muted);
}

/* Responsive de la ficha y los índices */
@media (min-width: 480px) {
  .cmec-review-form .cmec-field--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .cmec-single__head {
    padding: 40px 0 24px;
  }

  .cmec-single__head .cmec-single__title {
    font-size: 32px;
  }

  .cmec-panel {
    padding: 28px 30px;
  }

  .cmec-single__map {
    height: 340px;
  }

  /* Mosaico: principal a la izquierda, miniaturas apiladas a la derecha
     (2x2 cuando hay 5). Las miniaturas toman el alto de la principal. */
  .cmec-gallery--n2,
  .cmec-gallery--n3,
  .cmec-gallery--n4,
  .cmec-gallery--n5 {
    align-items: stretch;
  }

  .cmec-gallery--n2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cmec-gallery--n3 {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }

  .cmec-gallery--n4 {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  }

  .cmec-gallery--n5 {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }

  .cmec-gallery--n2 .cmec-gallery__thumbs,
  .cmec-gallery--n3 .cmec-gallery__thumbs,
  .cmec-gallery--n4 .cmec-gallery__thumbs,
  .cmec-gallery--n5 .cmec-gallery__thumbs {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(0, 1fr);
  }

  .cmec-gallery--n5 .cmec-gallery__thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .cmec-gallery--n2 .cmec-gallery__item--thumb,
  .cmec-gallery--n3 .cmec-gallery__item--thumb,
  .cmec-gallery--n4 .cmec-gallery__item--thumb,
  .cmec-gallery--n5 .cmec-gallery__item--thumb {
    aspect-ratio: auto;
    min-height: 0;
  }

  .cmec-lightbox__btn {
    width: 52px;
    height: 52px;
  }

  .cmec-lightbox__prev {
    left: 24px;
  }

  .cmec-lightbox__next {
    right: 24px;
  }

  .cmec-indice__group {
    padding: 22px 24px;
  }
}

@media (min-width: 1024px) {
  .cmec-single {
    padding-bottom: 60px;
  }

  .cmec-wa-fixed {
    display: none;
  }

  .cmec-single__layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .cmec-single__aside {
    position: sticky;
    top: calc(var(--cmec-header-h) + 20px);
  }

  body.admin-bar .cmec-single__aside {
    top: calc(var(--cmec-header-h) + 32px + 20px);
  }
}

/* Índice de rubros: 6 rubros padre en 3 columnas (dos filas) en escritorio. */
@media (min-width: 1160px) {
  .cmec-grid--rubros.cmec-grid--rubros-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.cmec *,
  body.cmec *::before,
  body.cmec *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .cmec-header,
  .cmec-footer,
  .cmec-results__map,
  .cmec-hero__search,
  .cmec-wa-fixed,
  .cmec-lightbox {
    display: none !important;
  }
}
