/* Esteroides para Woo · UNAR HUB */

/* 6 · Barra de envío gratis */
.epw-barra {
	margin: 0 0 1.2em;
	padding: .8em 1em;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 8px;
	background: rgba(0, 0, 0, .02);
	font-size: .95em;
}
.epw-barra__txt { margin: 0 0 .5em; }
.epw-barra__track {
	height: 8px;
	border-radius: 99px;
	background: rgba(0, 0, 0, .08);
	overflow: hidden;
}
.epw-barra__fill {
	height: 100%;
	border-radius: 99px;
	background: var(--epw-color, #2e7d32);
	transition: width .4s ease;
}
.epw-barra--ok .epw-barra__txt { font-weight: 600; color: var(--epw-color, #2e7d32); }
.epw-barra-mini .epw-barra { margin: 0 0 .8em; font-size: .85em; }

/* 13 y 17 · Cuotas y precio sin impuestos */
.epw-cuotas { margin: .2em 0 .6em; font-size: .9em; }
.epw-iva { margin: .2em 0 .8em; font-size: .8em; opacity: .75; }

/* 14 · WhatsApp */
.epw-wa-wrap { margin: 1em 0; }
.woocommerce a.button.epw-wa,
a.button.epw-wa {
	background: #25d366;
	border-color: #25d366;
	color: #fff;
}
.woocommerce a.button.epw-wa:hover,
a.button.epw-wa:hover { background: #1ebe5a; color: #fff; }

/* 12 · Comprar ahora */
.epw-comprar-ahora { margin-left: .5em; }

/* 10 · Vaciar carrito */
.epw-vaciar { margin-left: .5em; }

/* 16 · Quedan X unidades */
.stock.epw-quedan { color: #c62828; font-weight: 600; }

/* 20 · Nota / dedicatoria */
.epw-nota { margin: 0 0 1em; width: 100%; }
.epw-nota label { display: block; margin-bottom: .3em; font-weight: 600; }
.epw-nota textarea { width: 100%; }

/* 21, 22, 23 · Textos de precio */
.epw-consultar, .epw-login-precio { font-weight: 600; }
.epw-may { font-size: .75em; opacity: .75; }

/* ---------- Funciones 2.0 ---------- */

/* 39 · Etiquetas */
.epw-badges { position: absolute; top: 10px; z-index: 9; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.epw-badges--left { left: 10px; align-items: flex-start; }
.epw-badges--right { right: 10px; align-items: flex-end; }
.woocommerce ul.products li.product, .woocommerce div.product { position: relative; }
.epw-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .02em; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }

/* 16 · Barra de stock */
.epw-stockbar { display: block; height: 6px; max-width: 220px; margin: -6px 0 14px; border-radius: 99px; background: rgba(198, 40, 40, .15); overflow: hidden; }
.epw-stockbar span { display: block; height: 100%; border-radius: 99px; background: #c62828; }

/* 41, 43, 44, 65 · Avisos en la ficha */
.epw-ahorro { margin: -4px 0 10px; font-size: .9em; font-weight: 600; color: #15803d; }
.epw-countdown { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 12px; padding: 6px 12px; border-radius: 8px; background: #fff1f2; color: #be123c; font-size: .9em; font-weight: 600; }
.epw-countdown__t { font-variant-numeric: tabular-nums; }
.epw-preventa { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #eef2ff; color: #3730a3; font-size: .92em; font-weight: 600; }
.epw-entrega { display: flex; align-items: center; gap: 6px; margin: 10px 0; font-size: .92em; color: #166534; }
.epw-entrega .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* 45 · Lista de espera */
.epw-espera { margin: 14px 0; padding: 14px 16px; border: 1px solid rgba(0, 0, 0, .1); border-radius: 10px; }
.epw-espera__title { margin: 0 0 8px; font-weight: 600; }
.epw-espera__form { display: flex; flex-wrap: wrap; gap: 8px; }
.epw-espera__form input[type="email"] { flex: 1 1 200px; min-height: 40px; }
.epw-espera__ok { margin: 0; color: #166534; font-weight: 600; }

/* 46 · Tabla de precios por cantidad */
.epw-escala { margin: 14px 0; }
.epw-escala__title { margin: 0 0 6px; font-weight: 600; }
.epw-escala table { width: 100%; max-width: 380px; margin: 0; border-collapse: collapse; font-size: .92em; }
.epw-escala td { padding: 6px 8px; border-bottom: 1px solid rgba(0, 0, 0, .08); }

/* 35, 47 · Regalo */
.epw-regalo-tag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: .8em; font-weight: 700; }

/* 36 · Cupones visibles */
.epw-cupvis { margin: 0 0 1.4em; padding: 14px 16px; border: 1px dashed rgba(0, 0, 0, .2); border-radius: 10px; }
.epw-cupvis__title { margin: 0 0 8px; font-weight: 700; }
.epw-cupvis ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.epw-cupvis__item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.epw-cupvis__code { padding: 3px 10px; border-radius: 6px; background: rgba(0, 0, 0, .06); font-family: monospace; font-weight: 700; letter-spacing: .05em; }
.epw-cupvis__txt { flex: 1 1 160px; font-size: .92em; }

/* 38 · Tarjeta de regalo */
.epw-gc { margin: 0 0 1em; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.epw-gc__title { margin: 0; font-weight: 700; }
.epw-gc label { display: flex; flex-direction: column; gap: 4px; font-size: .92em; }

/* 50 · Buscador */
.epw-buscador { position: relative; max-width: 520px; }
.epw-buscador input[type="search"] { width: 100%; min-height: 44px; padding: 0 14px; border-radius: 10px; }
.epw-buscador__res { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 999; max-height: 420px; overflow-y: auto; background: #fff; border: 1px solid rgba(0, 0, 0, .1); border-radius: 12px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .25); }
.epw-buscador__item { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; color: inherit; text-decoration: none; }
.epw-buscador__item:hover, .epw-buscador__item:focus { background: rgba(0, 0, 0, .04); }
.epw-buscador__item img, .epw-buscador__ph { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: rgba(0, 0, 0, .06); }
.epw-buscador__t { display: flex; flex-direction: column; min-width: 0; }
.epw-buscador__t strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .92em; }
.epw-buscador__t small { opacity: .6; }
.epw-buscador__p { font-size: .88em; font-weight: 600; white-space: nowrap; }
.epw-buscador__vacio { margin: 0; padding: 12px; opacity: .7; }

/* 52 · Validación */
.epw-valid-msg { display: block; margin-top: 4px; color: #b42318; font-size: .85em; }

/* 53 · Cantidades en el checkout */
.epw-qty { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; vertical-align: middle; }
.epw-qty__b, .epw-qty__x { width: 26px; height: 26px; padding: 0; border: 1px solid rgba(0, 0, 0, .15); border-radius: 6px; background: #fff; color: inherit; line-height: 1; cursor: pointer; }
.epw-qty__x { margin-left: 4px; border-color: transparent; opacity: .6; }
.epw-qty__i { width: 44px; height: 26px; padding: 0 2px; text-align: center; border: 1px solid rgba(0, 0, 0, .15); border-radius: 6px; -moz-appearance: textfield; }
.epw-qty__i::-webkit-inner-spin-button, .epw-qty__i::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 58, 64, 70 · Bloques en gracias / Mi cuenta */
.epw-comprobante, .epw-textopago { margin: 0 0 2em; padding: 16px 18px; border: 1px solid rgba(0, 0, 0, .1); border-radius: 12px; }
.epw-comprobante h2 { margin-top: 0; font-size: 1.15em; }
.epw-comprobante form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.epw-comprobante__ok { color: #166534; font-weight: 600; }
.epw-factura-dl { margin: 1em 0 2em; }

/* 81 · Modo vacaciones */
.epw-vacaciones { position: relative; z-index: 99999; padding: 10px 16px; background: #16142b; color: #fff; text-align: center; font-size: 14px; font-weight: 600; }

/* 55 · Registro mayorista */
.epw-regmay__campos { padding: 4px 0 0; }
