/* ==========================================================================
   Tu Hogar – Encabezado y pie de página
   ========================================================================== */

:root {
	--th-navy: #003b68;
	--th-navy-deep: #0b2340;
	--th-ink: #16243b;
	--th-text: #3d4b61;
	--th-muted: #74839a;
	--th-line: #e2e9f2;
	--th-bg: #f2f7fd;
	--th-accent: #f84f2f;
	--th-wa: #25d366;
	--th-radius: 14px;
	--th-ease: cubic-bezier(.2, .7, .2, 1);
	--th-font: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
	--th-font-display: "Barlow", "Quicksand", system-ui, sans-serif;
	--th-header-h: 78px;
}

.th-container {
	width: 100%;
	max-width: 1300px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}

.th-ico {
	flex-shrink: 0;
}

/* Neutraliza el reset de botones del tema padre (borde y fondo rosados). */
.th-header button,
.th-drawer button,
.th-header button:hover,
.th-header button:focus,
.th-drawer button:hover,
.th-drawer button:focus {
	border: 0;
	box-shadow: none;
	font-family: inherit;
	text-transform: none;
}

.th-sub-toggle:hover,
.th-sub-toggle:focus {
	background: none;
}

.th-burger:hover,
.th-burger:focus {
	background: #e3eefb;
	color: var(--th-navy);
}

/* Botones ------------------------------------------------------------------ */

.th-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	font-family: var(--th-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .2s var(--th-ease), background-color .2s, box-shadow .2s, color .2s;
}

.th-btn:hover {
	transform: translateY(-1px);
}

.th-btn--primary {
	background: var(--th-navy);
	color: #fff;
}

.th-btn--primary:hover,
.th-btn--primary:focus-visible {
	background: #00508e;
	color: #fff;
	box-shadow: 0 8px 20px rgba(0, 59, 104, .25);
}

.th-btn--wa {
	background: var(--th-wa);
	color: #fff;
}

.th-btn--wa:hover,
.th-btn--wa:focus-visible {
	background: #1ebe5a;
	color: #fff;
	box-shadow: 0 8px 20px rgba(37, 211, 102, .3);
}

.th-btn--ghost {
	border: 1.5px solid var(--th-line);
	background: #fff;
	color: var(--th-ink);
}

.th-btn--ghost:hover {
	border-color: var(--th-navy);
	color: var(--th-navy);
}

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

.th-icon-btn {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--th-ink);
	cursor: pointer;
	transition: background-color .2s, color .2s;
}

.th-icon-btn:hover,
.th-icon-btn:focus-visible,
.th-icon-btn:focus {
	background: var(--th-bg);
	color: var(--th-navy);
}

.th-icon-btn__count {
	position: absolute;
	top: 4px;
	right: 2px;
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--th-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	box-sizing: content-box;
}

.th-icon-btn__count[hidden] {
	display: none;
}

/* Encabezado ---------------------------------------------------------------- */

.th-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 900;
	border-bottom: 1px solid transparent;
	background: rgba(255, 255, 255, .96);
	font-family: var(--th-font);
	transition: box-shadow .25s, border-color .25s, background-color .25s;
	-webkit-backdrop-filter: saturate(160%) blur(10px);
	backdrop-filter: saturate(160%) blur(10px);
}

.th-header.is-scrolled {
	border-bottom-color: var(--th-line);
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 6px 24px rgba(16, 36, 66, .07);
}

.th-header__bar {
	display: flex;
	align-items: center;
	gap: 32px;
	height: var(--th-header-h);
	transition: height .25s var(--th-ease);
}

.th-header.is-scrolled .th-header__bar {
	height: 66px;
}

.th-logo {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
}

.th-logo__img {
	display: block;
	width: auto;
	height: 46px;
	max-width: 200px;
	object-fit: contain;
	transition: height .25s var(--th-ease);
}

.th-header.is-scrolled .th-logo__img {
	height: 40px;
}

.th-logo__text {
	color: var(--th-navy);
	font-family: var(--th-font-display);
	font-size: 22px;
	font-weight: 800;
}

/* Menú escritorio */
.th-nav {
	flex: 1;
}

.th-menu,
.th-menu .sub-menu,
.th-mmenu,
.th-mmenu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

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

.th-menu > li {
	position: relative;
	display: flex;
	align-items: center;
}

.th-menu > li > a {
	position: relative;
	display: block;
	padding: 10px 14px;
	border-radius: 10px;
	color: var(--th-ink);
	font-size: 15.5px;
	font-weight: 600;
	text-decoration: none;
	transition: color .2s, background-color .2s;
}

.th-menu > li.menu-item-has-children > a {
	padding-right: 4px;
}

.th-menu > li > a::after {
	content: "";
	position: absolute;
	right: 14px;
	bottom: 4px;
	left: 14px;
	height: 2px;
	border-radius: 2px;
	background: var(--th-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s var(--th-ease);
}

.th-menu > li.menu-item-has-children > a::after {
	right: 4px;
}

.th-menu > li > a:hover,
.th-menu > li:focus-within > a {
	color: var(--th-navy);
}

.th-menu > li.current-menu-item > a,
.th-menu > li.current-menu-ancestor > a,
.th-menu > li.current-menu-parent > a {
	color: var(--th-navy);
}

.th-menu > li.current-menu-item > a::after,
.th-menu > li.current-menu-ancestor > a::after,
.th-menu > li.current-menu-parent > a::after,
.th-menu > li > a:hover::after {
	transform: scaleX(1);
}

.th-sub-toggle {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--th-muted);
	cursor: pointer;
	transition: transform .2s, color .2s;
}

