/* ======================================================================
   UBD VISUAL UX · PRODUCT SAFE 1.1.0
   Fase 2: Ficha de Producto
   ----------------------------------------------------------------------
   CONTRATO DE SEGURIDAD
   - CSS únicamente; no reordena DOM ni mueve hooks.
   - No oculta controles ni cambia display/position/order de módulos.
   - No modifica inputs, nombres, values, data-*, formularios ni eventos.
   - Conserva la paleta colorida actual de Un Bonito Detalle.
   - Scope estricto a body#product.ubd-modular-page + html.ubd-product-ready.
   ====================================================================== */

html.ubd-product-ready body#product.ubd-modular-page {
  --uxp-ink:#18333A;
  --uxp-muted:#687B80;
  --uxp-orange:#E7923C;
  --uxp-coral:#E78252;
  --uxp-yellow:#EFC25E;
  --uxp-green:#93B56D;
  --uxp-teal:#5DA084;
  --uxp-paper:#F7F2EC;
  --uxp-line:rgba(24,51,58,.11);
  --uxp-orange-soft:#FFF2E5;
  --uxp-coral-soft:#FFF0E8;
  --uxp-yellow-soft:#FFF7DA;
  --uxp-green-soft:#EFF6E9;
  --uxp-teal-soft:#EAF5F1;
  --uxp-radius:20px;
  color:var(--uxp-ink);
  background:#fff;
}

/* Menos pintura costosa en la zona de decisión. */
html.ubd-product-ready body#product.ubd-modular-page :where(
  .ubd-product-cover,
  .ubd-delivery-intent-product,
  .product-variants,
  .ubdpr-wrap,
  .ubdgi-wrap,
  .block-product-attribute-custom,
  .product-quantity,
  .ubd-product-includes-v11024,
  #loyalty_product_wrapper
) {
  box-shadow:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}

/* ----------------------------------------------------------------------
   1. IMAGEN + CABECERA
   ---------------------------------------------------------------------- */
html.ubd-product-ready body#product.ubd-modular-page .ubd-product-cover {
  margin-bottom:10px !important;
  padding:10px !important;
  border:1px solid var(--uxp-line) !important;
  border-radius:26px !important;
  background:#fff !important;
}

html.ubd-product-ready body#product.ubd-modular-page :where(
  .product-cover img,
  .ubd-product-cover img,
  .product-images img
) {
  filter:none !important;
}

html.ubd-product-ready body#product.ubd-modular-page .product-images .thumb-container {
  border:1px solid var(--uxp-line) !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:none !important;
}

html.ubd-product-ready body#product.ubd-modular-page .tvproduct-title-brandimage h1.h1 {
  margin:0 0 12px !important;
  color:var(--uxp-ink) !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-size:clamp(28px,4vw,40px) !important;
  font-weight:900 !important;
  line-height:1.02 !important;
  letter-spacing:-.038em !important;
  text-transform:none !important;
}

html.ubd-product-ready body#product.ubd-modular-page .product-prices {
  margin:10px 0 13px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

html.ubd-product-ready body#product.ubd-modular-page .product-prices .price {
  color:var(--uxp-coral) !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-size:clamp(28px,4vw,38px) !important;
  font-weight:900 !important;
  line-height:1 !important;
  letter-spacing:-.035em !important;
}

html.ubd-product-ready body#product.ubd-modular-page .ubd-product-availability {
  margin-left:7px !important;
  padding:5px 9px !important;
  border:1px solid rgba(93,160,132,.24) !important;
  border-radius:999px !important;
  background:var(--uxp-teal-soft) !important;
  color:#315F51 !important;
  font-size:11px !important;
  font-weight:800 !important;
  box-shadow:none !important;
}

/* Fecha: una tarjeta clara y visible, sin cambiar el comportamiento del selector. */
html.ubd-product-ready body#product.ubd-modular-page .ubd-delivery-intent-product {
  margin:10px 0 14px !important;
  padding:13px 14px !important;
  border:1px solid rgba(93,160,132,.28) !important;
  border-radius:18px !important;
  background:var(--uxp-teal-soft) !important;
}

html.ubd-product-ready body#product.ubd-modular-page .ubd-delivery-intent-product__top span {
  color:#4A7569 !important;
  font-size:10px !important;
  font-weight:900 !important;
  letter-spacing:.075em !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubd-delivery-intent-product__top strong {
  color:var(--uxp-ink) !important;
  font-size:14px !important;
  font-weight:900 !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubd-delivery-intent-change {
  padding:8px 12px !important;
  border:0 !important;
  border-radius:12px !important;
  background:var(--uxp-teal) !important;
  color:#fff !important;
  font-weight:850 !important;
  box-shadow:none !important;
}

html.ubd-product-ready body#product.ubd-modular-page .tvproduct-page-decs {
  margin:10px 0 14px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  color:var(--uxp-muted) !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-size:13px !important;
  line-height:1.55 !important;
  box-shadow:none !important;
}

