/* =========================================================================
   Header C&G — logo + buscador + CATEGORÍAS + acciones + botón azul MENÚ.
   Panel de menú verde (#4BA24A) que entra desde la derecha (media pantalla).
   Se carga DESPUÉS de gabic-header.css para ganar en especificidad.
   Reutiliza el overlay .capa y el bloqueo de scroll body.ghm-drawer-open.
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&display=swap');

:root {
	--cyg-blue:    #1878d1;
	--cyg-blue-d:  #135fab;
	--cyg-green:   #4ba24a;
	--cyg-lime:    #b6d400;
	--cyg-ink:     #16233d;
	--cyg-muted:   #5b6472;
	--cyg-line:    #d9dde3;
}

/* Header FIJO: se oculta al hacer scroll hacia abajo y reaparece al subir,
   con una transición suave (translateY). Va por encima del hero para que los
   desplegables no queden tapados. La clase .is-hidden la aplica el JS. */
#header-desktop,
#header-mobile {
	background: #ffffff;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 1000;
	transform: translateY(0);
	transition: transform 0.35s ease;
	will-change: transform;
}
#header-desktop.is-hidden,
#header-mobile.is-hidden { transform: translateY(-100%); }

/* Desplaza el header bajo la barra de administración de WordPress */
body.admin-bar #header-desktop,
body.admin-bar #header-mobile { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar #header-desktop,
	body.admin-bar #header-mobile { top: 46px; }
}

/* Espaciador que compensa el header fijo (altura real la fija el JS). */
.site { padding-top: var(--cyg-header-h, 92px); }
@media (max-width: 991.98px) {
	.site { padding-top: var(--cyg-header-h, 122px); }
}

@media (prefers-reduced-motion: reduce) {
	#header-desktop,
	#header-mobile { transition: none; }
}

/* =========================================================================
   HEADER DESKTOP
   ========================================================================= */
