/* UBD Modular Bonito 1.10.22
   Ficha de producto: menos ruido de pago + reseñas integradas.
   Capa exclusivamente visual. No mueve nodos, no cambia formularios,
   no toca SDKs, callbacks, precios, carrito, checkout ni ETS Reviews. */

/* =========================================================
   1) PAYPAL + KUESKI
   Ocultos UNICAMENTE en la ficha de producto.
   Los módulos continúan cargados y siguen disponibles en checkout.
   ========================================================= */
html.ubd-product-ready body#product :is(
  kueskipay-widget,
  #ps_checkout-payment-method-logo-block-container,
  .ps_checkout-payment-method-logo-block-container,
  #ps_checkout-express-button-container,
  .ps_checkout-express-button-container,
  #paypal-button-container,
  .paypal-button-container,
  .paypal-buttons-context-iframe
) {
  display:none !important;
  visibility:hidden !important;
  min-height:0 !important;
  height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  overflow:hidden !important;
  box-shadow:none !important;
}

/* Kueski se renderiza dentro de una fila dedicada. Ocultamos esa fila para
   que no quede un hueco en blanco por las capas visuales anteriores. */
html.ubd-product-ready body#product .product-additional-info > .row:has(kueskipay-widget),
html.ubd-product-ready body#product .tvwishlist-compare-wrapper-page .product-additional-info > .row:has(kueskipay-widget),
html.ubd-product-ready body#product .tvproduct-stock-social .product-additional-info > .row:has(kueskipay-widget) {
  display:none !important;
  min-height:0 !important;
  height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  overflow:hidden !important;
}

/* =========================================================
   2) ETS REVIEWS
   Misma funcionalidad, menor ruido y lenguaje visual Bonito.
   ========================================================= */
html.ubd-product-ready body#product .ets_rv_wrap {
  width:min(100% - 18px, 1180px) !important;
  margin:24px auto !important;
  padding:clamp(14px, 2.5vw, 24px) !important;
  border:1px solid rgba(24,51,58,.07) !important;
  border-radius:24px !important;
  background:#fff !important;
  box-shadow:0 14px 38px rgba(24,51,58,.07) !important;
}

html.ubd-product-ready body#product :is(
  #ets-rv-product-comments-list-header,
  .ets-rv-product-comments,
  .ets_rv_product_review
) {
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

html.ubd-product-ready body#product :is(
  .ets_rv_reviews_title,
  .ets_rv_reviews_header h4
) {
  margin:0 0 12px !important;
  color:#18333a !important;
  font-family:Manrope,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  font-size:clamp(20px, 3.2vw, 28px) !important;
  font-weight:900 !important;
  line-height:1.08 !important;
  letter-spacing:-.025em !important;
  text-transform:none !important;
}

/* Resumen de calificación */
html.ubd-product-ready body#product .ets_rv_average_rating {
  padding:14px 16px !important;
  border:1px solid rgba(24,51,58,.06) !important;
  border-radius:18px !important;
  background:linear-gradient(145deg,#fff8df,#f8df8e) !important;
  color:#18333a !important;
  box-shadow:none !important;
  text-align:center !important;
}
html.ubd-product-ready body#product .ets_rv_average_grade {
  color:#18333a !important;
  font-family:Manrope,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  font-size:36px !important;
  font-weight:900 !important;
  line-height:1 !important;
}

html.ubd-product-ready body#product :is(
  .ets_rv_wrap_filter,
  .ets_rv_statistics,
  .ets_rv_wrap_content,
  .ets_rv_tab_content
) {
  border:1px solid rgba(24,51,58,.06) !important;
  border-radius:18px !important;
  background:#f9f6ee !important;
  box-shadow:none !important;
}
html.ubd-product-ready body#product :is(.ets_rv_wrap_filter,.ets_rv_statistics) {
  padding:12px !important;
}
html.ubd-product-ready body#product .ets_rv_tab_content {
  margin-top:10px !important;
  padding:12px !important;
}