.th-menu > li:hover > .th-sub-toggle,
.th-menu > li:focus-within > .th-sub-toggle {
	color: var(--th-navy);
	transform: rotate(180deg);
}

.th-menu .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 10;
	min-width: 230px;
	padding: 8px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius);
	background: #fff;
	box-shadow: 0 18px 40px rgba(16, 36, 66, .14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s, transform .2s var(--th-ease), visibility .2s;
}

.th-menu .sub-menu::before {
	content: "";
	position: absolute;
	top: -12px;
	right: 0;
	left: 0;
	height: 12px;
}

.th-menu > li:hover > .sub-menu,
.th-menu > li:focus-within > .sub-menu,
.th-menu > li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.th-menu .sub-menu a {
	display: block;
	padding: 10px 14px;
	border-radius: 10px;
	color: var(--th-text);
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .15s, color .15s;
}

.th-menu .sub-menu a:hover,
.th-menu .sub-menu a:focus-visible,
.th-menu .sub-menu .current-menu-item > a {
	background: var(--th-bg);
	color: var(--th-navy);
}

/* Acciones */
.th-header__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.th-header__phone {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-right: 6px;
	color: var(--th-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.15;
	text-decoration: none;
}

.th-header__phone small {
	display: block;
	color: var(--th-muted);
	font-size: 12px;
	font-weight: 600;
}

.th-header__phone-ico {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--th-bg);
	color: var(--th-navy);
	transition: background-color .2s, color .2s;
}

.th-header__phone:hover .th-header__phone-ico {
	background: var(--th-navy);
	color: #fff;
}

.th-burger {
	display: none;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--th-bg);
	color: var(--th-navy);
	cursor: pointer;
}

/* Menú móvil (drawer) ------------------------------------------------------- */

.th-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	font-family: var(--th-font);
}

.th-drawer.is-open {
	visibility: visible;
}

.th-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(11, 35, 64, .5);
	opacity: 0;
	transition: opacity .3s;
}

.th-drawer.is-open .th-drawer__overlay {
	opacity: 1;
}

.th-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(88vw, 380px);
	background: #fff;
	box-shadow: -20px 0 50px rgba(11, 35, 64, .2);
	transform: translateX(100%);
	transition: transform .35s var(--th-ease);
}

.th-drawer.is-open .th-drawer__panel {
	transform: none;
}

.th-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 16px 16px 22px;
	border-bottom: 1px solid var(--th-line);
}

.th-drawer__head .th-logo__img {
	height: 40px;
}

.th-drawer__nav {
	flex: 1;
	overflow-y: auto;
	padding: 12px 14px;
}

.th-mmenu > li {
	position: relative;
	border-bottom: 1px solid var(--th-line);
}

.th-mmenu:last-child > li:last-child {
	border-bottom: 0;
}

.th-mmenu a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 15px 8px;
	color: var(--th-ink);
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
}

.th-mmenu .current-menu-item > a,
.th-mmenu .current-menu-ancestor > a {
	color: var(--th-navy);
}

.th-mmenu > li > .th-sub-toggle {
	position: absolute;
	top: 8px;
	right: 0;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--th-bg);
	color: var(--th-navy);
}

.th-mmenu > li.is-open > .th-sub-toggle {
	transform: rotate(180deg);
}

.th-mmenu .sub-menu {
	display: none;
	padding: 0 0 10px 10px;
}

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

.th-mmenu .sub-menu a {
	padding: 10px 8px;
	color: var(--th-text);
	font-size: 15.5px;
	font-weight: 600;
}

.th-icon-btn__count--inline {
	position: static;
	border: 0;
	margin-left: auto;
}

.th-drawer__foot {
	display: grid;
	gap: 10px;
	padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--th-line);
	background: var(--th-bg);
}

.th-drawer__foot .th-socials {
	justify-content: center;
	margin-top: 6px;
}

body.th-lock {
	overflow: hidden;
}

/* Pie de página ------------------------------------------------------------- */

.th-footer {
	position: relative;
	margin-top: 0;
	padding-top: 64px;
	overflow: hidden;
	background:
		radial-gradient(900px 400px at 85% -10%, rgba(0, 145, 255, .16), transparent 60%),
		linear-gradient(180deg, var(--th-navy) 0%, var(--th-navy-deep) 100%);
	color: rgba(255, 255, 255, .72);
	font-family: var(--th-font);
	font-size: 15px;
}

.th-footer a {
	color: rgba(255, 255, 255, .78);
	text-decoration: none;
	transition: color .2s;
}

.th-footer a:hover,
.th-footer a:focus-visible {
	color: #fff;
}

