/* ══════════════════════════════════════════════════════
   WC Lista de Precios por Pago — Frontend CSS v2.1
   Diseño compacto tipo "chip" — no rompe grillas
   ══════════════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────────────── */
.wcpp-wrap {
  --ink:    #1a202c;
  --line:   #e8ecf0;
  --bg:     #f7f9fb;
  --blue:   #2563eb;
  --bluel:  #dbeafe;
  --green:  #16a34a;
  --greenl: #dcfce7;
  --amber:  #b45309;
  --rad:    6px;
}

/* ── Wrapper ─────────────────────────────────── */
.wcpp-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 10px 0 6px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.3;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: var(--bg);
  overflow: hidden;
}

/* ── Título ──────────────────────────────────── */
.wcpp-title {
  display: block;
  padding: 5px 10px;
  background: #1a202c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.wcpp-title strong { font-weight: 800; }

/* ── Lista ───────────────────────────────────── */
.wcpp-list { display: flex; flex-direction: column; }

/* ── Ítem ────────────────────────────────────── */
.wcpp-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 6px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  transition: background .1s;
  box-sizing: border-box;
  width: 100%;
}
.wcpp-item:last-child  { border-bottom: none; }
.wcpp-item:hover       { background: #fff; }

.wcpp-item__icon  { font-size: 13px; line-height: 1; flex-shrink: 0; }

.wcpp-item__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
}

/* Precio empuja a la derecha */
.wcpp-item__price {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  justify-content: flex-end;
}

/* ── Precios ─────────────────────────────────── */
.wcpp-price-main {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}
.wcpp-price--green { color: var(--green); }

.wcpp-price-old {
  font-size: 11px;
  color: #a0aec0;
  text-decoration: line-through;
  font-weight: 400;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

/* ── Tags ────────────────────────────────────── */
.wcpp-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  line-height: 1.7;
}
.wcpp-tag--blue   { background: var(--blue);  color: #fff; }
.wcpp-tag--green  { background: var(--green); color: #fff; }
.wcpp-tag--amber  { background: var(--amber); color: #fff; }

/* ── Loop (más compacto) ─────────────────────── */
.wcpp--loop .wcpp-title   { font-size: 10px; padding: 4px 8px; }
.wcpp--loop .wcpp-item    { padding: 5px 8px; gap: 2px 5px; }
.wcpp--loop .wcpp-item__icon  { font-size: 11px; }
.wcpp--loop .wcpp-item__label { font-size: 11px; }
.wcpp--loop .wcpp-price-main  { font-size: 11.5px; }
.wcpp--loop .wcpp-price-old   { font-size: 10px; }
.wcpp--loop .wcpp-tag         { font-size: 9px; padding: 1px 5px; }

/* ── Ítem activo (checkout) ──────────────────── */
.wcpp-item--active {
  background: #fff !important;
  border-left: 3px solid var(--blue);
  padding-left: 7px !important;
}
.wcpp-item--active .wcpp-price-main { color: var(--blue); }

/* ═══════════════════════════════════════════════
   CHECKOUT — badge en labels de gateway
═══════════════════════════════════════════════ */
.payment_methods li label .wcpp-gw-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 8px 14px;
  background: var(--blue, #2563eb);
  color: #fff;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}

/* ═══════════════════════════════════════════════
   CHECKOUT — banner de ahorro
═══════════════════════════════════════════════ */
#wcpp-checkout-banner {
  display: none;
  margin: 10px 0 14px;
  border-radius: 8px;
  overflow: hidden;
}

@keyframes wcpp-in {
  from { opacity:0; transform:translateY(-5px); }
  to   { opacity:1; transform:none; }
}

.wcpp-banner__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  animation: wcpp-in .3s ease;
}

.wcpp-banner--saving {
  background: #dcfce7;
  border: 1px solid #86efac;
}
.wcpp-banner--installments {
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.wcpp-banner__icon  { font-size: 26px; flex-shrink: 0; }
.wcpp-banner__text  { display: flex; flex-direction: column; gap: 2px; }
.wcpp-banner__title { font-size: 22px; font-weight: 800; color: #14532d; line-height: 1.08; }
.wcpp-banner--installments .wcpp-banner__title { color: #1e3a8a; }
.wcpp-banner__sub   { font-size: 15px; font-weight: 600; color: #166534; line-height: 1.18; }
.wcpp-banner--installments .wcpp-banner__sub { color: #1d4ed8; }

/* ═══════════════════════════════════════════════════════
   ALINEACIÓN DE TARJETAS EN EL LOOP DE PRODUCTOS
   Hace que todas las cards tengan la misma altura y el
   botón "Añadir al carrito" quede siempre al fondo.
═══════════════════════════════════════════════════════ */

/* Flexbox en cada tarjeta del loop */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
}

/* La imagen no crece */
.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce ul.products li.product a img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Si el wcpp-wrap queda dentro de un <a> (según el tema), forzar block para que tome el 100% de ancho */
.woocommerce ul.products li.product a:has(.wcpp-wrap) {
    display: block !important;
    width: 100% !important;
}

/* Cualquier div ancestro del wcpp-wrap dentro de la card debe ocupar el 100% de ancho
   (cubre divs del tema como .animated-meta, .product-loop-meta, etc.) */
.woocommerce ul.products li.product div:has(> .wcpp-wrap),
.woocommerce ul.products li.product div:has(> .wcpp--loop) {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* El bloque de precios/tabla ocupa el espacio disponible → empuja el botón abajo */
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .wcpp-wrap {
    flex-grow: 1;
}

/* La tabla de medios de pago NO crece (solo el hueco arriba de ella)
   min-height = header (29px) + 3 filas × 34px = ~131px
   Ajustá este valor si tenés más o menos filas en la mayoría de productos */
.woocommerce ul.products li.product .wcpp-wrap {
    flex-grow: 0;
    margin-top: auto;
    min-height: 131px; /* garantiza espacio para 3 filas de medios de pago */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* las filas se pegan abajo dentro del bloque */
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

/* El precio crece para empujar la tabla hacia abajo */
.woocommerce ul.products li.product .price {
    flex-grow: 1;
    align-self: flex-start;
    width: 100%;
}

/* Botón siempre al fondo */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .product_type_simple {
    margin-top: 12px !important;
    align-self: stretch;
}

/* ── Título de producto: altura uniforme (1 o 2 líneas) ── */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
    /* 2 líneas de texto × line-height ~1.4 = ~2.8em */
    min-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;       /* máximo 2 líneas visibles */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════
   AVISO PRODUCTOS EXCLUIDOS
   Usa las clases .seta-aviso .seta-excluido y .seta-tip
   definidas en el plugin Seta – Envío Gratis.
   Si ese plugin no está activo, estas reglas de respaldo
   garantizan que el aviso igual se vea correctamente.
═══════════════════════════════════════════════ */
.seta-aviso {
    margin: 12px 0 6px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
}
.seta-excluido { background: #fdecea; border-color: #f5c6c6; color: #721c24; }
.seta-tip { display: block; margin-top: 5px; font-size: 12.5px; opacity: .9; }


@media (max-width: 767px) {
  .payment_methods li label .wcpp-gw-badge {
    font-size: 16px;
    padding: 7px 12px;
  }

  .wcpp-banner__inner {
    gap: 12px;
    padding: 12px 14px;
  }

  .wcpp-banner__icon {
    font-size: 22px;
  }

  .wcpp-banner__title {
    font-size: 19px;
  }

  .wcpp-banner__sub {
    font-size: 14px;
  }
}
