* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #f3f4f6;
  color: #1f2937;
  min-height: 100vh;
}

/* 1. Franja Blanca Superior de Punta a Punta para el Banner */
.top-banner-strip {
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 6px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.top-banner-img {
  max-height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* 2. Header Rojo Superior */
.app-header {
  background-color: #e60000;
  color: #ffffff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Contenedor del nombre del cliente: separado del banner y del menú */
.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 14px 16px 10px 16px;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
}

/* Botón Volver en Header */
.btn-back {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  position: absolute;
  left: 16px;
  line-height: 1;
}

/* Menú horizontal deslizable en la cabecera */
.promo-nav {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 8px;
  padding: 0 12px 12px 12px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  max-width: 600px;
  margin: 0 auto;
}

.promo-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.nav-tab {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nav-tab.active {
  background-color: #ffffff;
  color: #e60000;
  border-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.18);
}

/* 3. Contenedor Principal */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 12px;
}

/* Título de la acción seleccionada */
.section-badge-container {
  text-align: center;
  margin: 6px 0 12px 0;
}

.section-action-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #b30000;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Grid de Promociones */
.promos-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Tarjeta Principal */
.promo-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: relative;
  padding: 16px 16px 14px 16px;
  overflow: hidden;
}

/* Título de la Promoción: libre de margen a margen para textos largos */
.promo-title {
  color: #e60000;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  padding: 0 4px;
}

/* Franja de Vigencia en Tarjeta de Combo */
.promo-validity-badge {
  background: #fff8e6;
  border: 1px solid #f6c343;
  border-radius: 4px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #7d5a00;
  margin: 0 0 10px 0;
  text-align: center;
}

.promo-validity-badge strong {
  color: #b32d00;
  font-weight: 800;
}

.promo-validity-badge .icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* Fila intermedia que alinea el descuento con el bloque de precios */
.promo-middle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px 0;
}

/* Badge Circular de Descuento (Amarillo) - Más grande y destacado */
.badge-discount {
  position: static;
  width: 82px;
  height: 82px;
  min-width: 82px;
  background-color: #ffe600;
  color: #d60000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.45rem;
  letter-spacing: -0.5px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18);
  margin-left: 8px;
  flex-shrink: 0;
}

/* Sección de Precios (Alineada a la derecha) */
.price-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0;
}

.price-list-label {
  font-size: 0.85rem;
  color: #374151;
}

.price-list-value {
  font-size: 0.95rem;
  text-decoration: line-through;
  color: #111827;
  font-weight: 700;
  margin-bottom: 4px;
}

/* Bloque Rojo/Amarillo de Promoción y Ahorro */
.price-box {
  width: 170px;
  text-align: center;
  border: 1px solid #e60000;
}

.price-box-promo {
  background-color: #e60000;
  color: #ffffff;
  padding: 6px 4px;
}

.price-box-promo .label {
  font-size: 0.72rem;
  font-weight: 600;
  display: block;
}

.price-box-promo .value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.price-box-saving {
  background-color: #ffe600;
  color: #d60000;
  padding: 4px 2px;
}

.price-box-saving .label {
  font-size: 0.72rem;
  font-weight: 800;
  display: block;
}

.price-box-saving .value {
  font-size: 0.95rem;
  font-weight: 800;
}

/* Metadata de producto y límites */
.promo-meta {
  text-align: center;
  margin: 10px 0;
}

.promo-code {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.promo-limit {
  font-size: 0.85rem;
  color: #374151;
}

/* Botón Rojo "VER DETALLE" */
.btn-detail {
  display: block;
  width: 100%;
  background-color: #e60000;
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 0;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 8px;
}

.btn-detail:active {
  background-color: #cc0000;
}

/* Mensaje sin combos */
.card-empty {
  background: #fff;
  padding: 24px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Card de Detalle */
.detail-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.detail-promo-title {
  color: #e60000;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.detail-header-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-right: 8px;
}

.detail-qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.detail-qr-code {
  width: 90px;
  height: 90px;
}

.detail-qr-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
  margin-top: 4px;
}

.detail-discount-box {
  background-color: #ffe600;
  color: #e60000;
  width: 100px;
  padding: 12px 6px;
  text-align: center;
  border-radius: 2px;
}

.detail-discount-box .percent {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.detail-discount-box .label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Lista de ítems desglosados */
.detail-items-list {
  border-top: 1px solid #e5e7eb;
}

.detail-item-row {
  padding: 14px 4px;
  border-bottom: 1px solid #f3f4f6;
}

.detail-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.detail-item-meta {
  font-size: 0.85rem;
  color: #4b5563;
  margin-bottom: 2px;
}

.detail-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 2px;
}

.detail-item-unit-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e60000;
}

/* Contenedor de Promociones OLA */
.ola-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

/* Badge destacado de vigencia */
.ola-validity-card {
  background: #fff8e6;
  border: 1px solid #f6c343;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7d5a00;
  font-size: 0.9rem;
}

.ola-validity-card .validity-dates {
  font-weight: 800;
  color: #b32d00;
}

/* Tarjetas de escalones / tiers */
.ola-tier-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #e60000;
  border-radius: 6px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ola-tier-info {
  flex: 1;
}

.ola-tier-threshold {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 3px;
}

.ola-tier-cap {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
}

.ola-tier-cap.with-limit {
  color: #b45309;
  font-weight: 700;
}

/* Badge de porcentaje de descuento */
.ola-tier-badge {
  background: #e60000;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  min-width: 65px;
}

.ola-tier-badge .percent {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.ola-tier-badge .label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Contenedor de Referencias */
.ref-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.ref-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Barra y métricas de avance */
.ref-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.ref-progress-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ref-progress-values {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
}

.ref-progress-values span {
  color: #e60000;
}

.ref-progress-bar-bg {
  width: 100%;
  height: 10px;
  background-color: #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 16px;
}

.ref-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4d4d, #e60000);
  border-radius: 5px;
}

/* Grilla de importes */
.ref-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.ref-stat-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 10px;
  text-align: center;
}

.ref-stat-box.highlight {
  background: #fff5f5;
  border-color: #fecaca;
}

.ref-stat-label {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.ref-stat-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f2937;
}

.ref-stat-box.highlight .ref-stat-val {
  color: #e60000;
}