/* Barras y estrellas */
html.ubd-product-ready body#product .ets_rv_grade_stars_process {
  overflow:hidden !important;
  border-radius:999px !important;
  background:rgba(24,51,58,.09) !important;
}
html.ubd-product-ready body#product .ets_rv_grade_stars_percent {
  border-radius:999px !important;
  background:#ea7a43 !important;
}
html.ubd-product-ready body#product :is(
  .star,
  .star-content,
  .ets-rv-grade-stars,
  .ets_rv_grade_stars
) {
  color:#ea7a43 !important;
}

/* Pestañas: controles pequeños en lugar de otra tarjeta protagonista. */
html.ubd-product-ready body#product .ets_rv_tabs > ul,
html.ubd-product-ready body#product ul.ets_rv_tabs {
  display:flex !important;
  flex-wrap:wrap !important;
  gap:7px !important;
  margin:10px 0 0 !important;
  padding:6px !important;
  border:1px solid rgba(24,51,58,.06) !important;
  border-radius:15px !important;
  background:#f9f6ee !important;
  box-shadow:none !important;
}
html.ubd-product-ready body#product :is(.ets_rv_tab,.ets_rv_tab a) {
  min-height:36px !important;
  border:0 !important;
  border-radius:11px !important;
  background:transparent !important;
  color:#51656a !important;
  font-family:Manrope,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  font-size:11px !important;
  font-weight:800 !important;
  text-decoration:none !important;
  box-shadow:none !important;
}
html.ubd-product-ready body#product .ets_rv_tab.active,
html.ubd-product-ready body#product .ets_rv_tab.bg1,
html.ubd-product-ready body#product .ets_rv_tab.active a,
html.ubd-product-ready body#product .ets_rv_tab.bg1 a {
  background:#18333a !important;
  color:#fff !important;
}

/* Opiniones/preguntas como tarjetas discretas. */
html.ubd-product-ready body#product :is(.ets-rv-comment,.ets-rv-question) {
  margin:8px 0 !important;
  padding:14px !important;
  border:1px solid rgba(24,51,58,.07) !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:0 7px 20px rgba(24,51,58,.045) !important;
}
html.ubd-product-ready body#product :is(.ets-rv-comment,.ets-rv-question) :is(p,span,div) {
  line-height:1.5 !important;
}

/* Acciones conservan exactamente sus enlaces/eventos; sólo cambia apariencia. */
html.ubd-product-ready body#product :is(
  .ets-rv-btn-comment,
  .ets-rv-btn-question-big
) {
  min-height:40px !important;
  padding:9px 14px !important;
  border:0 !important;
  border-radius:12px !important;
  background:#18333a !important;
  color:#fff !important;
  font-family:Manrope,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  font-size:11px !important;
  font-weight:900 !important;
  box-shadow:none !important;
}
html.ubd-product-ready body#product :is(
  .ets-rv-btn-comment,
  .ets-rv-btn-question-big
):hover {
  background:#25515b !important;
  color:#fff !important;
}

/* Modal de ETS: sólo acabado visual. */
html.ubd-product-ready body#product .ets_rv_reviews_modal > div {
  border:0 !important;
  border-radius:20px !important;
  background:#fff !important;
  box-shadow:0 24px 70px rgba(24,51,58,.22) !important;
}

@media (max-width:699px) {
  html.ubd-product-ready body#product .ets_rv_wrap {
    width:calc(100% - 16px) !important;
    margin:18px auto !important;
    padding:12px !important;
    border-radius:20px !important;
  }
  html.ubd-product-ready body#product :is(
    .ets_rv_wrap_filter,
    .ets_rv_statistics,
    .ets_rv_tab_content
  ) {
    padding:10px !important;
    border-radius:15px !important;
  }
  html.ubd-product-ready body#product .ets_rv_average_grade {
    font-size:32px !important;
  }
  html.ubd-product-ready body#product :is(.ets-rv-comment,.ets-rv-question) {
    padding:12px !important;
    border-radius:14px !important;
  }
}
