/* Estilos generales tabla */
table {
    width: 100%;
    margin: 0 auto;
    border-collapse: collapse;
    margin-bottom: 8rem !important;
}

/* NUEVO estilo para thead.sticky */
table thead.sticky {
    position: fixed;
    top: 73px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* Estilo de fondo en cada th del encabezado */
table thead th {
    background-color: #3270af;
    color: #ffffff;
    padding: 10px;
    font-size: 1.7rem;
    z-index: 20;
}

/* Body gris claro y letras negras */
table tbody td {
    color: #222222; /* Texto negro más legible */
    padding: 8px;
}

/* Tabla striped (filas intercaladas) */
table tbody tr:nth-child(even) td {
    background-color: #ffffff; /* filas blancas */
}

table tbody tr:nth-child(odd) td {
    background-color: #f8f9fa; /* filas gris claro */
}

/* Mantener colores especiales en filas con colspan (títulos de sección) */
table tbody tr td[colspan="5"] {
    background-color: #e0e0e0 !important; /* gris más oscuro para títulos */
    color: #222222;
}

/* Asegurar visibilidad correcta al flotar */
table tbody tr.floating td {
    background-color: #ffffff !important;
}


/* Estilos para botones */
.btn {
    background-color: #3270af; /* Rojo */
    color: #ffffff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    font-weight: bold;
    font-size: 1.7rem;
}

.btn:hover {
    background-color: #599de3;
    color: #ffffff;
}

/* Footer fijo */
table tbody tr.floating {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    z-index: 999;
    box-shadow: 0 -3px 6px rgba(0,0,0,0.3);
}

/* Asegura que las celdas mantengan bordes y paddings originales */
table thead tr.sticky th,
table tbody tr.floating td {
    padding: 8px;
    box-sizing: border-box;
}

table tbody {
    border-right: solid 1px #ccc;
    border-left: solid 1px #ccc;
}

/* ====== Toggle: desktop tabla / mobile cards ====== */
.mobile-cards { display: none; }

@media (max-width: 768px) {
  .container-fluid table, .container table { display: none; }
  .mobile-cards { display: block; }
}

/* ====== Card ====== */
.mobile-card{
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin: 0 12px 14px;
}

/* Header rojo estilo “tabla mobile” */
.mobile-head{
  background: #3270af; /* rojo tipo bootstrap danger */
  color: #fff !important;
}

.mobile-head-row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  border-top: 1px solid rgba(255,255,255,.25);
}
.mobile-head-row:first-child{ border-top: 0; }

.mobile-head-label{
  font-weight: 700;
  font-size: 16px;
  color: #fff !important;
}

.mobile-head-value{
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
  color: #fff !important;
}

/* Body */
.mobile-body{
  padding: 14px;
}

.mobile-benefit-text{
  font-size: 13px;
  line-height: 1.35;
  color: #111;
}

.mobile-benefit-text strong{
  font-weight: 800;
}

.mobile-actions{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

/* Botón comprar rojo como tu 3ra imagen */
.mobile-btn{
  display: inline-block;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
  flex: 1;
  background: #3270af;
  color: #fff;
}

/* Ver más simple */
.mobile-more{
  background: transparent;
  border: 0;
  padding: 12px 10px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  color: #111;
  flex: 1;
}

/* Panel oculto (ver más) */
.mobile-hidden{ display:none; }

.mobile-row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed #eee;
  align-items: flex-start; /* para que si hace wrap no quede raro */
}
.mobile-row__label{
  font-size: 13px;
  flex: 0 0 55%;
  max-width: 55%;
}
.mobile-row__value{
  font-size: 13px;
  font-weight: 800;
  white-space: normal;      /* antes estaba nowrap */
  overflow-wrap: anywhere;  /* corta palabras muy largas si hace falta */
  word-break: break-word;   /* fallback */
  text-align: right;
  flex: 0 0 45%;            /* reserva espacio fijo */
  max-width: 45%;
  padding-right: 10px;
}

.mobile-group-title{
  margin-top: 14px;
  font-size: 12px;
  font-weight: 900;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.mobile-group-title{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 12px;
  font-weight: 900;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .03em;
}
