/* Intelec Buscador — caja del encabezado, panel de resultados y hoja para celular. Prefijo: ib-
   (La página de resultados es la oficial de la tienda: el plugin solo decide qué productos y en qué orden.) */

.ib-box, .ib-panel, .ib-sheet {
	--ib-red: #e30613;
	--ib-red-2: #c70511;
	--ib-text: #14161b;
	--ib-text-2: #3b404b;
	--ib-muted: #7a808c;
	--ib-line: #eceef2;
	--ib-hover: #f4f5f7;
	--ib-soft: #f7f8fa;
	--ib-bg: #fff;
	--ib-ease: cubic-bezier(.2, .8, .2, 1);
	/* WoodMart pinta todos los <button>: se neutraliza acá */
	--btn-height: auto; --btn-padding: 0; --btn-bgcolor: transparent; --btn-bgcolor-hover: transparent; --btn-color: inherit; --btn-color-hover: inherit;
	--btn-transform: none; --btn-font-weight: inherit; --btn-font-size: inherit; --btn-brd-radius: 0; --btn-box-shadow: none; --btn-box-shadow-hover: none;
}
.ib-box button, .ib-panel button, .ib-sheet button {
	-webkit-appearance: none; appearance: none; min-height: 0; height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
	color: inherit; font: inherit; letter-spacing: normal; line-height: inherit; text-transform: none; cursor: pointer;
}
.ib-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ib-lock, .ib-lock body { overflow: hidden !important; }