/* ----------------------------------------------------------------------
   2. BLOQUES DE DECISIÓN: MISMA FUNCIÓN, COLOR COMO GUÍA
   ---------------------------------------------------------------------- */
html.ubd-product-ready body#product.ubd-modular-page .product-variants {
  margin:12px 0 !important;
  padding:14px !important;
  border:1px solid rgba(231,146,60,.28) !important;
  border-radius:var(--uxp-radius) !important;
  background:var(--uxp-orange-soft) !important;
}

html.ubd-product-ready body#product.ubd-modular-page .product-variants .control-label {
  color:var(--uxp-ink) !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-size:12px !important;
  font-weight:850 !important;
  text-transform:none !important;
}

html.ubd-product-ready body#product.ubd-modular-page .product-variants :where(select.form-control,input.form-control) {
  border:1px solid rgba(24,51,58,.16) !important;
  border-radius:12px !important;
  background:#fff !important;
  color:var(--uxp-ink) !important;
  box-shadow:none !important;
}

/* Reglas / Seis Razones: coral. */
html.ubd-product-ready body#product.ubd-modular-page .ubdpr-wrap {
  margin:12px 0 !important;
  padding:14px !important;
  border:1px solid rgba(231,130,82,.30) !important;
  border-radius:var(--uxp-radius) !important;
  background:var(--uxp-coral-soft) !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdpr-icon {
  background:#fff !important;
  color:var(--uxp-coral) !important;
  box-shadow:none !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdpr-head strong,
html.ubd-product-ready body#product.ubd-modular-page .ubdpr-field-label strong {
  color:var(--uxp-ink) !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-weight:900 !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdpr-head small,
html.ubd-product-ready body#product.ubd-modular-page .ubdpr-help {
  color:var(--uxp-muted) !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdpr-option-card {
  border-color:rgba(24,51,58,.12) !important;
  border-radius:13px !important;
  background:#fff !important;
  box-shadow:none !important;
  transition:none !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdpr-option-card:has(input:checked) {
  border-color:var(--uxp-coral) !important;
  background:#FFF8F4 !important;
  box-shadow:0 0 0 1px var(--uxp-coral) inset !important;
}

/* Globo incluido: verde. */
html.ubd-product-ready body#product.ubd-modular-page .ubdgi-wrap {
  margin:12px 0 !important;
  padding:14px !important;
  border:1px solid rgba(147,181,109,.38) !important;
  border-radius:var(--uxp-radius) !important;
  background:var(--uxp-green-soft) !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdgi-icon {
  color:#668A43 !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdgi-head strong,
html.ubd-product-ready body#product.ubd-modular-page .ubdgi-slot-title {
  color:var(--uxp-ink) !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-weight:900 !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdgi-head small,
html.ubd-product-ready body#product.ubd-modular-page .ubdgi-confirm-area {
  color:var(--uxp-muted) !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdgi-choice-tabs label,
html.ubd-product-ready body#product.ubd-modular-page .ubdgi-card {
  border-color:rgba(24,51,58,.12) !important;
  background:#fff !important;
  box-shadow:none !important;
  transition:none !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubdgi-card:has(input:checked) {
  border-color:var(--uxp-green) !important;
  background:#FBFFF7 !important;
  box-shadow:0 0 0 1px var(--uxp-green) inset !important;
}

/* Extras / Engrandece tu regalo: amarillo. */
html.ubd-product-ready body#product.ubd-modular-page .block-product-attribute-custom {
  margin:12px 0 !important;
  padding:14px !important;
  border:1px solid rgba(239,194,94,.40) !important;
  border-radius:var(--uxp-radius) !important;
  background:var(--uxp-yellow-soft) !important;
}
html.ubd-product-ready body#product.ubd-modular-page .block-product-attribute-custom .form-group h4 {
  margin-bottom:10px !important;
  color:var(--uxp-ink) !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-size:18px !important;
  font-weight:900 !important;
  letter-spacing:-.025em !important;
  text-transform:none !important;
}
html.ubd-product-ready body#product.ubd-modular-page .block-product-attribute-custom .from-group-option > h5 {
  border:0 !important;
  border-radius:10px !important;
  background:rgba(255,255,255,.62) !important;
  color:#66572B !important;
  font-weight:850 !important;
}
html.ubd-product-ready body#product.ubd-modular-page .block-product-attribute-custom .ubd-eto-modular-track > :is(.radio,.checkbox) {
  border-color:rgba(24,51,58,.11) !important;
  background:#fff !important;
  box-shadow:none !important;
  transition:none !important;
}
html.ubd-product-ready body#product.ubd-modular-page .block-product-attribute-custom .ubd-eto-modular-track > :is(.radio,.checkbox):has(input:checked) {
  border-color:var(--uxp-yellow) !important;
  background:#FFFDF5 !important;
  box-shadow:0 0 0 1px var(--uxp-yellow) inset !important;
}

