/* ==========================================================================
   Win & Win — componentes del child theme
   Colores y fuentes vienen del Kit de Elementor (--e-global-color-*).
   Aquí solo: espaciado de secciones, utilidades y estilos de shortcodes.
   ========================================================================== */

:root {
	--ww-space-section: clamp(48px, 5vw, 72px);
	--ww-gutter: 16px;
	--ww-radius-lg: 24px;
	--ww-radius: 16px;
	--ww-radius-sm: 8px;
	--ww-shadow-card: 0 18px 40px rgba(2, 17, 25, 0.08);
	--ww-ink: var(--e-global-color-primary, #021119);
	--ww-muted: var(--e-global-color-ww_muted, #6b7280);
	--ww-border: var(--e-global-color-ww_border, #e5e9ee);
	--ww-surface: var(--e-global-color-ww_surface, #f0f5f8);
	--ww-accent: var(--e-global-color-accent, #ffcf5a);
	--ww-success: var(--e-global-color-ww_success, #1e8e3e);
	--ww-info: var(--e-global-color-ww_info, #2b5db8);
}

/* ---------- Secciones (una sola variable de espaciado) ---------- */
.e-con.ww-sec {
	--padding-top: var(--ww-space-section);
	--padding-bottom: var(--ww-space-section);
	--padding-left: var(--ww-gutter);
	--padding-right: var(--ww-gutter);
}
.e-con.ww-sec--nt { --padding-top: 0; }
.e-con.ww-sec--nb { --padding-bottom: 0; }

/* Contenedores anidados que no deben estirarse al 100% en filas */
.e-con.e-flex.ww-auto { --width: auto; }
.e-con.e-flex.ww-grow { --width: auto; flex: 1 1 0; min-width: 0; }
.ww-star { color: var(--ww-accent); }
.e-con.ww-push { margin-top: auto; }

/* Headings sin la "strut" de 1.6em del marcado optimizado de Elementor 4 */
.ww-home .elementor-widget-heading,
.ww-card .elementor-widget-heading { display: flex; flex-direction: column; }

/* Grids de Elementor: sin filas fijas vacías */
.ww-home .e-con.e-grid { grid-template-rows: none !important; }

/* ---------- Página de sede ---------- */
.ww-crumbs a,
.ww-contact a { color: inherit; text-decoration: none; }
.ww-crumbs a:hover,
.ww-contact a:hover { color: var(--ww-ink); text-decoration: underline; }
.ww-map iframe { display: block; border-radius: var(--ww-radius); }
.ww-reviews .elementor-testimonial__text { font-style: normal; }

/* ---------- Card de sede ---------- */
.ww-sede { box-shadow: var(--ww-shadow-card); }
.ww-sede .ww-gal { --ww-gal-w: 129px; }

/* ---------- FAQ (Nested Accordion): pregunta + respuesta como un solo bloque ---------- */
.ww-home .e-n-accordion-item[open] > .e-n-accordion-item-title {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}
.ww-home .e-n-accordion-item[open] > .e-con { border-radius: 0 0 var(--ww-radius) var(--ww-radius); }
.ww-home .elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* ---------- Galería [hotel_gallery] ---------- */
.ww-gal {
	--ww-gal-w: 92px;
	--ww-gal-ratio: 129 / 76;
	--ww-gal-gap: 10px;
	position: relative;
	width: 100%;
	min-width: 0;
}
.ww-gal__track {
	display: flex;
	gap: var(--ww-gal-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.ww-gal__track::-webkit-scrollbar { display: none; }
.ww-gal__item {
	flex: 0 0 var(--ww-gal-w);
	margin: 0;
	scroll-snap-align: start;
}
.ww-gal__link { display: block; border-radius: var(--ww-radius-sm); overflow: hidden; }
.ww-gal__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--ww-gal-ratio);
	object-fit: cover;
	border-radius: var(--ww-radius-sm);
	transition: transform .3s ease;
}
.ww-gal__link:hover .ww-gal__img { transform: scale(1.05); }
.ww-gal__cap {
	margin-top: 6px;
	font-size: 13px;
	font-style: normal;
	font-weight: 500;
	line-height: 1.4;
	color: inherit;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ww-gal .ww-gal__nav {
	position: absolute;
	top: calc(var(--ww-gal-w) / (129 / 76) / 2);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--ww-ink);
	box-shadow: 0 6px 18px rgba(2, 17, 25, .18);
	transform: translateY(-50%);
	cursor: pointer;
	transition: opacity .2s;
}
.ww-gal .ww-gal__nav:hover,
.ww-gal .ww-gal__nav:focus { background: var(--ww-accent); color: var(--ww-ink); }
.ww-gal .ww-gal__nav:disabled { opacity: 0; pointer-events: none; }
.ww-gal .ww-gal__nav--prev { left: -22px; }
.ww-gal .ww-gal__nav--next { right: -22px; }
.ww-gal.is-static .ww-gal__nav { display: none; }

/* Slide automático en CSS (cinta infinita): dos copias de las fotos que avanzan
   una copia completa y vuelven al inicio sin salto. Se pausa con el mouse o el foco. */
.ww-gal--auto .ww-gal__track {
	overflow: hidden;
	scroll-snap-type: none;
}
.ww-gal__belt {
	display: flex;
	gap: var(--ww-gal-gap);
	width: max-content;
	animation: ww-gal-slide calc(var(--ww-gal-n, 5) * 3.5s) linear infinite;
	will-change: transform;
}
.ww-gal--auto:hover .ww-gal__belt,
.ww-gal--auto:focus-within .ww-gal__belt { animation-play-state: paused; }
@keyframes ww-gal-slide {
	from { transform: translateX(0); }
	to { transform: translateX(calc(-50% - var(--ww-gal-gap) / 2)); }
}
@media (prefers-reduced-motion: reduce) {
	.ww-gal__belt { animation: none; }
	.ww-gal--auto .ww-gal__track { overflow-x: auto; }
	.ww-gal__belt > [aria-hidden="true"] { display: none; }
}

/* ---------- Chips de la card de habitación ---------- */
.ww-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ww-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 999px;
	font-size: 13px;
	line-height: 1.3;
	font-weight: 500;
}
.ww-chip svg { flex: none; }
.ww-chip__sep { font-style: normal; opacity: .5; margin: 0 4px; }
.ww-chip--info { background: #e8eefb; color: var(--ww-info); }
.ww-chip--ok { background: #e6f5ea; color: var(--ww-success); }

/* ---------- Características con check ---------- */
.ww-feats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	line-height: 1.4;
	color: var(--e-global-color-text, #353e46);
}
.ww-feats li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ww-feats svg { flex: none; color: var(--ww-success); }

/* ---------- Precio ---------- */
.ww-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.ww-price__row { display: flex; align-items: baseline; gap: 10px; }
.ww-price__old { font-size: 14px; color: var(--ww-muted); }
.ww-price__now { font-size: 28px; line-height: 1.1; font-weight: 700; color: var(--ww-ink); }
.ww-price__save { margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--ww-success); }
.ww-price__note { margin-top: 2px; font-size: 12px; color: var(--ww-muted); }

/* ---------- Card de habitación (Loop) ---------- */
.ww-card { transition: box-shadow .25s ease, transform .25s ease; }
.ww-card:hover { box-shadow: var(--ww-shadow-card); }
.ww-card .elementor-widget-theme-post-featured-image a { display: block; }
.ww-card .elementor-widget-theme-post-featured-image img { display: block; width: 100%; object-fit: cover; }

/* Los items del Loop Grid no deben crecer por el contenido con scroll (galería) */
.elementor-loop-container > .e-loop-item { min-width: 0; }

@media (max-width: 1200px) {
	.ww-gal .ww-gal__nav--prev { left: 4px; }
	.ww-gal .ww-gal__nav--next { right: 4px; }
}

@media (max-width: 767px) {
	.ww-sede .ww-gal { --ww-gal-w: 104px; }
	.ww-gal .ww-gal__nav { display: none; }
	.ww-price__now { font-size: 24px; }
}