/* ---------- Caja del encabezado ---------- */
.ib-box { position: relative; width: 100%; max-width: 820px; margin: 0 auto; }
.ib-field { position: relative; display: flex; align-items: center; font: 400 15px/1 var(--wd-text-font, inherit); }
.ib-box .ib-input, .ib-sheet .ib-input {
	-webkit-appearance: none !important; appearance: none !important; width: 100% !important; height: 48px !important; min-height: 0 !important; margin: 0 !important;
	padding: 0 96px 0 22px !important; border: 0 !important; border-radius: 999px !important; outline: 0 !important;
	background: #fff !important; color: var(--ib-text) !important; box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px -14px rgba(0, 0, 0, .55) !important;
	font: inherit !important; letter-spacing: 0 !important; text-indent: 0 !important; transition: box-shadow .2s;
}
.ib-box .ib-input::placeholder { color: #737884 !important; opacity: 1 !important; font-style: normal !important; }
.ib-box .ib-input:focus, .ib-box.is-open .ib-input { box-shadow: 0 0 0 3px rgba(227, 6, 19, .55), 0 12px 30px -10px rgba(0, 0, 0, .7) !important; }
.ib-input::-webkit-search-decoration, .ib-input::-webkit-search-cancel-button, .ib-input::-webkit-search-results-button { -webkit-appearance: none; display: none; }
.ib-ghost {
	position: absolute; inset: 0 96px 0 22px; display: flex; align-items: center; overflow: hidden; white-space: pre; pointer-events: none;
	color: #a2a7b2; font: inherit; z-index: 1;
}
.ib-ghost > span { color: transparent; }
.ib-ghost > i { font-style: normal; }
.ib-box .ib-input { position: relative; z-index: 0; background: #fff !important; }
.ib-box .ib-ghost { z-index: 2; }
.ib-go {
	position: absolute !important; right: 5px; top: 50%; z-index: 3; display: grid !important; place-items: center; width: 38px !important; height: 38px !important;
	border-radius: 50% !important; background: var(--ib-red) !important; color: #fff !important; transform: translateY(-50%);
	box-shadow: 0 6px 14px -4px rgba(227, 6, 19, .8) !important; transition: transform .2s var(--ib-ease), background-color .2s;
}
.ib-go:hover { background: #ff1f2d !important; transform: translateY(-50%) scale(1.06); }
.ib-go .ib-i { width: 18px; height: 18px; stroke-width: 2.2; }
.ib-mic { position: absolute !important; right: 48px; top: 50%; z-index: 3; display: grid !important; place-items: center; width: 36px !important; height: 36px !important; border-radius: 50% !important; color: #6b717d !important; transform: translateY(-50%); transition: color .2s, background-color .2s; }
.ib-mic[hidden] { display: none !important; }
.ib-mic:hover { color: var(--ib-text) !important; background: #f1f2f4 !important; }
.ib-mic.is-on { color: #fff !important; background: var(--ib-red) !important; animation: ib-pulse 1.2s infinite; }
@keyframes ib-pulse { 50% { box-shadow: 0 0 0 7px rgba(227, 6, 19, .18); } }

/* ---------- Panel ---------- */
.ib-panel {
	position: fixed; z-index: 100050; overflow: auto; overscroll-behavior: contain; color: var(--ib-text); background: var(--ib-bg); border-radius: 18px;
	box-shadow: 0 0 0 1px rgba(15, 18, 28, .07), 0 30px 70px -20px rgba(8, 10, 18, .5); font: 400 14px/1.35 var(--wd-text-font, inherit); text-align: left;
	animation: ib-in .16s var(--ib-ease);
}
.ib-panel[hidden], .ib-sheet[hidden] { display: none !important; }
@keyframes ib-in { from { opacity: 0; transform: translateY(-6px); } }
.ib-panel a, .ib-sheet a { color: inherit; text-decoration: none; }
.ib-panel mark, .ib-sheet mark { padding: 0; color: #c70511; background: none; box-shadow: none; }

.ib-h { display: flex; align-items: center; gap: 8px; padding: 14px 18px 6px; color: var(--ib-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ib-h small { padding: 1px 7px; border-radius: 999px; color: var(--ib-text-2); background: var(--ib-hover); font-size: 11px; letter-spacing: 0; }
.ib-link { margin-left: auto; color: var(--ib-muted); font-size: 12px !important; font-weight: 500 !important; letter-spacing: 0; text-transform: none; text-decoration: underline !important; }

/* Lo que entendió */
.ib-understood { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 14px 18px 4px; }
.ib-understood__lab { display: inline-flex; align-items: center; gap: 6px; margin-right: 2px; color: var(--ib-muted); font-size: 12.5px; font-weight: 600; }
.ib-understood__lab .ib-i { width: 15px; height: 15px; color: var(--ib-red); }
.ib-tag { display: inline-flex !important; align-items: center; gap: 6px; padding: 5px 8px 5px 12px !important; border-radius: 999px !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1.2 !important; transition: background-color .15s, color .15s; }
.ib-tag .ib-i { width: 14px; height: 14px; opacity: .55; }
.ib-tag:hover .ib-i { opacity: 1; }
.ib-tag--cat { color: #9d0610 !important; background: #fdeced !important; }
.ib-tag--brand { color: #fff !important; background: var(--ib-text) !important; }
.ib-tag--price { color: #0d6b3c !important; background: #e5f7ed !important; }
.ib-tag--sale { color: #fff !important; background: var(--ib-red) !important; }
.ib-tag--sort, .ib-tag--filter { color: var(--ib-text) !important; background: #eceef2 !important; }
.ib-tag:hover { filter: brightness(.96); }
.ib-fix { padding: 8px 18px 0; color: var(--ib-muted); font-size: 13px; }
.ib-fix b { color: var(--ib-text); }

.ib-cols { display: grid; grid-template-columns: 256px minmax(0, 1fr); margin-top: 6px; border-top: 1px solid var(--ib-line); }
.ib-cols--one { grid-template-columns: minmax(0, 1fr); }
.ib-side { padding: 2px 0 14px; border-right: 1px solid var(--ib-line); }
.ib-main { padding: 2px 8px 10px; }
.ib-main > .ib-h { padding-left: 10px; }

.ib-s { display: flex !important; align-items: center; gap: 11px; padding: 8px 18px; color: var(--ib-text-2) !important; font-size: 14px; }
.ib-s .ib-i { width: 15px; height: 15px; color: #a3a8b2; }
.ib-s b { color: var(--ib-text); font-weight: 700; }
.ib-f { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 7px 18px !important; color: var(--ib-text-2) !important; font-size: 14px !important; text-align: left; }
.ib-f span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-f small { flex: none; min-width: 26px; padding: 1px 7px; border-radius: 999px; color: var(--ib-muted); background: var(--ib-hover); font-size: 12px; text-align: center; }
.ib-s:hover, .ib-f:hover, .ib-s.is-sel, .ib-f.is-sel { color: var(--ib-text) !important; background: var(--ib-hover); }

.ib-p { display: grid !important; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 12px; transition: background-color .12s; }
.ib-p:hover, .ib-p.is-sel { background: var(--ib-hover); }
.ib-p__img { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--ib-line); }
.ib-p__img img { width: 98%; height: 98%; object-fit: contain; }
.ib-p__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ib-p__n { display: -webkit-box; overflow: hidden; color: var(--ib-text); font-size: 14px; font-weight: 600; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ib-p__m { overflow: hidden; color: var(--ib-muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.ib-p__pr { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.ib-p__pr s { color: var(--ib-muted); font-size: 12px; }
.ib-p__pr b { color: var(--ib-text); font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.ib-p__pr b small { color: var(--ib-muted); font-size: 11px; font-weight: 500; }
.ib-off, .ib-out { padding: 2px 6px; border-radius: 6px; color: #fff; background: var(--ib-red); font-size: 11px; font-style: normal; font-weight: 700; }
.ib-out { color: var(--ib-text-2); background: var(--ib-hover); }

.ib-foot { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 18px; border-top: 1px solid var(--ib-line); background: var(--ib-bg); }
.ib-all { display: inline-flex !important; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; color: #fff !important; background: var(--ib-red); font-size: 14px; font-weight: 700; transition: background-color .15s, box-shadow .15s; }
.ib-all:hover { background: var(--ib-red-2); }
.ib-all.is-sel { box-shadow: 0 0 0 3px rgba(227, 6, 19, .28); }
.ib-all .ib-i { width: 16px; height: 16px; }
.ib-hint { color: var(--ib-muted); font-size: 12.5px; }
.ib-hint a { color: var(--ib-text-2) !important; text-decoration: underline !important; }
.ib-hint kbd { padding: 1px 6px; border-radius: 5px; color: var(--ib-text-2); background: var(--ib-hover); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); font: 600 11px/1.6 inherit; }

/* Vacío / sin resultados */
.ib-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 18px 6px; }
.ib-chip { display: inline-flex !important; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; color: var(--ib-text-2) !important; box-shadow: inset 0 0 0 1px #e2e4e9; font-size: 13.5px; transition: box-shadow .15s, background-color .15s; }
.ib-chip .ib-i { width: 15px; height: 15px; color: #a3a8b2; }
.ib-chip:hover, .ib-chip.is-sel { color: var(--ib-text) !important; background: var(--ib-soft); box-shadow: inset 0 0 0 1px #c9ccd3; }
.ib-best { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 4px 18px 18px; }
.ib-best__it { display: flex !important; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--ib-line); transition: box-shadow .15s, transform .2s var(--ib-ease); }
.ib-best__it:hover, .ib-best__it.is-sel { box-shadow: inset 0 0 0 1px #cfd2d8, 0 10px 24px -16px rgba(0, 0, 0, .35); transform: translateY(-1px); }
.ib-best__img { position: relative; display: block; }
.ib-best__img img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.ib-best__tag { position: absolute; top: 0; left: 0; max-width: 100%; overflow: hidden; padding: 3px 8px; border-radius: 999px; color: #fff; background: var(--ib-red); font-size: 11px; font-style: normal; font-weight: 800; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ib-best__n { display: -webkit-box; overflow: hidden; color: var(--ib-text-2); font-size: 12.5px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ib-best__it b { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 13.5px; font-weight: 800; }
.ib-best__it b s { color: var(--ib-muted); font-size: 11.5px; font-weight: 500; }
.ib-new { margin-right: 6px; padding: 1px 6px; border-radius: 5px; color: #0d6b3c; background: #e5f7ed; font-size: 11px; font-style: normal; font-weight: 700; }
html[data-tema="oscuro"] .ib-new { color: #8be3b3; background: rgba(79, 210, 143, .14); }
.ib-none { padding: 18px 18px 20px; }
.ib-none p { margin: 0 0 8px; color: var(--ib-muted); font-size: 13.5px; }
.ib-none .ib-none__t { color: var(--ib-text); font-size: 17px; font-weight: 700; }
.ib-none .ib-chips { padding: 0 0 14px; }
.ib-wa { display: flex !important; align-items: center; gap: 14px; max-width: 520px; padding: 14px 16px; border-radius: 14px; background: #effaf3; box-shadow: inset 0 0 0 1px #cdeedb; }
.ib-wa .ib-i { width: 30px; height: 30px; padding: 6px; border-radius: 50%; color: #fff; background: #1fa855; stroke-width: 1.7; }
.ib-wa span { display: flex; flex-direction: column; gap: 2px; }
.ib-wa b { color: #0d5b33; font-size: 14.5px; }
.ib-wa small { color: #3c6f53; font-size: 12.5px; }
.ib-wa:hover, .ib-wa.is-sel { box-shadow: inset 0 0 0 1px #9fdcb8; }
/* Dictado por voz */
.ib-voice { display: flex; align-items: center; gap: 10px; margin: 12px 18px 0; padding: 10px 14px; border-radius: 12px; color: var(--ib-text); background: var(--ib-hover); font-size: 13.5px; font-weight: 600; }
.ib-voice .ib-i { flex: none; width: 30px; height: 30px; padding: 6px; border-radius: 50%; color: #fff; background: var(--ib-red); animation: ib-pulse 1.2s infinite; }
.ib-voice.is-err { color: #7a4b00; background: #fff6e0; font-weight: 500; }
.ib-voice.is-err .ib-i { color: #7a4b00; background: #ffe2a3; animation: none; }
html[data-tema="oscuro"] .ib-voice.is-err { color: #ffd78a; background: rgba(255, 190, 60, .12); }
.ib-loading { display: flex; justify-content: center; gap: 6px; padding: 34px; }
.ib-loading span { width: 8px; height: 8px; border-radius: 50%; background: #d4d7dd; animation: ib-dot 1s infinite; }
.ib-loading span:nth-child(2) { animation-delay: .15s; }
.ib-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes ib-dot { 50% { background: var(--ib-red); transform: translateY(-3px); } }

/* ---------- Celular: hoja a pantalla completa ---------- */
.ib-sheet { position: fixed; inset: 0; z-index: 100060; display: flex; flex-direction: column; color: var(--ib-text); background: var(--ib-bg); font: 400 14px/1.35 var(--wd-text-font, inherit); animation: ib-up .18s var(--ib-ease); }
@keyframes ib-up { from { opacity: 0; transform: translateY(14px); } }
.ib-sheet__bar { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 10px 10px 6px; border-bottom: 1px solid var(--ib-line); }
.ib-back { display: grid !important; place-items: center; flex: none; width: 42px !important; height: 42px !important; border-radius: 50% !important; color: var(--ib-text) !important; }
.ib-back .ib-i { width: 22px; height: 22px; }
.ib-sheet .ib-field { flex: 1; min-width: 0; font-size: 16px; }
.ib-sheet .ib-input { height: 44px !important; padding: 0 16px !important; background: var(--ib-hover) !important; box-shadow: none !important; }
.ib-sheet .ib-ghost { inset: 0 16px; }
.ib-sheet .ib-mic { position: static !important; flex: none; transform: none; width: 42px !important; height: 42px !important; }
.ib-sheet__body { flex: 1; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 24px; }
.ib-sheet .ib-main { padding: 0 6px; }
.ib-sheet .ib-p { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; }
.ib-sheet .ib-p__img { width: 56px; height: 56px; }
.ib-sheet .ib-facets { display: flex; gap: 8px; overflow-x: auto; padding: 2px 18px 6px; scrollbar-width: none; }
.ib-sheet .ib-facets .ib-f { flex: none; width: auto; padding: 7px 8px 7px 13px !important; border-radius: 999px; box-shadow: inset 0 0 0 1px #e2e4e9; }
.ib-sheet .ib-foot { position: static; border: 0; padding-top: 16px; }
.ib-sheet .ib-hint { display: none; }
.ib-sheet .ib-best { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 899px) {
	.ib-box { max-width: none; }
	.ib-box .ib-input { height: 42px !important; padding-right: 50px !important; font-size: 16px !important; }
	.ib-box .ib-mic { display: none !important; }
	.ib-box .ib-ghost { display: none; }
	.ib-go { width: 34px !important; height: 34px !important; right: 4px; }
}

/* Modo oscuro del sitio (html[data-tema="oscuro"]) */
html[data-tema="oscuro"] .ib-panel, html[data-tema="oscuro"] .ib-sheet {
	--ib-text: var(--idm-text, #eceef2); --ib-text-2: var(--idm-text-2, #c4c8d0); --ib-muted: var(--idm-muted, #9aa0ad); --ib-line: var(--idm-line, rgba(255, 255, 255, .08));
	--ib-hover: var(--idm-card-2, #1c2028); --ib-soft: var(--idm-card-2, #1c2028); --ib-bg: var(--idm-card, #15181e);
}
html[data-tema="oscuro"] .ib-panel { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -20px rgba(0, 0, 0, .9); }
html[data-tema="oscuro"] .ib-panel mark, html[data-tema="oscuro"] .ib-sheet mark { color: #ff6b74; }
html[data-tema="oscuro"] .ib-p__img, html[data-tema="oscuro"] .ib-best__img img { background: var(--idm-stage, #e7e9ed); border-radius: 10px; }
html[data-tema="oscuro"] .ib-tag--cat { color: #ffb3b8 !important; background: rgba(227, 6, 19, .2) !important; }
html[data-tema="oscuro"] .ib-tag--brand { color: var(--ib-bg) !important; background: var(--ib-text) !important; }
html[data-tema="oscuro"] .ib-tag--price { color: #8be3b3 !important; background: rgba(79, 210, 143, .14) !important; }
html[data-tema="oscuro"] .ib-tag--sort, html[data-tema="oscuro"] .ib-tag--filter { color: var(--ib-text) !important; background: var(--ib-hover) !important; }
html[data-tema="oscuro"] .ib-wa { background: rgba(31, 168, 85, .12); box-shadow: inset 0 0 0 1px rgba(31, 168, 85, .3); }
html[data-tema="oscuro"] .ib-wa b, html[data-tema="oscuro"] .ib-wa small { color: #a9e8c4; }
html[data-tema="oscuro"] .ib-sheet .ib-input { color: var(--ib-text) !important; background: var(--ib-hover) !important; }
html[data-tema="oscuro"] .ib-chip, html[data-tema="oscuro"] .ib-sheet .ib-facets .ib-f { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }

@media (prefers-reduced-motion: reduce) {
	.ib-panel, .ib-sheet { animation: none; }
	.ib-mic.is-on, .ib-loading span, .ib-voice .ib-i { animation: none; }
}
