/* Estilos aislados para WooCommerce: referencias en blanco, gris y rojo. */
.mcfw-root, .mcfw-modal, .mcfw-trigger-slot { --mcfw-red: #ed1e32; --mcfw-red-dark: #c91428; --mcfw-border: #e6e6e9; --mcfw-muted: #777b83; --mcfw-ink: #22252b; font-family: inherit; }
.mcfw-root *, .mcfw-modal *, .mcfw-trigger-slot * { box-sizing: border-box; }
.mcfw-root { clear: both; width: 100%; margin: 25px auto 30px; color: var(--mcfw-ink); text-align: left; font-size: 14px; }
.mcfw-root h3, .mcfw-modal h3, .mcfw-modal h2 { padding: 0; margin: 0; font-family: inherit; color: #23252b; letter-spacing: normal; text-transform: none; }
.mcfw-pending { color: #91959d; }
.mcfw-topbar { display: flex; align-items: stretch; border: 1px solid var(--mcfw-border); border-radius: 11px; background: #fff; box-shadow: 0 2px 10px rgba(15,22,35,.10); min-height: 82px; margin-bottom: 39px; overflow: hidden; }
.mcfw-topbar-intro { min-width: 243px; display: flex; align-items: center; gap: 15px; padding: 13px 21px; border-right: 1px solid #ececef; }
.mcfw-topbar-intro > svg { display: block; width: 24px; height: 24px; color: var(--mcfw-red); flex-shrink: 0; }
.mcfw-topbar-intro strong { display: block; font-size: 13px; line-height: 1.3; font-weight: 750; color: #202125; }
.mcfw-topbar-intro span { color: var(--mcfw-red); font-size: 11px; display: block; margin-top: 2px; line-height: 1.35; }
.mcfw-brands { flex: 1; display: flex; align-items: stretch; min-width: 0; }
.mcfw-brand { flex: 1 1 115px; display: flex; align-items: center; justify-content: center; padding: 12px 13px; min-width: 90px; position: relative; }
.mcfw-brand + .mcfw-brand::before { content: ''; width: 1px; height: 32px; left: 0; top: calc(50% - 16px); background: #f0f0f0; position: absolute; }
.mcfw-brand img { height: 43px; width: 120px; max-width: 100%; object-fit: contain; display: block; }
.mcfw-logo-text { font-size: 14px; font-weight: 800; color: #233762; text-align: center; line-height: 1.15; }
.mcfw-finance-head { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 14px; }
.mcfw-finance-head > svg { width: 27px; height: 27px; flex: none; color: var(--mcfw-red); margin-top: 1px; }
.mcfw-finance-head h3 { font-size: 16px; line-height: 1.3; font-weight: 780; margin: 0 !important; }
.mcfw-finance-head p { color: var(--mcfw-muted); font-size: 12px; line-height: 1.4; margin: 3px 0 0 !important; }
.mcfw-finance-grid { background: #fbfbfc; border: 1px solid #e5e5e8; border-radius: 11px; overflow: hidden; display: grid; grid-template-columns: minmax(220px, 30%) minmax(0, 1fr); box-shadow: 0 1px 8px rgba(0,0,0,.03); }
.mcfw-cheapest { background: #fff; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 17px 19px; border-right: 1px solid #e6e6e8; min-width: 0; }
.mcfw-from { color: #20232a; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.mcfw-cheapest-price { color: var(--mcfw-red); font-size: clamp(24px, 2.2vw, 31px); font-weight: 850; letter-spacing: -.035em; line-height: 1.2; white-space: nowrap; margin-top: 12px; }
.mcfw-cheapest-price span { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.mcfw-cheapest-detail { display: block; min-height: 18px; margin-top: 7px; font-size: 11px; color: #737781; }
.mcfw-cheapest-divider { width: 100%; border-top: 1px solid #eaeaec; margin-top: auto; padding-top: 23px; }
.mcfw-benefits { display: flex; justify-content: space-around; align-items: center; gap: 10px; width: 100%; }
.mcfw-benefits span { display: flex; align-items: center; gap: 3px; color: #7d818b; font-size: 10px; line-height: 1.1; }
.mcfw-benefits svg { color: var(--mcfw-red); width: 18px; height: 18px; flex: none; }
.mcfw-methods-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); min-width: 0; }
.mcfw-method-card { min-width: 0; padding: 16px 14px 20px; border-right: 1px solid #e5e5e8; background: #fafafb; }
.mcfw-method-card:last-child { border-right: none; }
.mcfw-method-heading { min-height: 53px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 3px; margin-bottom: 10px; }
.mcfw-method-logo { display: flex; align-items: center; height: 31px; max-width: 100%; }
.mcfw-method-logo img { width: 130px; height: 32px; max-width: 100%; object-fit: contain; object-position: left center; display: block; }
.mcfw-method-logo .mcfw-logo-text { font-size: 14px; color: var(--mcfw-red-dark); }
.mcfw-method-name { font-size: 10px; line-height: 1.2; color: #868993; font-weight: 500; }
.mcfw-plan-group + .mcfw-plan-group { margin-top: 13px; }
.mcfw-plan-type { font-size: 9px; font-weight: 800; letter-spacing: .04em; color: #646b77; line-height: 1.3; margin-bottom: 8px; }
.mcfw-plan-type--zero { color: var(--mcfw-red-dark); }
.mcfw-installment { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 6px; row-gap: 2px; padding: 10px 9px; border: 1px solid transparent; border-radius: 6px; background: #fff; min-height: 37px; margin-bottom: 6px; }
.mcfw-installment--best { border-color: var(--mcfw-red); }
.mcfw-months { font-size: 10px; font-weight: 750; color: #2b2f37; white-space: nowrap; }
.mcfw-installment strong { font-size: 12px; color: #1b222b; font-weight: 800; white-space: nowrap; margin-left: auto; }
.mcfw-installment--best strong { color: var(--mcfw-red); }
.mcfw-installment small { font-size: 9px; font-weight: 400; color: #717781; }
.mcfw-best-label { color: #fff; background: var(--mcfw-red); font-size: 8px; font-weight: 750; line-height: 1.3; padding: 4px 6px; border-radius: 12px; white-space: nowrap; }
.mcfw-disclaimer { margin: 12px 0 0 !important; font-size: 10px; color: #858994; line-height: 1.5; }
.mcfw-empty, .mcfw-no-methods { text-align: center; padding: 30px 20px; border-radius: 10px; border: 1px solid #e7e8eb; color: #777c85; background: #fafafa; font-size: 13px; }
.mcfw-no-methods { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 22px auto; }
.mcfw-no-methods svg { width: 32px; height: 32px; color: #b3b6bd; }
.mcfw-no-methods strong { color: #353943; }
.mcfw-no-methods p { margin: 0 !important; }
/* El botón de cuotas queda inmediatamente después del botón Añadir al carrito. */
.mcfw-trigger-slot { display: inline-flex; flex: 0 1 auto; align-items: center; vertical-align: middle; margin: 0 0 0 10px; max-width: 100%; }
.woocommerce .mcfw-trigger-slot .mcfw-open-btn,
.mcfw-trigger-slot .mcfw-open-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  max-width: 100%;
  min-height: var(--mcfw-cart-height, 30px);
  margin: 0 !important;
  padding: var(--mcfw-cart-padding, 9px 16px) !important;
  color: var(--mcfw-cart-color, #fff) !important;
  background-color: var(--mcfw-cart-bg, #a20d0d) !important;
  background-image: var(--mcfw-cart-bg-image, none) !important;
  border: var(--mcfw-cart-border, 1px solid transparent) !important;
  border-radius: var(--mcfw-cart-radius, 4px) !important;
  box-shadow: var(--mcfw-cart-shadow, none) !important;
  font-family: var(--mcfw-cart-family, inherit) !important;
  font-size: var(--mcfw-cart-size, 13px) !important;
  font-weight: var(--mcfw-cart-weight, 700) !important;
  line-height: var(--mcfw-cart-line-height, 1.5) !important;
  letter-spacing: var(--mcfw-cart-letter-spacing, normal) !important;
  text-transform: var(--mcfw-cart-text-transform, none) !important;
  white-space: normal;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: filter .15s ease;
}
.woocommerce .mcfw-trigger-slot .mcfw-open-btn:hover,
.mcfw-trigger-slot .mcfw-open-btn:hover { filter: brightness(.90); text-decoration: none !important; }
.mcfw-open-btn:focus-visible, .mcfw-modal-close:focus-visible { outline: 2px solid #d82136; outline-offset: 3px; }
@media (max-width: 480px) {
  .mcfw-trigger-slot { margin-top: 0; }
  .woocommerce .mcfw-trigger-slot .mcfw-open-btn,
  .mcfw-trigger-slot .mcfw-open-btn { padding-inline: 12px !important; }
}
.mcfw-modal[hidden] { display: none !important; }
.mcfw-modal { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 3vw, 32px); }
.mcfw-modal-backdrop { position: absolute; inset: 0; background: rgba(18,21,28,.68); backdrop-filter: blur(4px); }
.mcfw-modal-panel { z-index: 1; position: relative; display: flex; flex-direction: column; width: min(1120px, 100%); max-height: min(92vh, 900px); background: #fff; box-shadow: 0 25px 90px rgba(0,0,0,.25); border-radius: 14px; overflow: hidden; color: #242830; }
.mcfw-modal-heading-bar { background: #fff; padding: 21px 27px 15px; border-bottom: 1px solid #eef0f3; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mcfw-eyebrow { font-size: 9px; font-weight: 850; color: var(--mcfw-red); letter-spacing: .12em; }
.mcfw-modal-heading-bar h2 { font-size: 22px; font-weight: 800; line-height: 1.2; margin: 5px 0 0; }
.mcfw-modal-close { background: #f1f2f4; border: 0; cursor: pointer; border-radius: 50%; width: 38px; height: 38px; font-size: 26px; line-height: 38px; color: #3e434c; padding: 0; flex: none; }
.mcfw-modal-close:hover { background: #eaecef; }
.mcfw-modal-content { overflow-y: auto; padding: 24px 27px 28px; overscroll-behavior: contain; }
.mcfw-modal-content .mcfw-topbar { margin-bottom: 27px; }
.mcfw-modal-content .mcfw-cheapest-price { font-size: clamp(24px, 2.2vw, 31px); }
body.mcfw-modal-is-open { overflow: hidden !important; }
@media (max-width: 920px) {
  .mcfw-topbar { display: block; }
  .mcfw-topbar-intro { min-height: 58px; border-right: 0; border-bottom: 1px solid #eee; }
  .mcfw-brands { overflow-x: auto; justify-content: flex-start; }
  .mcfw-brand { flex: 0 0 115px; }
  .mcfw-finance-grid { grid-template-columns: minmax(195px, 32%) minmax(0, 1fr); }
  .mcfw-methods-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (max-width: 680px) {
  .mcfw-root { margin: 20px auto; }
  .mcfw-topbar { margin-bottom: 24px; border-radius: 9px; }
  .mcfw-finance-head h3 { font-size: 15px; }
  .mcfw-finance-grid { display: flex; flex-direction: column; }
  .mcfw-cheapest { padding: 20px 14px 17px; border-right: 0; border-bottom: 1px solid var(--mcfw-border); }
  .mcfw-cheapest-price { font-size: 29px; margin-top: 7px; }
  .mcfw-cheapest-divider { margin: 14px 0 0; padding-top: 12px; }
  .mcfw-benefits { justify-content: center; gap: 16px; }
  .mcfw-methods-grid { grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); }
  .mcfw-method-card { border-right: 0; border-bottom: 1px solid var(--mcfw-border); padding: 15px 17px; }
  .mcfw-method-heading { min-height: 42px; }
  .mcfw-modal { padding: 0; align-items: flex-end; }
  .mcfw-modal-panel { max-height: 96dvh; border-radius: 15px 15px 0 0; }
  .mcfw-modal-heading-bar { padding: 16px 17px 12px; }
  .mcfw-modal-heading-bar h2 { font-size: 19px; }
  .mcfw-modal-content { padding: 17px 14px 28px; }
  .mcfw-modal-content .mcfw-topbar { margin-bottom: 23px; }
}
@media (prefers-reduced-motion: reduce) { .mcfw-admin-plan-body { transition: none; } }

/* Los métodos de pago sin cuotas muestran solamente la franja de logos. */
.mcfw-root > .mcfw-topbar:last-child,
.mcfw-modal-content > .mcfw-topbar:last-child { margin-bottom: 0; }
.mcfw-payment-logo[hidden], .mcfw-logo-fallback[hidden] { display: none !important; }

/* Pago inmediato (SINPE Móvil, efectivo, transferencia) con precio asignado. */
.mcfw-cash-section { margin-bottom: 30px; }
.mcfw-cash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); gap: 12px; }
.mcfw-cash-card { background: #fff; border: 1px solid var(--mcfw-border); border-radius: 10px; box-shadow: 0 2px 9px rgba(15,22,35,.035); padding: 15px 17px; min-width: 0; }
.mcfw-cash-card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid #eceef1; padding-bottom: 11px; margin-bottom: 12px; }
.mcfw-cash-card-header .mcfw-payment-logo { object-fit: contain; object-position: left center; max-width: 135px; max-height: 38px; width: auto; height: auto; }
.mcfw-cash-name { font-size: 11px; font-weight: 650; color: #666e7a; text-align: right; overflow-wrap: anywhere; }
.mcfw-cash-price-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 4px 0; }
.mcfw-cash-price-row + .mcfw-cash-price-row { border-top: 1px solid #f0f0f1; margin-top: 10px; padding-top: 13px; }
.mcfw-cash-label { font-size: 10px; font-weight: 800; letter-spacing: .035em; color: #656b76; }
.mcfw-cash-price { display: block; font-size: clamp(20px, 2vw, 26px); font-weight: 850; letter-spacing: -.025em; color: var(--mcfw-red-dark); line-height: 1.35; }
.mcfw-cash-tag { color: #16885d; background: #effaf5; border: 1px solid #d5f1e2; border-radius: 4px; font-size: 9px; font-weight: 750; padding: 2px 5px; }
.mcfw-cash-muted { font-size: 10px; line-height: 1.4; color: var(--mcfw-muted); }
.mcfw-cash-wait { font-size: 11px; color: var(--mcfw-muted); padding: 7px 0; }
/* Descuento y cuotas pueden coexistir, sin alterar la grilla de financiamiento. */
.mcfw-cash-section + .mcfw-finance-head { margin-top: 8px; }
.mcfw-root > .mcfw-topbar:has(+ .mcfw-cash-section), .mcfw-modal-content > .mcfw-topbar:has(+ .mcfw-cash-section) { margin-bottom: 25px; }
@media (max-width: 640px) { .mcfw-cash-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); } }

.mcfw-cash-price-row--regular .mcfw-cash-price { color: #2b333d; }
