/**
 * ======================================================
 * ARCHIVO: bono.css
 * UBICACIÓN: frontend/public/styles/
 * VERSIÓN: 5.2 — Modal detalle bono (imagen en marco)
 * ÚLTIMA ACTUALIZACIÓN: 2026-03-30 12:00
 *
 * 🎯 PROPÓSITO:
 * Estilos para componente de bonos (cliente + SuperAdmin).
 *
 * ======================================================
 * 📋 HISTORIAL DE CAMBIOS:
 * ------------------------------------------------------
 * [5.2] - 2026-03-30 12:00
 *    ✅ .bono-modal .bono-detalle: ancho e imagen hero acotada (object-fit)
 *
 * [5.1] - 2026-03-05 16:00
 *    ✅ bono-footer con position relative + z-index 3
 *    ✅ bono-acciones con flex para botones
 *
 * [5.0] - 2026-02-28 12:00
 *    ✅ Integrado + estadísticas + toolbars
 * ======================================================
 */

/* ================= GRID DE BONOS - 3 COLUMNAS ================= */
.bonos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 20px;
  margin-bottom: 30px;
}

/* Scroll infinito - loader al final */
.bonos-loader {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: #6b7280;
  font-size: 16px;
  background: transparent;
}

.bonos-end-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-style: italic;
  font-size: 14px;
}

/* ================= ESTADÍSTICAS - TARJETAS SUPERIORES ================= */
.bonos-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
  padding: 0 20px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 4px solid #3b82f6;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Decoración de fondo sutil */
.stat-card::after {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 60px;
  height: 60px;
  background: currentColor;
  opacity: 0.03;
  border-radius: 50%;
  pointer-events: none;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* Variantes de color por tipo de estadística */
.stat-card.stat-success {
  border-left-color: #10b981;
}
.stat-card.stat-success .stat-value {
  color: #059669;
}

.stat-card.stat-warning {
  border-left-color: #f59e0b;
}
.stat-card.stat-warning .stat-value {
  color: #d97706;
}

.stat-card.stat-info {
  border-left-color: #3b82f6;
}
.stat-card.stat-info .stat-value {
  color: #2563eb;
}

.stat-card.stat-purple {
  border-left-color: #8b5cf6;
}
.stat-card.stat-purple .stat-value {
  color: #7c3aed;
}

/* ================= TOOLBAR DE FILTROS ================= */
.bonos-toolbar {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin: 0 20px 24px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bonos-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}

.filtro-busqueda {
  flex: 2;
  min-width: 250px;
}

.filtro-busqueda input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 30px;
  font-size: 14px;
  transition: all 0.3s;
  background: #f9fafb;
}

.filtro-busqueda input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: white;
}

.filtro-estado,
.filtro-empresa {
  flex: 1;
  min-width: 160px;
}

.filtro-estado select,
.filtro-empresa select {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 30px;
  font-size: 14px;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.3s;
}

.filtro-estado select:focus,
.filtro-empresa select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: white;
}

/* Botón limpiar */
#btn-limpiar-filtros {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

#btn-limpiar-filtros:hover {
  background: #e5e7eb;
  color: #1f2937;
}

/* Botón crear bono */
#btn-create-bono {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

#btn-create-bono:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

#btn-create-bono:active {
  transform: translateY(0);
}

/* ================= TARJETA DE BONO BASE - FONDOS OSCUROS ================= */
.bono-card {
  position: relative;
  border-radius: 16px;
  padding: 20px;
  color: white;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.1);
}

.bono-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.2);
}