/* CTA */
.th-footer__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 56px;
	padding: 24px 28px;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 20px;
	background: rgba(255, 255, 255, .06);
}

.th-footer__cta-text {
	display: flex;
	align-items: center;
	gap: 18px;
}

.th-footer__cta-ico {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: var(--th-accent);
	color: #fff;
}

.th-footer__cta strong {
	display: block;
	margin-bottom: 4px;
	color: #fff;
	font-family: var(--th-font-display);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

.th-footer__cta .th-btn {
	flex-shrink: 0;
	min-height: 50px;
	padding: 0 26px;
	color: #fff;
}

/* Columnas */
.th-footer__grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1.1fr 1.4fr;
	gap: 40px;
	padding-bottom: 48px;
}

.th-footer__brand p {
	max-width: 320px;
	margin: 18px 0 22px;
	line-height: 1.65;
}

.th-logo--light .th-logo__img {
	height: 52px;
	max-width: 220px;
}

.th-footer__title {
	margin: 4px 0 18px;
	color: #fff;
	font-family: var(--th-font-display);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.th-footer__title::after {
	content: "";
	display: block;
	width: 26px;
	height: 3px;
	margin-top: 10px;
	border-radius: 3px;
	background: var(--th-accent);
}

.th-footer__links,
.th-footer__info {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.th-footer__links a {
	display: inline-block;
	transition: color .2s, transform .2s var(--th-ease);
}

.th-footer__links a:hover {
	transform: translateX(3px);
}

.th-footer__info li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	line-height: 1.45;
}

.th-footer__info .th-ico {
	margin-top: 1px;
	color: var(--th-accent);
}

.th-footer__info a {
	word-break: break-word;
}

/* Redes */
.th-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.th-socials a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	transition: background-color .2s, transform .2s var(--th-ease);
}

.th-socials a:hover {
	background: var(--th-accent);
	color: #fff;
	transform: translateY(-2px);
}

.th-socials--dark a {
	background: #fff;
	color: var(--th-navy);
	box-shadow: 0 1px 3px rgba(16, 36, 66, .1);
}

/* Franja inferior */
.th-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .1);
	font-size: 13.5px;
}

.th-footer__bottom .th-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 64px;
}

.th-footer__bottom p {
	margin: 0;
	color: rgba(255, 255, 255, .55);
}

.th-footer__top {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
}

.th-footer__top .th-ico {
	transform: rotate(-90deg);
}

/* WhatsApp flotante */
.th-wa-float {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 800;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--th-wa);
	color: #fff;
	box-shadow: 0 10px 28px rgba(37, 211, 102, .4);
	transition: transform .25s var(--th-ease);
}

.th-wa-float:hover {
	color: #fff;
	transform: scale(1.07);
}

.th-wa-float::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--th-wa);
	opacity: .5;
	animation: th-pulse 2.4s ease-out infinite;
	z-index: -1;
}

@keyframes th-pulse {
	0% { transform: scale(1); opacity: .5; }
	80%, 100% { transform: scale(1.6); opacity: 0; }
}

/* Responsive ---------------------------------------------------------------- */

@media (max-width: 1240px) {
	.th-header__phone {
		display: none;
	}

	.th-footer__grid {
		grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	}

	.th-footer__brand {
		grid-column: 1 / -1;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 12px 32px;
	}

	.th-footer__brand p {
		flex: 1;
		min-width: 260px;
		margin: 0;
	}
}

@media (max-width: 960px) {
	:root {
		--th-header-h: 68px;
	}

	.th-nav,
	.th-header__cta {
		display: none;
	}

	.th-burger {
		display: grid;
	}

	.th-header.is-scrolled .th-header__bar {
		height: 60px;
	}

	.th-logo__img {
		height: 40px;
	}

	.th-header.is-scrolled .th-logo__img {
		height: 36px;
	}

	.th-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: 36px 24px;
	}

	.th-footer__contact {
		grid-column: 1 / -1;
	}

	.th-footer__cta {
		flex-direction: column;
		align-items: stretch;
		text-align: left;
	}

	.th-footer__cta .th-btn {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.admin-bar .th-header {
		top: 0;
	}

	.th-container {
		padding: 0 18px;
	}

	.th-header__bar {
		gap: 12px;
	}

	.th-header__actions {
		gap: 4px;
	}

	.th-footer {
		padding-top: 40px;
	}

	.th-footer__cta {
		margin-bottom: 40px;
		padding: 20px;
	}

	.th-footer__cta-ico {
		width: 46px;
		height: 46px;
		border-radius: 14px;
	}

	.th-footer__cta strong {
		font-size: 19px;
	}

	.th-footer__brand {
		display: block;
	}

	.th-footer__brand p {
		margin: 16px 0 20px;
	}

	.th-footer__bottom .th-container {
		flex-direction: column;
		justify-content: center;
		padding-top: 18px;
		padding-bottom: 18px;
		text-align: center;
	}

	.th-wa-float {
		right: 16px;
		bottom: 16px;
		width: 54px;
		height: 54px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.th-header,
	.th-header *,
	.th-drawer *,
	.th-footer * {
		transition: none !important;
	}

	.th-wa-float::before {
		animation: none;
	}
}
