/* ============================================================
   VIALIX UY - WooCommerce y LearnDash dentro del sistema de diseno
   Lo usan: /uy/mi-cuenta/, /uy/carrito/ y /uy/finalizar-compra/.
   Se carga DESPUES del CSS del tema (en los empates gana el tema).
   ============================================================ */

/* ---------- WooCommerce dentro del diseño (el reset del sistema borra márgenes) ---------- */
  .vx-wp .woocommerce{font-family:var(--font-body);color:var(--ink);font-size:1rem;}
  .vx-wp .woocommerce h2,.vx-wp .woocommerce h3{font-family:var(--font-display);font-weight:800;
    letter-spacing:-.015em;margin:0 0 .7rem;font-size:1.25rem;}
  .vx-wp .woocommerce p{margin:0 0 1rem;color:var(--muted);}
  .vx-wp .woocommerce a:not(.button){color:var(--preto);font-weight:700;text-decoration:underline;text-underline-offset:3px;}
  /* Kadence pone los .form-row de WooCommerce en una grilla de 2 columnas INVERTIDA
     (etiqueta en la columna derecha x=648, campo en la izquierda x=186): se ve
     desordenado. Forzamos una sola columna: etiqueta arriba, campo abajo, todo al mismo eje. */
  .vx-wp .woocommerce .form-row{display:block !important;float:none !important;}
  .vx-wp .woocommerce .form-row label{float:none !important;}
  .vx-wp .woocommerce .form-row::after{content:none;}
  .vx-wp .woocommerce .woocommerce-form-login__rememberme{float:none;display:inline-flex;}
  .vx-wp .woocommerce .lost_password{clear:both;}
  .vx-wp .woocommerce .form-row{margin:0 0 1.05rem;padding:0;}
  .vx-wp .woocommerce .form-row label{display:block;font-size:.82rem;font-weight:700;margin-bottom:.4rem;color:var(--ink);}
  .vx-wp .woocommerce .form-row label .required{color:#B3261E;}
  .vx-wp .woocommerce .form-row input.input-text,.vx-wp .woocommerce .form-row textarea,
  .vx-wp .woocommerce .form-row select,.vx-wp .woocommerce select{
    width:100%;min-height:48px;padding:.7rem .9rem;border:1.5px solid #DAD9D2;border-radius:10px;
    font-family:var(--font-body);font-size:.98rem;color:var(--ink);background:var(--branco);}
  .vx-wp .woocommerce .form-row input.input-text:focus,.vx-wp .woocommerce .form-row textarea:focus,
  .vx-wp .woocommerce .form-row select:focus,.vx-wp .woocommerce select:focus{outline:none;border-color:var(--preto);}
  .vx-wp .woocommerce .form-row-wide{width:100%;float:none;}
  .vx-wp .woocommerce .woocommerce-form-login__rememberme{display:inline-flex;align-items:center;gap:.5rem;font-size:.92rem;}
  .vx-wp .woocommerce input[type="checkbox"]{width:18px;height:18px;min-height:0;accent-color:#000;}
  .vx-wp .woocommerce button.button,.vx-wp .woocommerce input.button,.vx-wp .woocommerce a.button,
  .vx-wp .woocommerce .woocommerce-form-login__submit,.vx-wp .woocommerce #place_order{
    display:inline-flex;align-items:center;justify-content:center;background:var(--preto);color:var(--branco);
    border:2px solid var(--preto);border-radius:999px;min-height:48px;padding:.8rem 1.6rem;
    font-family:var(--font-body);font-weight:800;font-size:.98rem;cursor:pointer;text-decoration:none;line-height:1.2;}
  .vx-wp .woocommerce button.button:hover,.vx-wp .woocommerce a.button:hover,
  .vx-wp .woocommerce input.button:hover{background:var(--cinza-escuro);border-color:var(--cinza-escuro);}
  .vx-wp .woocommerce .woocommerce-form-login__submit{margin-right:.8rem;}
  .vx-wp .woocommerce .lost_password{margin-top:1rem;font-size:.9rem;}
  .vx-wp .woocommerce form.lost_reset_password{max-width:460px;}
  .vx-wp .woocommerce table.shop_table{width:100%;border-collapse:collapse;font-size:.95rem;}
  .vx-wp .woocommerce table.shop_table th,.vx-wp .woocommerce table.shop_table td{
    padding:.85rem .7rem;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle;}
  .vx-wp .woocommerce table.shop_table th{font-size:.76rem;font-weight:800;letter-spacing:.1em;
    text-transform:uppercase;color:var(--cinza-escuro);}
  .vx-wp .woocommerce table.shop_table tbody tr:last-child td{border-bottom:0;}
  .vx-wp .woocommerce .woocommerce-MyAccount-navigation{margin:0 0 1.8rem;}
  .vx-wp .woocommerce .woocommerce-MyAccount-navigation ul{list-style:none;display:flex;flex-wrap:wrap;gap:.5rem;}
  .vx-wp .woocommerce .woocommerce-MyAccount-navigation ul li{list-style:none;}
  .vx-wp .woocommerce .woocommerce-MyAccount-navigation ul li a{display:inline-block;padding:.55rem 1.05rem;
    border:1.5px solid var(--line);border-radius:999px;font-size:.9rem;font-weight:700;
    text-decoration:none;color:var(--ink);}
  .vx-wp .woocommerce .woocommerce-MyAccount-navigation ul li a:hover{border-color:var(--preto);}
  .vx-wp .woocommerce .woocommerce-MyAccount-navigation ul li.is-active a{background:var(--preto);border-color:var(--preto);color:var(--branco);}
  .vx-wp .woocommerce .woocommerce-MyAccount-content p{margin:0 0 1rem;}
  .vx-wp .woocommerce .woocommerce-message,.vx-wp .woocommerce .woocommerce-info,
  .vx-wp .woocommerce .woocommerce-error{list-style:none;border:1.5px solid var(--line);border-top:3px solid var(--preto);
    border-radius:12px;background:#FAFAF4;padding:1rem 1.1rem;margin:0 0 1.3rem;font-size:.95rem;}
  .vx-wp .woocommerce .woocommerce-error{border-top-color:#B3261E;}
  .vx-wp .woocommerce .woocommerce-message::before,.vx-wp .woocommerce .woocommerce-info::before,
  .vx-wp .woocommerce .woocommerce-error::before{display:none;}
  .vx-wp .woocommerce .woocommerce-message a.button,.vx-wp .woocommerce .woocommerce-info a.button{float:none;margin-left:.6rem;}
  .vx-wp .woocommerce .woocommerce-customer-details address{border:1.5px solid var(--line);border-radius:12px;
    padding:1rem 1.1rem;font-style:normal;line-height:1.7;margin-top:.6rem;color:var(--muted);}
  .vx-wp .woocommerce .woocommerce-Addresses,.vx-wp .woocommerce .u-columns{display:grid;grid-template-columns:1fr 1fr;gap:1.4rem;}
  .vx-wp .woocommerce .woocommerce-Address-title,.vx-wp .woocommerce header.title{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;}
  .vx-wp .woocommerce .password-input{width:100%;} /* ancho del campo */

  /* ---------- LearnDash (salón de clases) ---------- */
  .vx-wp .learndash-wrapper{font-family:var(--font-body);color:var(--ink);}
  .vx-wp .learndash-wrapper .ld-profile-summary .ld-profile-card{display:flex;align-items:center;gap:1.2rem;
    background:var(--amarelo-claro);border:1.5px solid #EFECD2;border-radius:var(--radius);padding:1.2rem 1.4rem;}
  .vx-wp .learndash-wrapper .ld-profile-avatar img{border-radius:50%;width:84px;height:84px;object-fit:cover;}
  .vx-wp .learndash-wrapper .ld-profile-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin:1.4rem 0;}
  .vx-wp .learndash-wrapper .ld-profile-stat{background:var(--branco);border:1.5px solid var(--line);
    border-radius:var(--radius);padding:1rem;text-align:center;}
  .vx-wp .learndash-wrapper .ld-profile-stat strong,.vx-wp .learndash-wrapper .ld-profile-stat span{font-family:var(--font-display);}
  .vx-wp .learndash-wrapper .ld-item-list .ld-section-heading h2{font-family:var(--font-display);font-weight:800;
    font-size:1.25rem;letter-spacing:-.015em;}
  .vx-wp .learndash-wrapper .ld-item-list-item{border:1.5px solid var(--line);border-radius:var(--radius);
    margin-bottom:.8rem;overflow:hidden;background:var(--branco);}
  .vx-wp .learndash-wrapper .ld-item-list-item-expanded{border-top:1.5px solid var(--line);}
  .vx-wp .learndash-wrapper .ld-item-name a{font-weight:800;color:var(--ink);text-decoration:none;}
  .vx-wp .learndash-wrapper .ld-button,.vx-wp .learndash-wrapper .ld-item-list-actions .ld-button{
    background:var(--preto);color:var(--branco);border:2px solid var(--preto);border-radius:999px;
    font-family:var(--font-body);font-weight:800;min-height:46px;padding:.7rem 1.4rem;text-decoration:none;}
  .vx-wp .learndash-wrapper .ld-button:hover{background:var(--cinza-escuro);color:var(--branco);}
  .vx-wp .learndash-wrapper .ld-progress-bar{background:var(--line);border-radius:999px;overflow:hidden;height:10px;}
  .vx-wp .learndash-wrapper .ld-progress-bar .ld-progress-bar-percentage{background:var(--preto);height:10px;}
  .vx-wp .learndash-wrapper .ld-alert{border-radius:12px;border:1.5px solid var(--line);background:#FAFAF4;
    padding:1rem 1.1rem;display:flex;gap:.8rem;align-items:flex-start;}
  .vx-wp .learndash-wrapper .ld-alert-warning{border-top:3px solid var(--amarelo-escuro);}
  .vx-wp .learndash-wrapper .ld-alert-content{color:var(--muted);}
  .vx-wp .learndash-wrapper .ld-item-search-fields{display:flex;gap:.7rem;flex-wrap:wrap;align-items:flex-end;}
  .vx-wp .learndash-wrapper .ld-item-search-fields input.ld-course-nav-field{min-height:46px;
    border:1.5px solid #DAD9D2;border-radius:10px;padding:.6rem .9rem;font-family:var(--font-body);}
  .vx-wp .learndash-wrapper .ld-icon{color:var(--cinza-claro);}

  /* ---------- Correcciones de convivencia con el tema/plugins (medidas en vivo) ---------- */
  /* El menú se partía en dos líneas dentro de WordPress (Kadence achica el contenedor
     del flex: la home estática da 24px de alto por ítem y acá daba 47px en "Vialixa IA"). */
  .vx-cuenta .nav-links,
  .vx-compra .nav-links{flex-wrap:nowrap;}
  .vx-cuenta .nav-links a,
  .vx-compra .nav-links a{white-space:nowrap;}
  /* Kadence define `.woocommerce-page img{height:auto}` (0,1,1) y le gana a
     `.brand-logo{height:40px}` (0,1,0): en las páginas de WooCommerce el logo de la
     cabecera salía al doble (80px) y la cabecera pasaba de 80 a 113px de alto.
     Se sube la especificidad con las clases de cuerpo propias. */
  .vx-cuenta .brand-logo,
  .vx-compra .brand-logo{height:40px;width:auto;}
  /* Los títulos heredaban el color del tema (Kadence) en vez del sistema: texto casi
     invisible sobre el fondo oscuro (rgb(26,32,44) sobre #1B1A1A). */
  .vx-cuenta .hero h1,
  .vx-compra .hero h1{color:var(--ink);}
  .vx-cuenta .on-dark h2,.vx-cuenta .on-dark h3,
  .vx-compra .on-dark h2,.vx-compra .on-dark h3{color:var(--branco);}
  .vx-cuenta .on-dark p,
  .vx-compra .on-dark p{color:#C9C7C7;}
  .vx-wp .woocommerce h2,.vx-wp .woocommerce h3,.vx-wp .learndash-wrapper h2{color:var(--ink);}

  /* ---------- LearnDash: botones y piezas que traen su propio azul de marca ---------- */
  .vx-wp .learndash-wrapper .ld-expand-button,
  .vx-wp .learndash-wrapper .ld-button,
  .vx-wp .learndash-wrapper .ld-primary-background,
  .vx-wp .learndash-wrapper .ld-item-list-actions .ld-expand-button{
    background:var(--preto) !important;color:var(--branco) !important;
    border:2px solid var(--preto) !important;border-radius:999px !important;
    font-family:var(--font-body);font-weight:800;box-shadow:none !important;
    min-height:44px;padding:.6rem 1.3rem;}
  .vx-wp .learndash-wrapper .ld-expand-button:hover,
  .vx-wp .learndash-wrapper .ld-primary-background:hover{background:var(--cinza-escuro) !important;}
  .vx-wp .learndash-wrapper .ld-status-icon{border-color:var(--cinza-claro) !important;background:var(--branco) !important;}
  .vx-wp .learndash-wrapper .ld-status-incomplete.ld-status-icon{border-color:var(--cinza-claro) !important;}
  .vx-wp .learndash-wrapper .ld-profile-card{padding:1.1rem 1.3rem;}
  /* el avatar viene como DIV de 150px con la imagen adentro */
  .vx-wp .learndash-wrapper .ld-profile-avatar{width:88px !important;height:88px !important;
    flex:0 0 88px;overflow:hidden;border-radius:50%;background:var(--branco);}
  .vx-wp .learndash-wrapper .ld-profile-avatar img{width:88px !important;height:88px !important;
    border-radius:50%;object-fit:cover;display:block;}
  .vx-wp .learndash-wrapper .ld-profile-edit-link{display:inline-flex;align-items:center;
    background:var(--branco);border:1.5px solid var(--preto);border-radius:999px;
    padding:.45rem 1rem;font-size:.85rem;font-weight:800;text-decoration:none;color:var(--preto);}
  .vx-wp .learndash-wrapper .ld-profile-edit-link:hover{background:var(--preto);color:var(--branco);}
  .vx-wp .learndash-wrapper .ld-item-list-actions{gap:.7rem;align-items:center;}
  .vx-wp .learndash-wrapper .ld-item-search{margin-left:auto;}
  .vx-wp{padding-bottom:clamp(1.6rem,3vw,2.4rem);}

  /* ---------- Carrito y checkout: piezas propias ---------- */
  /* Bloques de WooCommerce (carrito) */
  .vx-wp .wc-block-components-sidebar-layout{display:grid;grid-template-columns:1.55fr 1fr;gap:clamp(1.2rem,3vw,2.4rem);align-items:start;}
  .vx-wp .wc-block-components-sidebar-layout .wc-block-components-main,
  .vx-wp .wc-block-components-sidebar-layout .wc-block-components-sidebar{width:auto;padding:0;}
  .vx-wp .wc-block-cart-items{border:1.5px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--branco);}
  .vx-wp .wc-block-cart-items__header{border-bottom:1.5px solid var(--line);background:#FAFAF4;}
  .vx-wp .wc-block-cart-items__header th,
  .vx-wp .wc-block-cart-items__header span{font-size:.76rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--cinza-escuro);}
  .vx-wp .wc-block-cart-items__row{border-bottom:1px solid var(--line);}
  .vx-wp .wc-block-cart-items__row:last-child{border-bottom:0;}
  .vx-wp .wc-block-cart-item__image img{border-radius:12px;border:1.5px solid var(--line);}
  .vx-wp .wc-block-components-product-name{font-family:var(--font-display);font-weight:800;font-size:1.05rem;line-height:1.25;text-decoration:none;color:var(--ink);}
  .vx-wp .wc-block-components-product-price,
  .vx-wp .wc-block-components-product-price__value{font-weight:800;color:var(--ink);}
  .vx-wp .wc-block-components-product-price del{color:var(--cinza-claro);font-weight:600;}
  .vx-wp .wc-block-components-product-price ins{text-decoration:none;}
  .vx-wp .wc-block-cart-item__quantity .wc-block-components-quantity-selector{border:1.5px solid #DAD9D2;border-radius:10px;min-height:44px;}
  .vx-wp .wc-block-components-quantity-selector__button{border:0;background:transparent;color:var(--preto);font-weight:900;}
  .vx-wp .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input{border:0;background:transparent;text-align:center;font-weight:800;}
  .vx-wp .wc-block-cart-item__remove-link,
  .vx-wp .wc-block-cart-item__remove-link a{font-size:.85rem;color:var(--cinza-claro);text-decoration:underline;text-underline-offset:3px;}
  /* Totales (bloque) */
  .vx-wp .wc-block-components-totals-item{display:flex;justify-content:space-between;gap:1rem;padding:.55rem 0;font-size:.98rem;}
  .vx-wp .wc-block-components-totals-item__label{font-weight:700;color:var(--cinza-escuro);text-transform:none;font-size:.85rem;letter-spacing:.04em;}
  .vx-wp .wc-block-components-totals-item__value{font-family:var(--font-display);font-weight:900;font-size:1.05rem;}
  .vx-wp .wc-block-components-totals-footer-item .wc-block-components-totals-item__value{font-size:1.55rem;}
  .vx-wp .wc-block-components-totals-item__description{display:none;}
  /* Cupón (bloque y shortcode) */
  .vx-wp .wc-block-components-totals-coupon,
  .vx-wp .woocommerce-form-coupon-toggle{background:transparent;border:0;padding:0;margin:0 0 1.1rem;}
  .vx-wp .wc-block-components-panel__button{font-weight:800;color:var(--ink);text-decoration:underline;text-underline-offset:3px;background:transparent;border:0;padding:0;}
  .vx-wp .wc-block-components-totals-coupon__form,
  .vx-wp form.checkout_coupon{display:flex;gap:.6rem;flex-wrap:wrap;margin:.8rem 0 0;border:1.5px solid var(--line);border-radius:12px;padding:1rem;}
  .vx-wp .wc-block-components-totals-coupon__form input[type=text],
  .vx-wp form.checkout_coupon input#coupon_code{flex:1 1 200px;min-height:46px;border:1.5px solid #DAD9D2;border-radius:10px;padding:.6rem .9rem;font-family:var(--font-body);}
  /* Botón de finalizar (bloque y shortcode) */
  /* El boton de finalizar del carrito viene como "sticky": WooCommerce lo oculta
     hasta que el usuario hace scroll (barra fija abajo) y sin el, arriba del carrito
     NO hay forma de avanzar. Se lo deja siempre visible y en el flujo, dentro de la
     columna de totales (el layout estandar). */
  .vx-wp .wc-block-cart__submit-container,
  .vx-wp .wc-block-cart__submit-container--sticky{
    display:block !important;position:static !important;padding:0 !important;
    background:transparent !important;width:auto !important;left:auto !important;
    bottom:auto !important;z-index:auto !important;margin-top:1rem;}
  .vx-wp .wc-block-cart__submit-container--sticky:before{display:none !important;}
  .vx-wp .wc-block-cart__submit-button,
  .vx-wp .wc-block-components-button:not(.is-link),
  .vx-wp .woocommerce .checkout-button,
  .vx-wp .woocommerce #place_order{
    display:flex;align-items:center;justify-content:center;width:100%;background:var(--preto);color:var(--branco);
    border:2px solid var(--preto);border-radius:999px;min-height:54px;padding:1rem 1.6rem;
    font-family:var(--font-body);font-weight:800;font-size:1.05rem;text-decoration:none;cursor:pointer;}
  .vx-wp .wc-block-cart__submit-button:hover,
  .vx-wp .wc-block-components-button:not(.is-link):hover,
  .vx-wp .woocommerce .checkout-button:hover,
  .vx-wp .woocommerce #place_order:hover{background:var(--cinza-escuro);border-color:var(--cinza-escuro);color:var(--branco);}
  /* Checkout (shortcode clásico) */
  /* Checkout en dos columnas: detalle a la izquierda, resumen a la derecha.
     El <h3> del resumen NO puede quedar suelto: en grid ocuparía la fila 1 de la
     columna 2 y empujaría el resumen al pie (y=2105), y en flex la fila 1 mide lo
     que el formulario (1457px) así que el resumen cae igual de abajo. Por eso el
     template mueve ese <h3> DENTRO de la caja del resumen (compra.php), y acá el
     formulario queda con dos hijos reales, uno por columna. */
  .vx-wp .woocommerce form.woocommerce-checkout{display:grid;grid-template-columns:1.55fr 1fr;gap:0 clamp(1.2rem,3vw,2.4rem);align-items:start;}
  .vx-wp .woocommerce form.woocommerce-checkout #customer_details{grid-column:1;width:auto;float:none;min-width:0;}
  .vx-wp .woocommerce form.woocommerce-checkout #order_review{grid-column:2;width:auto;float:none;}
  .vx-wp .woocommerce form.woocommerce-checkout #order_review_heading{width:auto;float:none;margin:0 0 1rem;}
  .vx-wp .woocommerce #order_review{border:1.5px solid var(--line);border-radius:var(--radius);padding:clamp(1.1rem,2.5vw,1.6rem);background:var(--branco);box-shadow:var(--shadow-soft);}
  .vx-wp .woocommerce #order_review table.shop_table{margin:0 0 1rem;}
  .vx-wp .woocommerce #order_review table.shop_table .order-total .amount{font-family:var(--font-display);font-weight:900;font-size:1.3rem;}
  .vx-wp .woocommerce #order_review table.shop_table .product-name,
  .vx-wp .woocommerce #order_review table.shop_table .cart_item td{font-weight:600;}
  .vx-wp .woocommerce .woocommerce-billing-fields h3,
  .vx-wp .woocommerce .woocommerce-additional-fields h3,
  .vx-wp .woocommerce #order_review_heading{font-family:var(--font-display);font-weight:800;font-size:1.2rem;letter-spacing:-.015em;margin:0 0 1rem;}
  .vx-wp .woocommerce #payment{background:transparent;border:0;padding:0;}
  .vx-wp .woocommerce #payment ul.wc_payment_methods{list-style:none;border:0;padding:0;margin:0 0 1rem;}
  .vx-wp .woocommerce #payment ul.wc_payment_methods li.wc_payment_method{border:1.5px solid var(--line);border-radius:12px;padding:.85rem 1rem;margin-bottom:.6rem;list-style:none;}
  .vx-wp .woocommerce #payment ul.wc_payment_methods li.wc_payment_method label{font-weight:700;display:inline-flex;align-items:center;gap:.5rem;}
  .vx-wp .woocommerce #payment div.payment_box{background:#FAFAF4;border-radius:10px;margin-top:.8rem;font-size:.92rem;color:var(--muted);}
  .vx-wp .woocommerce #payment div.payment_box::before{display:none;}
  .vx-wp .woocommerce #payment .form-row.place-order{padding:0;margin:0;}
  .vx-wp .woocommerce .woocommerce-terms-and-conditions-wrapper{font-size:.9rem;color:var(--muted);margin-bottom:1rem;}
  .vx-wp .woocommerce .woocommerce-form-login-toggle .woocommerce-info,
  .vx-wp .woocommerce .woocommerce-form-coupon-toggle .woocommerce-info{margin:0 0 1rem;}
  .vx-wp .woocommerce .woocommerce-form-login{max-width:520px;}
  .vx-wp .woocommerce .woocommerce-billing-fields__field-wrapper{display:block;}
  .vx-wp .woocommerce .woocommerce-shipping-fields,
  .vx-wp .woocommerce .woocommerce-additional-fields{margin-top:1.2rem;}

  @media (max-width:760px){

    .vx-wp .woocommerce .woocommerce-Addresses,.vx-wp .woocommerce .u-columns{grid-template-columns:1fr;}
    .vx-wp .learndash-wrapper .ld-profile-stats{grid-template-columns:1fr 1fr;}
    /* --- carrito / checkout en pantalla chica --- */
    .vx-wp .wc-block-components-sidebar-layout{grid-template-columns:1fr;}
    .vx-wp .woocommerce form.woocommerce-checkout{grid-template-columns:1fr;}
    .vx-wp .woocommerce form.woocommerce-checkout #customer_details,
    .vx-wp .woocommerce form.woocommerce-checkout #order_review{grid-column:1;}
    .vx-wp .wc-block-cart-items__header{display:none;}
  }
