/* Barra a todo el ancho: fondo en el row, no en el container de 1400px. */
#header,
#header .ct-sticky-container,
#header [data-row="middle"] {
	width: 100%;
	max-width: none;
	background-color: #111;
}
#header .ct-container,
#header [data-row="middle"] > div {
	background-color: transparent !important;
}

/* Menú pegado al logo (no estirar el buscar al borde del container). */
#header [data-device="desktop"] [data-column="end"] {
	justify-content: start;
	justify-items: start;
	grid-template-columns: auto auto !important;
	gap: 4px;
}
#header [data-device="desktop"] [data-column="end"] [data-items="primary"] {
	justify-content: flex-start;
}

/* Header mobile: logo centrado y más grande (como ED). */

#header [data-device="mobile"] [data-row="middle"] {
	--height: 72px;
}

#header [data-device="mobile"] [data-row="middle"] .ct-container {
	display: grid !important;
	grid-template-columns: 1fr auto 1fr !important;
	align-items: center;
	position: relative;
}

#header [data-device="mobile"] [data-column="start"] {
	grid-column: 2;
	grid-row: 1;
	width: auto !important;
	max-width: none !important;
	justify-self: center;
	z-index: 1;
}

#header [data-device="mobile"] [data-column="end"] {
	grid-column: 1 / -1;
	grid-row: 1;
	width: auto !important;
	max-width: none !important;
	z-index: 2;
	pointer-events: none;
}
#header [data-device="mobile"] [data-column="end"] .ct-header-trigger,
#header [data-device="mobile"] [data-column="end"] .ct-header-search,
#header [data-device="mobile"] [data-column="end"] a,
#header [data-device="mobile"] [data-column="end"] button {
	pointer-events: auto;
}
#header [data-device="mobile"] [data-column="start"] {
	z-index: 3;
	pointer-events: auto;
}

#header [data-device="mobile"] [data-column="end"] [data-items] {
	display: flex;
	width: 100%;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

#header [data-device="mobile"] .ct-header-trigger {
	order: -1;
}

#header [data-device="mobile"] .site-logo-container {
	--logo-max-height: 64px;
	--logo-shrink-height: 64px;
	height: 64px !important;
	width: auto;
}

#header [data-device="mobile"] .site-logo-container img {
	height: 64px !important;
	width: auto !important;
	max-height: 64px !important;
	object-fit: contain;
}

#header [data-device="mobile"] .ct-header-search,
#header [data-device="mobile"] .ct-header-trigger {
	padding: 10px 4px;
}

/* Overlay de búsqueda: opaco (sin ghosting del catálogo detrás). */
#search-modal.ct-panel {
	background-color: #1a1a1a !important;
	z-index: 100000;
}

#search-modal .ct-panel-content,
#search-modal .ct-panel-content-inner,
#search-modal .ct-container {
	background-color: #1a1a1a;
}

#search-modal [id^="ct-search-results"],
#search-modal .ct-search-results {
	background-color: #1a1a1a;
	z-index: 30;
}

#search-modal .ct-search-result,
#search-modal .ct-search-results li {
	background-color: #1a1a1a;
}
