/* ============================================================================
 * Khome Cabecera — barra superior + cabecera transparente sobre el hero.
 * Ver design/home-v2/HANDOFF.md §4. Colores de marca §3.
 * ========================================================================== */

.khome-header {
	font-family: 'Nunito Sans', sans-serif;
	--k-fg: #fff;        /* color de texto/iconos de la cabecera */
	--k-line: rgba(255, 255, 255, 0.25);
	--k-field: rgba(255, 255, 255, 0.75);
}

/* El tema (GeneratePress/Kit) ennegrece los SVG; forzar que los iconos sigan el
   color de la cabecera (--k-fg: blanco en transparente, #111 en sólida/buscador). */
.khome-header svg {
	color: var(--k-fg) !important;
}
.khome-header svg path,
.khome-header svg circle {
	stroke: currentColor !important;
}

/* El tema añade borde/fondo negro a todos los <button>: resetearlo en los iconos
   y reafirmar el borde propio del campo de búsqueda y los chips. */
.khome-header .k-icon,
.khome-header .khome-burger {
	border: 0 !important;
	background: none !important;
}
.khome-header .khome-sfield {
	border: 1px solid var(--k-field) !important;
	background: transparent !important;
	border-radius: 0 !important;
	color: var(--k-fg) !important;        /* el tema lo pone negro; seguir el color del header */
	font-family: 'Nunito Sans', sans-serif !important;
	font-size: 14px !important;           /* el tema fuerza 16px */
	font-weight: 400 !important;          /* el tema fuerza 700 (negrita) */
}
.khome-header .khome-sfield span {
	color: var(--k-fg) !important;
	font-weight: 400 !important;
	opacity: .85;
}
/* Enlaces del menú: blancos arriba (sobre el hero), oscuros en el submenú desplegable. */
.khome-header .khome-menu > li > a {
	color: var(--k-fg) !important;
}
.khome-header .khome-menu .sub-menu a {
	color: #111 !important;
}
.khome-header .khome-chip {
	border: 1px solid #d6d6d6 !important;
	background: #fff !important;
	border-radius: 0 !important;
}

/* Transparente y superpuesta al hero (la home). El contenedor padre debe ir en
   position:relative y el hero justo debajo. */
.khome-header.is-transparent {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
}

/* Sólida en flujo normal (páginas sin hero), o cuando se abre el buscador. */
.khome-header.is-solid,
.khome-header.is-light {
	position: relative;
	--k-fg: #111;
	--k-line: #ececec;
	--k-field: #cfcfcf;
}
.khome-header.is-light .khome-nav-wrap,
.khome-header.is-solid .khome-nav-wrap {
	background: #fff;
	color: #111;
	box-shadow: 0 1px 0 #ececec;
}
/* El logo blanco solo cuando la cabecera es transparente (logo de un color, HANDOFF §3). */
.khome-header.is-transparent:not(.is-light) .logo-blanco img {
	filter: brightness(0) invert(1);
}

/* --- Barra superior --- */
.khome-topbar {
	background: #111;
	color: #fff;
	font-size: 13px;
	letter-spacing: 0.04em;
}
.khome-topbar-in {
	max-width: 1360px;
	margin: 0 auto;
	padding: 9px 16px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 28px;
	flex-wrap: wrap;
}
.khome-sep {
	color: #8a8a8a;
}

/* --- Cabecera (nav) --- */
.khome-nav-wrap {
	color: var(--k-fg);
	border-bottom: 1px solid var(--k-line);
	transition: background .25s ease, color .25s ease;
}
.khome-nav-in {
	max-width: 1360px;
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	gap: 32px;
}
.khome-logo {
	display: flex;
	flex-shrink: 0;
}
/* .khome-header de prefijo: Elementor aplica .elementor img (misma especificidad) y
   el logo saldría a su tamaño natural. La altura fina se controla desde el widget
   (control "Altura del logo"); esto es el respaldo. */
.khome-header .khome-logo img {
	height: 44px;
	width: auto;
	display: block;
}

/* Menú */
.khome-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}
.khome-menu {
	display: flex;
	gap: 26px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 15px;
}
.khome-menu a {
	color: inherit;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.khome-menu a:hover {
	text-decoration: underline;
	text-underline-offset: 6px;
}
.khome-menu .menu-item-has-children > a::after {
	content: "";
	width: 10px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	display: inline-block;
}
/* Submenú desplegable */
.khome-menu li {
	position: relative;
}
.khome-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: -20px;
	margin: 0;
	padding: 8px 0;
	min-width: 260px;
	list-style: none;
	background: #fff;
	color: #111;
	border: 1px solid #ececec;
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
	display: none;
	flex-direction: column;
	z-index: 10;
}
.khome-menu li:hover > .sub-menu,
.khome-menu li:focus-within > .sub-menu {
	display: flex;
}
.khome-menu .sub-menu a {
	color: #111;
	padding: 12px 20px;
	display: block;
}
.khome-menu .sub-menu a:hover {
	text-decoration: none;
	background: #f7f7f7;
}
.khome-nav-empty {
	margin: 0;
	opacity: .7;
	font-size: 13px;
}

