/*
 * Capa de diseño propia sobre Rehub: tipografía Inter (servida desde la web), colores de marca,
 * tarjetas y botones homogéneos. Rehub no se puede actualizar (sin licencia): todo se hace aquí,
 * redefiniendo sus variables CSS y sobrescribiendo lo justo.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations'), url(fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html:root {
  --esc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --esc-ink: #0f172a;
  --esc-text: #334155;
  --esc-muted: #64748b;
  --esc-line: #e5e9f0;
  --esc-soft: #f5f7fa;
  --esc-brand: #0097d6;      /* azul del logo */
  --esc-link: #0b6fa4;       /* azul de marca con contraste AA para texto */
  --esc-cta: #f0561d;        /* naranja: complementario del azul, para "Comprar" / "Ver oferta" */
  --esc-cta-hover: #d4450f;
  --esc-ok: #15803d;
  --esc-ok-soft: #ecfdf3;
  --esc-radius: 12px;
  --esc-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
  --esc-shadow-hover: 0 2px 4px rgba(15, 23, 42, .06), 0 12px 28px rgba(15, 23, 42, .10);

  /* Variables de Rehub */
  --rehub-body-font: var(--esc-font);
  --rehub-head-font: var(--esc-font);
  --rehub-nav-font: var(--esc-font);
  --rehub-btn-font: var(--esc-font);
  --rehub-main-color: var(--esc-brand);
  --rehub-link-color: var(--esc-link);
  --rehub-main-btn-bg: var(--esc-cta);
}