/* ================= GRADIENTES OSCUROS PARA CADA TIPO ================= */
.bono-card[data-tipo="default"] {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.bono-card[data-tipo="descuento"] {
  background: linear-gradient(135deg, #2d0a0a 0%, #4a1a1a 100%);
}

.bono-card[data-tipo="2x1"] {
  background: linear-gradient(135deg, #0a2d1a 0%, #1a4a2a 100%);
}

.bono-card[data-tipo="regalo"] {
  background: linear-gradient(135deg, #2d1a0a 0%, #4a2d1a 100%);
}

/* ================= ICONO DECORATIVO ================= */
.bono-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 48px;
  opacity: 0.15;
  transform: rotate(10deg);
  transition: transform 0.3s;
  pointer-events: none;
}

.bono-card:hover .bono-icon {
  transform: rotate(0deg) scale(1.1);
  opacity: 0.25;
}

/* ================= CONTENIDO DE LA TARJETA ================= */
.bono-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bono-titulo {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: white;
  line-height: 1.3;
  padding-right: 40px; /* Espacio para el icono */
}

.bono-descripcion {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
  opacity: 0.9;
  color: rgba(255,255,255,0.9);
  
  /* ⚠️ Línea subrayada en amarillo pero funcional */
  display: -webkit-box;
  -webkit-line-clamp: 2;  /* Límite a 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  
  /* Fallback para navegadores que no soportan line-clamp */
  max-height: 3em; /* Aproximadamente 2 líneas */
}

/* ================= EMPRESA ================= */
.bono-empresa {
  background: rgba(255,255,255,0.1);
  padding: 6px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  backdrop-filter: blur(5px);
  color: white;
  width: fit-content;
  border: 1px solid rgba(255,255,255,0.1);
}

.empresa-nombre {
  font-weight: 600;
  color: white;
}

/* ================= EXPIRACIÓN ================= */
.bono-expiracion {
  font-size: 0.85rem;
  margin-bottom: 15px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
}

.bono-expiracion.expirado {
  background: rgba(180, 40, 40, 0.3);
  border-color: rgba(255, 80, 80, 0.3);
}

.bono-expiracion.por-vencer {
  background: rgba(200, 120, 30, 0.3);
  border-color: rgba(255, 160, 60, 0.3);
}

/* ================= ETIQUETAS Y VALORES ================= */
.info-label {
  display: inline-block;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 6px;
}

.info-value {
  font-size: 13px;
  color: white;
  font-weight: 500;
}

/* ================= STOCK ================= */
.stock-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.stock-numbers {
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: rgba(0,0,0,0.2);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ================= BOTÓN REDIMIR ================= */
.btn-redimir {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
  margin-top: auto;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-redimir:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-redimir:active {
  transform: translateY(0);
}

/* ================= BOTÓN EXPIRADO ================= */
.btn-expirado {
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  backdrop-filter: blur(5px);
}

/* ================= FOOTER Y BOTONES (z-index para clicabilidad) ================= */
.bono-footer {
  position: relative;
  z-index: 3;
  margin-top: auto;
}

.bono-acciones {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bono-footer .btn-icon {
  cursor: pointer;
  flex-shrink: 0;
}

/* ================= EFECTO SHINE ================= */
.bono-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.bono-card:hover .bono-shine {
  opacity: 1;
}

/* ================= ESTADOS VACÍO Y ERROR ================= */
.bonos-empty,
.bonos-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  color: white;
}

.empty-icon,
.error-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 20px;
  opacity: 0.8;
}

/* ================= SPINNER ================= */
.spinner-small {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================= BOTONES DE ACCIÓN ================= */
.btn-promociones,
.btn-reintentar {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-promociones:hover,
.btn-reintentar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* ================= MODAL DE ÉXITO ================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
}

.modal-exito {
  text-align: center;
  padding: 30px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: color 0.3s;
}

.close-btn:hover {
  color: white;
}

.modal-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

/* ================= CÓDIGO EN MODAL ================= */
.codigo-container {
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.codigo-grande {
  font-size: 28px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 4px;
  color: #3b82f6;
  background: rgba(0,0,0,0.5);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 15px;
  word-break: break-all;
}

.btn-copiar {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-copiar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* ================= INFORMACIÓN EN MODAL ================= */
.modal-info {
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
}

.modal-info p {
  margin: 8px 0;
  color: rgba(255,255,255,0.9);
}

.btn-cerrar {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
}

.btn-cerrar:hover {
  background: rgba(255,255,255,0.2);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px) {
  .bonos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .bonos-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 10px;
  }
  
  .stat-value {
    font-size: 24px;
  }
  
  .stat-label {
    font-size: 11px;
  }
  
  .bonos-toolbar {
    flex-direction: column;
    align-items: stretch;
    margin: 0 10px 20px 10px;
    padding: 16px;
  }
  
  .bonos-filtros {
    flex-direction: column;
  }
  
  .filtro-busqueda,
  .filtro-estado,
  .filtro-empresa {
    width: 100%;
    min-width: auto;
  }
  
  #btn-create-bono {
    width: 100%;
  }
  
  .bonos-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 10px;
  }
  
  .bono-titulo {
    font-size: 1.2rem;
  }
  
  .bono-icon {
    font-size: 40px;
  }
  
  .codigo-grande {
    font-size: 20px;
    letter-spacing: 2px;
  }
  
  .modal-exito {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .bonos-stats {
    grid-template-columns: 1fr;
  }
}

/* ================= SECCIÓN BONOS INLINE (index.html) ================= */
.bonos-section-inline {
  padding: 30px 0 60px;
}

.bonos-section-inline .bonos-page-header {
  margin-bottom: 24px;
}

.bonos-section-inline .bonos-page-header h2 {
  font-size: 1.6rem;
  color: #111827;
  margin-bottom: 8px;
}

.bonos-section-inline .bonos-filters {
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex: 1 1 100%;
  margin-bottom: 8px;
}

.filter-tab {
  padding: 10px 20px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  background: #f3f4f6;
}

.filter-tab.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-color: transparent;
}

/* ================= PÁGINA BONOS (bonos.html) ================= */
.bonos-page-main {
  padding: 30px 0 60px;
  min-height: 60vh;
}

.bonos-page-header {
  margin-bottom: 28px;
  text-align: center;
}

.bonos-page-header h1 {
  font-size: 1.9rem;
  color: #111827;
  margin-bottom: 10px;
}

.bonos-page-subtitle {
  color: #6b7280;
  font-size: 0.95rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Filtros de la página bonos */
.bonos-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.bonos-filters .filter-group {
  flex: 1;
  min-width: 140px;
}

.bonos-filters .filter-input,
.bonos-filters .filter-select {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 30px;
  font-size: 14px;
  background: #f9fafb;
  transition: all 0.2s;
}

.bonos-filters .filter-input:focus,
.bonos-filters .filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
}

/* Grid 6 columnas - catálogo tipo impresoras */
.bonos-grid-container {
  margin-top: 20px;
}

.bonos-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  padding: 10px 0;
}

/* Tarjeta de bono - solo imagen, botón fuera */
.bono-card-catalog-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s ease;
}

.bono-card-catalog-wrapper:hover {
  transform: translateY(-4px);
}

/* Imagen del bono - sin texto, sin overlay */
.bono-card-catalog.bono-card-imagen {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 200px;
  aspect-ratio: 4/3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transition: box-shadow 0.3s ease;
}

.bono-card-catalog-wrapper:hover .bono-card-imagen {
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.bono-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Footer con botón fuera de la tarjeta */
.bono-card-footer-ext {
  display: flex;
  justify-content: center;
  padding: 0 8px 4px;
}

/* Botón Redimir más pequeño, fuera de la tarjeta */
.btn-redimir-small {
  padding: 8px 16px !important;
  font-size: 0.9rem !important;
  font-weight: 600;
}

/* Badge "Usado" en esquina de tarjeta usada */
.bono-card-imagen .bono-usado-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.95);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.bono-card-usado .bono-card-imagen {
  opacity: 0.9;
}

/* Loading y empty */
.loading-indicator {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 50px;
  color: #6b7280;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.bonos-empty .bonos-empty-msg {
  text-align: center;
  padding: 50px 20px;
  color: #6b7280;
}

.bonos-empty .empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.bonos-empty .bonos-empty-msg h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: #374151;
}

.bonos-empty .bonos-empty-msg p {
  font-size: 0.95rem;
}

/* Modal redimir - especificaciones y descargar */
.modal-redimir .modal-content {
  padding: 0;
  text-align: left;
  overflow: hidden;
  max-width: 560px;
}

.modal-redimir .modal-redimir-body {
  display: flex;
  gap: 0;
  min-height: 280px;
}

.modal-redimir .modal-redimir-img {
  flex: 0 0 200px;
  min-width: 160px;
  background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-redimir .modal-redimir-img img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 8px;
}

.modal-redimir .modal-redimir-info {
  flex: 1;
  padding: 24px 48px 24px 28px;
  display: flex;
  flex-direction: column;
}

.modal-redimir .modal-redimir-badge {
  display: inline-block;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  width: fit-content;
}

.modal-redimir h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.modal-redimir .modal-redimir-empresa {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
}

.modal-redimir .modal-desc {
  margin: 14px 0;
}

.modal-redimir .modal-desc p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.modal-redimir .modal-terminos {
  margin: 16px 0 22px;
}

.modal-redimir .terminos-box {
  margin-top: 8px;
  padding: 14px;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  max-height: 140px;
  overflow-y: auto;
}

.modal-redimir .modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
}

