/* GesTB — catálogo público. Hereda los tokens del tema CPA TB si existen. */
.gestb-cat, .gestb-hero, .gestb-solicitud {
	--gestb-p: var(--cpatb-c-primario, #61A347);
	--gestb-p-hover: var(--cpatb-c-primario-hover, #404040);
	--gestb-tierra: var(--cpatb-c-tierra-claro, #F5EDD8);
	--gestb-r: 14px;
}
.gestb-cat *, .gestb-hero *, .gestb-solicitud * { box-sizing: border-box; }
.gestb-boton {
	display: inline-block; padding: .7em 1.4em; border-radius: 999px; border: 0;
	background: var(--gestb-p, var(--cpatb-c-primario, #61A347)); color: #fff !important; font-weight: 700; font-size: .9rem;
	letter-spacing: .03em; text-transform: uppercase; text-decoration: none !important; cursor: pointer; line-height: 1.2;
}
.gestb-boton:hover, .gestb-boton:focus-visible { background: var(--gestb-p-hover, var(--cpatb-c-primario-hover, #404040)); }
.gestb-boton--grande { padding: .9em 1.8em; font-size: 1rem; }

/* Filtros */
.gestb-cat__filtros { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.gestb-cat__buscar { flex: 1 1 240px; }
.gestb-cat__filtros input, .gestb-cat__filtros select {
	width: 100%; font: inherit; padding: .65em .9em; border: 1px solid #cfd6cd; border-radius: 999px; background: #fff;
}
.gestb-cat__filtros select { width: auto; }
.gestb-cat__filtros button { font: inherit; font-weight: 700; padding: .65em 1.4em; border: 0; border-radius: 999px; background: var(--gestb-p); color: #fff; cursor: pointer; }
.gestb-cat__filtros button:hover { background: var(--gestb-p-hover); }
.gestb-cat__total { color: #5d6b5a; margin: 0 0 12px; }
.gestb-cat__vacio { padding: 28px; text-align: center; background: var(--gestb-tierra); border-radius: var(--gestb-r); }

/* Rejilla y tarjetas */
.gestb-cat__rejilla { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gestb-cat__rejilla > li { margin: 0; }
.gestb-tarjeta { background: #fff; border-radius: var(--gestb-r); overflow: hidden; box-shadow: 0 2px 14px rgba(0,0,0,.07); height: 100%; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.gestb-tarjeta:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.gestb-tarjeta__foto { display: block; aspect-ratio: 4 / 3; background: #e9eee7; }
.gestb-tarjeta__foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gestb-tarjeta__sin-foto { display: block; width: 100%; height: 100%; min-height: 160px; background: #e9eee7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b5c0b2'%3E%3Cpath d='M8.5 3.5a2 2.5 0 1 1 0 5 2 2.5 0 0 1 0-5zm7 0a2 2.5 0 1 1 0 5 2 2.5 0 0 1 0-5zM4 9a2 2.4 0 1 1 0 4.8A2 2.4 0 0 1 4 9zm16 0a2 2.4 0 1 1 0 4.8A2 2.4 0 0 1 20 9zm-8 2.5c2.6 0 5.5 3.6 5.5 6.2 0 1.9-1.5 2.8-3 2.8-1 0-1.6-.6-2.5-.6s-1.5.6-2.5.6c-1.5 0-3-.9-3-2.8 0-2.6 2.9-6.2 5.5-6.2z'/%3E%3C/svg%3E") center/34% no-repeat; }
.gestb-tarjeta__cuerpo { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gestb-tarjeta__nombre { margin: 0; font-size: 1.15rem; }
.gestb-tarjeta__nombre a { color: inherit; text-decoration: none; }
.gestb-tarjeta__meta { margin: 0 0 6px; color: #5d6b5a; font-size: .92rem; }
.gestb-tarjeta .gestb-boton { margin-top: auto; align-self: flex-start; }
.gestb-cat__paginas { display: flex; gap: 14px; justify-content: center; align-items: center; margin: 26px 0 0; }
.gestb-destacados__titulo { text-align: center; }

/* Ficha pública */
.gestb-ficha-pub__volver { margin: 0 0 14px; }
.gestb-ficha-pub__rejilla { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.gestb-ficha-pub__principal { display: block; border-radius: var(--gestb-r); overflow: hidden; background: #e9eee7; aspect-ratio: 4 / 3; }
.gestb-ficha-pub__principal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gestb-ficha-pub__miniaturas { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gestb-ficha-pub__miniaturas button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; width: 72px; height: 72px; }
.gestb-ficha-pub__miniaturas button[aria-current="true"] { border-color: var(--gestb-p); }
.gestb-ficha-pub__miniaturas img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gestb-ficha-pub__nombre { margin: 0 0 4px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.gestb-ficha-pub__datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.gestb-ficha-pub__datos div { background: var(--gestb-tierra); border-radius: 10px; padding: 10px 12px; }
.gestb-ficha-pub__datos dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #6b6450; }
.gestb-ficha-pub__datos dd { margin: 2px 0 0; font-weight: 600; }
.gestb-ficha-pub__aviso { background: #fff6e0; border-left: 4px solid #e0a800; padding: 10px 12px; border-radius: 6px; font-size: .92rem; }

/* Solicitud */
.gestb-solicitud { margin: 40px 0 0; padding: 28px; background: var(--gestb-tierra); border-radius: var(--gestb-r); scroll-margin-top: 90px; }
.gestb-solicitud h3 { margin-top: 0; }
.gestb-solicitud__campos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 14px; }
.gestb-solicitud__campos label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.gestb-solicitud__ancho { grid-column: 1 / -1; }
.gestb-solicitud input[type="text"], .gestb-solicitud input[type="email"], .gestb-solicitud input[type="tel"], .gestb-solicitud textarea,
.gestb-res input[type="text"], .gestb-res input[type="email"], .gestb-res input[type="tel"], .gestb-res textarea {
	font: inherit; font-weight: 400; padding: .7em .9em; border: 1px solid #d9d0b8; border-radius: 10px; background: #fff; width: 100%;
}
.gestb-solicitud__rgpd { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; margin: 0 0 16px; }
.gestb-solicitud__rgpd input { margin-top: .25em; }
.gestb-solicitud__trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gestb-solicitud__ok { background: #e3f2dc; padding: 14px; border-radius: 10px; font-weight: 600; }
.gestb-solicitud__error { background: #fdecea; padding: 12px 14px; border-radius: 10px; }

/* Hero de prioritarias */
.gestb-hero { position: relative; height: var(--gestb-hero-alto, 560px); max-height: 82vh; overflow: hidden; border-radius: var(--gestb-r); background: #2b3328; color: #fff; }
.gestb-hero__pista, .gestb-hero__diapo { position: absolute; inset: 0; }
/* Fondo: la misma foto, ampliada y desenfocada (como el carrusel de la web Joomla). */
.gestb-hero__fondo { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(22px) brightness(.8) saturate(1.1); transform: scale(1.08); }
/* Foto: entera, sin recortar, centrada. */
.gestb-hero__diapo img { position: relative; z-index: 1; display: block; height: 100%; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; box-shadow: 0 0 60px rgba(0,0,0,.35); }
.gestb-hero__diapo::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 45%); pointer-events: none; }
.gestb-hero__texto { position: absolute; left: clamp(18px, 6vw, 90px); right: 18px; bottom: clamp(24px, 5vw, 56px); z-index: 2; max-width: 640px; }
.gestb-hero__texto h2 { color: #fff; margin: 0 0 4px; font-size: clamp(1.5rem, 3vw, 2.2rem); text-transform: uppercase; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.gestb-hero__texto p { margin: 0 0 14px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.gestb-hero__ante { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; }
.gestb-hero__puntos { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.85); }
.gestb-hero__puntos button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #b9c4b4; cursor: pointer; }
.gestb-hero__puntos button[aria-current="true"] { background: var(--gestb-p, #61A347); }
@media (max-width: 640px) {
	.gestb-hero__diapo img { width: 100%; object-fit: cover; box-shadow: none; }
	.gestb-hero__puntos { bottom: auto; top: 12px; }
}
.gestb-hero__flecha { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #222; font-size: 28px; line-height: 1; cursor: pointer; }
.gestb-hero__flecha--ant { left: 14px; } .gestb-hero__flecha--sig { right: 14px; }

@container (max-width: 760px) { .gestb-ficha-pub__rejilla { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
	.gestb-ficha-pub__rejilla { grid-template-columns: 1fr; gap: 18px; }
	.gestb-solicitud__campos { grid-template-columns: 1fr; }
	.gestb-solicitud { padding: 18px; }
	.gestb-cat__filtros select { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) { .gestb-tarjeta { transition: none; } }

/* Reservas */
.gestb-res { --gestb-p: var(--cpatb-c-primario, #61A347); --gestb-p-hover: var(--cpatb-c-primario-hover, #404040); --gestb-tierra: var(--cpatb-c-tierra-claro, #F5EDD8); --gestb-r: 14px; scroll-margin-top: 90px; }
.gestb-res *, .gestb-res *::before { box-sizing: border-box; }
.gestb-res__paso { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.gestb-res__paso legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.gestb-res__paso legend span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gestb-p); color: #fff; font-size: .9rem; }
.gestb-res__servicios { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.gestb-res__servicio, .gestb-res__turno { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 2px solid #e2e7df; border-radius: 12px; cursor: pointer; background: #fff; }
.gestb-res__servicio:has(input:checked), .gestb-res__turno:has(input:checked) { border-color: var(--gestb-p); background: #f3f9ef; }
.gestb-res__servicio span, .gestb-res__turno span { display: flex; flex-direction: column; }
.gestb-res__servicio small, .gestb-res__turno small { color: #5d6b5a; }
.gestb-res__lista-dias { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
.gestb-res__dia { flex: none; width: 74px; padding: 8px 4px; border: 2px solid #e2e7df; border-radius: 12px; background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; font: inherit; color: inherit; scroll-snap-align: start; }
.gestb-res__dia strong { font-size: 1.4rem; line-height: 1.1; }
.gestb-res__dia small { font-size: .75rem; color: #5d6b5a; }
.gestb-res__dia[aria-pressed="true"] { border-color: var(--gestb-p); background: var(--gestb-p); color: #fff; }
.gestb-res__dia[aria-pressed="true"] small { color: #eaf5e4; }
.gestb-res__dia.is-lleno, .gestb-res__turno.is-lleno { opacity: .45; cursor: not-allowed; }
.gestb-res__dia-elegido { font-weight: 700; margin: 0 0 8px; }
.gestb-res__dia-elegido::first-letter { text-transform: uppercase; }
.gestb-res__lista-turnos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.gestb-res__cargando { color: #5d6b5a; }
.gestb-res .gestb-boton[disabled] { opacity: .5; cursor: not-allowed; }
.gestb-res--ver .gestb-ficha-pub__datos { max-width: 640px; }

/* 0.21.5 — Reservas: horarios, calendario mensual y plazas libres */
.gestb-res { --gestb-libre: #3E7A2B; --gestb-libre-f: #EAF4E6; --gestb-pocas: #8A5A00; --gestb-pocas-f: #FCEFD2; --gestb-lleno: #A3352B; --gestb-lleno-f: #FBE9E7; --gestb-borde: var(--cpatb-c-borde, #E2E7DF); }
.gestb-res__infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 0 0 26px; }
.gestb-res__info { background: var(--cpatb-c-superficie, #fff); border: 1px solid var(--gestb-borde); border-radius: var(--gestb-r); padding: 18px 20px; }
.gestb-res__info-tit { margin: 0 0 8px; font-size: 1.05rem; }
.gestb-res__info dl { margin: 0; }
.gestb-res__info-fila { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--gestb-borde); font-size: .95rem; }
.gestb-res__info-fila:last-child { border-bottom: 0; }
.gestb-res__info-fila dt { color: var(--cpatb-c-texto-suave, #4A4945); }
.gestb-res__info-fila dd { margin: 0; font-weight: 600; text-align: right; }
.gestb-res__info-fila--aforo dd { color: var(--gestb-libre); }

.gestb-res__rejilla { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.gestb-res__rejilla .gestb-solicitud__campos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gestb-res__rejilla .gestb-solicitud__ancho { grid-column: 1 / -1; }
@media (max-width: 900px) { .gestb-res__rejilla { grid-template-columns: 1fr; } }

.gestb-cal__vistas { display: inline-flex; border: 1px solid var(--gestb-borde); border-radius: 999px; padding: 3px; margin: 0 0 12px; background: var(--cpatb-c-superficie, #fff); }
.gestb-cal__vista { border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 16px; border-radius: 999px; cursor: pointer; color: inherit; }
.gestb-cal__vista[aria-pressed="true"] { background: var(--gestb-p); color: #fff; }
.gestb-cal--mes { background: var(--cpatb-c-superficie, #fff); border: 1px solid var(--gestb-borde); border-radius: var(--gestb-r); overflow: hidden; }
.gestb-cal__cab { display: flex; align-items: center; justify-content: space-between; background: var(--gestb-p); color: #fff; padding: 8px 10px; }
.gestb-cal__mes { font-size: 1.05rem; }
.gestb-cal__nav { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.gestb-cal__nav:hover:not([disabled]) { background: rgba(255,255,255,.32); }
.gestb-cal__nav[disabled] { opacity: .35; cursor: default; }
.gestb-cal__rejilla { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; padding: 10px; }
.gestb-cal__sem { text-align: center; font-size: .78rem; font-weight: 700; color: var(--cpatb-c-texto-suave, #4A4945); padding: 4px 0; }
.gestb-cal__dia { aspect-ratio: 1 / 1; min-width: 0; border: 2px solid transparent; border-radius: 10px; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; padding: 2px; }
.gestb-cal__dia strong { font-size: 1rem; line-height: 1.1; }
.gestb-cal__dia small { font-size: .62rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gestb-cal__dia.is-libre { background: var(--gestb-libre-f); color: var(--gestb-libre); }
.gestb-cal__dia.is-pocas { background: var(--gestb-pocas-f); color: var(--gestb-pocas); }
.gestb-cal__dia.is-lleno { background: var(--gestb-lleno-f); color: var(--gestb-lleno); cursor: not-allowed; }
.gestb-cal__dia.is-sin { background: transparent; color: var(--cpatb-c-texto-tenue, #A3A29C); cursor: default; }
.gestb-cal__dia.is-hoy { border-color: currentColor; }
.gestb-cal__dia:hover:not([disabled]) { filter: brightness(.95); }
.gestb-cal__dia[aria-pressed="true"] { background: var(--gestb-p); color: #fff; border-color: var(--gestb-p); }
.gestb-cal__dia:focus-visible, .gestb-cal__vista:focus-visible, .gestb-cal__nav:focus-visible { outline: 3px solid var(--cpatb-c-acento, #E8A33D); outline-offset: 2px; }
.gestb-cal__leyenda { list-style: none; margin: 0; padding: 4px 12px 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; color: var(--cpatb-c-texto-suave, #4A4945); }
.gestb-cal__leyenda li { display: inline-flex; align-items: center; gap: 6px; }
.gestb-cal__punto { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--gestb-borde); }
.gestb-cal__leyenda .is-libre .gestb-cal__punto { background: var(--gestb-libre-f); border-color: var(--gestb-libre); }
.gestb-cal__leyenda .is-pocas .gestb-cal__punto { background: var(--gestb-pocas-f); border-color: var(--gestb-pocas); }
.gestb-cal__leyenda .is-lleno .gestb-cal__punto { background: var(--gestb-lleno-f); border-color: var(--gestb-lleno); }
/* 0.21.7 — vista Horas (semana) */
.gestb-cal--horas { background: var(--cpatb-c-superficie, #fff); border: 1px solid var(--gestb-borde); border-radius: var(--gestb-r); overflow: hidden; }
.gestb-cal__semana { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px; }
.gestb-cal__esq { }
.gestb-cal__col { display: flex; flex-direction: column; align-items: center; padding: 2px 0 6px; line-height: 1.15; }
.gestb-cal__col small { font-size: .72rem; font-weight: 700; color: var(--cpatb-c-texto-suave, #4A4945); }
.gestb-cal__col strong { font-size: 1rem; }
.gestb-cal__col.is-hoy strong { color: #fff; background: var(--gestb-p); border-radius: 999px; padding: 0 7px; }
.gestb-cal__hora { display: flex; flex-direction: column; justify-content: center; font-size: .78rem; line-height: 1.15; color: var(--cpatb-c-texto-suave, #4A4945); }
.gestb-cal__hora strong { color: var(--cpatb-c-texto, #2C2C2A); font-size: .85rem; }
.gestb-cal__celda { min-height: 44px; border-radius: 8px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; padding: 0; }
.gestb-cal__celda.is-libre { background: var(--gestb-libre-f); color: var(--gestb-libre); }
.gestb-cal__celda.is-pocas { background: var(--gestb-pocas-f); color: var(--gestb-pocas); }
.gestb-cal__celda.is-lleno { background: var(--gestb-lleno-f); color: var(--gestb-lleno); cursor: not-allowed; }
.gestb-cal__celda.is-sin { background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(0,0,0,.035) 6px 12px); cursor: default; }
.gestb-cal__celda:hover:not([disabled]) { filter: brightness(.95); }
.gestb-cal__celda[aria-pressed="true"] { background: var(--gestb-p); color: #fff; border-color: var(--gestb-p); }
.gestb-cal__celda:focus-visible { outline: 3px solid var(--cpatb-c-acento, #E8A33D); outline-offset: 2px; }
.gestb-cal__nada { grid-column: 1 / -1; text-align: center; color: var(--cpatb-c-texto-suave, #4A4945); margin: 14px 0; }
.gestb-cal__nota { margin: 0; padding: 0 12px 12px; font-size: .78rem; color: var(--cpatb-c-texto-suave, #4A4945); }
@media (max-width: 520px) { .gestb-cal__semana { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 3px; padding: 6px; } .gestb-cal__hora { font-size: .68rem; } .gestb-cal__hora small { display: none; } .gestb-cal__celda { min-height: 38px; font-size: .85rem; } }
@media (max-width: 520px) { .gestb-cal__txt { display: none; } .gestb-cal__rejilla { gap: 3px; padding: 6px; } }
.gestb-res__dia em { font-style: normal; font-size: .68rem; font-weight: 600; margin-top: 2px; }
.gestb-res__dia.is-pocas:not([aria-pressed="true"]) em { color: var(--gestb-pocas); }
.gestb-res__dia.is-libre:not([aria-pressed="true"]) em { color: var(--gestb-libre); }
.gestb-res__turno.is-libre small { color: var(--gestb-libre); font-weight: 600; }
.gestb-res__turno.is-pocas small { color: var(--gestb-pocas); font-weight: 600; }
.gestb-res__turno.is-lleno small { color: var(--gestb-lleno); }

/* =========================================================================
   0.19.0 — Catálogo «A» a todo el ancho y ficha «A» (formulario plegado)
   ========================================================================= */
/* La página del catálogo usa todo el ancho del contenido (no la columna de lectura). */
.cpatb-prosa:has(.gestb-cat) { max-width: none; }
.gestb-cat { --gestb-borde: var(--cpatb-c-borde, #ECEBE4); --gestb-borde-f: var(--cpatb-c-borde-fuerte, #DEDDD5); --gestb-texto-s: var(--cpatb-c-texto-suave, #4A4945); --gestb-tenue: var(--cpatb-c-texto-tenue, #8A8880); }

/* Filtros: una barra blanca, campos que reparten el ancho. */
.gestb-cat .gestb-cat__filtros { background: #fff; border: 1px solid var(--gestb-borde); border-radius: var(--gestb-r); padding: 12px; gap: 10px; align-items: center; margin: 0 0 14px; }
.gestb-cat .gestb-cat__buscar { flex: 2 1 240px; margin: 0; }
.gestb-cat .gestb-cat__filtros input, .gestb-cat .gestb-cat__filtros select { border-radius: 10px; border-color: var(--gestb-borde-f); padding: .7em .9em; min-height: 46px; }
.gestb-cat .gestb-cat__filtros select { flex: 1 1 170px; width: auto; min-width: 0; }
.gestb-cat .gestb-cat__filtros button { border-radius: 10px; min-height: 46px; padding: .6em 1.6em; flex: 0 0 auto; }
.gestb-cat .gestb-cat__total { color: var(--gestb-texto-s); margin: 0 0 18px; }

/* Rejilla: 4 columnas en escritorio, foto vertical igual para todos. */
.gestb-cat .gestb-cat__rejilla { gap: 24px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); padding: 0; }
.gestb-cat .gestb-cat__rejilla > li { margin: 0; list-style: none; }
.gestb-cat .gestb-tarjeta { border: 1px solid var(--gestb-borde); box-shadow: none; }
.gestb-cat .gestb-tarjeta:hover { box-shadow: 0 10px 28px rgba(0,0,0,.08); }
/* overflow + img absoluta: sin esto la foto vertical estiraba la caja (mínimo automático del aspect-ratio). */
.gestb-cat .gestb-tarjeta__foto { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.gestb-cat .gestb-tarjeta__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .35s ease; }
.gestb-cat .gestb-tarjeta:hover .gestb-tarjeta__foto img { transform: scale(1.03); }
.gestb-cat .gestb-tarjeta__sin-foto { position: absolute; inset: 0; min-height: 0; }
.gestb-cat .gestb-tarjeta__cuerpo { padding: 16px 18px 18px; gap: 10px; }
.gestb-cat .gestb-tarjeta__nombre { font-size: 1.25rem; margin: 0; }
.gestb-tarjeta__etiquetas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.gestb-etiq { font-size: .78rem; font-weight: 600; line-height: 1.2; padding: .35em .8em; border-radius: 999px; background: var(--cpatb-c-fondo, #F1F0EA); color: var(--gestb-texto-s, #4A4945); }
.gestb-etiq--sexo { background: var(--cpatb-c-primario-suave, #EAF4E6); color: #2F5E20; }
.gestb-etiq--edad { background: var(--gestb-tierra); color: var(--cpatb-c-acento-texto, #6E5520); }
.gestb-etiq--tamano { background: #F1F0EA; }
.gestb-boton--borde { background: transparent !important; color: var(--gestb-p) !important; box-shadow: inset 0 0 0 2px var(--gestb-p); }
.gestb-boton--borde:hover, .gestb-boton--borde:focus-visible { background: var(--gestb-p) !important; color: #fff !important; }
.gestb-cat .gestb-tarjeta .gestb-boton { align-self: stretch; text-align: center; margin-top: auto; }

/* Ficha A */
.gestb-ficha-pub .gestb-ficha-pub__rejilla { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; }
.gestb-ficha-pub .gestb-ficha-pub__principal { position: relative; border-radius: 18px; }
.gestb-ficha-pub .gestb-ficha-pub__principal img { position: absolute; inset: 0; border-radius: 0; }
.gestb-ficha-pub__ampliar { position: absolute; right: 12px; bottom: 12px; background: #fff; color: #2C2C2A; font-size: .8rem; font-weight: 600; padding: .45em .9em; border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.gestb-ficha-pub .gestb-ficha-pub__miniaturas { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; margin-top: 12px; padding: 0; }
.gestb-ficha-pub .gestb-ficha-pub__miniaturas li { margin: 0; list-style: none; }
.gestb-ficha-pub .gestb-ficha-pub__miniaturas button { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; border-width: 3px; }
.gestb-ficha-pub .gestb-ficha-pub__miniaturas img { border-radius: 0; }
.gestb-ficha-pub__info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.gestb-ficha-pub__ante { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cpatb-c-acento-texto, #8A6E2E); }
.gestb-ficha-pub .gestb-ficha-pub__nombre { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; } /* 0.21.3: antes hasta 3.2rem */
.gestb-ficha-pub .gestb-tarjeta__etiquetas .gestb-etiq { font-size: .88rem; }
.gestb-ficha-pub__desc { font-size: 1rem; line-height: 1.75; color: var(--gestb-texto-s); max-width: 65ch; }
.gestb-ficha-pub__desc p { margin: 0 0 .8em; }
.gestb-ficha-pub__desc p:last-child { margin-bottom: 0; }
.gestb-ficha-pub .gestb-ficha-pub__datos { gap: 0 20px; margin: 0; border-top: 1px solid var(--gestb-borde); }
.gestb-ficha-pub .gestb-ficha-pub__datos div { background: none; border-radius: 0; padding: 12px 0; border-bottom: 1px solid var(--gestb-borde); }
.gestb-ficha-pub .gestb-ficha-pub__datos dt { color: var(--gestb-tenue); font-size: .72rem; }
.gestb-ficha-pub__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }
.gestb-ficha-pub__tel { color: var(--gestb-texto-s); font-size: .95rem; }

/* Bloque de adopción: plegado hasta pulsar «Quiero adoptar». */
.gestb-ficha-pub__adoptar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; margin: 48px 0 0; padding: 32px; background: var(--gestb-tierra); border-radius: 20px; scroll-margin-top: 90px; }
.gestb-ficha-pub__pasos h3 { margin: 0 0 12px; }
.gestb-ficha-pub__pasos ol { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; line-height: 1.6; }
.gestb-ficha-pub__adoptar .gestb-solicitud { margin: 0; background: #fff; }
@media (max-width: 860px) {
	.gestb-ficha-pub .gestb-ficha-pub__rejilla { grid-template-columns: 1fr; gap: 24px; }
	.gestb-ficha-pub__adoptar { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
}
@media (max-width: 560px) {
	.gestb-cat .gestb-cat__rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.gestb-cat .gestb-tarjeta__cuerpo { padding: 12px; }
	.gestb-cat .gestb-tarjeta__nombre { font-size: 1.05rem; }
	.gestb-ficha-pub .gestb-ficha-pub__datos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .gestb-cat .gestb-tarjeta__foto img { transition: none; } }

/* 0.20.0 — Solicitud de adopción en ventana (modal) */
.gestb-modal { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px; background: transparent; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.gestb-modal::backdrop { background: rgba(30, 30, 28, .6); }
.gestb-modal[open] { animation: gestb-modal-in .2s ease-out; }
.gestb-modal .gestb-ficha-pub__adoptar { margin: 0; border-radius: 20px; }
.gestb-modal .gestb-solicitud { scroll-margin-top: 0; }
.gestb-modal__cerrar { position: sticky; float: right; top: 10px; margin: 10px 10px -54px 0; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #2C2C2A; font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.gestb-modal__cerrar:hover, .gestb-modal__cerrar:focus-visible { background: var(--cpatb-c-primario, #61A347); color: #fff; outline: none; }
.gestb-modal-abierto, .gestb-modal-abierto body { overflow: hidden; }
@keyframes gestb-modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .gestb-modal .gestb-ficha-pub__pasos { padding-right: 48px; } }
@media (prefers-reduced-motion: reduce) { .gestb-modal[open] { animation: none; } }

/* 0.21.0 — La ventana de solicitud cabe en pantalla sin scroll (portátil de 768 px de alto en adelante) */
.gestb-modal .gestb-ficha-pub__adoptar { grid-template-columns: 230px minmax(0, 1fr); gap: 20px; padding: 20px; }
.gestb-modal .gestb-ficha-pub__pasos { padding-top: 14px; }
.gestb-modal .gestb-ficha-pub__pasos h3 { font-size: 1.05rem; margin-bottom: 10px; }
.gestb-modal .gestb-ficha-pub__pasos ol { font-size: .92rem; gap: 6px; line-height: 1.45; }
.gestb-modal .gestb-solicitud { padding: 20px 22px; }
.gestb-modal .gestb-solicitud h3 { font-size: 1.15rem; margin: 0 52px 6px 0; line-height: 1.3; }
.gestb-modal .gestb-solicitud > p { margin: 0 0 12px; font-size: .92rem; line-height: 1.5; }
.gestb-modal .gestb-solicitud__campos { gap: 10px; margin-bottom: 10px; }
.gestb-modal .gestb-solicitud__campos label { gap: 4px; font-size: .86rem; }
.gestb-modal .gestb-solicitud input[type="text"], .gestb-modal .gestb-solicitud input[type="email"], .gestb-modal .gestb-solicitud input[type="tel"] { padding: .55em .8em; }
.gestb-modal .gestb-solicitud textarea { padding: .55em .8em; min-height: 92px; height: 92px; resize: vertical; }
.gestb-modal .gestb-solicitud__rgpd { font-size: .8rem; line-height: 1.45; margin-bottom: 12px; }
.gestb-modal .gestb-solicitud .gestb-boton { padding: .75em 1.6em; }
.gestb-modal .gestb-modal__cerrar { width: 40px; height: 40px; font-size: 26px; margin: 8px 8px -48px 0; top: 8px; }
@media (max-width: 860px) {
	.gestb-modal .gestb-ficha-pub__adoptar { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
	.gestb-modal .gestb-ficha-pub__pasos { padding: 4px 48px 0 6px; }
	.gestb-modal .gestb-ficha-pub__pasos ol { font-size: .86rem; }
	.gestb-modal .gestb-solicitud { padding: 16px; }
}

/* 0.21.1 — Principio de la descripción en las tarjetas (3 líneas como mucho) */
.gestb-tarjeta__desc { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--cpatb-c-texto-suave, #4A4945); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 560px) { .gestb-tarjeta__desc { -webkit-line-clamp: 2; line-clamp: 2; font-size: .82rem; } }

/* 0.22.16: «Reservar una visita | Mis reservas» y listado de reservas del usuario. */
.gestb-res__pestanas { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid #E3E2DC; margin: 0 0 20px; }
.gestb-res__pestana { padding: 10px 16px; margin-bottom: -2px; border-bottom: 3px solid transparent; color: #6B726C; font-weight: 600; text-decoration: none; }
.gestb-res__pestana:hover { color: #26302A; }
.gestb-res__pestana.is-activa { color: #26302A; font-weight: 800; border-bottom-color: var(--gestb-p, #61A347); }
.gestb-res__pestana span { display: inline-block; min-width: 22px; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--gestb-p, #61A347); color: #fff; font-size: .8rem; text-align: center; }
.gestb-res__titulo { font-size: 1.15rem; margin: 22px 0 10px; }
.gestb-mis { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.gestb-mis__item { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; background: #fff; border: 1px solid #E3E2DC; border-left: 5px solid var(--gestb-p, #61A347); border-radius: 12px; }
.gestb-mis__fecha { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; }
.gestb-mis__fecha span { color: #6B726C; font-size: .9rem; }
.gestb-mis__estado { display: inline-block; border-radius: 999px; padding: 3px 11px; font-size: .8rem; font-weight: 700; background: #F3F2EE; color: #6B726C; }
.gestb-mis__estado--confirmada { background: #EEF3FA; color: #2A4F7A; }
.gestb-mis__estado--asistio { background: #EAF4E6; color: #2F6A1F; }
.gestb-mis__estado--no_asistio { background: #FBE9E7; color: #8E2B20; }
.gestb-mis__estado--cancelada { text-decoration: line-through; }
.gestb-mis--anteriores .gestb-mis__item { border-left-color: #CFCEC6; background: #FAFAF8; }
.gestb-mis .gestb-boton { margin: 0; }
.gestb-mis__resumen { background: #EAF4E6; color: #2F6A1F; border-radius: 12px; padding: 12px 16px; font-weight: 600; margin: 0 0 6px; }

/* 0.22.18: catálogo — «Se lleva bien con» y compartir la ficha. */
.gestb-cat__convive { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 0; margin: 4px 0 0; padding: 0; }
.gestb-cat__convive legend { float: left; margin-right: 6px; font-weight: 700; font-size: .9rem; color: #4A524C; padding: 0; }
.gestb-cat__convive label { cursor: pointer; }
.gestb-cat__convive input { position: absolute; opacity: 0; }
.gestb-cat__convive span { display: inline-block; border: 1.5px solid #CFCEC6; border-radius: 999px; padding: 5px 14px; font-weight: 600; font-size: .9rem; background: #fff; }
.gestb-cat__convive input:checked + span { background: var(--gestb-p, #61A347); border-color: var(--gestb-p, #61A347); color: #fff; }
.gestb-cat__convive input:focus-visible + span { outline: 3px solid #E8A33D; outline-offset: 2px; }
.gestb-compartir { margin-top: 22px; padding-top: 16px; border-top: 1px solid #E3E2DC; }
.gestb-compartir__titulo { display: block; font-size: .9rem; color: #6B726C; margin-bottom: 10px; }
.gestb-compartir__botones { display: flex; flex-wrap: wrap; gap: 8px; }
.gestb-compartir__btn { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid #CFCEC6; border-radius: 999px; padding: 8px 15px; background: #fff; color: #26302A; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; }
.gestb-compartir__btn:hover, .gestb-compartir__btn:focus-visible { border-color: #26302A; }
.gestb-compartir__btn--wa { background: #25D366; border-color: #25D366; color: #fff; }
.gestb-compartir__btn--wa:hover, .gestb-compartir__btn--wa:focus-visible { background: #1EBE5A; border-color: #1EBE5A; color: #fff; }
.gestb-compartir__btn--fb { background: #1877F2; border-color: #1877F2; color: #fff; }
.gestb-compartir__btn--fb:hover, .gestb-compartir__btn--fb:focus-visible { background: #0F66D6; border-color: #0F66D6; color: #fff; }
.gestb-compartir__btn.is-copiado { border-color: #61A347; color: #2F6A1F; }
/* 0.22.18: con el orden, el buscador va en su propia fila y los desplegables caben enteros. */
.gestb-cat .gestb-cat__filtros .gestb-cat__buscar { flex: 1 1 100%; }
.gestb-cat .gestb-cat__filtros .gestb-cat__buscar input { width: 100%; }
.gestb-cat .gestb-cat__filtros select { flex: 1 1 190px; padding-right: 2.2em; }