.cyg-header { position: relative; z-index: 1000; background: #ffffff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.cyg-header * { box-sizing: border-box; }
.cyg-header a { text-decoration: none; color: inherit; }

.cyg-header__inner {
	position: relative;
	width: 100%;
	min-height: 92px;
	padding: 0 0 0 28px;
	display: flex;
	align-items: center;
	gap: 26px;
}

/* Logo */
.cyg-logo { flex: 0 0 auto; line-height: 0; }
.cyg-logo .custom-logo-link { display: inline-block; line-height: 0; }
.cyg-logo img { max-height: 56px; width: auto; height: auto; display: block; }

/* Centro: buscador + categorías. Ocupa el espacio libre y se centra dentro
   de él; al reducir la pantalla encoge en vez de superponerse a los botones. */
.cyg-center {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

/* Contenedor del buscador (envuelve el buscador en vivo del tema o el fallback).
   min-width:0 permite que encoja libremente al reducirse la pantalla. */
.cyg-search {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 720px;
}
.cyg-search .oz-ls,
.cyg-search .ozpls-figma { width: 100%; }

/* Caja del buscador: buscador en vivo (ozpls) y fallback comparten el aspecto */
.cyg-search .ozpls-figma__form,
.cyg-search__fallback {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	margin: 0;
	height: 52px;
	background: #ffffff;
	border: 1px solid var(--cyg-line);
	border-radius: 8px;
	overflow: visible;
}
.cyg-search .ozpls-figma__inputWrap,
.cyg-search .ozpls-figma__bar {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
}
.cyg-search .ozpls-figma__input,
.cyg-search__input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 100%;
	border: 0;
	outline: none;
	background: transparent;
	padding: 0 56px 0 18px;
	font-size: 15px;
	color: #333;
	-webkit-appearance: none;
	appearance: none;
}
.cyg-search .ozpls-figma__input::placeholder,
.cyg-search__input::placeholder { color: #9aa0a6; }
.cyg-search .ozpls-figma__input::-webkit-search-cancel-button,
.cyg-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Botón lupa (a la derecha, dentro de la caja) */
.cyg-search .ozpls-figma__btn,
.cyg-search__btn {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 54px;
	border: 0;
	border-left: 1px solid var(--cyg-line);
	background: transparent;
	color: var(--cyg-ink);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease, background 0.2s ease;
}
.cyg-search .ozpls-figma__btn:hover,
.cyg-search__btn:hover { background: #f5f7fa; }
.cyg-search .ozpls-figma__btnText {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.cyg-search .ozpls-figma__btn::after {
	content: "";
	width: 20px;
	height: 20px;
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316233d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

/* Panel de resultados alineado con la caja */
.cyg-search .oz-ls__panel {
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	border-radius: 10px;
}

/* Oculta el precio en la vista previa del buscador */
.cyg-search .oz-ls__meta,
.cyg-m__search .oz-ls__meta { display: none; }

/* Botón CATEGORÍAS (azul) — abre el panel deslizante de categorías */
#header-desktop .cyg-cats {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	height: 52px;
	padding: 0 24px;
	border: 0;
	border-radius: 8px;
	background: var(--cyg-blue);
	color: #ffffff;
	font: 600 15px/1 'Poppins', system-ui, sans-serif;
	letter-spacing: 0.02em;
	cursor: pointer;
	white-space: nowrap;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	outline: none;
	transition: background 0.2s ease;
}
#header-desktop .cyg-cats:hover { background: var(--cyg-blue-d); }
#header-desktop .cyg-cats:focus { outline: none; box-shadow: none; }

/* Acciones: Datos de Contacto / Carrito Cotizador */
.cyg-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 22px; }
.cyg-action {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--cyg-ink);
	line-height: 1.15;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.cyg-action + .cyg-action { padding-left: 22px; border-left: 1px solid var(--cyg-line); }
.cyg-action__icon { flex: 0 0 auto; color: var(--cyg-ink); display: inline-flex; }
.cyg-action__text { font-size: 14px; color: var(--cyg-muted); white-space: nowrap; }
.cyg-action__text strong { display: block; font-size: 15px; font-weight: 800; color: var(--cyg-ink); }
.cyg-action:hover .cyg-action__icon,
.cyg-action:hover .cyg-action__text strong { color: var(--cyg-blue); }

/* Botón azul MENÚ (bloque a la derecha, altura completa) */
.cyg-menu-btn {
	align-self: stretch;
	flex: 0 0 auto;
	width: 90px;
	border: 0;
	background: var(--cyg-blue);
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 7px;
	transition: background 0.2s ease;
}
.cyg-menu-btn:hover { background: var(--cyg-blue-d); }
.cyg-menu-btn__bars { display: inline-flex; flex-direction: column; gap: 4px; }
.cyg-menu-btn__bars span { display: block; width: 26px; height: 3px; background: #fff; border-radius: 2px; }
.cyg-menu-btn__label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }

/* Compactar antes de saltar a móvil */
@media (max-width: 1400px) {
	.cyg-header__inner { gap: 18px; padding-left: 20px; }
	.cyg-actions { gap: 16px; }
	.cyg-action + .cyg-action { padding-left: 16px; }
	.cyg-search { max-width: 560px; }
}

/* Logo y botón más compactos antes de esconder los textos */
@media (max-width: 1240px) {
	.cyg-logo img { max-height: 46px; }
	#header-desktop .cyg-cats { padding: 0 16px; font-size: 14px; }
	.cyg-search { max-width: 460px; }
}

/* Se ocultan los textos de las acciones: quedan solo los iconos */
@media (max-width: 1120px) {
	.cyg-action__text { display: none; }
	.cyg-action { gap: 0; }
	.cyg-actions { gap: 12px; }
	.cyg-action + .cyg-action { padding-left: 12px; }
	.cyg-menu-btn { width: 76px; }
}

/* =========================================================================
   HEADER MÓVIL (< 992px; el toggle desktop/mobile lo hace gabic-header.css)
   ========================================================================= */
.cyg-m { background: #ffffff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.cyg-m * { box-sizing: border-box; }
.cyg-m__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 64px; }
.cyg-m__logo { flex: 1 1 auto; line-height: 0; }
.cyg-m__logo .custom-logo-link { display: inline-block; line-height: 0; }
.cyg-m__logo img { max-height: 44px; width: auto; height: auto; }
/* Botones cuadrados del header móvil: Categorías (verde) y Menú (azul) */
.cyg-m__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	color: #ffffff;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	outline: none;
	transition: background 0.2s ease;
}
.cyg-m__btn--cats { background: var(--cyg-green); }
.cyg-m__btn--cats:hover { background: #3d8a3c; }
.cyg-m__btn--menu { background: var(--cyg-blue); }
.cyg-m__btn--menu:hover { background: var(--cyg-blue-d); }
.cyg-m__btn .cyg-menu-btn__bars { gap: 4px; }
.cyg-m__btn .cyg-menu-btn__bars span { width: 22px; height: 2.5px; }

.cyg-m__search { padding: 0 14px 12px; }
.cyg-m__search .oz-ls,
.cyg-m__search .ozpls-figma { width: 100%; }
.cyg-m__search .ozpls-figma__form,
.cyg-m__search-fallback {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	margin: 0;
	height: 46px;
	background: #fff;
	border: 1px solid var(--cyg-line);
	border-radius: 8px;
	overflow: visible;
}
.cyg-m__search .ozpls-figma__inputWrap,
.cyg-m__search .ozpls-figma__bar { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.cyg-m__search .ozpls-figma__input,
.cyg-m__search-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 100%;
	border: 0;
	outline: none;
	background: transparent;
	padding: 0 52px 0 14px;
	font-size: 15px;
	color: #333;
	-webkit-appearance: none;
	appearance: none;
}
.cyg-m__search .ozpls-figma__input::placeholder,
.cyg-m__search-input::placeholder { color: #9aa0a6; }
.cyg-m__search .ozpls-figma__btn,
.cyg-m__search-btn {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 50px;
	border: 0;
	border-left: 1px solid var(--cyg-line);
	background: transparent;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.cyg-m__search .ozpls-figma__btnText { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cyg-m__search .ozpls-figma__btn::after {
	content: "";
	width: 18px;
	height: 18px;
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316233d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}
.cyg-m__search .oz-ls__panel { left: 0; right: 0; top: calc(100% + 8px); border-radius: 10px; }

/* =========================================================================
   PANEL VERDE DESLIZANTE (derecha → izquierda, media pantalla)
   Apertura en cascada: entran capas de color del tema y, por último, el
   panel verde con el contenido (estado final).
   ========================================================================= */
.cyg-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 50vw;
	height: 100vh;
	height: 100dvh;
	z-index: 100000;
	overflow: hidden;
	pointer-events: none;
}
.cyg-drawer.is-open { pointer-events: auto; }

/* Capas de color + panel: todas parten fuera (derecha) y entran escalonadas */
.cyg-drawer__layer,
.cyg-drawer__panel {
	position: absolute;
	inset: 0;
	transform: translateX(100%);
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cyg-drawer__layer { z-index: 1; }
.cyg-drawer__layer--1 { z-index: 1; background: var(--cyg-blue); }
.cyg-drawer__layer--2 { z-index: 2; background: var(--cyg-lime); }
.cyg-drawer__layer--3 { z-index: 3; background: #6cc24a; }

.cyg-drawer__panel {
	z-index: 4;
	background: var(--cyg-green);
	color: #ffffff;
	display: flex;
	flex-direction: column;
	padding: 22px clamp(24px, 4vw, 64px) 40px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Retardos al CERRAR (sale primero el verde, luego los colores) */
.cyg-drawer__panel   { transition-delay: 0s; }
.cyg-drawer__layer--3 { transition-delay: 0.06s; }
.cyg-drawer__layer--2 { transition-delay: 0.12s; }
.cyg-drawer__layer--1 { transition-delay: 0.18s; }

/* Estado abierto: todo entra a translateX(0), escalonado (colores → verde) */
.cyg-drawer.is-open .cyg-drawer__layer,
.cyg-drawer.is-open .cyg-drawer__panel { transform: translateX(0); }
.cyg-drawer.is-open .cyg-drawer__layer--1 { transition-delay: 0s; }
.cyg-drawer.is-open .cyg-drawer__layer--2 { transition-delay: 0.1s; }
.cyg-drawer.is-open .cyg-drawer__layer--3 { transition-delay: 0.2s; }
.cyg-drawer.is-open .cyg-drawer__panel   { transition-delay: 0.3s; }

.cyg-drawer__top { display: flex; justify-content: flex-end; flex: 0 0 auto; margin-bottom: 8px; }
.cyg-drawer__close {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 12px 18px;
	border: 2px solid rgba(255, 255, 255, 0.9);
	background: transparent;
	color: #ffffff;
	font: 700 14px/1 'Poppins', sans-serif;
	letter-spacing: 0.14em;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.cyg-drawer__close:hover { background: #ffffff; color: var(--cyg-green); }

.cyg-drawer__nav {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	text-align: right;
	padding: 20px 0;
}
.cyg-drawer__menu { list-style: none; margin: 0; padding: 0; width: 100%; }
.cyg-drawer__menu li { display: block; }
.cyg-drawer__menu a {
	display: block;
	padding: 6px 0;
	color: rgba(255, 255, 255, 0.72);
	font-family: 'Poppins', sans-serif;
	font-weight: 800;
	font-size: clamp(1.9rem, 4vw, 3.4rem);
	line-height: 1.08;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 0.18s ease, transform 0.18s ease;
}
.cyg-drawer__menu a:hover,
.cyg-drawer__menu .current-menu-item > a {
	color: #ffffff;
	transform: translateX(-6px);
}
.cyg-drawer__empty {
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
	font-family: 'Poppins', sans-serif;
	font-size: 1.1rem;
	text-align: right;
}

/* ---- Panel de DATOS DE CONTACTO (fondo blanco, tarjetas) ---- */
.cyg-drawer__panel--contact { background: #ffffff; color: var(--cyg-ink); }
.cyg-drawer__panel--contact .cyg-drawer__close {
	color: var(--cyg-ink);
	border-color: rgba(22, 35, 61, 0.35);
}
.cyg-drawer__panel--contact .cyg-drawer__close:hover { background: var(--cyg-ink); color: #ffffff; }

.cyg-drawer__body { flex: 1 1 auto; padding-top: 6px; }
.cyg-drawer__heading {
	margin: 0 0 6px;
	font: 800 clamp(1.4rem, 2.4vw, 2rem) / 1.1 'Poppins', sans-serif;
	color: var(--cyg-ink);
}

.cyg-contact { list-style: none; margin: 0; padding: 0; }
.cyg-contact__item { display: flex; align-items: flex-start; gap: 18px; padding: 22px 2px; }
.cyg-contact__item + .cyg-contact__item { border-top: 2px solid var(--cyg-lime); }
.cyg-contact__icon {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 2px solid #16346e;
	color: #16346e;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.cyg-contact__title { margin: 0 0 4px; font: 800 20px/1.15 'Poppins', sans-serif; color: #111827; }
.cyg-contact__lines { margin: 0; color: #8a8f98; font-size: 14px; line-height: 1.55; }
.cyg-contact__lines a { color: inherit; text-decoration: none; }
.cyg-contact__lines a:hover { color: #16346e; }

@media (max-width: 991.98px) {
	.cyg-drawer { width: min(88vw, 460px); }
	.cyg-drawer__panel { padding: 18px 24px 32px; }
	.cyg-drawer__nav { justify-content: flex-start; padding: 16px 0; }
	.cyg-drawer__menu a { font-size: clamp(1.7rem, 8vw, 2.6rem); }
}

@media (prefers-reduced-motion: reduce) {
	.cyg-drawer__layer,
	.cyg-drawer__panel { transition: none; transition-delay: 0s !important; }
}
