/*
 * loyaltyeditpoints 1.2.32
 * CHANGED: Ajustes de UI y layout para página de canje.
 */

.lep-redeem-container {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.lep-redeem-banner {
  margin-bottom: 1rem;
}

.lep-redeem-banner-img {
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

/* Guest lead */
.lep-redeem-guest-lead {
  margin: 0.75rem 0 1.25rem;
}

/* Products grid: cards alineadas y CTA al fondo */

/*
 * CHANGED 1.2.31:
 * En tu theme hay reglas agresivas (por ejemplo en .product-miniature) que rompen layouts.
 * Para que /punto sea 100% estable, usamos un layout propio con FLEX + WRAP y especificidad alta,
 * evitando depender de CSS Grid y evitando que el theme/módulos lo pisen.
 */
.lep-redeem-page .lep-products-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch;
  justify-content: flex-start;
  margin-left: -15px;  /* alineación con .row del theme */
  margin-right: -15px;
}

.lep-redeem-page .lep-product-col {
  display: flex;
  padding-left: 15px;
  padding-right: 15px;
  margin-bottom: 30px;
  flex: 0 0 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

@media (min-width: 576px) {
  .lep-redeem-page .lep-product-col {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

@media (min-width: 768px) {
  .lep-redeem-page .lep-product-col {
    flex: 0 0 33.3333% !important;
    max-width: 33.3333% !important;
  }
}

@media (min-width: 992px) {
  .lep-redeem-page .lep-product-col {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}

/* CHANGED 1.2.29: estilo de tarjeta similar a los listados del sitio (cajón con sombra, centro y ancho consistente). */
.lep-redeem-card {
  width: 100%;
  /* CHANGED 1.2.30: en grilla, la card debe ocupar el ancho de la columna (como en listados). */
  max-width: 100%;
  margin: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  background: #ffffff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Thumb: forzar área cuadrada para que la imagen y el botón tengan el mismo ancho visual. */
.lep-redeem-thumb {
  display: block;
  width: 100% !important;
}

.lep-redeem-thumb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.lep-redeem-thumb img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.lep-redeem-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
  margin-top: 0.75rem;
}

/*
 * CHANGED 1.2.28:
 * - forzar 2 renglones SIEMPRE (aunque el nombre sea corto) para que todas las cards tengan mismo alto.
 * - subir especificidad para ganar a CSS del theme.
 */
.lep-redeem-page .lep-redeem-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3em;
  height: 2.6em !important; /* 2 líneas */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lep-redeem-page .lep-redeem-title a {
  display: block;
}

.lep-redeem-meta {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.lep-redeem-meta-row {
  display: flex;
  justify-content: center !important;
  gap: 0.5rem;
}

.lep-redeem-actions {
  margin-top: auto;
  padding-top: 0.75rem;
  width: 100%;
}

.lep-redeem-actions .btn {
  width: 100%;
  min-height: 44px; /* CHANGED 1.2.29: altura consistente de CTA (alineación visual). */
}


/* Badge flotante de saldo */
.lep-floating-balance {
  position: fixed;
  right: 16px;
  /* CHANGED 1.2.26: subimos el botón para evitar superposición con widgets flotantes (ej. WhatsApp / chat). */
  bottom: 84px;
  /* CHANGED 1.2.26: aseguramos que quede por encima de cualquier widget del FO. */
  z-index: 2147483647;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* CHANGED 1.2.27: bloquear UI de cantidad/agregar (Carrito Rápido Pro / MegaMinQuantity u otros) en la página de canje. */
.lep-redeem-page .bootstrap-touchspin,
.lep-redeem-page [class*='touchspin'],
.lep-redeem-page .product-quantity,
.lep-redeem-page .quantity,
.lep-redeem-page input[type='number'],
.lep-redeem-page input[name='qty'],
.lep-redeem-page input[name='quantity'],
.lep-redeem-page .add-to-cart,
.lep-redeem-page [data-button-action='add-to-cart'],
.lep-redeem-page .product-add-to-cart,
.lep-redeem-page [class*='carritorapido'],
.lep-redeem-page [class*='carrito-rapido'],
.lep-redeem-page [class*='carrito_rapido'],
.lep-redeem-page [class*='megaminquantity'],
.lep-redeem-page [class*='megaMinquantity'] {
  display: none !important;
}

@media (max-width: 576px) {
  .lep-floating-balance {
    right: 12px;
    /* CHANGED 1.2.26: mantener separación en mobile (evita superposición con botones del theme/widgets). */
    bottom: 96px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}