/* ---------- Tipografía ---------- */
body,
button, input, select, textarea,
h1, h2, h3, h4, h5, h6,
.main-nav, .main-nav a, .rehub-body-font, .rehub-main-font, .rehub-btn-font,
.wpsm-button, .woocommerce .button, .elementor-heading-title, .elementor-widget-text-editor {
  font-family: var(--esc-font) !important;
}
body {
  color: var(--esc-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 {
  color: var(--esc-ink);
  letter-spacing: -0.02em;
}
h1 { font-weight: 800 !important; }
h2, h3 { font-weight: 700; }
a { text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--esc-brand); outline-offset: 2px; }

/* ---------- Cabecera ---------- */
header.white_style .logo-section { padding-top: 14px; padding-bottom: 14px; }
.head_search input[type="text"], .head_search input[type="search"], .head_search select, .head_search .rh_search_select {
  border-radius: 10px !important;
  border-color: var(--esc-line) !important;
  background-color: var(--esc-soft) !important;
}
.head_search input[type="text"]:focus { background-color: #fff !important; border-color: var(--esc-brand) !important; }
.head_search button, .head_search .btnsearch { border-radius: 10px !important; background: var(--esc-ink) !important; }
.main-nav { border-color: var(--esc-line) !important; box-shadow: 0 1px 0 var(--esc-line); }
.main-nav .menu > li, .main-nav ul.menu > li > a { border: 0 !important; }
.main-nav ul.menu > li > a {
  font-weight: 500 !important;
  font-size: 15px !important;
  color: var(--esc-ink) !important;
  position: relative;
}
.main-nav ul.menu > li > a:hover,
.main-nav ul.menu > li.current-menu-item > a,
.main-nav ul.menu > li.current-menu-ancestor > a { color: var(--esc-brand) !important; }
.main-nav ul.menu > li > a::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px;
  background: var(--esc-brand); transform: scaleX(0); transition: transform .2s ease;
}
.main-nav ul.menu > li > a:hover::after,
.main-nav ul.menu > li.current-menu-item > a::after { transform: scaleX(1); }
.main-nav ul.menu > li { border-top: 0 !important; }
.main-nav .sub-menu { border-radius: 0 0 var(--esc-radius) var(--esc-radius); box-shadow: var(--esc-shadow); border: 1px solid var(--esc-line); }

/* ---------- Migas ---------- */
.woocommerce-breadcrumb, .breadcrumb { font-size: 13px !important; color: var(--esc-muted) !important; }
.woocommerce-breadcrumb a, .breadcrumb a { color: var(--esc-muted) !important; background: none !important; padding: 0 !important; }
.woocommerce-breadcrumb a:hover, .breadcrumb a:hover { color: var(--esc-link) !important; }

/* ---------- Bordes y cajas de Rehub ---------- */
.border-lightgrey, .border-grey-bottom, .rh-cartbox, .widget_merchant_list, .rh-tabletext-block {
  border-color: var(--esc-line) !important;
}
.rh-cartbox, .rh-tabletext-block { border-radius: var(--esc-radius) !important; }
.rh-tabletext-block { overflow: hidden; box-shadow: none !important; }
.rh-tabletext-block-heading { background: #fff !important; border-color: var(--esc-line) !important; }
.rh-tabletext-block-heading h2, .rh-tabletext-block-heading .rh-heading-icon { font-size: 18px !important; }

/* ---------- Botones principales (Comprar / Ver oferta) ---------- */
html body .rehub_main_btn,
html body .wpsm-button.rehub_main_btn,
html body a.btn_offer_block,
html body .btn_offer_block,
html body .re_track_btn.rehub-main-color,
html body .woo_column_btn .re_track_btn,
html body .rehub-main-btn-bg,
html body .woocommerce a.button.alt,
html body .woocommerce button.button.alt,
html body .single_add_to_cart_button {
  background: var(--esc-cta) !important;
  border-color: var(--esc-cta) !important;
  color: #fff !important;
  border-radius: 10px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  box-shadow: 0 6px 16px -6px rgba(240, 86, 29, .55) !important;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
html body .rehub_main_btn:hover,
html body .wpsm-button.rehub_main_btn:hover,
html body a.btn_offer_block:hover,
html body .btn_offer_block:hover,
html body .re_track_btn.rehub-main-color:hover,
html body .woo_column_btn .re_track_btn:hover,
html body .woocommerce a.button.alt:hover,
html body .single_add_to_cart_button:hover {
  background: var(--esc-cta-hover) !important;
  border-color: var(--esc-cta-hover) !important;
  transform: translateY(-1px);
}
html body .woo_column_btn .re_track_btn,
html body .woo_grid_compact .re_track_btn { box-shadow: none !important; }

html body .widget_merchant_list .buttons_col { background-color: var(--esc-cta) !important; }
html body .widget_merchant_list .buttons_col:hover { background-color: var(--esc-cta-hover) !important; }
html body .rehub_btn_color { background-color: var(--esc-cta); border-color: var(--esc-cta); }

/* ---------- Ficha de producto ---------- */
.single-product .title_single_area h1, .single-product h1.product_title {
  font-size: clamp(24px, 2.2vw, 32px) !important;
  line-height: 1.2 !important;
}
/* Precio: sin la sombra ni Tahoma del CSS adicional */
body.single-product p.price, body.single-product .woo-price-area .price { color: var(--esc-ink) !important; }
body.single-product ins .woocommerce-Price-amount.amount,
body.single-product p.price > .woocommerce-Price-amount.amount,
body.single-product p.price ins .woocommerce-Price-amount.amount {
  font-family: var(--esc-font) !important;
  text-shadow: none !important;
  font-size: 36px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: var(--esc-ink) !important;
}
body.single-product p.price del, body.single-product p.price del .amount { color: var(--esc-muted) !important; font-size: 18px !important; font-weight: 500 !important; }
body.single-product p.price ins { text-decoration: none; }
.compare-button-holder .rehub_main_btn, .re_wooinner_cta_wrapper .rehub_main_btn { padding: 14px 28px !important; font-size: 16px !important; }

/* Tabla de tiendas de Content Egg */
.widget_merchant_list { border-radius: var(--esc-radius) !important; overflow: hidden; box-shadow: var(--esc-shadow); }
.widget_merchant_list .table_merchant_list > div, .widget_merchant_list .table_merchant_list a { border-color: var(--esc-line) !important; }
.widget_merchant_list .price_simple_col { background: var(--esc-soft) !important; color: var(--esc-ink) !important; }
.widget_merchant_list .buttons_col a, .widget_merchant_list .buttons_col .btn_offer_block { border-radius: 8px !important; box-shadow: none !important; }

/* Pestañas y tablas de especificaciones */
.woocommerce-tabs ul.tabs li { border-radius: 10px 10px 0 0 !important; }
table.shop_attributes, .woocommerce table.shop_attributes { border-color: var(--esc-line) !important; }
table.shop_attributes th, table.shop_attributes td { border-color: var(--esc-line) !important; }
table.shop_attributes th { color: var(--esc-muted) !important; font-weight: 600 !important; }

/* ---------- Tarjetas de producto (portada, categorías, marcas) ---------- */
.col_item.woo_column_item, .col_item.woo_grid_compact, .col_item.column_grid, .woorelatedgrid .col_item {
  border: 1px solid var(--esc-line) !important;
  border-radius: 14px !important;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.col_item.woo_column_item:hover, .col_item.woo_grid_compact:hover, .col_item.column_grid:hover {
  box-shadow: var(--esc-shadow-hover);
  border-color: #d6dde7 !important;
  transform: translateY(-2px);
}
.col_item h3, .col_item h3 a, .col_item .woo_loop_desc a {
  color: var(--esc-ink) !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  letter-spacing: -0.01em;
}
.col_item .price, .col_item .price .amount, .rehub-main-price .price {
  color: var(--esc-ink) !important;
  font-weight: 700 !important;
}
.col_item .price del, .col_item .price del .amount { color: var(--esc-muted) !important; font-weight: 400 !important; }
.col_item .woo_loop_desc .cat_link_meta, .col_item .woo_desc_part .cat_link_meta, .col_item .cat_link_meta a { color: var(--esc-muted) !important; letter-spacing: .04em; }
.col_item .onsale, .rh-label-string, .onsale { background: var(--esc-ok) !important; border-radius: 6px !important; }

/* Precio de las tarjetas: Rehub lo pinta con .redbrightcolor */
html body .rehub-main-price.redbrightcolor, html body .price_for_grid.redbrightcolor,
html body .rehub-main-price.redbrightcolor .amount, html body .price_for_grid.redbrightcolor .amount {
  color: var(--esc-ink) !important;
  border-color: var(--esc-line) !important;
}
html body .price_for_grid del, html body .price_for_grid del .amount { color: var(--esc-muted) !important; }

/* ---------- Archivo: título, barra lateral y paginación ---------- */
.arc-main-title, .woo-tax-name h1 { font-size: clamp(26px, 2.6vw, 36px) !important; }
.sidebar .widget .title, .rh-mini-sidebar .title {
  font-size: 15px !important; font-weight: 700 !important; color: var(--esc-ink) !important;
  text-transform: none !important; letter-spacing: 0;
}
.sidebar .widget .title::after, .sidebar .widget .title span { border-color: var(--esc-brand) !important; }
.sidebar .widget .tagcloud a, .widget_layered_nav a.rh_attr_link, .woocommerce-widget-layered-nav-list a {
  border-radius: 999px !important;
}
.page-numbers, .woocommerce-pagination .page-numbers li a, .woocommerce-pagination .page-numbers li span {
  border-radius: 10px !important;
  border-color: var(--esc-line) !important;
}
.woocommerce-pagination .page-numbers li span.current, .page-numbers.current { background: var(--esc-ink) !important; color: #fff !important; }
html body .widget_price_filter .price_slider_amount .button {
  background: var(--esc-ink) !important; border-radius: 8px !important; text-transform: none !important;
}
html body .widget_price_filter .ui-slider .ui-slider-range, html body .widget_price_filter .ui-slider .ui-slider-handle { background-color: var(--esc-brand) !important; }
.orderby, .woocommerce-ordering select { border-radius: 10px !important; border-color: var(--esc-line) !important; }

/* ---------- Artículos ---------- */
.post-readopt .post-inner p, .single-post article.post p, .single-post .post-inner li {
  font-size: 18px; line-height: 1.75; color: var(--esc-text);
}
.single-post article.post h2 { font-size: clamp(22px, 2vw, 28px); margin-top: 1.6em; }
.single-post article.post h3 { font-size: 20px; }
.single-post article.post a:not(.re_track_btn):not(.esc-card__btn):not(.esc-offer__btn) { color: var(--esc-link); text-decoration: underline; text-decoration-thickness: 1px; }
.single-post article.post blockquote { border-left: 4px solid var(--esc-brand); background: var(--esc-soft); border-radius: 0 var(--esc-radius) var(--esc-radius) 0; }

/* ---------- Pie ---------- */
.footer-bottom.dark_style { background: var(--esc-ink) !important; }
.footer-bottom.dark_style, .footer-bottom.dark_style a { color: #cbd5e1 !important; }

/* ---------- Componentes del comparador ---------- */
.esc-offers__list { border-color: var(--esc-line); border-radius: var(--esc-radius); box-shadow: var(--esc-shadow); }
.esc-offer { border-color: var(--esc-line); }
.esc-offer--best { background: var(--esc-ok-soft); }
.esc-offer__badge { color: var(--esc-ok); }
.esc-offer__price strong { color: var(--esc-ink); font-weight: 800; letter-spacing: -0.02em; }
.esc-offer__btn, .esc-offer--best .esc-offer__btn, .esc-card__btn {
  background: var(--esc-cta); border-radius: 10px; transition: background-color .15s ease;
}
.esc-offer__btn:hover, .esc-card__btn:hover { background: var(--esc-cta-hover); opacity: 1; }
.esc-card { border-color: var(--esc-line); border-radius: 14px; transition: box-shadow .2s ease, transform .2s ease; }
.esc-card:hover { box-shadow: var(--esc-shadow-hover); transform: translateY(-2px); }
.esc-card__price strong { color: var(--esc-ink); font-weight: 800; }

/* Tarjetas de artículos (relacionados y listados del blog): imagen con aire y título con relleno */
.col_item.column_grid { display: flex; flex-direction: column; }
.col_item.column_grid figure {
  margin: 0 !important; padding: 14px; background: #fff;
  border-bottom: 1px solid var(--esc-line); aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center;
}
.col_item.column_grid figure a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.col_item.column_grid figure img { width: 100%; height: 100%; object-fit: contain; }
.col_item.column_grid .content_constructor { padding: 14px 18px 18px; flex: 1; }
.col_item.column_grid .content_constructor h2,
.col_item.column_grid .content_constructor h3 { margin: 0 !important; font-size: 16px !important; line-height: 1.4 !important; font-weight: 600 !important; }
.col_item.column_grid .content_constructor h2 a,
.col_item.column_grid .content_constructor h3 a { color: var(--esc-ink) !important; text-decoration: none !important; }
.col_item.column_grid:hover .content_constructor h2 a,
.col_item.column_grid:hover .content_constructor h3 a { color: var(--esc-link) !important; }
.col_item.column_grid .content_constructor .rh-flex-center-align:empty,
.col_item.column_grid .content_constructor .rh-flex-center-align > div:empty:only-child { display: none; }
.col_item.column_grid .button_action { z-index: 2; }
.related_articles .related_title { color: var(--esc-ink); }

/* Tablas de los artículos (comparativas, guías) */
.post-inner table:not(.shop_attributes) {
  width: 100%; margin: 8px 0 28px; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--esc-line); border-radius: var(--esc-radius); overflow: hidden;
  font-size: 15px; line-height: 1.5; background: #fff;
}
.post-inner table:not(.shop_attributes) th,
.post-inner table:not(.shop_attributes) td {
  padding: 12px 16px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--esc-line);
}
.post-inner table:not(.shop_attributes) thead th {
  background: var(--esc-soft); color: var(--esc-ink); font-weight: 600; font-size: 14px;
}
.post-inner table:not(.shop_attributes) tbody tr:nth-child(even) td { background: #fafbfc; }
.post-inner table:not(.shop_attributes) tbody tr:last-child td { border-bottom: 0; }
.post-inner table:not(.shop_attributes) td:first-child { font-weight: 600; color: var(--esc-ink); }
.post-inner table:not(.shop_attributes) a { font-weight: 600; }
@media (max-width: 640px) {
  .post-inner table:not(.shop_attributes) { display: block; overflow-x: auto; white-space: normal; }
  .post-inner table:not(.shop_attributes) th, .post-inner table:not(.shop_attributes) td { padding: 10px 12px; min-width: 120px; }
}

/* Variantes de color del mismo modelo ([esc_colores]) */
.esc-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; font-size: 14px; }
.esc-colors strong { color: var(--esc-ink); margin-right: 4px; }
.esc-colors__item { display: inline-block; padding: 5px 12px; border: 1px solid var(--esc-line); border-radius: 999px; background: #fff; color: var(--esc-text); text-decoration: none; line-height: 1.3; }
a.esc-colors__item:hover { border-color: var(--esc-brand); color: var(--esc-link); }
.esc-colors__item.is-current { border-color: var(--esc-ink); color: var(--esc-ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .col_item:hover, .esc-card:hover { transform: none !important; }
}

/* Alquiler (Grover): el precio es una cuota mensual */
.esc-offer__per { font-size: .7em; font-weight: 500; margin-left: 2px; }
.esc-offer__coupon { grid-row: 2; grid-column: 1 / -1; text-align: right; font-size: 13px; color: var(--esc-ok); font-weight: 600; margin-top: -6px; }
.esc-coupon { font: inherit; font-weight: 700; letter-spacing: .03em; color: var(--esc-ink); background: #fff; border: 1px dashed var(--esc-ok); border-radius: 4px; padding: 0 5px; cursor: pointer; }
.price:has(.esc-price-coupon) { flex-wrap: wrap; }
.esc-price-coupon { display: block; clear: both; flex-basis: 100%; width: 100%; line-height: 1.3; margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--esc-ok); letter-spacing: 0; }
.esc-coupon.is-copied::after { content: " ✓"; color: var(--esc-ok); }

/* Portada, "Top Marcas" (sección 2f79ca75 de Elementor): 6 logos en escritorio, 3+3 en tableta, 2+2+2 en móvil */
.elementor-element-2f79ca75 > .elementor-container { flex-wrap: wrap; }
.elementor-element-2f79ca75 > .elementor-container > .elementor-column { width: 16.666%; }
@media (max-width: 1024px) {
  .elementor-element-2f79ca75 > .elementor-container > .elementor-column { width: 33.333%; }
}
@media (max-width: 767px) {
  .elementor-element-2f79ca75 > .elementor-container > .elementor-column { width: 50%; }
}

/* Logo: Rehub pone tamaños fijos (160×50 en la cabecera móvil, 150×45 en el panel lateral) que lo deformaban */
#logo_mobile_wrapper img,
#mobpanelimg { width: auto !important; height: 36px !important; max-width: 100%; }

/* Bloques de AdSense en artículos (ESC_Ads): hueco reservado para que el texto no salte; si no hay anuncio, fuera */
.esc-ad { margin: 28px 0; min-height: 280px; text-align: center; }
.esc-ad__label { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8a8f98; margin-bottom: 6px; }
.esc-ad:has(ins[data-ad-status="unfilled"]) { display: none; }
@media (min-width: 768px) { .esc-ad { min-height: 120px; } }
