/* Rodex Catálogo – componentes públicos. Los colores salen de variables del tema. */
:root {
	--rx-ink: var(--rodex-ink, #1d1d1f);
	--rx-muted: var(--rodex-muted, #5f6368);
	--rx-line: var(--rodex-line, #e3e3e6);
	--rx-bg: var(--rodex-bg, #ffffff);
	--rx-soft: var(--rodex-soft, #f5f5f7);
	--rx-accent: var(--rodex-accent, #ffcc2d);
	--rx-accent-ink: var(--rodex-accent-ink, #1d1d1f);
	--rx-ok: #1e8e3e;
	--rx-ok-bg: #e6f4ea;
	--rx-wait: #8a5a00;
	--rx-wait-bg: #fff4d6;
	--rx-wa: #1fa855;
	--rx-radius: 10px;
}

/* ---------- Buscador ---------- */
.rodex-search { container-type: inline-size; background: var(--rx-bg); border: 1px solid var(--rx-line); border-radius: 14px; padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.rodex-search__tipos { display: flex; gap: 8px; margin-bottom: 14px; }
.rodex-search__tipo input { position: absolute; opacity: 0; pointer-events: none; }
.rodex-search__tipo span { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--rx-line); cursor: pointer; font-weight: 600; font-size: 14px; }
.rodex-search__tipo input:checked + span { background: var(--rx-ink); color: #fff; border-color: var(--rx-ink); }
.rodex-search__tipo input:focus-visible + span { outline: 2px solid var(--rx-accent); outline-offset: 2px; }
.rodex-search__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.rodex-search__field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--rx-muted); text-transform: uppercase; letter-spacing: .04em; }
.rodex-search__field select { height: 46px; border: 1px solid var(--rx-line); border-radius: var(--rx-radius); padding: 0 12px; font-size: 16px; color: var(--rx-ink); background: var(--rx-bg); }
.rodex-search__field select:disabled { background: var(--rx-soft); color: var(--rx-muted); }
.rodex-search__go { height: 46px; padding: 0 22px !important; }
.rodex-search__help { margin: 10px 0 0; font-size: 13px; color: var(--rx-muted); }
.rodex-search--compact { padding: 14px; box-shadow: none; }
.rodex-search--compact .rodex-search__fields { grid-template-columns: 1fr 1fr; }
.rodex-search--compact .rodex-search__go { grid-column: 1 / -1; }
.rodex-search--compact .rodex-search__help { display: none; }
@container (max-width: 620px) {
	.rodex-search__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.rodex-search__go { grid-column: 1 / -1; }
}
@container (max-width: 380px) {
	.rodex-search__fields { grid-template-columns: 1fr 1fr; }
}

/* ---------- Distintivos ---------- */
.rodex-badge { display: inline-block; margin: 4px 0; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.rodex-badge--taller { background: var(--rx-ok-bg); color: var(--rx-ok); }
.rodex-badge--pedido { background: var(--rx-soft); color: var(--rx-muted); }
.rodex-loop-montaje { display: block; font-size: 13px; color: var(--rx-muted); margin-top: 2px; }
.rodex-loop-eu { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.rodex-chip { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--rx-soft); color: var(--rx-ink); }
.rodex-chip--a { background: #00a651; color: #fff; }
.rodex-chip--b { background: #50b848; color: #fff; }
.rodex-chip--c { background: #bed630; }
.rodex-chip--d { background: #fff200; }
.rodex-chip--e { background: #fdb913; }

/* ---------- Ficha ---------- */
.rodex-summary { margin: 8px 0 24px; display: grid; gap: 12px; }
.rodex-tasas { margin: 0; font-size: 13px; color: var(--rx-muted); }
.rodex-montaje { margin: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--rx-line); border-radius: var(--rx-radius); }
.rodex-montaje__label { font-weight: 600; }
.rodex-montaje__price { font-size: 18px; font-weight: 700; }
.rodex-montaje__price small { font-size: 12px; font-weight: 400; color: var(--rx-muted); }
.rodex-stock { margin: 0; padding: 10px 14px; border-radius: var(--rx-radius); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.rodex-stock::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.rodex-stock--taller { background: var(--rx-ok-bg); color: var(--rx-ok); }
.rodex-stock--pedido { background: var(--rx-wait-bg); color: var(--rx-wait); }

.rodex-consulta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rodex-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: var(--rx-radius) !important; font-weight: 700 !important; text-align: center; cursor: pointer; border: 0; }
.rodex-btn--whatsapp { background: var(--rx-wa) !important; color: #fff !important; }
.rodex-btn--whatsapp:hover { filter: brightness(.95); }
.rodex-btn--email, .rodex-btn--primary { background: var(--rx-accent) !important; color: var(--rx-accent-ink) !important; }
@media (max-width: 480px) { .rodex-consulta { grid-template-columns: 1fr; } }

/* ---------- Etiqueta europea ---------- */
.rodex-eu { border: 2px solid #0b4ea2; border-radius: 12px; overflow: hidden; max-width: 420px; background: #fff; }
.rodex-eu__head { display: flex; align-items: center; gap: 8px; background: #0b4ea2; color: #fff; padding: 8px 12px; font-size: 14px; }
.rodex-eu__flag { color: #ffde00; }
.rodex-eu__class { margin-left: auto; background: #fff; color: #0b4ea2; border-radius: 4px; padding: 0 6px; font-weight: 700; font-size: 12px; }
.rodex-eu__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; }
.rodex-eu__title { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: #1d1d1f; }
.rodex-eu__scale { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.rodex-eu__bar { position: relative; height: 18px; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; padding-left: 6px; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); }
.rodex-eu__bar--a { width: 45%; background: #00a651; }
.rodex-eu__bar--b { width: 55%; background: #50b848; }
.rodex-eu__bar--c { width: 65%; background: #bed630; color: #1d1d1f; }
.rodex-eu__bar--d { width: 75%; background: #fff200; color: #1d1d1f; }
.rodex-eu__bar--e { width: 85%; background: #fdb913; color: #1d1d1f; }
.rodex-eu__bar.is-active { outline: 2px solid #1d1d1f; outline-offset: 1px; }
.rodex-eu__marker { position: absolute; right: -34px; top: -1px; background: #1d1d1f; color: #fff; width: 26px; text-align: center; border-radius: 3px; }
.rodex-eu__bar { overflow: visible; }
.rodex-eu__scale { padding-right: 34px; }
.rodex-eu__bar.is-active { clip-path: none; border-radius: 2px; }
.rodex-eu__noise, .rodex-eu__extra, .rodex-eu__eprel { margin: 0; padding: 8px 12px; border-top: 1px solid var(--rx-line); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rodex-eu__noise-class { margin-left: auto; font-weight: 700; background: var(--rx-soft); padding: 1px 6px; border-radius: 4px; }
.rodex-eu__eprel a { color: #0b4ea2; font-weight: 600; }

/* ---------- Filtros ---------- */
.rodex-filters .widget { margin: 0 0 22px; }
.rodex-filters .widgettitle { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; color: var(--rx-muted); }
.rodex-filters ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.rodex-filters li { padding: 3px 0; font-size: 14px; }
.rodex-filters li a { color: var(--rx-ink); text-decoration: none; }
.rodex-filters li.chosen > a { font-weight: 700; }
.rodex-filters .count { color: var(--rx-muted); font-size: 12px; }
.rodex-filters select { width: 100%; height: 40px; border: 1px solid var(--rx-line); border-radius: 8px; padding: 0 8px; }
.rodex-toggle { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--rx-line); border-radius: var(--rx-radius); color: var(--rx-ink); text-decoration: none; font-weight: 600; }
.rodex-toggle__box { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--rx-line); flex: none; }
.rodex-toggle.is-on { border-color: var(--rx-ok); background: var(--rx-ok-bg); }
.rodex-toggle.is-on .rodex-toggle__box { background: var(--rx-ok); border-color: var(--rx-ok); box-shadow: inset 0 0 0 3px #fff; }
.rodex-filter--stock { margin-bottom: 22px; }
.woocommerce .rodex-filters .widget_price_filter .price_slider_wrapper .ui-widget-content, .rodex-filters .price_slider_wrapper .ui-widget-content { background: var(--rx-line); border-radius: 3px; height: 4px; }
.rodex-filters .widget_price_filter .ui-slider .ui-slider-range, .woocommerce .widget_price_filter .ui-slider .ui-slider-range { background-color: var(--rx-ink) !important; }
.rodex-filters .widget_price_filter .ui-slider .ui-slider-handle, .woocommerce .widget_price_filter .ui-slider .ui-slider-handle { background-color: #fff !important; border: 2px solid var(--rx-ink) !important; background: #fff; border: 2px solid var(--rx-ink); width: 16px; height: 16px; top: -6px; }
.rodex-filters .price_slider_amount { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; }
.rodex-filters .price_slider_amount .button { min-height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- Modal de consulta ---------- */
.rodex-modal { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.rodex-modal::backdrop { background: rgba(0,0,0,.45); }
.rodex-modal__form { padding: 24px; display: grid; gap: 12px; position: relative; }
.rodex-modal__form h2 { margin: 0; font-size: 20px; }
.rodex-modal__product { margin: 0; color: var(--rx-muted); font-size: 14px; }
.rodex-modal__form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.rodex-modal__form input[type="text"], .rodex-modal__form input[type="email"], .rodex-modal__form input[type="tel"], .rodex-modal__form select, .rodex-modal__form textarea { border: 1px solid var(--rx-line); border-radius: 8px; padding: 10px; font-size: 16px; font-weight: 400; width: 100%; box-sizing: border-box; }
.rodex-modal__form textarea { font-family: inherit; }
.single-product .product_meta .tagged_as { display: none; }
.rodex-modal__legal { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; font-size: 13px !important; }
.rodex-modal__close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--rx-muted); }
.rodex-modal__status { margin: 0; font-size: 14px; min-height: 1em; }
.rodex-modal__status.is-ok { color: var(--rx-ok); }
.rodex-modal__status.is-error { color: #c5221f; }
.rodex-hp { position: absolute !important; left: -9999px !important; }
.rodex-turnstile { min-height: 65px; }

/* ---------- Alineado de botones y desplegables ---------- */
.rodex-search__tipo span { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 16px; line-height: 1.2; box-sizing: border-box; }
.rodex-search select, .rodex-filters select { line-height: 1.2; }
.button, .btn, .rodex-btn, .rodex-filters button { line-height: 1.2 !important; text-align: center; }
.rodex-filters .price_slider_amount .button { display: inline-flex !important; align-items: center; justify-content: center; float: none !important; height: 36px; }
.rodex-filters .price_slider_amount .price_label { float: none !important; }
/* Desplegables de atributos (select2 de WooCommerce) */
.rodex-filters .select2-container { width: 100% !important; }
.rodex-filters .select2-container .select2-selection--single { height: 40px; border: 1px solid var(--rx-line); border-radius: 8px; display: flex; align-items: center; }
.rodex-filters .select2-container .select2-selection--single .select2-selection__rendered { padding: 0 32px 0 10px !important; height: auto; line-height: 1.2 !important; font-size: 14px; color: var(--rx-ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rodex-filters .select2-container .select2-selection--single .select2-selection__arrow { height: 38px; top: 0; right: 6px; }
.select2-dropdown { border-color: var(--rx-line) !important; border-radius: 8px; overflow: hidden; }
.select2-results__option { padding: 8px 10px !important; font-size: 14px; line-height: 1.2; }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--rx-ink) !important; color: #fff !important; }

/* Filtro "Tipo" */
.rodex-filter--tipo ul { max-height: none; }
.rodex-filter--tipo ul.children { margin: 4px 0 2px 12px; padding-left: 10px; border-left: 2px solid var(--rx-line); }
.rodex-filter--tipo ul.children li { font-weight: 400; }
.rodex-filter--tipo ul.children li.chosen, .rodex-filter--tipo ul.children li.chosen a { font-weight: 700; }
.rodex-filter--tipo li.chosen > a { color: var(--rx-ink); }
.rodex-filter--tipo li.chosen > a::before { content: "›"; margin-right: 4px; color: var(--rx-accent-ink, #1d1d1f); }
