/*
 * Cabecera de escritorio (>=1025px) — propuesta4.jpg.
 * Tablet/móvil usan la cabecera de la plantilla Elementor #103 (ver widget 38a03c3).
 * Convención: bloque `bnv-` (BEM ligero), colores como variables, sin !important
 * salvo donde FiboSearch fija estilos en línea.
 */

#bnv-hd { display: none; }

@media (min-width: 1025px) {
	:root {
		/* 1px = 1px a 1774px de viewport (ancho del diseño) y escala hacia abajo */
		--bnv-u: min(1px, calc(100vw / 1774));
		--bnv-top: max(74px, calc(104 * var(--bnv-u)));
		--bnv-nav: max(44px, calc(57 * var(--bnv-u)));
		--bnv-max: 1680px;
		--bnv-gutter: clamp(28px, 4.2vw, 76px);

		--bnv-bg-top-a: #e7d9c6;
		--bnv-bg-top-b: #eadccb;
		--bnv-bg-nav: #f1e8dc;
		--bnv-ink: #1d1a17;
		--bnv-text: #3a332d;
		--bnv-muted: #8c8379;
		--bnv-gold: #c79a52;
		--bnv-brown-a: #8a6a3e;
		--bnv-brown-b: #a5834c;
		--bnv-orange: #d38d35;
		--bnv-circle: #f6eee3;
		--bnv-line: rgba(120, 90, 50, .16);
		--bnv-ease: cubic-bezier(.16, 1, .3, 1);
	}

	/* Con el header fijo el contenido arranca debajo de él */
	body { padding-top: calc(var(--bnv-top) + var(--bnv-nav)); }
	body.admin-bar { padding-top: calc(var(--bnv-top) + var(--bnv-nav) + 32px); }

	/* Secciones auxiliares de la plantilla #103 (solo llevan elementos fijos/estilos):
	   no deben ocupar alto en el flujo. */
	.elementor-location-header > .elementor-section { height: 0; min-height: 0; padding: 0; margin: 0; overflow: visible; }

	#bnv-hd {
		display: block;
		position: fixed; top: 0; left: 0; right: 0; z-index: 990;
		font-family: 'Inter', sans-serif;
		background: var(--bnv-bg-nav);
		box-shadow: 0 1px 0 rgba(120, 90, 50, .10);
		transition: box-shadow .3s;
	}
	body.admin-bar #bnv-hd { top: 32px; }
	body.dpc-scrolled #bnv-hd { box-shadow: 0 10px 30px -14px rgba(60, 40, 15, .35); }

	#bnv-hd svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

	/* ── Fila 1 ── */
	#bnv-hd .bnv-top { background: linear-gradient(180deg, var(--bnv-bg-top-a), var(--bnv-bg-top-b)); }
	#bnv-hd .bnv-top__in {
		box-sizing: border-box; max-width: var(--bnv-max); margin: 0 auto;
		height: var(--bnv-top); padding: 0 var(--bnv-gutter);
		display: flex; align-items: center; gap: calc(26 * var(--bnv-u));
		transition: height .35s var(--bnv-ease);
	}
	body.dpc-scrolled #bnv-hd .bnv-top__in { height: 72px; }

	#bnv-hd .bnv-logo { flex: none; display: flex; align-items: center; margin-right: 4px; }
	#bnv-hd .bnv-logo img { display: block; width: auto; height: max(54px, calc(96 * var(--bnv-u))); transition: height .35s var(--bnv-ease); }
	body.dpc-scrolled #bnv-hd .bnv-logo img { height: 56px; }

	/* Botones tipo píldora (Distribuidor / Cotizar) */
	#bnv-hd .bnv-pill {
		display: flex; align-items: center; text-decoration: none; color: #fff;
		transition: transform .35s var(--bnv-ease), box-shadow .35s;
	}
	#bnv-hd .bnv-pill:hover { transform: translateY(-2px); color: #fff; }
	#bnv-hd .bnv-pill svg { width: 19px; height: 19px; }
	#bnv-hd .bnv-pill__go { flex: none; display: flex; align-items: center; justify-content: center; transition: transform .35s var(--bnv-ease); }
	#bnv-hd .bnv-pill:hover .bnv-pill__go { transform: translateX(4px); }

	#bnv-hd .bnv-dist {
		flex: 0 0 max(176px, calc(190 * var(--bnv-u)));
		height: max(50px, calc(62 * var(--bnv-u)));
		gap: 11px; padding: 0 22px 0 10px; border-radius: 40px;
		background: linear-gradient(135deg, var(--bnv-brown-a), var(--bnv-brown-b));
		box-shadow: 0 10px 22px -10px rgba(110, 78, 34, .65), inset 0 1px 0 rgba(255, 255, 255, .18);
	}
	#bnv-hd .bnv-dist:hover { box-shadow: 0 16px 26px -10px rgba(110, 78, 34, .7), inset 0 1px 0 rgba(255, 255, 255, .18); }
	#bnv-hd .bnv-dist__tx { flex-direction: column-reverse; gap: 1px; }
	#bnv-hd .bnv-dist__tx em { font-size: 11px; font-weight: 500; letter-spacing: .02em; }
	#bnv-hd .bnv-dist__ic { flex: none; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; }
	#bnv-hd .bnv-dist__tx { flex: 1; min-width: 0; display: flex; flex-direction: column-reverse; gap: 1px; }
	#bnv-hd .bnv-dist__tx strong { font-size: 15px; font-weight: 600; line-height: 1.15; }
	#bnv-hd .bnv-dist__tx em { font-style: normal; font-size: 10px; line-height: 1.25; color: rgba(255, 255, 255, .88); }
	#bnv-hd .bnv-dist .bnv-pill__go { width: 32px; height: 32px; border-radius: 50%; background: var(--bnv-orange); }

	#bnv-hd .bnv-cot {
		flex: none; height: max(50px, calc(62 * var(--bnv-u)));
		gap: 12px; padding: 0 20px 0 10px; border-radius: 30px;
		background: #211e1b; box-shadow: 0 10px 22px -10px rgba(20, 14, 8, .7);
	}
	#bnv-hd .bnv-cot:hover { box-shadow: 0 16px 26px -10px rgba(20, 14, 8, .75); }
	#bnv-hd .bnv-cot__ic { width: 38px; height: 38px; border-radius: 50%; background: var(--bnv-gold); color: #2a1d0a; display: flex; align-items: center; justify-content: center; }
	#bnv-hd .bnv-cot__tx { display: flex; flex-direction: column; gap: 1px; }
	#bnv-hd .bnv-cot__tx strong { font-size: 15.5px; font-weight: 600; line-height: 1.1; }
	#bnv-hd .bnv-cot__tx em { font-style: normal; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
	#bnv-hd .bnv-cot .bnv-pill__go { margin-left: 4px; }
	#bnv-hd .bnv-cot .bnv-pill__go svg { width: 17px; height: 17px; }

	/* Buscador (FiboSearch) */
	#bnv-hd .bnv-search { position: relative; flex: 1 1 0; min-width: 220px; max-width: calc(1200 * var(--bnv-u)); height: max(48px, calc(62 * var(--bnv-u))); }
	#bnv-hd .bnv-search .dgwt-wcas-search-wrapp,
	#bnv-hd .bnv-search .dgwt-wcas-search-form,
	#bnv-hd .bnv-search .dgwt-wcas-sf-wrapp { width: 100%; max-width: 100%; height: 100%; margin: 0; background: transparent; box-shadow: none; }
	#bnv-hd .bnv-search .dgwt-wcas-search-input {
		position: absolute; left: 0; top: 0; box-sizing: border-box; width: 100%; height: 100%; margin: 0;
		padding: 0 140px 0 30px; line-height: normal;
		border: 0; border-radius: 40px; background: #fff;
		box-shadow: 0 0 22px -4px rgba(120, 85, 35, .38), 0 0 0 2px var(--bnv-gold);
		font-family: 'Inter', sans-serif; font-size: 15.5px; color: var(--bnv-text); text-overflow: ellipsis;
		transition: transform .35s var(--bnv-ease), box-shadow .3s;
	}
	#bnv-hd .bnv-search .dgwt-wcas-search-input:hover { box-shadow: 0 0 26px -3px rgba(120, 85, 35, .5), 0 0 0 2px var(--bnv-brown-b); }
	#bnv-hd .bnv-search .dgwt-wcas-search-input:focus {
		outline: 0; transform: scale(1.018);
		box-shadow: 0 0 30px -4px rgba(211, 141, 53, .6), 0 0 0 2px var(--bnv-orange), 0 0 0 7px rgba(211, 141, 53, .22);
	}
	#bnv-hd .bnv-search .dgwt-wcas-search-input::placeholder { color: #7a6f63; opacity: 1; }
	#bnv-hd .bnv-search .dgwt-wcas-ico-magnifier,
	#bnv-hd .bnv-search .dgwt-wcas-search-submit,
	#bnv-hd .bnv-search .dgwt-wcas-preloader { display: none; }
	#bnv-hd .bnv-search .dgwt-wcas-voice-search { margin-top: -1px; right: 64px; opacity: .8; }
	/* el plugin de búsqueda por imagen fija `right` en línea → !important necesario */
	#bnv-hd .bnv-search .bvs-cam-btn { right: 104px !important; width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(199, 154, 82, .18); box-shadow: none; color: var(--bnv-brown-a); opacity: 1; transition: background .25s, color .25s, transform .3s var(--bnv-ease); }
	#bnv-hd .bnv-search .bvs-cam-btn svg { width: 25px; height: 25px; }
	#bnv-hd .bnv-search .bvs-cam-btn:hover { background: var(--bnv-gold); color: #2a1d0a; opacity: 1; transform: translateY(-50%) scale(1.1); }
	#bnv-hd .bnv-search .bvs-cam-btn::after { display: none; }
	#bnv-hd .bnv-search__go {
		position: absolute; right: 6px; top: 50%; margin-top: -25px; width: 50px; height: 50px; padding: 0; overflow: hidden;
		border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--bnv-gold), var(--bnv-orange)); color: #2a1d0a;
		box-shadow: 0 6px 14px -4px rgba(211, 141, 53, .7);
		display: flex; align-items: center; justify-content: center; cursor: pointer;
		transition: transform .3s var(--bnv-ease), background .25s;
	}
	#bnv-hd .bnv-search__go::after {
		content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
		background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent); transform: skewX(-20deg);
	}
	#bnv-hd .bnv-search__go:hover { transform: scale(1.08); box-shadow: 0 8px 18px -4px rgba(211, 141, 53, .85); }
	#bnv-hd .bnv-search__go:hover::after { left: 130%; transition: left .6s var(--bnv-ease); }
	#bnv-hd .bnv-search__go svg { width: 22px; height: 22px; stroke-width: 2; }

	/* Íconos circulares: cuenta, carrito, menú */
	#bnv-hd .bnv-ic {
		position: relative; flex: none; box-sizing: border-box;
		width: max(42px, calc(52 * var(--bnv-u))); height: max(42px, calc(52 * var(--bnv-u)));
		padding: 0; border: 1px solid var(--bnv-line); border-radius: 50%;
		background: var(--bnv-circle); color: var(--bnv-ink); text-decoration: none; cursor: pointer;
		display: flex; align-items: center; justify-content: center;
		box-shadow: 0 6px 14px -9px rgba(80, 55, 20, .5);
		transition: transform .3s var(--bnv-ease), background .25s;
	}
	#bnv-hd .bnv-ic:hover { transform: translateY(-2px); background: #fff; color: var(--bnv-ink); }
	#bnv-hd .bnv-ic svg { width: 22px; height: 22px; }
	#bnv-hd .bnv-burger { background: #e3d1b8; }
	#bnv-hd .bnv-burger:hover { background: #d9c3a3; }

	#bnv-hd .bnv-cart-count {
		position: absolute; top: -5px; right: -5px; box-sizing: border-box; min-width: 19px; height: 19px; padding: 0 4px;
		border-radius: 10px; background: var(--bnv-orange); color: #fff;
		font-size: 10.5px; font-weight: 700; line-height: 19px; text-align: center;
	}
	#bnv-hd .bnv-cartwrap { position: relative; flex: none; display: flex; }
	#bnv-hd .bnv-cart-panel {
		position: absolute; top: calc(100% + 14px); right: -6px; z-index: 5; width: 330px;
		padding: 16px; border-radius: 14px; background: #fff; box-shadow: 0 18px 44px rgba(40, 25, 8, .25);
		opacity: 0; visibility: hidden; transform: translateY(-8px);
		transition: opacity .2s, transform .2s, visibility .2s;
	}
	#bnv-hd .bnv-cartwrap:hover .bnv-cart-panel,
	#bnv-hd .bnv-cartwrap:focus-within .bnv-cart-panel { opacity: 1; visibility: visible; transform: none; }
	#bnv-hd .bnv-cart-panel .woocommerce-mini-cart__empty-message { margin: 6px 0; font-size: 14px; color: #555; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__products { max-height: 46vh; overflow-y: auto; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product { position: relative; display: block; min-height: 52px; padding: 10px 24px 10px 52px; border-bottom: 1px solid #eee; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product-image { position: absolute; left: 0; top: 10px; width: 44px; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product-image img { width: 44px; height: auto; border-radius: 4px; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product-name { font-size: 12.5px; line-height: 1.35; font-weight: 600; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product-name a { color: var(--bnv-ink); text-decoration: none; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product-price { margin-top: 2px; font-size: 12px; color: #555; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product-remove { position: absolute; right: 0; top: 10px; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product-remove a { display: block; width: 18px; height: 18px; border-radius: 50%; background: #eee; color: #c00; text-align: center; line-height: 18px; font-size: 12px; text-decoration: none; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product-remove a::before { content: "\00d7"; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__product-remove a + a { display: none; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__subtotal { display: flex; justify-content: space-between; margin: 0 0 12px; padding: 12px 0; border: 0; border-bottom: 1px solid #eee; background: none; font-size: 14px; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__subtotal * { border: 0; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__footer-buttons { display: flex; gap: 8px; margin: 0; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__footer-buttons a { flex: 1; padding: 10px 12px; border-radius: 50px; background: var(--bnv-ink); color: #fff; font-size: 12.5px; font-weight: 700; text-align: center; text-decoration: none; }
	#bnv-hd .bnv-cart-panel .elementor-menu-cart__footer-buttons a.elementor-button--checkout { background: var(--bnv-brown-b); }

	/* ── Fila 2: navegación ── */
	#bnv-hd .bnv-nav {
		background: var(--bnv-bg-nav); height: var(--bnv-nav); max-height: var(--bnv-nav);
		transition: max-height .35s var(--bnv-ease), opacity .25s;
	}
	body.dpc-scrolled #bnv-hd .bnv-nav { max-height: 0; opacity: 0; pointer-events: none; overflow: hidden; }
	#bnv-hd .bnv-menu, #bnv-hd .bnv-menu ul { list-style: none; margin: 0; padding: 0; }
	#bnv-hd .bnv-menu { box-sizing: border-box; max-width: var(--bnv-max); height: 100%; margin: 0 auto; padding: 0 var(--bnv-gutter); display: flex; align-items: center; justify-content: center; gap: 58px; }
	#bnv-hd .bnv-menu > li { position: relative; height: 100%; display: flex; align-items: center; }
	#bnv-hd .bnv-menu a {
		font-size: 13px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase;
		color: var(--bnv-text); text-decoration: none; background: transparent; transition: color .25s;
	}
	#bnv-hd .bnv-menu > li > a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 0 8px; }
	#bnv-hd .bnv-menu > li > a::before {
		content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--bnv-gold);
		transform: scaleX(0); transform-origin: left; transition: transform .45s var(--bnv-ease);
	}
	#bnv-hd .bnv-menu > li:hover > a::before,
	#bnv-hd .bnv-menu > li:focus-within > a::before,
	#bnv-hd .bnv-menu > li.current-menu-item > a::before,
	#bnv-hd .bnv-menu > li.current-menu-ancestor > a::before { transform: scaleX(1); }
	#bnv-hd .bnv-menu > li.current-menu-item > a,
	#bnv-hd .bnv-menu > li:hover > a { color: var(--bnv-ink); }
	#bnv-hd .bnv-menu > li.menu-item-has-children > a::after {
		content: ""; width: 6px; height: 6px; margin-left: 2px;
		border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px);
	}
	#bnv-hd .bnv-menu .sub-menu {
		position: absolute; top: 100%; left: 50%; min-width: 210px; padding: 6px 0;
		background: #f6eee3; border: 1px solid var(--bnv-line); border-top: 2px solid var(--bnv-gold); border-radius: 0 0 14px 14px;
		box-shadow: 0 20px 40px -14px rgba(40, 25, 8, .35);
		opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
		transition: opacity .25s, transform .3s var(--bnv-ease), visibility .25s;
	}
	#bnv-hd .bnv-menu li:hover > .sub-menu,
	#bnv-hd .bnv-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
	#bnv-hd .bnv-menu .sub-menu a { display: block; padding: 11px 22px; border-left: 3px solid transparent; font-size: 12.5px; letter-spacing: .07em; transition: background .2s, padding-left .25s, border-color .2s, color .2s; }
	#bnv-hd .bnv-menu .sub-menu a:hover,
	#bnv-hd .bnv-menu .sub-menu a:focus-visible { padding-left: 27px; border-left-color: var(--bnv-gold); background: var(--bnv-ink); color: var(--bnv-bg-nav); }

	/* Foco visible para teclado */
	#bnv-hd a:focus-visible, #bnv-hd button:focus-visible { outline: 2px solid var(--bnv-gold); outline-offset: 3px; }

	/* La portada tiene su propio espaciador de ticker (solo útil con header bajo) */
	.elementor-element-6592f7b { display: none; }
}

@media (min-width: 1025px) and (max-width: 1280px) {
	#bnv-hd .bnv-top__in { gap: 14px; }
	#bnv-hd .bnv-dist { flex-basis: 176px; }
	#bnv-hd .bnv-menu { gap: 36px; }
}
@media (min-width: 1025px) and (max-width: 1160px) {
	#bnv-hd .bnv-cot__tx em { display: none; }
	#bnv-hd .bnv-dist { flex-basis: 160px; }
	#bnv-hd .bnv-dist__tx strong { font-size: 13px; }
	#bnv-hd .bnv-search { min-width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
	#bnv-hd, #bnv-hd * { transition-duration: .01ms !important; }
}