/* ----------------------------------------------------------------------
   3. CANTIDAD + COMPRA
   ---------------------------------------------------------------------- */
html.ubd-product-ready body#product.ubd-modular-page .product-quantity {
  margin:12px 0 8px !important;
  padding:10px 12px !important;
  border:1px solid var(--uxp-line) !important;
  border-radius:15px !important;
  background:#fff !important;
}
html.ubd-product-ready body#product.ubd-modular-page .product-quantity .control-label {
  color:var(--uxp-muted) !important;
  font-size:11px !important;
  font-weight:850 !important;
  letter-spacing:.04em !important;
  text-transform:uppercase !important;
}
html.ubd-product-ready body#product.ubd-modular-page .product-quantity :where(input,button) {
  border-color:rgba(24,51,58,.14) !important;
  box-shadow:none !important;
}

html.ubd-product-ready body#product.ubd-modular-page .tvcart-btn-model .add-to-cart {
  margin-top:4px !important;
  padding:15px 18px !important;
  border:0 !important;
  border-radius:15px !important;
  background:var(--uxp-orange) !important;
  color:#fff !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-size:15px !important;
  font-weight:900 !important;
  letter-spacing:-.01em !important;
  box-shadow:none !important;
  text-transform:none !important;
}
html.ubd-product-ready body#product.ubd-modular-page .tvcart-btn-model .add-to-cart :where(span,i) {
  color:#fff !important;
}

/* Puntos Bonitos: visible, pero ya no compite con Comprar. */
html.ubd-product-ready body#product.ubd-modular-page #loyalty_product_wrapper {
  margin:9px 0 !important;
  padding:11px 12px !important;
  border:1px solid rgba(147,181,109,.30) !important;
  border-radius:14px !important;
  background:var(--uxp-green-soft) !important;
  color:var(--uxp-ink) !important;
}
html.ubd-product-ready body#product.ubd-modular-page #loyalty_product_wrapper :where(strong,b) {
  color:#4F7334 !important;
}

/* Qué incluye: secundaria, simple y plegable como ya funciona hoy. */
html.ubd-product-ready body#product.ubd-modular-page #ubd-product-includes-v11024 {
  margin:12px 0 !important;
  border:1px solid var(--uxp-line) !important;
  border-radius:16px !important;
  background:var(--uxp-paper) !important;
}
html.ubd-product-ready body#product.ubd-modular-page #ubd-product-includes-v11024 > summary {
  padding:12px 14px !important;
  color:var(--uxp-ink) !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-size:13px !important;
  font-weight:850 !important;
}
html.ubd-product-ready body#product.ubd-modular-page .ubd-product-includes-content-v11024 {
  color:var(--uxp-muted) !important;
}

/* ----------------------------------------------------------------------
   4. MÓVIL
   Menos relleno, sin cambiar orden ni columnas de módulos funcionales.
   ---------------------------------------------------------------------- */
@media (max-width:767px) {
  html.ubd-product-ready body#product.ubd-modular-page .ubd-product-cover {
    padding:7px !important;
    border-radius:20px !important;
  }
  html.ubd-product-ready body#product.ubd-modular-page .tvproduct-title-brandimage h1.h1 {
    margin-bottom:9px !important;
    font-size:29px !important;
  }
  html.ubd-product-ready body#product.ubd-modular-page :where(
    .ubd-delivery-intent-product,
    .product-variants,
    .ubdpr-wrap,
    .ubdgi-wrap,
    .block-product-attribute-custom
  ) {
    margin:9px 0 !important;
    padding:11px !important;
    border-radius:16px !important;
  }
  html.ubd-product-ready body#product.ubd-modular-page .block-product-attribute-custom .form-group h4 {
    font-size:16px !important;
  }
  html.ubd-product-ready body#product.ubd-modular-page .tvcart-btn-model .add-to-cart {
    padding:14px 16px !important;
    border-radius:14px !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  html.ubd-product-ready body#product.ubd-modular-page :where(
    .ubdpr-option-card,
    .ubdgi-card,
    .block-product-attribute-custom .radio,
    .block-product-attribute-custom .checkbox,
    .tvcart-btn-model .add-to-cart
  ) {
    transition:none !important;
  }
}