/* Acciones derecha */
.khome-actions {
	display: flex;
	gap: 4px;
	align-items: center;
	margin-left: auto;
}
.khome-sfield {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 220px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--k-field);
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: 14px;
	cursor: text;
	text-align: left;
}
.khome-sfield span {
	opacity: .85;
}
/* Especificidad extra: el elemento también es .k-icon (display:flex), que si no
   lo pisa y el icono de buscar externo sale en escritorio. Solo debe verse en móvil. */
.khome-header .khome-sicon {
	display: none;
}
.k-icon {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: none;
	cursor: pointer;
	color: inherit;
	text-decoration: none;
	padding: 0;
}
.khome-header .khome-burger {
	display: none;
}

/* --- Panel del buscador --- */
.khome-search-panel {
	background: #fff;
	color: #111;
	border-top: 1px solid #ececec;
	box-shadow: 0 24px 40px rgba(0, 0, 0, 0.08);
}
.khome-search-panel[hidden] {
	display: none;
}
.khome-search-in {
	max-width: 880px;
	margin: 0 auto;
	padding: 32px 24px 36px;
}
.khome-search-label {
	display: block;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #5f5f5f;
	margin-bottom: 8px;
}
.khome-search-row {
	display: flex;
	align-items: center;
	gap: 12px;
	border-bottom: 1.5px solid #111;
	padding-bottom: 10px;
	color: #111;
}
.khome-search-row input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 0;
	font-family: inherit;
	font-size: 22px;
	color: #111;
	background: transparent;
	padding: 4px 0;
}
.khome-search-row input[type="search"]:focus {
	outline: none;
}
/* Ocultar la "x" nativa del navegador (type=search): ya tenemos nuestro botón de cerrar. */
.khome-search-row input[type="search"]::-webkit-search-cancel-button,
.khome-search-row input[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}
.khome-search-row input[type="search"]::-ms-clear {
	display: none;
	width: 0;
	height: 0;
}
.khome-chips {
	margin-top: 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.khome-chips-label {
	font-size: 13px;
	color: #5f5f5f;
	margin-right: 4px;
}
.khome-chip {
	font-family: inherit;
	font-size: 14px;
	color: #111;
	background: #fff;
	border: 1px solid #d6d6d6;
	border-radius: 0;
	padding: 10px 18px;
	cursor: pointer;
	min-height: 44px;
}
.khome-chip:hover {
	border-color: #111;
}

/* --- Foco accesible --- */
.khome-header a:focus-visible,
.khome-header button:focus-visible,
.khome-header input:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* --- Responsive --- */
/* Tramo intermedio (≤1180px): el campo de búsqueda de 220px deja paso al icono de
   lupa y los elementos se juntan, para que el menú completo quepa en una sola línea.
   Antes el campo forzaba que el menú se partiera en dos líneas y el carrito se saliera
   entre ~960 y ~1180px. El menú NO pasa a hamburguesa aquí: sigue visible y usable. */
@media (max-width: 1180px) {
	.khome-header .khome-sfield {
		display: none !important;
	}
	.khome-header .khome-sicon {
		display: flex !important;
	}
	.khome-nav-in {
		gap: 20px;
	}
	.khome-menu {
		gap: 20px;
	}
}

/* Hamburguesa (≤960px): cuando ni el menú compacto cabe. El icono de lupa sigue
   mostrándose (regla de ≤1180px). */
@media (max-width: 960px) {
	.khome-nav {
		display: none !important;
	}
	.khome-burger {
		display: flex !important;
	}
	/* Menú móvil desplegado por el botón hamburguesa. */
	.khome-header.is-menu-open .khome-nav {
		display: block !important;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		color: #111;
		padding: 8px 0;
		border-top: 1px solid #ececec;
		box-shadow: 0 24px 40px rgba(0, 0, 0, 0.08);
		z-index: 20;
	}
	.khome-header.is-menu-open .khome-menu {
		flex-direction: column;
		gap: 0;
		padding: 0 8px;
	}
	/* color #111 con !important: en la home la cabecera es transparente y los
	   enlaces del menú van en blanco (var(--k-fg) !important); en el desplegable
	   móvil, sobre fondo blanco, hay que devolverlos a negro o no se verían. */
	.khome-header.is-menu-open .khome-menu a {
		color: #111 !important;
		padding: 12px 16px;
		display: block;
	}
	.khome-header.is-menu-open .khome-menu .sub-menu {
		position: static;
		display: flex;
		box-shadow: none;
		border: 0;
		min-width: 0;
		padding: 0 0 0 12px;
	}
}

@media (max-width: 640px) {
	.k-hide-sm {
		display: none !important;
	}
	.khome-topbar-in {
		gap: 0;
	}
	.khome-logo img {
		height: 38px;
	}
}
