/* Bubols · Topbar + Header widgets. Spec: diseño.pen (C/Topbar, C/Header, Menú móvil). */
.elementor-widget-bubols-topbar,
.elementor-widget-bubols-header,
.elementor-widget-bubols-footer { width: 100%; max-width: none; }
.elementor-widget-bubols-header { position: relative; z-index: 990; }

.bubols-topbar-widget,
.bubols-header-widget {
	--bhw-bg: #FFFFFF;
	--bhw-line: #E3E7F0;
	--bhw-ink: #1D2847;
	--bhw-buy: #FDD743;
	--bhw-wa: #25D366;
	--bhw-pale: #FDD743;
	--bhw-pale-2: #FDD743;
	--bhw-gray-2: #5A628A;
	--bhw-gray-3: #8A8FA3;
	--bhw-red: #E01950;
	box-sizing: border-box;
	font-family: Nunito, system-ui, sans-serif;
}
.bubols-topbar-widget *,
.bubols-header-widget * { box-sizing: border-box; }

/* Topbar */
.bubols-topbar-widget { width: 100%; min-height: 38px; padding: 10px 80px; background: #1D2847; color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.bubols-topbar-widget__items { display: flex; align-items: center; justify-content: center; gap: 28px; }
.bubols-topbar-widget__item,
.bubols-topbar-widget__line { font: 700 13px/18px Nunito, system-ui, sans-serif; }
.bubols-topbar-widget__mobile { display: none; }

/* Header bar */
.bubols-header-widget { position: relative; width: 100%; background: var(--bhw-bg); color: var(--bhw-ink); border-bottom: 1.5px solid var(--bhw-line); }
.bubols-header-widget a { text-decoration: none; }
:where(.bubols-header-widget) button { appearance: none; -webkit-appearance: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font: inherit; line-height: inherit; text-transform: none; cursor: pointer; }
:where(.bubols-header-widget) button:hover,
:where(.bubols-header-widget) button:focus { background: none; color: inherit; }
.bubols-header-widget :focus-visible { outline: 2px solid var(--bhw-ink); outline-offset: 2px; }
.bubols-header-widget svg { display: block; flex: none; }
.bubols-header-widget__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bubols-header-widget__bar { display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 14px 80px; }
.bubols-header-widget__logo { flex: none; display: flex; align-items: center; width: 118px; height: 48px; }
.bubols-header-widget__logo img { display: block; width: 118px; height: 48px; object-fit: contain; }
.bubols-header-widget__toggle,
.bubols-header-widget__drawer { display: none; }
.bubols-header-widget__search-toggle { display: flex; flex: none; margin-left: auto; color: var(--bhw-ink); }
.bubols-header-widget__search-toggle svg { width: 20px; height: 20px; }

/* Navigation */
.bubols-header-widget__nav { display: flex; align-items: center; flex: none; }
.bubols-header-widget__item { position: relative; display: flex; align-items: center; border-radius: 999px; transition: background-color .15s; }
.bubols-header-widget__item:hover,
.bubols-header-widget__item:focus-within,
.bubols-header-widget__item.is-open { background: var(--bhw-pale); }
.bubols-header-widget__link { display: block; padding: 9px 8px; font: 800 13.5px/18px Nunito, system-ui, sans-serif; color: var(--bhw-ink); white-space: nowrap; }
.bubols-header-widget__link:has(+ .bubols-header-widget__caret) { padding-right: 0; }
.bubols-header-widget .bubols-header-widget__caret,
.bubols-header-widget button.bubols-header-widget__caret:hover,
.bubols-header-widget button.bubols-header-widget__caret:focus { display: flex; align-items: center; padding: 9px 8px 9px 4px; color: var(--bhw-gray-2); }
.bubols-header-widget__caret svg { width: 12px; height: 12px; stroke-width: 2.2; transition: transform .15s; }
.bubols-header-widget__item.is-open .bubols-header-widget__caret svg { transform: rotate(180deg); }

.bubols-header-widget__dropdown { position: absolute; top: 100%; left: 0; z-index: 5; padding-top: 12px; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .15s; }
.bubols-header-widget__item.is-open > .bubols-header-widget__dropdown { visibility: visible; opacity: 1; pointer-events: auto; }
@media (hover: hover) {
	.bubols-header-widget__item:hover > .bubols-header-widget__dropdown { visibility: visible; opacity: 1; pointer-events: auto; }
}
.bubols-header-widget__panel { display: flex; flex-direction: column; gap: 1px; width: 280px; padding: 10px; background: #fff; border-radius: 18px; box-shadow: 0 18px 44px rgba(29, 40, 71, .16); }
.bubols-header-widget__panel a { display: block; padding: 9px 14px; border-radius: 11px; font: 700 14px/19px Nunito, system-ui, sans-serif; color: var(--bhw-ink); }
.bubols-header-widget__panel a:hover,
.bubols-header-widget__panel a:focus-visible { background: var(--bhw-pale-2); }

/* Search popup */
.bubols-header-widget__search-overlay { position: fixed; inset: 0; z-index: 99995; display: none; align-items: flex-start; justify-content: center; padding: 12vh 20px 20px; background: rgba(29, 40, 71, .55); }
.bubols-header-widget.is-search-open .bubols-header-widget__search-overlay { display: flex; }
.bubols-header-widget__search-box { position: relative; width: 100%; max-width: 640px; padding: 40px; background: #fff; border-radius: 20px; box-shadow: 0 30px 70px rgba(29, 40, 71, .28); }
.bubols-header-widget__search-title { margin: 0 0 22px; font: 900 28px/1.2 Nunito, system-ui, sans-serif; color: var(--bhw-ink); text-align: center; }
.bubols-header-widget button.bubols-header-widget__search-close,
.bubols-header-widget button.bubols-header-widget__search-close:hover,
.bubols-header-widget button.bubols-header-widget__search-close:focus { position: absolute; top: 16px; right: 16px; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; color: var(--bhw-ink); }
.bubols-header-widget button.bubols-header-widget__search-close:hover { background: var(--bhw-pale-2); }
.bubols-header-widget__search-close svg { width: 18px; height: 18px; }
.bubols-header-widget__search { width: 100%; height: 52px; display: flex; align-items: center; gap: 9px; padding: 0 18px; margin: 0; background: #fff; border: 1.5px solid var(--bhw-line); border-radius: 999px; }
.bubols-header-widget__search:focus-within { border-color: var(--bhw-ink); }
.bubols-header-widget__search svg { width: 18px; height: 18px; color: var(--bhw-ink); }
.bubols-header-widget__search input[type="search"] { flex: 1; min-width: 0; height: auto; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; appearance: none; -webkit-appearance: none; font: 600 15px/20px Nunito, system-ui, sans-serif; color: var(--bhw-ink); }
.bubols-header-widget__search input::placeholder { color: var(--bhw-gray-3); opacity: 1; }
.bubols-header-widget__search input:focus-visible { outline: 0; }

.bubols-header-widget__icon { position: relative; flex: none; display: flex; color: var(--bhw-ink); }
.bubols-header-widget__icon::after { content: ""; position: absolute; inset: -8px; }
.bubols-header-widget__account svg { width: 22px; height: 22px; }
.bubols-header-widget__cart { width: 28px; height: 24px; align-items: flex-end; }
.bubols-header-widget__cart svg { width: 22px; height: 22px; }
.bubols-header-widget__cart .bubols-header__cart-count { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; min-height: 0; padding: 0 4px; border-radius: 999px; background: var(--bhw-red); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 800 10px/1 Nunito, system-ui, sans-serif; }

@media (max-width: 1439px) {
	.bubols-topbar-widget { padding-inline: 48px; }
	.bubols-header-widget__bar { padding-inline: 48px; }
}

/* Mobile / tablet layout: menu drawer replaces the desktop nav */
@media (max-width: 1279px) {
	.bubols-header-widget__bar { flex-wrap: wrap; min-height: 60px; padding: 10px 32px; }
	.bubols-header-widget__nav { display: none; }
	.bubols-header-widget__toggle { display: flex; flex: none; }
	.bubols-header-widget__toggle svg { width: 24px; height: 24px; }
	.bubols-header-widget__logo { width: 96px; height: 40px; }
	.bubols-header-widget__logo img { width: 96px; height: 40px; }
	.bubols-header-widget__cart { width: 26px; height: 22px; }
	.bubols-header-widget__cart svg { width: 20px; height: 20px; }
	.bubols-header-widget__cart .bubols-header__cart-count { min-width: 15px; height: 15px; font-size: 9px; }
	.bubols-header-widget__search-overlay { padding: 18vh 16px 16px; }
	.bubols-header-widget__search-box { padding: 28px 22px; }

	.bubols-header-widget__drawer { position: fixed; inset: 0; z-index: 99990; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: calc(20px + var(--wp-admin--admin-bar--height, 0px)) 22px 32px; background: var(--bhw-bg); }
	.bubols-header-widget__drawer[hidden] { display: none; }
	.bubols-header-widget__drawer-bar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 22px; }
	.bubols-header-widget__drawer-title { font: 900 23px/31px Nunito, system-ui, sans-serif; color: var(--bhw-ink); }
	.bubols-header-widget button.bubols-header-widget__drawer-close,
	.bubols-header-widget button.bubols-header-widget__drawer-close:hover,
	.bubols-header-widget button.bubols-header-widget__drawer-close:focus { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 999px; background: var(--bhw-ink); color: #fff; }
	.bubols-header-widget__drawer-close svg { width: 18px; height: 18px; }
	.bubols-header-widget__groups { display: flex; flex-direction: column; gap: 14px; }
	.bubols-header-widget__group { display: flex; flex-direction: column; gap: 8px; }
	.bubols-header-widget__group::after { content: ""; height: 1.5px; background: var(--bhw-line); }
	.bubols-header-widget__group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; font: 900 13px/18px Nunito, system-ui, sans-serif; letter-spacing: 1.4px; text-transform: uppercase; color: var(--bhw-ink); }
	.bubols-header-widget__group-head svg { width: 18px; height: 18px; color: var(--bhw-gray-2); transition: transform .15s; }
	.bubols-header-widget__group.is-open > .bubols-header-widget__group-head { color: var(--bhw-red); }
	.bubols-header-widget__group.is-open > .bubols-header-widget__group-head svg { transform: rotate(180deg); }
	.bubols-header-widget__group-items { display: flex; flex-direction: column; gap: 2px; }
	.bubols-header-widget__group-items[hidden] { display: none; }
	.bubols-header-widget__group-items a { font: 700 16px/1.9 Nunito, system-ui, sans-serif; color: var(--bhw-ink); }
	.bubols-header-widget__drawer-cta { margin-top: auto; padding-top: 20px; }
	.bubols-header-widget__drawer-buy { display: flex; align-items: center; justify-content: center; padding: 15px 24px; border-radius: 999px; background: var(--bhw-buy); color: var(--bhw-ink); font: 900 15px/22px Nunito, system-ui, sans-serif; }
}

html.bubols-menu-open { overflow: hidden; }

@media (max-width: 767px) {
	.bubols-topbar-widget { min-height: 0; padding: 9px 16px; }
	.bubols-topbar-widget__items { display: none; }
	.bubols-topbar-widget__mobile { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
	.bubols-topbar-widget__line { font-size: 12px; line-height: 16px; }
	.bubols-header-widget__bar { padding-inline: 16px; }
}
