/* Header · WhatsApp + píldora de íconos (buscar, cuenta, carrito, menú) */

/* Links del menú */
header .wp-block-navigation .wp-block-navigation-item__content { font-family: Quicksand, sans-serif; font-weight: 600; letter-spacing: .02em; color: #4a3728; }
header .wp-block-navigation-item:not(.uvdl-nav-aula) > .wp-block-navigation-item__content { position: relative; }
header .wp-block-navigation-item:not(.uvdl-nav-aula) > .wp-block-navigation-item__content::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: #C9A96E; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
header .wp-block-navigation-item:not(.uvdl-nav-aula) > .wp-block-navigation-item__content:hover::after,
header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }

/* Botón WhatsApp */
.uvdl-hwa { display: inline-flex; align-items: center; gap: .55rem; flex: none; height: 44px; padding: 0 1.25rem 0 1.05rem; border-radius: 999px; background: #3b2c20; color: #F6EFE4 !important; text-decoration: none !important; font: 600 .95rem/1 Quicksand, sans-serif; letter-spacing: .02em; white-space: nowrap; box-shadow: 0 8px 18px -12px rgba(47, 36, 27, .8); transition: background .2s ease, transform .15s ease; }
.uvdl-hwa svg { flex: none; color: #C9A96E; }
.uvdl-hwa:hover { background: #4a3728; }
.uvdl-hwa:active { transform: scale(.97); }
.uvdl-hwa:focus-visible { outline: 2px solid #C9A96E; outline-offset: 3px; }

/* Píldora */
.uvdl-hpill { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 4px; border-radius: 999px; background: #FBF6EE; border: 1px solid rgba(201, 169, 110, .5); box-shadow: 0 6px 16px -12px rgba(74, 55, 40, .55); }
.uvdl-hpill > * { flex: none; margin: 0 !important; }
.uvdl-hpill .uvdl-hpill__btn,
.uvdl-hpill .wp-block-woocommerce-customer-account > a,
.uvdl-hpill .wc-block-customer-account__toggle,
.uvdl-hpill .wc-block-mini-cart__button {
	position: relative; display: grid !important; place-items: center; width: 40px; height: 40px; min-height: 0; padding: 0 !important; margin: 0;
	border: 0; border-radius: 50%; background: transparent; color: #4a3728 !important; cursor: pointer; text-decoration: none !important; line-height: 1;
	transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.uvdl-hpill .uvdl-hpill__btn:hover,
.uvdl-hpill .wp-block-woocommerce-customer-account > a:hover,
.uvdl-hpill .wc-block-customer-account__toggle:hover,
.uvdl-hpill .wc-block-customer-account--is-dropdown-open .wc-block-customer-account__toggle,
.uvdl-hpill .wc-block-mini-cart__button:hover { background: #fff; color: #a8864f !important; box-shadow: 0 2px 8px rgba(74, 55, 40, .1); }
.uvdl-hpill .uvdl-hpill__btn.is-search { background: #fff; color: #a8864f !important; box-shadow: 0 2px 8px rgba(74, 55, 40, .12); }
.uvdl-hpill .uvdl-hpill__btn.is-search:hover { background: #4a3728; color: #F0EAE0 !important; }
.uvdl-hpill button:focus-visible, .uvdl-hpill a:focus-visible { outline: 2px solid #C9A96E; outline-offset: 1px; }
.uvdl-hpill .uvdl-hpill__btn svg { display: block; width: 20px !important; height: 20px !important; }
.uvdl-hpill .is-menu { display: none !important; }

/* Bloques de WooCommerce dentro de la píldora */
.uvdl-hpill .wp-block-woocommerce-customer-account,
.uvdl-hpill .wc-block-mini-cart { position: relative; display: block; padding: 0 !important; margin: 0 !important; line-height: 0; }
.uvdl-hpill .wc-block-customer-account__visual { display: grid; place-items: center; width: 22px; height: 22px; margin: 0 !important; }
.uvdl-hpill .wc-block-customer-account__visual img { width: 26px !important; height: 26px !important; max-width: none; border-radius: 50% !important; object-fit: cover; border: 1px solid #C9A96E; }
/* Sin la flechita del menú de la cuenta: el círculo ya indica que se abre */
.uvdl-hpill .wc-block-customer-account__caret { display: none !important; }
/* Menú desplegable de la cuenta (cuando la persona inició sesión) */
.uvdl-hpill .wc-block-customer-account__dropdown {
	position: absolute; top: calc(100% + 12px); right: -8px; left: auto; z-index: 1000; min-width: 220px; margin: 0; padding: 8px;
	background: #FBF6EE; border: 1px solid rgba(201, 169, 110, .5); border-radius: 16px; box-shadow: 0 22px 44px -20px rgba(42, 30, 21, .5);
	font: 500 .92rem/1.3 Quicksand, sans-serif; line-height: 1.3; text-align: left;
}
.uvdl-hpill .wc-block-customer-account__dropdown[hidden] { display: none !important; }
.uvdl-hpill .wc-block-customer-account__dropdown::before { content: ""; position: absolute; top: -6px; right: 22px; width: 10px; height: 10px; background: #FBF6EE; border-left: 1px solid rgba(201, 169, 110, .5); border-top: 1px solid rgba(201, 169, 110, .5); transform: rotate(45deg); }
.uvdl-hpill .wc-block-customer-account__dropdown-section { display: grid; gap: 2px; padding: 0; margin: 0; }
.uvdl-hpill .wc-block-customer-account__dropdown-item { display: block; padding: .6em .85em; border-radius: 10px; color: #4a3728 !important; text-decoration: none !important; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.uvdl-hpill .wc-block-customer-account__dropdown-item:hover, .uvdl-hpill .wc-block-customer-account__dropdown-item:focus-visible { background: #fff; color: #a8864f !important; outline: none; }
.uvdl-hpill .wc-block-customer-account__dropdown-divider { height: 1px; margin: 6px 4px; background: rgba(201, 169, 110, .35); border: 0; }
.uvdl-hpill .wc-block-customer-account__dropdown-section:last-child .wc-block-customer-account__dropdown-item { color: #8a7358 !important; }
.uvdl-hpill .wp-block-woocommerce-customer-account .label,
.uvdl-hpill .wc-block-customer-account__label,
.uvdl-hpill .wc-block-mini-cart__amount,
.uvdl-hpill .wc-block-mini-cart__tax-label { display: none !important; }
.uvdl-hpill .wc-block-customer-account__account-icon { display: block; width: 20px !important; height: 20px !important; }
.uvdl-hpill .wc-block-mini-cart__quantity-badge { position: relative; display: grid; place-items: center; }
.uvdl-hpill .wc-block-mini-cart__icon { width: 20px !important; height: 20px !important; }
.uvdl-hpill .wc-block-mini-cart__badge,
.uvdl-hpill .uvdl-hpill__count {
	position: absolute; top: -7px; right: -9px; left: auto; transform: none; min-width: 17px; height: 17px; padding: 0 4px; margin: 0; box-sizing: border-box;
	display: grid; place-items: center; border-radius: 99px; border: 2px solid #FBF6EE;
	background: #C9A96E !important; color: #2f241b !important; font: 700 .62rem/1 Quicksand, sans-serif;
}
.uvdl-hpill .wc-block-mini-cart__badge:empty, .uvdl-hpill .wc-block-mini-cart__badge.is-zero { display: none !important; }
.uvdl-hpill .uvdl-hpill__count { top: 3px; right: 1px; }

/* Tablet y celular: el menú se abre desde la píldora */
@media (max-width: 1023px) {
	header .wp-block-navigation__responsive-container-open { display: none !important; }
	header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
	.uvdl-hpill .is-menu { display: grid !important; }
}
/* Pantallas medianas: WhatsApp solo con el ícono */
@media (max-width: 1279px) {
	.uvdl-hwa { width: 44px; padding: 0; justify-content: center; }
	.uvdl-hwa span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.uvdl-hwa svg { width: 20px; height: 20px; }
}
@media (max-width: 599px) {
	header > .wp-block-group.alignfull { padding-left: 16px !important; padding-right: 16px !important; }
	header .wp-block-site-title { font-size: 1.12rem !important; }
	header .wp-block-group.is-content-justification-space-between { gap: .5rem !important; }
	header .wp-block-group.is-content-justification-right { gap: .45rem !important; }
	.uvdl-hwa { width: 38px; height: 38px; box-shadow: none; }
	.uvdl-hpill { padding: 3px; }
	.uvdl-hpill { gap: 2px; }
	.uvdl-hpill .uvdl-hpill__btn,
	.uvdl-hpill .wp-block-woocommerce-customer-account > a,
	.uvdl-hpill .wc-block-customer-account__toggle,
	.uvdl-hpill .wc-block-mini-cart__button { width: 36px; height: 36px; }
	.uvdl-hpill .wc-block-customer-account__dropdown { position: fixed; top: 76px; right: 12px; }
	.uvdl-hpill .wc-block-customer-account__dropdown::before { right: 96px; }
	.uvdl-hpill .uvdl-hpill__btn svg, .uvdl-hpill .wc-block-mini-cart__icon, .uvdl-hpill .wc-block-customer-account__account-icon { width: 19px !important; height: 19px !important; }
}
@media (max-width: 374px) {
	.uvdl-hwa { display: none; }
}

/* ---------- Buscador ---------- */
.uvdl-hs { position: fixed; inset: 0; z-index: 100000; }
.uvdl-hs[hidden] { display: none; }
.uvdl-hs__overlay { position: absolute; inset: 0; background: rgba(42, 30, 21, .45); opacity: 0; transition: opacity .3s ease; }
.uvdl-hs__panel { position: relative; width: min(760px, calc(100% - 24px)); margin: 12px auto 0; max-height: calc(100dvh - 24px); overflow: auto; box-sizing: border-box; padding: 18px; border-radius: 22px; background: #F7F1E7; border: 1px solid rgba(201, 169, 110, .45); box-shadow: 0 30px 60px -24px rgba(42, 30, 21, .6); font-family: Quicksand, sans-serif; color: #4a3728; opacity: 0; transform: translateY(-14px); transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1); }
.uvdl-hs.is-open .uvdl-hs__overlay { opacity: 1; }
.uvdl-hs.is-open .uvdl-hs__panel { opacity: 1; transform: none; }
.uvdl-hs__form { display: flex; align-items: center; gap: .6rem; margin: 0; padding: 0 6px 0 16px; height: 56px; border-radius: 999px; background: #fff; border: 1px solid rgba(201, 169, 110, .5); }
.uvdl-hs__form:focus-within { border-color: #C9A96E; box-shadow: 0 0 0 4px rgba(201, 169, 110, .2); }
.uvdl-hs__form > svg { flex: none; color: #a8864f; }
.uvdl-hs__form input[type="search"] { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0 !important; outline: 0; background: transparent; box-shadow: none !important; font: 500 1.05rem Quicksand, sans-serif; color: #4a3728; -webkit-appearance: none; appearance: none; }
.uvdl-hs__form input::placeholder { color: #a08b70; }
.uvdl-hs__form input::-webkit-search-cancel-button { display: none; }
.uvdl-hs .uvdl-hs__x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0; min-height: 0; border: 0; border-radius: 50%; background: #F0EAE0; color: #4a3728; cursor: pointer; }
.uvdl-hs .uvdl-hs__x:hover { background: #4a3728; color: #F0EAE0; }
.uvdl-hs__results:not(:empty) { margin-top: 14px; }
.uvdl-hs__label { margin: 12px 6px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a7358; }
.uvdl-hs__label:first-child { margin-top: 0; }
.uvdl-hs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.uvdl-hs__item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; color: #4a3728 !important; text-decoration: none !important; transition: background .15s ease; }
.uvdl-hs__item:hover, .uvdl-hs__item.is-active { background: #fff; }
.uvdl-hs__thumb { flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: #F0EAE0; display: grid; place-items: center; color: #C9A96E; }
body .uvdl-hs__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 12px; }
.uvdl-hs__thumb.is-post { width: 40px; height: 40px; border-radius: 50%; }
.uvdl-hs__name { flex: 1; min-width: 0; font-weight: 600; font-size: .95rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.uvdl-hs__price { flex: none; font-weight: 600; font-size: .85rem; color: #7e6346; white-space: nowrap; }
.uvdl-hs__msg { margin: 6px; font-size: .92rem; color: #7e6346; }
.uvdl-hs__all { display: inline-block; margin: 10px 6px 0; font-weight: 700; font-size: .85rem; color: #4a3728 !important; text-decoration: underline !important; text-decoration-color: #C9A96E !important; text-underline-offset: 4px; }
.uvdl-hs__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding: 14px 4px 2px; border-top: 1px solid rgba(201, 169, 110, .3); }
.uvdl-hs__quick span { margin-right: 4px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a7358; }
.uvdl-hs__quick a { padding: .45em 1em; border-radius: 999px; border: 1px solid rgba(201, 169, 110, .6); background: #fff; color: #4a3728 !important; text-decoration: none !important; font-size: .85rem; font-weight: 600; transition: background .2s, color .2s; }
.uvdl-hs__quick a:hover { background: #4a3728; border-color: #4a3728; color: #F0EAE0 !important; }
body.uvdl-hs-lock { overflow: hidden; }
@media (max-width: 599px) {
	.uvdl-hs__panel { width: calc(100% - 16px); margin-top: 8px; padding: 12px; border-radius: 18px; }
	.uvdl-hs__form { height: 52px; padding-left: 14px; }
	.uvdl-hs__form input[type="search"] { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .uvdl-hs__panel, .uvdl-hs__overlay { transition: none; } }
