/*
 * Cabecera INC. Medidas y colores tomados de Header.dc.html.
 * Usa los tokens del tema (--wp--preset--…) con el valor del diseño de respaldo,
 * para que el bloque se vea igual aunque el tema cambie.
 */

.inc-cab {
	--inc-cab-alto: 76px;
	--inc-cab-gutter: clamp(16px, 2.4vw, 32px);
	height: var(--inc-cab-alto);
	font-family: var(--wp--preset--font-family--barlow, Barlow, system-ui, sans-serif);
}

.inc-cab__barra {
	position: fixed;
	z-index: 60;
	inset: 0 0 auto 0;
	background: rgba(255, 255, 255, .97);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .3s;
}

/* Con la barra de administración de WordPress, la cabecera baja con ella. */
.admin-bar .inc-cab__barra { top: var(--wp-admin--admin-bar--height, 32px); }
/* Hasta 600 px WordPress deja su barra de administración suelta (se va con el
   scroll) y la cabecera fija quedaba debajo o con un hueco. Se fija también, y
   la cabecera va siempre justo debajo. Solo lo ve quien tiene sesión iniciada. */
@media (max-width: 600px) { html #wpadminbar { position: fixed; } }
.inc-cab.is-desplazada .inc-cab__barra { border-bottom-color: #E4E5E2; }

.inc-cab__fila {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 var(--inc-cab-gutter);
	height: var(--inc-cab-alto);
	display: flex;
	align-items: center;
	gap: clamp(24px, 3.4vw, 56px);
}

.inc-cab__logo { flex: none; display: flex; align-items: center; text-decoration: none; }
.inc-cab__logo-svg { height: 28px; width: auto; display: block; }

.inc-cab__nav { flex: 1; min-width: 0; }
.inc-cab__lista { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }

.inc-cab__enlace {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 14px;
	border-radius: 999px;
	color: #141614;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
	background: transparent;
	transition: background .2s;
}

.inc-cab__enlace:hover,
.inc-cab__enlace[aria-expanded="true"] { background: #F1F2EF; color: #141614; }
.inc-cab__enlace.is-activo { background: #F1F2EF; font-weight: 600; }
.inc-cab__caret { width: 9px; height: 6px; display: block; transition: transform .2s; }
.inc-cab__enlace[aria-expanded="true"] .inc-cab__caret { transform: rotate(180deg); }

.inc-cab__acciones { display: flex; align-items: center; gap: 20px; margin-left: auto; }

.inc-cab__tel { font-size: 15px; font-weight: 600; color: #141614; text-decoration: none; white-space: nowrap; }
.inc-cab__tel:hover { color: #367B10; }

.inc-cab__cta {
	display: flex;
	align-items: center;
	height: 44px;
	padding: 0 22px;
	background: #62CD24;
	color: #141614;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	border-radius: 999px;
	white-space: nowrap;
}

.inc-cab__cta:hover { background: #57BA1E; color: #141614; }

.inc-cab__hamburguesa {
	width: 44px;
	height: 44px;
	border: 1px solid #E4E5E2;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 0;
}

.inc-cab__hamburguesa span { width: 16px; height: 1.5px; background: #141614; display: block; transition: transform .25s; }
.inc-cab__hamburguesa[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.inc-cab__hamburguesa[aria-expanded="true"] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

/* ── desplegables ─────────────────────────────────────────────────────────── */

.inc-cab__mega {
	position: absolute;
	inset: 100% 0 auto 0;
	background: #fff;
	border-bottom: 1px solid #E4E5E2;
	box-shadow: 0 30px 50px -30px rgba(20, 22, 20, .3);
}

.inc-cab__mega[hidden] { display: none; }

.inc-cab__mega-fila {
	max-width: 1400px;
	margin: 0 auto;
	padding: 28px var(--inc-cab-gutter) 32px;
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 1.1fr);
	gap: 32px;
}

.inc-cab__mega-lineas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.inc-cab__linea { display: flex; flex-direction: column; gap: 12px; }

.inc-cab__linea-foto {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: 12px;
	overflow: hidden;
	background: #1C1F1C;
}

.inc-cab__linea-foto img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.inc-cab__linea-foto:hover img { transform: scale(1.05); }
.inc-cab__linea-nombre { font-size: 17px; font-weight: 600; color: #141614; text-decoration: none; }
.inc-cab__linea-nombre:hover { color: #367B10; }
.inc-cab__linea-prendas { display: flex; flex-direction: column; gap: 9px; }
.inc-cab__linea-prendas a { font-size: 15px; color: #5C615D; text-decoration: none; }
.inc-cab__linea-prendas a:hover { color: #141614; }

.inc-cab__caja {
	background: #F1F2EF;
	border-radius: 16px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
}

.inc-cab__caja-titulo { font-size: 17px; font-weight: 600; }
.inc-cab__caja-texto { font-size: 15px; line-height: 1.5; color: #5C615D; }
.inc-cab__caja-asesor { font-size: 15px; font-weight: 600; color: #141614; }
.inc-cab__caja-ver { font-size: 15px; font-weight: 600; color: #367B10; text-decoration: none; }
.inc-cab__caja-ver:hover { color: #1F5A08; }

.inc-cab__mega-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }

.inc-cab__sector {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px;
	border-radius: 12px;
	text-decoration: none;
	color: #141614;
	transition: background .2s;
}

.inc-cab__sector:hover { background: #F1F2EF; color: #141614; }
.inc-cab__sector-foto { flex: none; position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #1C1F1C; }
.inc-cab__sector-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inc-cab__sector-texto { display: flex; flex-direction: column; gap: 3px; }
.inc-cab__sector-nombre { font-size: 16px; font-weight: 600; }
.inc-cab__sector-riesgo { font-size: 13px; color: #666D67; }

.inc-cab__grupo { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid #E4E5E2; }
.inc-cab__grupo-titulo { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #367B10; }

.inc-cab__icono {
	flex: none;
	width: 16px;
	height: 16px;
	background: #367B10;
	-webkit-mask: var(--icono) center / contain no-repeat;
	mask: var(--icono) center / contain no-repeat;
}

.inc-cab__norma {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 16px;
	font-weight: 600;
	color: #141614;
	text-decoration: none;
	padding: 4px 0;
}

.inc-cab__norma:hover { color: #367B10; }
.inc-cab__norma span { color: #9EA39F; }

/* ── menú del teléfono ────────────────────────────────────────────────────── */

/*
 * El mismo contenido rico de los desplegables de escritorio (fotos de líneas y
 * sectores, normas por riesgo), en tarjetas pensadas para el dedo, con una
 * tarjeta de contacto al pie. Rediseño pedido por el usuario el 2026-10-19.
 */
.inc-cab__movil {
	position: fixed;
	z-index: 59;
	inset: var(--inc-cab-alto) 0 0 0;
	background: #F5F6F3;
	padding: 10px 14px calc(18px + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	gap: 14px;
	overflow: auto;
	overscroll-behavior: contain;
	animation: incMvEntrar .28s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes incMvEntrar { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes incMvAbrir { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.admin-bar .inc-cab__movil { top: calc(var(--inc-cab-alto) + var(--wp-admin--admin-bar--height, 46px)); }
.inc-cab__movil[hidden] { display: none; }

.inc-cab__mv-nav { background: #fff; border-radius: 18px; padding: 4px 6px; }
.inc-cab__movil-lista { margin: 0; padding: 0; list-style: none; }
.inc-cab__mv-item + .inc-cab__mv-item { border-top: 1px solid #ECEDEA; }

.inc-cab__movil-enlace {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	color: #141614;
	text-decoration: none;
	font: inherit;
	font-size: 20px;
	font-weight: 600;
	padding: 15px 12px;
	border: 0;
	border-radius: 12px;
	background: none;
	cursor: pointer;
	text-align: left;
	-webkit-tap-highlight-color: transparent;
}

.inc-cab__movil-enlace:active { background: #F1F2EF; }
.inc-cab__mv-txt { display: flex; flex-direction: column; gap: 2px; }
.inc-cab__mv-txt small { font-size: 13px; font-weight: 500; color: #666D67; }
.inc-cab__movil-enlace.is-activo .inc-cab__mv-txt::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #62CD24;
	position: absolute;
	margin: 11px 0 0 -12px;
}
.inc-cab__movil-enlace.is-activo { position: relative; color: #367B10; }

.inc-cab__mv-mas {
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #F1F2EF;
	display: grid;
	place-items: center;
	color: #141614;
	transition: background .2s, transform .25s;
}

.inc-cab__mv-mas .inc-cab__caret { width: 12px; height: 8px; }
.inc-cab__mv-flecha { width: 7px; height: 11px; display: block; }
.inc-cab__movil-enlace[aria-expanded="true"] .inc-cab__mv-mas { background: #62CD24; transform: rotate(180deg); }

.inc-cab__movil-sub { display: flex; flex-direction: column; gap: 8px; padding: 2px 6px 14px; animation: incMvAbrir .25s ease both; }
.inc-cab__movil-sub[hidden] { display: none; }

/* Productos: una tarjeta por línea, con foto y sus prendas. */
.inc-cab__mv-linea {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 8px;
	border-radius: 14px;
	background: #F5F6F3;
	color: #141614;
	text-decoration: none;
}
.inc-cab__mv-lfoto { flex: none; position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #1C1F1C; }
.inc-cab__mv-lfoto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inc-cab__mv-ltexto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.inc-cab__mv-ltexto strong { font-size: 16px; font-weight: 600; }
.inc-cab__mv-ltexto span { font-size: 13px; line-height: 1.35; color: #666D67; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inc-cab__mv-linea .inc-cab__mv-flecha { flex: none; margin-right: 6px; color: #9EA39F; }

/* Sectores: filas compactas como en el desplegable de escritorio (foto, nombre y riesgo). */
.inc-cab__mv-sectores { display: flex; flex-direction: column; gap: 6px; }
.inc-cab__mv-sector {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	grid-template-rows: auto auto;
	column-gap: 12px;
	align-items: center;
	padding: 7px;
	border-radius: 14px;
	background: #F5F6F3;
	color: #141614;
	text-decoration: none;
}
.inc-cab__mv-sfoto { grid-row: 1 / 3; position: relative; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: #1C1F1C; }
.inc-cab__mv-sfoto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inc-cab__mv-sector strong { font-size: 15px; font-weight: 600; line-height: 1.2; align-self: end; }
.inc-cab__mv-sector span:last-child { font-size: 12px; color: #666D67; align-self: start; }

/* Normas: por riesgo, con su ícono, y cada norma como píldora. */
.inc-cab__mv-grupo { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #F5F6F3; }
.inc-cab__mv-normas { display: flex; flex-wrap: wrap; gap: 6px; }
.inc-cab__mv-normas a {
	display: flex;
	align-items: center;
	min-height: 38px;
	padding: 0 14px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #E4E5E2;
	font-size: 14px;
	font-weight: 600;
	color: #141614;
	text-decoration: none;
}

.inc-cab__mv-todo {
	align-self: flex-start;
	margin: 4px 4px 0;
	font-size: 15px;
	font-weight: 700;
	color: #367B10;
	text-decoration: none;
	padding: 6px 0;
}

/* Tarjeta de contacto al pie del menú. */
.inc-cab__mv-contacto {
	margin-top: auto;
	background: #141614;
	color: #fff;
	border-radius: 18px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.inc-cab__mv-ctitulo { font-size: 18px; font-weight: 600; }
.inc-cab__mv-ctexto { font-size: 14px; line-height: 1.5; color: #B9BDB9; margin-bottom: 4px; }
.inc-cab__cta--movil { height: 52px; justify-content: center; gap: 8px; font-size: 16px; }
.inc-cab__mv-acciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.inc-cab__mv-accion {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	border-radius: 999px;
	border: 1px solid #3A3E3A;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.inc-cab__mv-accion svg { width: 18px; height: 18px; color: #62CD24; }
.inc-cab__mv-accion:active { background: #232623; }
.inc-cab__mv-numero { align-self: center; font-size: 13px; color: #9EA39F; margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
	.inc-cab__movil,
	.inc-cab__movil-sub { animation: none; }
}

/* Dentro del editor la cabecera va en su sitio, no fija: si no, flota fuera de su bloque. */
.editor-styles-wrapper .inc-cab__barra,
.block-editor-block-list__layout .inc-cab__barra { position: relative; top: auto; }

/* Con el menú abierto, la página de fondo no se desplaza. */
html.inc-sin-scroll { overflow: hidden; }

/* ── puntos de quiebre del diseño ─────────────────────────────────────────── */

@media (min-width: 901px) {
	.inc-cab__hamburguesa { display: none; }
	.inc-cab__movil { display: none !important; }
}

@media (max-width: 1180px) {
	.inc-cab__tel { display: none; }
}

@media (max-width: 1100px) {
	.inc-cab__enlace { padding: 0 10px; }
}

@media (max-width: 900px) {
	.inc-cab__nav,
	.inc-cab__mega { display: none !important; }
}
