/* Listado en filas (Claude Design 01/11, «Resultados en lista», cabecera y fila
   finas; php/views/grupales-lista.php). Medidas del tablero ResultadosFina. */

.gl { background: var(--c-crema); padding: 0 0 56px; font-family: Barlow, sans-serif; font-style: normal; color: var(--c-tinta); }
.gl-link { padding: 6px 4px; border: 0; background: none; color: var(--c-naranja-txt); font: 700 14px Barlow, sans-serif; text-decoration: underline; cursor: pointer; white-space: nowrap; }

/* ---------- Cabecera: 184 px, foto de la región con degradé o crema ---------- */
.gl-cabecera { position: relative; height: 184px; overflow: hidden; border-bottom: 1px solid var(--c-borde); background: linear-gradient(90deg, #fff1e8 0%, #fbf7f3 70%); }
.gl-cabecera__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.gl-cabecera--foto::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(25, 18, 13, .86) 0%, rgba(25, 18, 13, .62) 45%, rgba(25, 18, 13, .15) 100%); }
.gl-cabecera__marco { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; gap: 40px; }
.gl-cabecera__texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.gl-cabecera__migas { font-size: 13px; font-weight: 600; color: var(--c-texto); }
.gl-cabecera__migas a { color: inherit; text-decoration: none; }
.gl-cabecera__migas a:hover { text-decoration: underline; }
.gl-titulo { margin: 0; font-size: 38px; line-height: 1.05; font-weight: 800; font-style: normal; letter-spacing: -.01em; text-transform: none; color: var(--c-tinta); }
.gl-bajada { font-size: 16px; font-weight: 500; color: var(--c-texto); }
.gl-cabecera--foto .gl-cabecera__migas, .gl-cabecera--foto .gl-bajada { color: rgba(255, 255, 255, .92); }
.gl-cabecera--foto .gl-titulo { color: #fff; }
.gl-buscador { flex: none; width: 440px; display: flex; align-items: center; gap: 10px; height: 52px; box-sizing: border-box; padding: 0 6px 0 16px; border: 1px solid var(--c-borde-2); border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(31, 26, 23, .18); }
.gl-buscador input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 500 16px Barlow, sans-serif; color: var(--c-tinta); }
.gl-buscador button { flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: #c94f10; color: #fff; font: 700 15px Barlow, sans-serif; cursor: pointer; }
.gl-buscador button:hover { background: #a83f0b; }
.gl-promo-vino { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin-top: 4px; padding: 6px; border: 1px solid #f3c9ad; border-radius: 999px; background: #fff; }
.gl-promo-vino img { flex: none; width: 36px; height: 36px; border-radius: 999px; object-fit: cover; object-position: 50% 0; background: #fde6d6; }
.gl-promo-vino > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.gl-promo-vino small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-naranja-txt); }
.gl-promo-vino strong { font-size: 15px; font-weight: 800; }
.gl-promo-vino__x { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: #fff1e8; font-size: 17px; color: #9a3a0a; text-decoration: none; }
.gl-promo-vino__x:hover { color: #9a3a0a; text-decoration: none; background: #fde0cd; }

.gl__marco { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 24px; }

/* ---------- Filtros ---------- */
.gl-filtros { position: sticky; top: calc(var(--c-header-alto) + 16px); max-height: calc(100vh - var(--c-header-alto) - 32px); overflow-y: auto; background: #fff; border: 1px solid var(--c-borde); border-radius: 16px; }
.gl-filtros__cab, .gl-filtros__pie { display: none; }
.gl-filtros__cuerpo { padding: 4px 18px 8px; }
.gl-faceta { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 14px 0; border: 0; border-top: 1px solid #f0e8e0; }
.gl-faceta:first-child { border-top: 0; }
.gl-faceta__tit { display: block; margin: 0 0 4px; padding: 0; font-size: 16px; font-weight: 700; color: var(--c-tinta); }
.gl-faceta__tit small { font-weight: 500; color: #6b625b; }
.gl-opcion { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 0; font-size: 15px; font-weight: 500; color: var(--c-tinta); cursor: pointer; }
.gl-opcion input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: #c94f10; }
.gl-opcion span { flex: 1; min-width: 0; line-height: 1.2; }
.gl-opcion b { flex: none; min-width: 26px; padding: 1px 7px; border-radius: 999px; background: #f6f1ec; font-size: 13px; font-weight: 600; color: var(--c-texto); text-align: center; }
.gl-opcion--apagada { opacity: .45; cursor: default; }
.gl-faceta--corta:not(.is-abierta) .gl-opcion--mas { display: none; }
.gl-mas { align-self: flex-start; }
.gl-select { width: 100%; height: 40px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--c-borde-2); border-radius: 8px; background: #fff; font: 500 15px Barlow, sans-serif; color: var(--c-tinta); }
.gl-precios { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gl-precios input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--c-borde-2); border-radius: 8px; font: 500 15px Barlow, sans-serif; }

/* ---------- Barra arriba de la lista: filtros puestos y orden ---------- */
.gl-resultados { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gl-barra-sup { display: flex; align-items: center; gap: 16px; }
.gl-pastillas { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.gl-pastilla { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px 0 12px; border: 1px solid #f3c9ad; border-radius: 999px; background: #fff1e8; font: 600 14px Barlow, sans-serif; color: var(--c-tinta); white-space: nowrap; cursor: pointer; }
.gl-pastilla::after { content: "×"; margin-left: 4px; font-size: 17px; line-height: 1; color: #9a3a0a; }
.gl-orden { flex: none; display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 15px; color: var(--c-texto); }
.gl-orden select { height: 40px; padding: 0 10px; border: 1px solid var(--c-borde-2); border-radius: 8px; background: #fff; font: 700 15px Barlow, sans-serif; color: var(--c-tinta); }

/* ---------- Fila: 236 · info · 232, con 12 px de aire ---------- */
.gl-filas { display: flex; flex-direction: column; gap: 14px; }
.gl-fila { position: relative; display: grid; grid-template-columns: 236px minmax(0, 1fr) 232px; padding: 12px; background: #fff; border: 1px solid var(--c-borde); border-radius: 16px; box-shadow: 0 1px 2px rgba(42, 28, 18, .04); transition: box-shadow .2s; }
.gl-fila[hidden] { display: none; }
/* Toda la fila lleva a la ficha: el link del título la cubre entera. En la fila no se elige nada. */
.gl-fila__titulo a::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: 16px; }
.gl-fila__titulo a:focus-visible { outline: 0; }
.gl-fila__titulo a:focus-visible::after { outline: 3px solid #ffd100; outline-offset: -3px; }
.gl-fila:hover { box-shadow: 0 12px 28px rgba(42, 28, 18, .12); }
.gl-fila:hover .gl-fila__titulo a { color: var(--c-naranja-txt); }
.gl-fila__foto { position: relative; width: 236px; height: 172px; border-radius: 10px; overflow: hidden; background: #eee3d9; }
.gl-fila__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* El cintillo de siempre, más chico: la foto es la mitad que en la tarjeta. */
.gl-fila__cintillo { position: absolute; left: 8px; top: 0; z-index: 2; width: 300px; height: 90px; pointer-events: none; transform: scale(.84); transform-origin: 0 0; }
.gl-sello { position: absolute; left: 8px; bottom: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .96); font-size: 12px; font-weight: 700; color: #c4470c; box-shadow: 0 1px 6px rgba(31, 26, 23, .22); }
.gl-sello--avion, .gl-sello--paquetes { color: #1f5f8b; }
.gl-sello--cruceros { color: #0f6e6a; }
.gl-fila__info { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 4px 24px 2px 22px; }
.gl-fila__volanta { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b625b; }
.gl-fila__titulo { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; font-style: normal; text-transform: none; color: var(--c-tinta); }
.gl-fila__titulo a { color: inherit; text-decoration: none; }
.gl-fila__cuando { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 16px; font-weight: 700; color: var(--c-tinta); }
.gl-fila__cuando svg { flex: none; }
.gl-fila__cuando small { font-size: 15px; font-weight: 500; color: #6b625b; }
.gl-fila__donde { margin: 0; font-size: 14px; line-height: 1.35; color: #6b625b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-fila__pie { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.gl-fila__incluye { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 13px; font-weight: 500; color: var(--c-texto); }
.gl-fila__incluye li { display: inline-flex; align-items: center; gap: 5px; }
.gl-disp { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--c-texto); }
.gl-disp > span { flex: none; width: 8px; height: 8px; border-radius: 999px; background: #1b7a50; }
.gl-disp--media > span, .gl-disp--pocos > span { background: #b45309; }
.gl-disp--no > span { background: #9a8a7b; }
.gl-fila__precio { display: flex; flex-direction: column; padding: 2px 4px 0 20px; border-left: 1px solid #f0e8e0; }
.gl-fila__desde { font-size: 12px; line-height: 1.3; font-weight: 500; color: #6b625b; }
.gl-fila__monto { margin-top: 2px; font-size: 30px; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; color: var(--c-tinta); }
.gl-fila__monto small { margin-right: 3px; font-size: 15px; font-weight: 700; }
.gl-fila__total { font-size: 13px; color: #6b625b; }
.gl-fila__cuota { display: flex; gap: 7px; margin-top: 8px; padding: 7px 9px; border: 1px solid #f0e8e0; border-radius: 8px; background: #fbf7f3; line-height: 1.25; }
.gl-fila__cuota svg { flex: none; margin-top: 1px; }
.gl-fila__cuota > span { display: flex; flex-direction: column; }
.gl-fila__cuota b { font-size: 13px; font-weight: 700; color: var(--c-tinta); }
.gl-fila__cuota small { font-size: 12px; color: #6b625b; }
.gl-fila__ver { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin-top: auto; padding: 0 16px; border: 2px solid #c94f10; border-radius: 10px; background: #c94f10; color: #fff; font-size: 15px; font-weight: 700; }
.gl-fila:hover .gl-fila__ver { background: #a83f0b; border-color: #a83f0b; }
/* Agotada: foto en gris, precio gris, sin cuota, el botón con borde. Va al final del orden. */
.gl-fila--agotada .gl-fila__foto img { filter: grayscale(1); opacity: .7; }
.gl-fila--agotada .gl-fila__monto, .gl-fila--agotada .gl-fila__titulo { color: #6b625b; }
.gl-fila--agotada .gl-fila__ver, .gl-fila--agotada:hover .gl-fila__ver { background: #fff; border-color: #c94f10; color: #c4470c; }

/* ---------- Sin resultados ---------- */
.gl-vacio { padding: 32px; border: 2px dashed var(--c-borde-2); border-radius: 16px; background: #fff; }
.gl-vacio[hidden] { display: none; }
.gl-vacio h2 { margin: 0; font-size: 24px; font-weight: 800; }
.gl-vacio p { margin: 6px 0 18px; font-size: 16px; color: var(--c-texto); }
.gl-vacio__botones { display: flex; flex-wrap: wrap; gap: 10px; }
.gl-boton { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 2px solid #c94f10; border-radius: 999px; background: #c94f10; color: #fff; font: 700 16px Barlow, sans-serif; text-decoration: none; cursor: pointer; }
.gl-boton[hidden] { display: none; }
.gl-boton:hover { color: #fff; text-decoration: none; }
.gl-boton--borde { background: #fff; color: #c94f10; }
.gl-boton--borde:hover { background: #fff3ea; color: #c94f10; }
.gl-boton--wa { border-color: #1b7a50; background: #1b7a50; }

.gl-barra { display: none; }

@media (max-width: 1199px) {
    .gl__marco { grid-template-columns: 250px minmax(0, 1fr); gap: 22px; }
    .gl-buscador { width: 360px; }
    .gl-fila { grid-template-columns: 200px minmax(0, 1fr) 210px; }
    .gl-fila__foto { width: 200px; height: 160px; }
    .gl-fila__info { padding: 2px 16px 2px 16px; }
    .gl-fila__precio { padding-left: 16px; }
}

/* ---------- Celular: cabecera de ~150 px con el buscador montado, la tarjeta vertical,
   los filtros en una hoja y «Filtrar» y «Ordenar» fijos abajo ---------- */
@media (max-width: 991px) {
    .gl { padding-bottom: 96px; }
    .gl-cabecera { height: auto; overflow: visible; border-bottom: 0; background: none; }
    .gl-cabecera__foto, .gl-cabecera--foto::before { height: 124px; bottom: auto; }
    .gl-cabecera--foto::before { background: linear-gradient(0deg, rgba(25, 18, 13, .85) 0%, rgba(25, 18, 13, .45) 100%); }
    .gl-cabecera:not(.gl-cabecera--foto) .gl-cabecera__texto { background: linear-gradient(90deg, #fff1e8 0%, #fbf7f3 70%); }
    .gl-cabecera__marco { display: block; height: auto; padding: 0; max-width: none; }
    .gl-cabecera__texto { min-height: 124px; box-sizing: border-box; justify-content: flex-end; gap: 3px; padding: 16px 16px 34px; }
    .gl-cabecera__migas { display: none; }
    .gl-titulo { font-size: 25px; line-height: 1.08; }
    .gl-bajada { font-size: 14px; }
    .gl-buscador { position: relative; width: auto; height: 48px; margin: -24px 16px 0; }
    .gl-buscador button { height: 36px; }
    .gl-promo-vino { margin-top: 8px; }
    .gl__marco { display: block; padding-top: 16px; }
    .gl-barra-sup .gl-orden { display: none; }
    .gl-pastillas { flex-wrap: nowrap; overflow-x: auto; margin: 0 -15px; padding: 0 15px; scrollbar-width: none; }
    .gl-pastillas::-webkit-scrollbar { display: none; }
    .gl-filtros { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1040; display: flex; flex-direction: column; max-height: 88vh; border-radius: 18px 18px 0 0; border: 0; box-shadow: 0 -10px 40px rgba(20, 14, 10, .3); transform: translateY(105%); transition: transform .25s ease; visibility: hidden; }
    .gl-filtros.is-abierta { transform: none; visibility: visible; }
    .gl-filtros__cab { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 56px 12px 18px; border-bottom: 1px solid var(--c-borde); }
    .gl-filtros__cab::before { content: ""; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #ddd2c8; }
    .gl-filtros__cab h2 { flex: 1; margin: 0; font-size: 20px; font-weight: 800; }
    .gl-filtros__cerrar { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 26px; color: var(--c-texto); }
    .gl-filtros__cuerpo { flex: 1; overflow-y: auto; }
    .gl-filtros__pie { display: block; padding: 12px 18px 16px; border-top: 1px solid var(--c-borde); }
    .gl-filtros__pie .gl-boton { width: 100%; border-radius: 12px; }
    .gl-velo { position: fixed; inset: 0; z-index: 1035; background: rgba(20, 14, 10, .45); }
    .gl-fila { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
    .gl-fila__foto { width: 100%; height: 176px; border-radius: 0; }
    .gl-fila__cintillo { left: 0; transform: none; }
    .gl-fila__info { padding: 16px 16px 0; }
    .gl-fila__titulo { font-size: 20px; }
    .gl-fila__donde { white-space: normal; }
    .gl-fila__pie { margin-top: 4px; }
    .gl-fila__precio { margin: 14px 16px 16px; padding: 14px 0 0; border-left: 0; border-top: 1px solid #f0e8e0; }
    .gl-fila__ver { margin-top: 12px !important; }
    .gl-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--c-borde); box-shadow: 0 -6px 18px rgba(20, 14, 10, .08); }
    .gl-barra__filtrar { min-height: 48px; border: 0; border-radius: 12px; background: var(--c-tinta); color: #fff; font: 800 16px Barlow, sans-serif; }
    .gl-barra__orden { margin: 0; }
    .gl-barra__orden select { width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--c-borde-2); border-radius: 12px; background: #fff; font: 700 15px Barlow, sans-serif; color: var(--c-tinta); }
    .gl-vacio { padding: 22px; }
    .gl-vacio__botones .gl-boton { width: 100%; }
}

/* ---------- Precio: barra con dos manijas (grupales-lista.js, pintarRango) ---------- */
.gl-rango { display: flex; flex-direction: column; gap: 10px; }
.gl-rango__txt { font-size: 15px; font-weight: 600; color: var(--c-tinta); }
.gl-rango__pista { position: relative; height: 28px; margin: 0 11px; }
.gl-rango__pista::before { content: ""; position: absolute; left: -11px; right: -11px; top: 12px; height: 4px; border-radius: 4px; background: #eadfd5; }
.gl-rango__lleno { position: absolute; top: 12px; height: 4px; border-radius: 4px; background: #c94f10; }
.gl-rango input[type="range"] { position: absolute; left: -11px; top: 0; width: calc(100% + 22px); height: 28px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.gl-rango input[type="range"]::-webkit-slider-runnable-track { background: none; border: 0; }
.gl-rango input[type="range"]::-moz-range-track { background: none; border: 0; }
.gl-rango input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; border: 1px solid #ddd2c8; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(31, 26, 23, .25); pointer-events: auto; cursor: grab; -webkit-appearance: none; appearance: none; }
.gl-rango input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 1px solid #ddd2c8; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(31, 26, 23, .25); pointer-events: auto; cursor: grab; }
.gl-rango input[type="range"]:focus-visible { outline: 0; }
.gl-rango input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid #ffd100; outline-offset: 1px; }
.gl-rango input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid #ffd100; outline-offset: 1px; }

/* ---------- Viaje en un evento (grupales_lista_evento): el cintillo dice «Black Friday»,
   «Navidad»… La fila lleva un borde y una etiqueta con los colores del evento y la
   mascota con su traje asomando por la derecha de la foto. Lo demás no cambia. ---------- */
.gl-fila--evento { border: 2px solid var(--ev-borde); padding: 11px; }
.gl-fila__evento { align-self: flex-start; display: inline-flex; align-items: center; height: 24px; margin-bottom: -2px; padding: 0 10px; border-radius: 999px; background: var(--ev-fondo); color: var(--ev-texto); font-size: 12px; font-weight: 800; font-style: italic; letter-spacing: .02em; }
.gl-fila__foto .gl-fila__mascota { position: absolute; inset: auto 2px 0 auto; z-index: 2; height: 104px; width: auto; max-width: 46%; object-fit: contain; object-position: bottom right; filter: drop-shadow(0 4px 8px rgba(20, 14, 10, .35)); pointer-events: none; }
@media (max-width: 991px) {
    .gl-fila--evento { padding: 0; }
    .gl-fila__foto .gl-fila__mascota { height: 124px; right: 6px; }
}
