/* === Trust chip =========================================================== */
.woocommerce-checkout .checkout-trust{display:flex;align-items:center;justify-content:center;text-align:center;padding:.6rem .75rem;margin-top:.75rem;background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;font:600 14px/1.25 system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,sans-serif;color:#374151;white-space:nowrap;gap:.75rem}
.woocommerce-checkout .checkout-trust .ct-row{display:inline-flex;align-items:center;gap:.45rem}
.woocommerce-checkout .checkout-trust .ct-top::after{content:"\00B7";opacity:.45;margin:0 .55rem}
.woocommerce-checkout .checkout-trust strong{font-weight:800;color:#111827}
.woocommerce-checkout .checkout-trust .stars{letter-spacing:.12em;transform:translateY(-.5px);font-size:13px;color:#F5A623}
.woocommerce-checkout .checkout-trust .sep{opacity:.45;display:inline-block;padding:0 .25rem}
.woocommerce-checkout .checkout-trust .i{display:inline-block;width:14px;height:14px;margin:0 .2rem 0 0;background:currentColor;color:#374151;vertical-align:-2px;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-size:contain;mask-repeat:no-repeat;mask-position:center}
.woocommerce-checkout .checkout-trust .i-lock{
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M6 10V8a6 6 0 1 1 12 0v2h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1zm2 0h8V8a4 4 0 1 0-8 0v2z'/%3E%3C/svg%3E");
          mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M6 10V8a6 6 0 1 1 12 0v2h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1zm2 0h8V8a4 4 0 1 0-8 0v2z'/%3E%3C/svg%3E");
}
.woocommerce-checkout .checkout-trust .i-truck{
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M2 7h12v6h3l2-3h3v8h-2a2 2 0 1 1-4 0H8a2 2 0 1 1-4 0H2V7zm16 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2zM6 15a1 1 0 1 0 0 2 1 1 0 0 0 0-2z'/%3E%3C/svg%3E");
          mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M2 7h12v6h3l2-3h3v8h-2a2 2 0 1 1-4 0H8a2 2 0 1 1-4 0H2V7zm16 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2zM6 15a1 1 0 1 0 0 2 1 1 0 0 0 0-2z'/%3E%3C/svg%3E");
}
@media (max-width:480px){
  .woocommerce-checkout .checkout-trust{white-space:normal;flex-direction:column;gap:.35rem;font-size:13.5px}
  .woocommerce-checkout .checkout-trust .ct-top{gap:.20rem}
  .woocommerce-checkout .checkout-trust .ct-top::after{content:"";display:none}
}

/* === “IVA incl.” ========================================================== */
.cmw-iva-incl{margin-left:.35rem;font-size:.85em;font-weight:600;opacity:.8}

/* === Resumen del pedido móvil (checkout clásico) ========================== */
.cmw-order-summary{width:100%}

/* Botón toggle: fondo gris MUY leve, borde suave y chevron a la derecha */
.cmw-order-summary__toggle{
  display:flex; align-items:center; justify-content:space-between; gap:.75rem;
  padding:.8rem 1rem; border-radius:12px;
  border:1px solid #e5e7eb;                 /* antes #111 */
  background:#f9fafb;                        /* antes #fff */
  color:#111;
  font:700 15px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,sans-serif;
  margin:0 0 .75rem; width:100%;
}
.cmw-order-summary__toggle .cmw-total{font-weight:800}

/* Chevron: por defecto apunta ABAJO (plegado) y gira ARRIBA cuando está abierto */
.cmw-order-summary__toggle::after{
  content:""; flex:0 0 18px; width:18px; height:18px; margin-left:auto;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M8.12 9.29 12 13.17l3.88-3.88 1.41 1.41L12 16l-5.29-5.29z"/></svg>') center / 100% 100% no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M8.12 9.29 12 13.17l3.88-3.88 1.41 1.41L12 16l-5.29-5.29z"/></svg>') center / 100% 100% no-repeat;
  transform: rotate(0deg);                   /* ▼ (abajo) */
  transition: transform .2s ease, opacity .2s ease;
  opacity:.9;
}
.cmw-order-summary__toggle[aria-expanded="true"]::after,
.cmw-order-summary__toggle.is-open::after{
  transform: rotate(180deg);                 /* ▲ (arriba) */
}

/* Hover/focus más sutil */
.cmw-order-summary__toggle:hover{ background:#f3f4f6; border-color:#d1d5db }
.cmw-order-summary__toggle:focus-visible{
  outline:2px solid #111; outline-offset:2px; border-color:#111;
}

.cmw-order-summary__panel{
  background:#f8fafc;                        /* leve gris */
  border:1px solid #e5e7eb; border-radius:12px; padding:12px;
}
.cmw-order-summary__panel #order_review_heading{
  margin:0 0 .5rem;
  font:700 16px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,sans-serif
}

.cmw-hidden{display:none!important}

/* Móvil */
@media (max-width:991.98px){
  .cmw-order-summary__panel{display:none}
  .cmw-order-summary__panel.is-open{display:block}

  /* Oculta duplicados de cupones/notices dentro del panel plegable */
  .cmw-order-summary ~ .woocommerce-form-coupon-toggle,
  .cmw-order-summary ~ a.coupon-modal-link,
  .cmw-order-summary ~ [data-micromodal-trigger*="coupon"],
  .cmw-order-summary ~ [data-modal-target*="coupon"],
  #order_review .woocommerce-form-coupon-toggle,
  #order_review a.coupon-modal-link,
  #order_review [data-micromodal-trigger*="coupon"],
  #order_review [data-modal-target*="coupon"],
  .cmw-order-summary__panel .woocommerce-form-coupon-toggle,
  .cmw-order-summary__panel a.coupon-modal-link,
  .cmw-order-summary__panel [data-micromodal-trigger*="coupon"],
  .cmw-order-summary__panel [data-modal-target*="coupon"]{display:none!important}

  .cmw-order-summary__panel .woocommerce-notices-wrapper > *,
  .cmw-order-summary__panel .woocommerce-info,
  .cmw-order-summary__panel .woocommerce-message,
  .cmw-order-summary__panel .woocommerce-error{display:none!important}

  .cmw-order-summary ~ .woocommerce-form-coupon,
  .cmw-order-summary ~ form.checkout_coupon,
  .cmw-order-summary ~ .coupon_inner_checkout,
  #order_review .woocommerce-form-coupon,
  #order_review form.checkout_coupon,
  #order_review .coupon_inner_checkout{display:none!important}

  #order_review .shop_table{display:none!important}
}

/* Desktop */
@media (min-width:992px){
  .cmw-order-summary__toggle{display:none!important}
  .cmw-order-summary__panel{display:block!important;background:transparent;border:0;padding:0}
}


/* === Labels flotantes ===================================================== */
.woocommerce-checkout form.checkout p.form-row.cmw-float{position:relative;margin-bottom:18px}
.woocommerce-checkout form.checkout p.form-row.cmw-float label{position:absolute;left:12px;top:14px;font-weight:600;font-size:14px;line-height:1;color:#6b7280;pointer-events:none;background:transparent;transition:all .15s ease}
.woocommerce-checkout form.checkout p.form-row.cmw-float label abbr.required{color:#ef4444;text-decoration:none;margin-left:.15rem}
.woocommerce-checkout form.checkout p.form-row.cmw-float input.input-text,
.woocommerce-checkout form.checkout p.form-row.cmw-float textarea,
.woocommerce-checkout form.checkout p.form-row.cmw-float select{padding-top:22px!important}
.woocommerce-checkout form.checkout p.form-row.cmw-float .select2-container .select2-selection{min-height:44px;padding-top:18px;padding-left:12px}
.woocommerce-checkout form.checkout p.form-row.cmw-float .select2-selection__rendered{line-height:24px;padding-left:0}
.woocommerce-checkout form.checkout p.form-row.cmw-float .select2-selection__arrow{height:44px;right:8px}
.woocommerce-checkout form.checkout p.form-row.cmw-float.is-active label,
.woocommerce-checkout form.checkout p.form-row.cmw-float.is-focus label{top:6px;left:10px;font-size:12px;color:#374151;background:#fff;padding:0 4px}
.woocommerce-checkout form.checkout p.form-row.cmw-float.woocommerce-invalid label{color:#b91c1c}
.woocommerce-checkout p.form-row.create-account label.woocommerce-form__label-for-checkbox{display:flex;align-items:center;gap:.5rem;position:static;margin:8px 0 12px;font-weight:600}
.woocommerce-checkout p.form-row.create-account input[type=checkbox]{margin:0;transform:none}

/* === Botón dinámico + estilos del botón ================================== */
#place_order,
.wc-block-components-checkout-place-order-button,
.wc-block-checkout__actions .components-button.is-primary{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;text-align:center}
.cmw-pp-icon{height:1em;width:auto;display:inline-block;vertical-align:middle;margin-left:.25rem}
.cmw-btn-dash{padding:0 .2rem}

.woocommerce-checkout #place_order{
  background:#111 !important;border:2px solid #111 !important;color:#fff !important;font-weight:800;text-align:center;line-height:1.1;padding:.9rem 1rem;border-radius:12px;box-shadow:none;width:100%;
}
.woocommerce-checkout #place_order:hover,
.woocommerce-checkout #place_order:focus{background:#e4c387 !important;border-color:#e4c387 !important;color:#111 !important;}
.woocommerce-checkout .processing #place_order,
.woocommerce-checkout #place_order[disabled]{opacity:.75; cursor:not-allowed;}

/* === Ocultar etiquetas de variaciones/opciones (checkout) ================= */
.woocommerce-checkout .wcpa_cart_meta_item_label,
.wc-block-components-order-summary .wcpa_cart_meta_item_label{display:none!important;}
.woocommerce-checkout dl.variation dt,
.wc-block-components-order-summary dl.variation dt{display:none!important;}

/* ===== FastPay (checkout) ===== */

/* Reserva por defecto (desktop) ≈ 2 botones */
:root{ --fastpay-reserve: 128px; }

/* Título */
.cmw-fastpay-title{
  font-size:26px; font-weight:800; line-height:1.1; margin-bottom:8px;
  text-align:center; color:#111; width:100%;
}
@media (max-width:540px){
  .cmw-fastpay-title{ font-size:22px; margin-bottom:8px; }
}

/* Cajón */
.cmw-fastpay-slot{
  margin:12px 0 18px; padding:12px;
  border:1px solid #e5e7eb; border-radius:12px; background:#fff;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  min-height:var(--fastpay-reserve); width:100%; transition:min-height .2s ease;
}
.cmw-fastpay-skel{ display:flex; align-items:center; gap:.6rem; font-weight:700; color:#111; }
.cmw-fastpay-slot .sk{ width:16px; height:16px; border:2px solid #e5e7eb; border-top-color:#111; border-radius:50%; animation:cmwspin .8s linear infinite; }
@keyframes cmwspin{ to{ transform:rotate(360deg);} }

/* Pila de botones */
.cmw-fastpay-stack{ display:flex; flex-direction:column; gap:10px; width:100%; align-items:center; }
.cmw-fastpay-stack > *{ display:flex; justify-content:center; width:100%; }
.cmw-fastpay-stack iframe{ display:block; }

/* Skeleton visible hasta ready */
.cmw-fastpay-slot .cmw-fastpay-skel{ display:flex !important; }
.cmw-fastpay-slot.ready .cmw-fastpay-skel,
.cmw-fastpay-slot.ready .sk{ display:none !important; }

/* Anti-CLS: reserva en el origen mientras “secuestramos” los PRB */
.cmw-fastpay-hijack #wcpay-payment-request-wrapper,
.cmw-fastpay-hijack .wcpay-payment-request-wrapper,
.cmw-fastpay-hijack .wcpay-payment-request-express-checkout,
.cmw-fastpay-hijack .wcpay-payment-request-button,
.cmw-fastpay-hijack #wc-stripe-express-checkout-element,
.cmw-fastpay-hijack .wc-stripe-payment-request-wrapper,
.cmw-fastpay-hijack .wc-stripe-payment-request-button,
.cmw-fastpay-hijack .woocommerce-gateway-stripe-payment-request-button,
.cmw-fastpay-hijack .wc-payment-request-wrapper,
.cmw-fastpay-hijack .wc-block-components-express-payment,
.cmw-fastpay-hijack .wc-block-components-express-checkout{
  opacity:0; pointer-events:none; min-height:56px;
}

/* Móvil: aumenta reserva (título + 2 botones + gap + paddings) */
@media (max-width:540px){
  :root{ --fastpay-reserve: 186px; } /* súbelo a 184px si notas micro-salto */
  .cmw-fastpay-hijack #wcpay-payment-request-wrapper,
  .cmw-fastpay-hijack .wcpay-payment-request-wrapper,
  .cmw-fastpay-hijack .wcpay-payment-request-express-checkout,
  .cmw-fastpay-hijack .wcpay-payment-request-button,
  .cmw-fastpay-hijack #wc-stripe-express-checkout-element,
  .cmw-fastpay-hijack .wc-stripe-payment-request-wrapper,
  .cmw-fastpay-hijack .wc-stripe-payment-request-button,
  .cmw-fastpay-hijack .woocommerce-gateway-stripe-payment-request-button,
  .cmw-fastpay-hijack .wc-payment-request-wrapper,
  .cmw-fastpay-hijack .wc-block-components-express-payment,
  .cmw-fastpay-hijack .wc-block-components-express-checkout{
    min-height:72px;
  }
}

/* Quita el separador “— O —” */
#wc-stripe-express-checkout-button-separator{ display:none !important; }

/* === Place Order: variante ultra-segura (solo CSS, sin tocar DOM) ======== */
#place_order,
.wc-block-components-checkout-place-order-button,
.wc-block-checkout__actions .components-button.is-primary{
  position: relative; /* para ::before/::after */
}

/* Pinta el total del pedido con la variable --cmw-order-total (inyectada por JS) */
#place_order::after,
.wc-block-components-checkout-place-order-button::after,
.wc-block-checkout__actions .components-button.is-primary::after{
  content: var(--cmw-order-total, "");
  margin-left: .5rem;
  font-weight: 700;
}

/* (Opcional) Logo PayPal por CSS cuando <html> tiene .cmw-gw--paypal */
/* Descomenta y pon tu ruta al SVG si quieres mostrar icono:
.cmw-gw--paypal #place_order::before,
.cmw-gw--paypal .wc-block-components-checkout-place-order-button::before,
.cmw-gw--paypal .wc-block-checkout__actions .components-button.is-primary::before{
  content: "";
  display: inline-block;
  width: 20px; height: 14px;
  margin-right: .35rem;
  background-image: url('/ruta/a/paypal.svg'); 
  background-size: contain;
  background-repeat: no-repeat;
} */