@media (max-width: 580px) {
  .modal-redimir .modal-redimir-body {
    flex-direction: column;
  }
  .modal-redimir .modal-redimir-img {
    flex: 0 0 auto;
    min-height: 140px;
  }
}

/* Responsive grid 6 → 4 → 2 → 1 */
@media (max-width: 1200px) {
  .bonos-grid-6 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .bonos-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .bonos-grid-6 {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .bono-card-catalog.bono-card-imagen {
    min-height: 180px;
  }
}

@media (max-width: 400px) {
  .bonos-grid-6 {
    grid-template-columns: 1fr;
  }
}

/* ================= MODAL DETALLE BONO (panel admin / superadmin) =================
   Imagen acotada al marco del modal; no desborda ni fuerza scroll horizontal.
   ====================================================== */
.modal.bono-modal .modal-content.bono-detalle {
  max-width: min(92vw, 560px);
  padding: 20px 22px 24px;
  padding-top: 48px;
}

.modal.bono-modal .bono-detalle .detalle-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal.bono-modal .bono-detalle .detalle-header h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.35;
  flex: 1 1 200px;
  word-break: break-word;
}

.modal.bono-modal .bono-detalle .detalle-imagen.detalle-imagen--hero {
  width: 100%;
  margin: 0 0 18px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: min(42vh, 320px);
}

.modal.bono-modal .bono-detalle .detalle-imagen.detalle-imagen--hero img {
  display: block;
  max-width: 100%;
  max-height: min(42vh, 320px);
  width: auto;
  height: auto;
  object-fit: contain;
}