/* ======================================================================
   UBD Visual UX · PRODUCT CHOICE PALETTE FORCE 1.6.14

   Diagnóstico:
   - La paleta 1.6.12 sí estaba registrada, pero el bloque 1.6.10 había dejado
     un selector muchísimo más específico para .control-label.
   - Resultado: seguía ganando el fondo oscuro tostado en los títulos.

   Solución:
   - Reaplicar la paleta con la MISMA ruta de especificidad que 1.6.10,
     y con una prioridad posterior, para que por fin sí cambie visualmente.
   - Paleta integrada al catálogo: mostaza suave, verde salvia,
     coral durazno y aqua menta.
   ====================================================================== */

html.ubd-product-ready body#product.ubd-modular-page {
  --ubd-choice-ink: #18333a;
  --ubd-choice-border: rgba(24, 51, 58, .04);
  --ubd-choice-1: linear-gradient(180deg, #F8E9B8 0%, #F1C866 100%);
  --ubd-choice-2: linear-gradient(180deg, #DCE9C8 0%, #A8C884 100%);
  --ubd-choice-3: linear-gradient(180deg, #F6D0BE 0%, #EA956D 100%);
  --ubd-choice-4: linear-gradient(180deg, #D7ECE7 0%, #9FD1C7 100%);
}

/* Variables por tarjeta usando la estructura real. */
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-variants .product-variants-item:nth-of-type(4n+1),
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-customization .product-customization-item:nth-of-type(4n+1) {
  --ubd-choice-bg: var(--ubd-choice-1);
}

html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-variants .product-variants-item:nth-of-type(4n+2),
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-customization .product-customization-item:nth-of-type(4n+2) {
  --ubd-choice-bg: var(--ubd-choice-2);
}

html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-variants .product-variants-item:nth-of-type(4n+3),
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-customization .product-customization-item:nth-of-type(4n+3) {
  --ubd-choice-bg: var(--ubd-choice-3);
}

html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-variants .product-variants-item:nth-of-type(4n+4),
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-customization .product-customization-item:nth-of-type(4n+4) {
  --ubd-choice-bg: var(--ubd-choice-4);
}

/* Fuerza final exactamente sobre el mismo target que la 1.6.10 oscura. */
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-variants .product-variants-item > .control-label,
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-variants .product-variants-item .control-label,
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-customization .product-customization-item > .control-label,
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-customization .product-customization-item .control-label {
  background: var(--ubd-choice-bg, var(--ubd-choice-1)) !important;
  background-color: transparent !important;
  background-image: var(--ubd-choice-bg, var(--ubd-choice-1)) !important;
  color: var(--ubd-choice-ink) !important;
  -webkit-text-fill-color: var(--ubd-choice-ink) !important;
  border: 1px solid var(--ubd-choice-border) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-variants .product-variants-item > .control-label *,
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-variants .product-variants-item .control-label *,
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-customization .product-customization-item > .control-label *,
html.ubd-product-ready body#product.ubd-modular-page
#wrapper #main form#add-to-cart-or-refresh
.product-customization .product-customization-item .control-label * {
  color: var(--ubd-choice-ink) !important;
  -webkit-text-fill-color: var(--ubd-choice-ink) !important;
  text-shadow: none !important;
}

@media (max-width: 767px) {
  html.ubd-product-ready body#product.ubd-modular-page
  #wrapper #main form#add-to-cart-or-refresh
  .product-variants .product-variants-item > .control-label,
  html.ubd-product-ready body#product.ubd-modular-page
  #wrapper #main form#add-to-cart-or-refresh
  .product-variants .product-variants-item .control-label,
  html.ubd-product-ready body#product.ubd-modular-page
  #wrapper #main form#add-to-cart-or-refresh
  .product-customization .product-customization-item > .control-label,
  html.ubd-product-ready body#product.ubd-modular-page
  #wrapper #main form#add-to-cart-or-refresh
  .product-customization .product-customization-item .control-label {
    min-height: 40px !important;
    border-radius: 16px !important;
  }
}
