/* Integración dinámica posterior al diseño V11. No redefine la maqueta. */
/* Fase 5 — Mercado Pago y producción */
.woocommerce-checkout #payment .wc_payment_method[class*="payment_method_woo-mercado-pago"],
.woocommerce-checkout #payment .wc_payment_method[class*="payment_method_mercadopago"] {
  margin: 0 0 10px;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: #fff;
  padding: 14px 16px;
}
.woocommerce-checkout #payment .wc_payment_method[class*="payment_method_woo-mercado-pago"] > label,
.woocommerce-checkout #payment .wc_payment_method[class*="payment_method_mercadopago"] > label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  font-weight: 800;
}
.woocommerce-checkout #payment .wc_payment_method img {
  width: auto !important;
  max-width: 112px !important;
  max-height: 30px !important;
  object-fit: contain;
  margin-left: auto !important;
}
.woocommerce-checkout #payment .payment_box {
  margin: 12px 0 0 !important;
  border-radius: 13px !important;
  background: var(--color-ivory) !important;
  color: var(--color-ink) !important;
}
.woocommerce-checkout #payment .payment_box::before { border-bottom-color: var(--color-ivory) !important; }
.wc-block-checkout .wc-block-components-radio-control-accordion-option {
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}
.wc-block-components-button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
  min-height: 50px !important;
  border-radius: 999px !important;
  background: var(--color-ink) !important;
  color: #fff !important;
  font-weight: 800 !important;
}
.rf-order-confirmation-note {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid var(--color-line);
  border-left: 5px solid var(--color-brand);
  border-radius: 18px;
  background: #fff;
}
.rf-order-confirmation-note p { margin: 7px 0 0; color: var(--color-mute); }
@media (max-width: 768px) {
  .woocommerce-checkout #payment .wc_payment_method[class*="payment_method_woo-mercado-pago"],
  .woocommerce-checkout #payment .wc_payment_method[class*="payment_method_mercadopago"] { padding: 12px; }
  .woocommerce-checkout #payment .wc_payment_method img { max-width: 92px !important; }
}

/* Fase 6.1 — bloqueo visual V11.
 * Estas reglas no rediseñan: neutralizan únicamente estilos WooCommerce posteriores
 * que podían sobreescribir la maqueta congelada del CSS V11 original. */
.rf-filter-panel.rf-catalog-sidebar {
  position: sticky;
  top: 220px;
  align-self: start;
  border: 0;
  border-radius: 24px;
  background: var(--color-ink);
  color: #fff;
  padding: 1.4rem;
}
.rf-filter-panel.rf-catalog-sidebar .rf-filter-head { margin-bottom: 1.2rem; }
.rf-filter-panel.rf-catalog-sidebar .rf-filter-head .rf-icon-btn { display: none; }
.rf-filter-panel.rf-catalog-sidebar .rf-filter-group {
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.13);
  padding: 1rem 0;
}
.rf-filter-panel.rf-catalog-sidebar .rf-filter-group legend { margin: 0; padding: 0; }
.rf-filter-panel.rf-catalog-sidebar .rf-filter-option { color: rgba(255,255,255,.7); }
.rf-filter-panel.rf-catalog-sidebar .rf-check { border-color: rgba(255,255,255,.28); }
.rf-filter-panel.rf-catalog-sidebar .rf-check.active {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: var(--color-ink);
}
.rf-product-info .rf-product-title {
  margin-top: .8rem;
  font-size: clamp(2.8rem,4.5vw,5rem);
  line-height: .92;
}
.rf-product-info .rf-product-sku { margin-top: .75rem; }
.rf-product-price-detail {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  margin-top: 1.7rem;
}
.rf-product-price-detail .rf-single-price {
  font-family: var(--font-display);
  font-size: clamp(2rem,3vw,3rem);
}
.rf-product-cta {
  display: grid;
  gap: .65rem;
  margin-top: 1.5rem;
}
.rf-product-secondary-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .55rem;
}
.rf-variable-purchase { margin-top: 1.2rem; }
.rf-variable-purchase form.cart { margin: 0; }
.rf-gallery-slide {
  position: absolute;
  inset: 0;
  display: none;
  margin: 0;
}
.rf-gallery-slide.active,
.rf-gallery-slide.is-active {
  display: grid;
  place-items: center;
}
.rf-gallery-main-measures { background: var(--color-ink); }
.rf-gallery-measure-slide { padding: clamp(1rem,3vw,2rem); }
.rf-gallery-measure-slide .rf-measure-card { width: min(100%,620px); margin: 0; }

@media (max-width: 900px) {
  .rf-filter-panel.rf-catalog-sidebar {
    position: fixed;
    z-index: 120;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(92vw,410px);
    overflow-y: auto;
    border-radius: 0;
    background: var(--color-paper);
    color: var(--color-ink);
    transform: translateX(105%);
    transition: transform .3s ease;
  }
  .rf-filter-panel.rf-catalog-sidebar.is-open { transform: translateX(0); }
  .rf-filter-panel.rf-catalog-sidebar .rf-filter-head .rf-icon-btn { display: grid; }
  .rf-filter-panel.rf-catalog-sidebar .rf-filter-group { border-top-color: var(--color-line); }
  .rf-filter-panel.rf-catalog-sidebar .rf-filter-group legend { color: var(--color-ink); }
  .rf-filter-panel.rf-catalog-sidebar .rf-filter-option { color: var(--color-mute); }
  .rf-filter-panel.rf-catalog-sidebar .rf-check { border-color: var(--color-line); }
  .rf-filter-panel.rf-catalog-sidebar .btn-outline-light {
    border-color: var(--color-line);
    color: var(--color-ink);
  }
}

@media (max-width: 640px) {
  .rf-product-info .rf-product-title { font-size: clamp(2.8rem,15vw,5rem); }
  .rf-product-secondary-actions { grid-template-columns: 1fr auto auto; }
  .rf-gallery-measure-slide { padding: .75rem; }
}

/* Fase 6.1 — segunda pasada visual estricta contra V11. */
.rf-filter-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}
.rf-filter-toggle svg { transition: transform .2s ease; }
.rf-filter-toggle.is-collapsed svg { transform: rotate(-90deg); }
.rf-filter-backdrop { display: none; }
.rf-gallery-index { border: 0; cursor: pointer; }
.rf-gallery-index .js-rf-gallery-icon-image,
.rf-gallery-index .js-rf-gallery-icon-measure { display: inline-flex; }

@media (max-width: 900px) {
  .rf-filter-panel.rf-catalog-sidebar { display: block; }
  .rf-filter-backdrop {
    position: fixed;
    z-index: 119;
    inset: 0;
    display: block;
    pointer-events: none;
    opacity: 0;
    background: rgba(0,0,0,.55);
    transition: opacity .3s ease;
  }
  .rf-filter-backdrop.is-open { pointer-events: auto; opacity: 1; }
  .rf-filter-panel.rf-catalog-sidebar .rf-filter-head p,
  .rf-filter-panel.rf-catalog-sidebar .rf-filter-toggle span { color: var(--color-ink); }
  .rf-filter-panel.rf-catalog-sidebar .rf-filter-options .text-white\/55 { color: var(--color-mute); }
}
