/* ==========================================================
   Cupones Tech · Header propio
   Astra sigue siendo el tema base — esto se inyecta ANTES de su
   header (hook astra_header_before) y #masthead (el contenedor
   estándar del header de Astra) se oculta abajo, para que solo se
   vea este. Si el theme no fuera Astra, #masthead simplemente no
   existiría y esta regla no tendría efecto — no rompe nada.
   ========================================================== */
#masthead {
	display: none !important;
}

.ctc-header {
	--ctc-h-alto: 56px;
	position: sticky;
	top: 0;
	z-index: 200;
	background: #ffffff;
	border-bottom: 1px solid #e4e7ee;
}
.ctc-header-inner {
	max-width: 1240px;
	margin: 0 auto;
	height: var(--ctc-h-alto);
	padding: 0 16px;
	display: flex;
	align-items: center;
	gap: 16px;
}

/* --- Logo: casa minimalista + texto, ambos al mismo link --- */
.ctc-header-logo {
	display: flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	color: #12141a;
	flex-shrink: 0;
}
.ctc-header-logo-icono {
	width: 20px;
	height: 20px;
	color: #1428a0;
	flex-shrink: 0;
}
.ctc-header-logo-texto {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

/* --- Navegación: horizontal en escritorio, colapsable en móvil --- */
.ctc-header-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
}
.ctc-header-nav > a,
.ctc-header-nav-proximamente,
.ctc-header-nav-toggle-submenu {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 7px 10px;
	border-radius: 8px;
	color: #33363f;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	background: none;
	border: none;
	cursor: pointer;
	white-space: nowrap;
}
.ctc-header-nav > a:hover {
	background: #f3f5f9;
	color: #12141a;
}
.ctc-header-nav-proximamente {
	color: #9aa0ac;
	cursor: default;
}
.ctc-header-nav-nota {
	font-size: 10.5px;
	color: #9aa0ac;
}

/* --- Submenú "Cupones": fondo/contraste propio, flecha pequeña --- */
.ctc-header-nav-submenu-wrap {
	position: relative;
}
.ctc-header-flecha {
	width: 8px;
	height: 8px;
	flex-shrink: 0;
	transition: transform 0.15s ease;
}
.ctc-header-nav-submenu-wrap.is-abierto .ctc-header-flecha {
	transform: rotate(180deg);
}
.ctc-header-submenu {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 170px;
	background: #ffffff;
	border: 1px solid #e4e7ee;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
	padding: 6px;
	z-index: 10;
}
.ctc-header-nav-submenu-wrap.is-abierto .ctc-header-submenu {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ctc-header-submenu a {
	display: block;
	padding: 7px 10px;
	border-radius: 7px;
	color: #33363f;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
}
.ctc-header-submenu a:hover {
	background: #f3f5f9;
	color: #12141a;
}

/* --- Buscador --- */
.ctc-header-buscador {
	margin-left: auto;
	display: flex;
	align-items: center;
	position: relative;
}
.ctc-header-buscador-lupa {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	border: 1.5px solid #c9cfdb;
	border-radius: 50%;
	background: #eef1f7;
	color: #12141a;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.ctc-header-buscador-lupa:hover,
.ctc-header-buscador-lupa:active {
	background: #e0e4ed;
	border-color: #a8afc0;
}
.ctc-header-buscador-lupa svg {
	width: 19px;
	height: 19px;
}
.ctc-header-buscador-input {
	width: 240px;
	height: 36px;
	padding: 0 14px;
	border: 1.5px solid #d5d9e3;
	border-radius: 999px;
	background: #f3f5f9;
	font-size: 13px;
	color: #12141a;
	outline: none;
	transition: width 0.2s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.ctc-header-buscador-input:hover {
	border-color: #b7bdcb;
}
.ctc-header-buscador-input:focus {
	border-color: #1428a0;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px var(--ctc-accent-bg, #eef0fa);
}
.ctc-header-buscador-input::placeholder {
	color: #6b7280;
}

/* --- Hamburguesa: solo móvil/tablet — con fondo propio, para que se
   lea como un botón y no como 3 líneas sueltas flotando --- */
.ctc-header-hamburguesa {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	border: 1.5px solid #c9cfdb;
	border-radius: 10px;
	background: #eef1f7;
	color: #12141a;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.ctc-header-hamburguesa:hover,
.ctc-header-hamburguesa:active {
	background: #e0e4ed;
	border-color: #a8afc0;
}
.ctc-header-hamburguesa svg {
	width: 21px;
	height: 16px;
}

/* ==========================================================
   Responsive — mismo umbral de 1024px que ya usa el Home para su
   layout de 2 columnas, por consistencia.
   ========================================================== */
@media (max-width: 1023px) {
	.ctc-header {
		--ctc-h-alto: 52px;
	}
	.ctc-header-nav {
		position: fixed;
		top: var(--ctc-h-alto);
		left: 0;
		right: 0;
		bottom: 0;
		background: #ffffff;
		flex-direction: column;
		align-items: stretch;
		padding: 10px;
		gap: 2px;
		font-size: 15px;
		overflow-y: auto;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		z-index: 199;
	}
	.ctc-header-nav.is-abierto {
		transform: translateX(0);
	}
	.ctc-header-nav > a,
	.ctc-header-nav-proximamente,
	.ctc-header-nav-toggle-submenu {
		font-size: 15px;
		padding: 12px 10px;
		justify-content: space-between;
	}
	.ctc-header-submenu {
		position: static;
		box-shadow: none;
		border: none;
		background: #f8f9fb;
		margin: 2px 0 4px 10px;
	}
	.ctc-header-nav-submenu-wrap.is-abierto .ctc-header-submenu {
		display: flex;
	}

	.ctc-header-buscador-lupa {
		display: flex;
	}
	.ctc-header-buscador-input {
		position: absolute;
		right: 0;
		top: 44px;
		width: 0;
		opacity: 0;
		pointer-events: none;
		box-shadow: 0 6px 16px rgba(16, 24, 40, 0.12);
	}
	.ctc-header-buscador.is-abierto .ctc-header-buscador-input {
		width: 240px;
		max-width: calc(100vw - 32px);
		padding-left: 36px;
		opacity: 1;
		pointer-events: auto;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='9' cy='9' r='6' stroke='%236b7280' stroke-width='1.8'/%3E%3Cpath d='M17 17l-4-4' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: 12px center;
		background-size: 16px 16px;
	}

	.ctc-header-hamburguesa {
		display: flex;
	}
}

@media (min-width: 1024px) {
	.ctc-header-buscador-input {
		width: 260px;
		padding-left: 36px;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='9' cy='9' r='6' stroke='%236b7280' stroke-width='1.8'/%3E%3Cpath d='M17 17l-4-4' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: 12px center;
		background-size: 16px 16px;
	}
	.ctc-header-buscador-input:focus {
		background-image: none;
		padding-left: 14px;
	}
}
