/* ==========================================================================
   Anclademia Pricing Module - Modern Nautical Visual System
   Scoped CSS Classes: .ancla-pricing-* (Prevents conflicts with host site)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Master CSS Variables & Tokens */
:root {
  --ancla-navy-deep: #0b192c;
  --ancla-navy-medium: #1e3a5f;
  --ancla-cyan-primary: #00b4d8;
  --ancla-cyan-hover: #0096b4;
  --ancla-cyan-light: #e6f8fc;
  --ancla-emerald: #10b981;
  --ancla-emerald-light: #ecfdf5;
  --ancla-amber: #f59e0b;
  --ancla-amber-light: #fffbe completed;
  --ancla-slate-900: #0f172a;
  --ancla-slate-700: #334155;
  --ancla-slate-500: #64748b;
  --ancla-slate-300: #cbd5e1;
  --ancla-slate-100: #f1f5f9;
  --ancla-slate-50: #f8fafc;
  --ancla-white: #ffffff;
  
  --ancla-radius-lg: 20px;
  --ancla-radius-md: 14px;
  --ancla-radius-sm: 8px;

  --ancla-shadow-card: 0 12px 32px -8px rgba(11, 25, 44, 0.08), 0 4px 12px rgba(11, 25, 44, 0.03);
  --ancla-shadow-card-hover: 0 24px 48px -12px rgba(11, 25, 44, 0.16), 0 8px 20px rgba(0, 180, 216, 0.12);
  --ancla-shadow-btn: 0 4px 14px rgba(0, 180, 216, 0.35);

  --ancla-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset local */
.ancla-pricing-wrapper * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ancla-pricing-wrapper {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 16px 36px 16px;
  background: transparent;
  color: var(--ancla-slate-900);
  box-sizing: border-box;
}

/* Header opcional de sección */
.ancla-pricing-header {
  text-align: center;
  margin-bottom: 40px;
}

.ancla-pricing-tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ancla-cyan-light);
  color: var(--ancla-cyan-hover);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.ancla-pricing-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--ancla-navy-deep);
  letter-spacing: -0.5px;
}

@media (min-width: 768px) {
  .ancla-pricing-title { font-size: 40px; }
}

/* Grid de Cursos (Multicolumna Adaptable) */
.ancla-pricing-container {
  container-type: inline-size;
  width: 100%;
}

.ancla-pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}

/*
 * data-cols indica el máximo de columnas, no una cantidad rígida.
 * Así, una selección de 3 pasa automáticamente de 3 → 2 → 1 según
 * el ancho real del iframe donde se haya incrustado el widget.
 */
.ancla-pricing-grid-cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

@supports not (container-type: inline-size) {
  @media (min-width: 640px) {
    .ancla-pricing-grid:not(.ancla-pricing-grid-cols-1) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (min-width: 960px) {
    .ancla-pricing-grid:not(.ancla-pricing-grid-cols-1):not(.ancla-pricing-grid-cols-2) {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @media (min-width: 1280px) {
    .ancla-pricing-grid-cols-4 {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }
}

/*
 * En navegadores modernos manda el ancho real del widget, no el de la
 * ventana completa. Las media queries anteriores quedan como fallback.
 */
@supports (container-type: inline-size) {
  .ancla-pricing-wrapper {
    container-type: inline-size;
  }

  .ancla-pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  @container (min-width: 640px) {
    .ancla-pricing-grid:not(.ancla-pricing-grid-cols-1) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @container (min-width: 960px) {
    .ancla-pricing-grid:not(.ancla-pricing-grid-cols-1):not(.ancla-pricing-grid-cols-2) {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @container (min-width: 1280px) {
    .ancla-pricing-grid-cols-4 {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }
}

/* Tarjeta de Curso */
.ancla-card {
  background: var(--ancla-white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--ancla-radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--ancla-shadow-card);
  transition: var(--ancla-transition);
  position: relative;
  overflow: clip;
  box-sizing: border-box;
  height: 100%;
}

.ancla-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--ancla-shadow-card-hover);
  border-color: rgba(0, 180, 216, 0.3);
}

.ancla-card-featured,
.ancla-card-border-cyan {
  border: 2.5px solid #00b4d8 !important;
  box-shadow: 0 12px 32px rgba(0, 180, 216, 0.15) !important;
}

.ancla-card-featured::before,
.ancla-card-border-cyan::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #00b4d8, #0077b6);
}

.ancla-card-border-fire {
  border: 2.5px solid #f97316 !important;
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.15) !important;
}
.ancla-card-border-fire::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.ancla-card-border-gold {
  border: 2.5px solid #f59e0b !important;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.15) !important;
}
.ancla-card-border-gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.ancla-card-border-purple {
  border: 2.5px solid #8b5cf6 !important;
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.15) !important;
}
.ancla-card-border-purple::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}

.ancla-card-border-navy {
  border: 2.5px solid #0b192c !important;
  box-shadow: 0 12px 32px rgba(11, 25, 44, 0.15) !important;
}
.ancla-card-border-navy::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #0b192c, #1e293b);
}

.ancla-card-border-soft {
  border: 1px solid #cbd5e1 !important;
  box-shadow: var(--ancla-shadow-card) !important;
}
.ancla-card-border-soft::before {
  display: none !important;
}

/* Header de la tarjeta */
.ancla-card-header {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.ancla-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 12px;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
  background: var(--ancla-slate-100);
  color: var(--ancla-navy-medium);
  align-self: flex-start;
}

.ancla-badge-popular,
.ancla-badge-navy {
  background: #0b192c !important;
  color: #ffffff !important;
}

.ancla-badge-fire {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.ancla-badge-cyan {
  background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.35);
}

.ancla-badge-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.ancla-badge-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.ancla-badge-soft {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0;
}

.ancla-card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ancla-navy-deep);
  line-height: 1.3;
  margin-bottom: 4px;
}

.ancla-card-description {
  font-size: 13.5px;
  color: var(--ancla-slate-700);
  line-height: 1.5;
  margin-top: 6px;
  margin-bottom: 0;
}

/* La altura se iguala dinámicamente por fila, usando solo el contenido real. */
.ancla-features-list {
  list-style: none;
  margin: 16px 0 20px;
  padding: 0 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.ancla-features-list::-webkit-scrollbar {
  width: 4px;
}
.ancla-features-list::-webkit-scrollbar-thumb {
  background: rgba(0, 180, 216, 0.3);
  border-radius: 4px;
}
.ancla-features-list::-webkit-scrollbar-track {
  background: transparent;
}

.ancla-modality-section {
  height: 135px;
  min-height: 135px;
  margin-bottom: 18px;
}

.ancla-extras-section {
  height: 85px;
  min-height: 85px;
  margin-bottom: 18px;
}

.ancla-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ancla-slate-700);
  line-height: 1.45;
}

.ancla-feature-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ancla-emerald-light);
  color: var(--ancla-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.ancla-feature-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

/* Bloque de Especificaciones Náuticas (Eslora y Millas) */
.ancla-specs-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: var(--ancla-slate-50);
  border: 1px solid var(--ancla-slate-300);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.ancla-spec-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 2px;
}

.ancla-spec-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--ancla-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ancla-spec-value {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ancla-navy-deep);
  text-align: center;
}

/* Tag Promocional de Descuentos antes de comprar */
.ancla-discount-tag-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(0, 180, 216, 0.12));
  border: 1px dashed rgba(16, 185, 129, 0.4);
  color: #065f46;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Selector de Modalidad (Teoría Online / Presencial) */
.ancla-option-section {
  margin-bottom: 18px;
}

.ancla-layout-slot {
  min-width: 0;
  display: flow-root;
}

.ancla-layout-slot.is-empty {
  display: none;
}

.ancla-layout-slot > .ancla-discount-tag-header,
.ancla-layout-slot > .ancla-option-section {
  margin-bottom: 0;
}

.ancla-option-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ancla-navy-deep);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ancla-modality-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ancla-modality-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ancla-slate-50);
  border: 1.5px solid var(--ancla-slate-300);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--ancla-transition);
  font-size: 13px;
  color: var(--ancla-slate-700);
}

.ancla-modality-item:hover {
  border-color: var(--ancla-cyan-primary);
}

.ancla-modality-item.active {
  background: var(--ancla-cyan-light);
  border-color: var(--ancla-cyan-primary);
  color: var(--ancla-navy-deep);
  font-weight: 700;
}

.ancla-modality-radio {
  accent-color: var(--ancla-cyan-primary);
  margin-right: 8px;
}

/* Selector de Extras Opcionales (Vela, Baleares, etc.) */
.ancla-extras-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ancla-extra-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ancla-white);
  border: 1px solid var(--ancla-slate-300);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--ancla-transition);
  font-size: 13px;
  color: var(--ancla-slate-700);
}

.ancla-extra-item:hover {
  border-color: var(--ancla-cyan-primary);
  background: var(--ancla-slate-50);
}

.ancla-extra-checkbox {
  accent-color: var(--ancla-cyan-primary);
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.ancla-extra-price {
  font-weight: 700;
  color: var(--ancla-cyan-hover);
  font-size: 12px;
}

/* Sección de Precio Base */
.ancla-price-section {
  background: var(--ancla-slate-50);
  border-radius: var(--ancla-radius-md);
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--ancla-slate-100);
}

.ancla-base-price-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ancla-price-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ancla-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ancla-price-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--ancla-navy-deep);
  line-height: 1;
}

.ancla-price-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--ancla-slate-500);
}

/* Selector de Cantidad de Personas */
.ancla-qty-section {
  margin-bottom: 20px;
}

.ancla-qty-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ancla-qty-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ancla-slate-700);
}

.ancla-qty-controls {
  display: flex;
  align-items: center;
  background: var(--ancla-slate-100);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid var(--ancla-slate-300);
  width: fit-content;
}

.ancla-qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: var(--ancla-white);
  color: var(--ancla-navy-deep);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ancla-transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ancla-qty-btn:hover:not(:disabled) {
  background: var(--ancla-cyan-primary);
  color: var(--ancla-white);
}

.ancla-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ancla-qty-input {
  width: 48px;
  height: 36px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ancla-navy-deep);
  -moz-appearance: textfield;
}

.ancla-qty-input::-webkit-outer-spin-button,
.ancla-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Box de Desglose Económico */
.ancla-breakdown-box {
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  border-radius: var(--ancla-radius-md);
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--ancla-slate-300);
}

.ancla-breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ancla-slate-700);
  margin-bottom: 8px;
}

.ancla-breakdown-row.discount-row {
  color: var(--ancla-emerald);
  font-weight: 600;
}

.ancla-breakdown-row.total-row {
  font-size: 16px;
  font-weight: 800;
  color: var(--ancla-navy-deep);
  border-top: 1px stroke #cbd5e1;
  padding-top: 10px;
  margin-top: 8px;
  margin-bottom: 0;
}

.ancla-discount-banner {
  background: var(--ancla-emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065f46;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ancla-per-person-effective {
  font-size: 12px;
  color: var(--ancla-slate-500);
  text-align: right;
  margin-top: 4px;
}

/* Botón Principal */
.ancla-btn-submit {
  width: 100%;
  height: 52px;
  min-height: 52px;
  background: linear-gradient(135deg, var(--ancla-cyan-primary), var(--ancla-cyan-hover));
  color: var(--ancla-white);
  border: none;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--ancla-shadow-btn);
  transition: var(--ancla-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  box-sizing: border-box;
}

.ancla-btn-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Selector de Plazos Alma (2x, 3x, 4x) */
.ancla-alma-selector-wrapper {
  margin-top: 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ancla-alma-selector-title {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ancla-alma-pills {
  display: flex;
  gap: 6px;
}

.ancla-alma-pill {
  flex: 1;
  height: 40px;
  min-height: 40px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.ancla-alma-pill:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background: #f5f3ff;
}

.ancla-alma-pill.active {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #4338ca;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

/* Grupo de Botones de Compra y Pago a Plazos Alma */
.ancla-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.ancla-btn-alma {
  width: 100%;
  height: 52px;
  min-height: 52px;
  background: rgba(11, 25, 44, 0.03);
  color: var(--ancla-navy-deep);
  border: 1.5px solid var(--ancla-navy-deep);
  padding: 0 14px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--ancla-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-sizing: border-box;
}

.ancla-btn-alma:hover:not(:disabled) {
  background: var(--ancla-navy-deep);
  color: var(--ancla-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 25, 44, 0.2);
}

.ancla-btn-alma:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Formulario Modal del Comprador */
.ancla-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 25, 44, 0.6);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ancla-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.ancla-modal-content {
  background: var(--ancla-white);
  border-radius: var(--ancla-radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ancla-modal-overlay.active .ancla-modal-content {
  transform: translateY(0);
}

.ancla-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--ancla-slate-100);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ancla-slate-500);
}

.ancla-form-group {
  margin-bottom: 16px;
}

.ancla-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ancla-slate-700);
  margin-bottom: 6px;
}

.ancla-form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--ancla-slate-300);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.ancla-form-input:focus {
  border-color: var(--ancla-cyan-primary);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

/* Estados Especiales */
.ancla-state-box {
  text-align: center;
  padding: 60px 20px;
  background: var(--ancla-white);
  border-radius: var(--ancla-radius-lg);
  box-shadow: var(--ancla-shadow-card);
  max-width: 500px;
  margin: 0 auto;
}

.ancla-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--ancla-slate-100);
  border-top-color: var(--ancla-cyan-primary);
  border-radius: 50%;
  animation: ancla-spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

/* Skeletons para estado de carga */
.ancla-skeleton-card {
  height: 480px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: ancla-skeleton-loading 1.5s infinite;
  border-radius: var(--ancla-radius-lg);
}

@keyframes ancla-skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Acordeón Redsys InSite en Tarjeta */
.ancla-insite-accordion {
  margin-top: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%);
  border: 2px solid #00b4d8;
  border-radius: var(--ancla-radius-md);
  padding: 20px 18px;
  box-shadow: 0 10px 25px -5px rgba(0, 180, 216, 0.15);
  animation: ancla-accordion-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ancla-accordion-slide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ancla-insite-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ancla-navy-deep);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ancla-insite-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ancla-insite-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ancla-insite-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ancla-slate-700);
}

.ancla-insite-input-wrapper {
  position: relative;
}

.ancla-insite-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ancla-insite-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px 10px 36px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.ancla-insite-input:focus {
  border-color: #00b4d8;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.18);
}

.ancla-insite-row {
  display: flex;
  gap: 10px;
}

.ancla-insite-row .ancla-insite-field {
  flex: 1;
}

.ancla-btn-insite-pay {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 180, 216, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.ancla-btn-insite-pay:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 180, 216, 0.45);
}

.ancla-insite-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  margin-top: 10px;
  text-align: center;
}

/* Layout Compacto para Tarjeta Única (Sin espacios en blanco verticales) */
/* Layout para Tarjeta Única */
.ancla-pricing-grid-single {
  display: flex !important;
  justify-content: center !important;
  max-width: 540px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

.ancla-card-single {
  justify-content: flex-start !important;
  height: auto !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 540px !important;
  margin: 0 auto !important;
  gap: 14px !important;
}

/* Flexbox dinámico y alineación perfecta de bloques para Tarjetas Múltiples */
.ancla-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ancla-card > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
}

.ancla-card > div:last-child {
  margin-top: auto;
  padding-top: 14px;
}

/* Alineación Horizontal Perfecta de Títulos en Parrilla Múltiple */
.ancla-card:not(.ancla-card-single) .ancla-card-header {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.ancla-card:not(.ancla-card-single) .ancla-specs-container {
  min-height: 52px;
}

.ancla-card:not(.ancla-card-single) .ancla-discount-tag-header {
  min-height: 48px;
  box-sizing: border-box;
}

.ancla-card:not(.ancla-card-single) .ancla-features-list {
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ancla-card:not(.ancla-card-single) .ancla-modality-section {
  min-height: 125px !important;
  height: auto !important;
  margin-bottom: 14px;
}

.ancla-card:not(.ancla-card-single) .ancla-extras-section {
  min-height: 85px !important;
  height: auto !important;
  margin-bottom: 14px;
}

.ancla-card-single .ancla-card-header,
.ancla-card-single .ancla-specs-container,
.ancla-card-single .ancla-discount-tag-header,
.ancla-card-single .ancla-features-list,
.ancla-card-single .ancla-modality-section,
.ancla-card-single .ancla-extras-section {
  min-height: 0 !important;
  height: auto !important;
  margin-bottom: 8px !important;
}

@keyframes anclaPopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ancla-modal-content {
  animation: anclaPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Tarjetas compactas 2026 - estilo visual Anclademia
   ========================================================================== */

.ancla-pricing-wrapper {
  padding: 12px 16px 28px;
}

.ancla-pricing-grid {
  gap: 16px;
}

.ancla-card {
  padding: 20px;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  justify-content: flex-start;
}

.ancla-card:hover {
  transform: translateY(-3px);
}

.ancla-card > div:first-child {
  gap: 0;
  flex: 0 0 auto;
}

.ancla-card > div:last-child {
  margin-top: 0;
  padding-top: 0;
}

.ancla-card-header,
.ancla-card:not(.ancla-card-single) .ancla-card-header {
  min-height: 0;
  margin-bottom: 0;
}

.ancla-badge {
  padding: 5px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.ancla-card-title {
  margin-bottom: 5px;
  font-size: 23px;
  line-height: 1.12;
  letter-spacing: -0.4px;
}

.ancla-card-description {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
}

.ancla-specs-container,
.ancla-card:not(.ancla-card-single) .ancla-specs-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 0;
  margin: 14px 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.ancla-specs-container.ancla-specs-count-2 {
  grid-template-columns: repeat(2, minmax(0, max-content));
}

.ancla-spec-chip {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 30px;
  padding: 6px;
  border: 1px solid #e2e6ec;
  border-radius: 9px;
  background: #f8fafc;
  color: #475467;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.ancla-spec-chip strong {
  color: var(--ancla-navy-deep);
  font-weight: 800;
}

.ancla-spec-symbol {
  color: #667085;
  font-size: 12px;
  line-height: 1;
}

.ancla-layout-slot > .ancla-discount-tag-header {
  margin-bottom: 0;
}

.ancla-discount-tag-header,
.ancla-card:not(.ancla-card-single) .ancla-discount-tag-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 10px 11px;
  margin: 0 0 12px;
  border: 1px solid #efcb38;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff2a9, #fff9dc);
  color: #4d3b00;
  box-shadow: 0 4px 12px rgba(181, 137, 0, 0.12);
}

.ancla-discount-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: radial-gradient(circle at 32% 24%, #ffe982 0, #f7cf3d 52%, #dca808 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.72), 0 4px 8px rgba(119, 82, 0, 0.2);
  font-size: 16px;
  perspective: 120px;
  isolation: isolate;
}

.ancla-discount-icon::after {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 7px;
  content: '';
  pointer-events: none;
}

.ancla-discount-gift {
  position: relative;
  z-index: 1;
  display: block;
  transform: translateZ(0);
  transform-style: preserve-3d;
  transform-origin: 50% 78%;
  backface-visibility: visible;
  filter: drop-shadow(0 2px 1px rgba(83, 48, 0, 0.28));
  will-change: transform, filter;
  animation: anclaGift3D 3.8s cubic-bezier(0.34, 1.4, 0.64, 1) infinite;
}

.ancla-discount-tag-header:hover .ancla-discount-gift {
  animation-duration: 2.2s;
}

@keyframes anclaGift3D {
  0%, 42%, 100% {
    transform: translateY(0) translateZ(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    filter: drop-shadow(0 2px 1px rgba(83, 48, 0, 0.28));
  }
  7% {
    transform: translateY(-2px) translateZ(8px) rotateX(8deg) rotateY(-22deg) rotateZ(-3deg) scale(1.08);
    filter: drop-shadow(3px 4px 2px rgba(83, 48, 0, 0.22));
  }
  14% {
    transform: translateY(-3px) translateZ(10px) rotateX(-5deg) rotateY(22deg) rotateZ(3deg) scale(1.1);
    filter: drop-shadow(-3px 5px 2px rgba(83, 48, 0, 0.22));
  }
  21% {
    transform: translateY(-1px) translateZ(5px) rotateX(5deg) rotateY(-12deg) rotateZ(-2deg) scale(1.06);
  }
  29% {
    transform: translateY(0) translateZ(0) rotateX(0deg) rotateY(7deg) rotateZ(1deg) scale(1.02);
  }
  35% {
    transform: translateY(0) translateZ(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ancla-discount-gift {
    animation: none;
    will-change: auto;
  }
}

.ancla-discount-copy {
  min-width: 0;
}

.ancla-discount-title {
  display: block;
  margin-bottom: 2px;
  color: #322600;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.ancla-discount-rule {
  display: block;
  color: #66500a;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
}

.ancla-discount-rule + .ancla-discount-rule {
  margin-top: 1px;
}

.ancla-features-list,
.ancla-card:not(.ancla-card-single) .ancla-features-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.ancla-feature-item {
  gap: 7px;
  font-size: 11.5px;
  line-height: 1.35;
}

.ancla-feature-icon {
  width: 17px;
  height: 17px;
  margin-top: 0;
}

.ancla-feature-icon svg {
  width: 10px;
  height: 10px;
}

.ancla-features-toggle {
  align-self: flex-start;
  margin: 9px 0 13px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b5200;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ancla-option-section,
.ancla-card:not(.ancla-card-single) .ancla-modality-section,
.ancla-card:not(.ancla-card-single) .ancla-extras-section {
  min-height: 0 !important;
  height: auto !important;
  margin-bottom: 0;
}

.ancla-layout-slot:not(.is-empty) {
  margin-top: 0;
}

.ancla-modality-slot:not(.is-empty),
.ancla-extras-slot:not(.is-empty) {
  padding: 12px 0;
  border-top: 1px solid #e7eaf0;
}

.ancla-extras-slot:not(.is-empty) {
  padding-top: 0;
  border-top: 0;
}

.ancla-option-label {
  margin-bottom: 7px;
  color: #667085;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ancla-option-label svg {
  display: none;
}

.ancla-modality-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.ancla-modality-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #d9dee7;
  border-radius: 9px;
  background: #ffffff;
  color: #475467;
  font-size: 10.5px;
}

.ancla-modality-item.active {
  border-color: #d4a900;
  background: #fff5c7;
  color: #3f3100;
  box-shadow: inset 0 0 0 1px rgba(212, 169, 0, 0.12);
}

.ancla-modality-label {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  cursor: pointer;
}

.ancla-modality-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.ancla-modality-name {
  width: 100%;
  color: inherit;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ancla-modality-price {
  color: var(--ancla-navy-deep);
  font-size: 13px;
  font-weight: 800;
}

.ancla-extras-group {
  gap: 6px;
}

.ancla-extra-item {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 11px;
}

.ancla-price-qty-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0;
}

.ancla-price-box-container,
.ancla-qty-section {
  margin: 0;
}

.ancla-price-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.ancla-price-label,
.ancla-qty-label {
  display: block;
  margin-bottom: 3px;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.ancla-price-amount {
  font-size: 30px;
  letter-spacing: -1px;
}

.ancla-price-unit {
  font-size: 11px;
}

.ancla-qty-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ancla-qty-controls {
  padding: 2px;
  border-radius: 9px;
}

.ancla-qty-btn {
  width: 31px;
  height: 31px;
  border-radius: 7px;
  box-shadow: none;
}

.ancla-qty-input {
  width: 30px;
  height: 31px;
  font-size: 13px;
}

.ancla-breakdown-box {
  padding: 0;
  margin: 9px 0 0;
  border: 0;
  border-top: 1px dashed #d5dae2;
  border-radius: 0;
  background: transparent;
}

.ancla-breakdown-row.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  margin: 0;
  border-top: 0;
  color: #475467;
  font-size: 11px;
}

.ancla-breakdown-row.total-row strong {
  color: var(--ancla-navy-deep);
  font-size: 14px;
  font-weight: 800;
}

.ancla-breakdown-row .discount-row {
  color: #207045;
  font-weight: 800;
}

.ancla-per-person-effective {
  min-height: 16px;
  margin-top: 5px;
  color: #667085;
  font-size: 10.5px;
  line-height: 1.35;
  text-align: right;
}

.ancla-per-person-effective strong {
  color: #207045;
  font-weight: 800;
}

.ancla-btn-group {
  margin-top: 10px;
}

.ancla-btn-submit {
  height: 46px;
  min-height: 46px;
  border-radius: 10px;
  background: #f7cf3d;
  color: var(--ancla-navy-deep);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(190, 144, 0, 0.2);
}

.ancla-btn-submit:hover:not(:disabled) {
  background: #efc42a;
  transform: translateY(-1px);
}

.ancla-alma-selector-wrapper {
  gap: 7px;
  padding: 10px;
  margin-top: 9px;
  border-radius: 10px;
  background: #f8fafc;
}

.ancla-alma-selector-title {
  justify-content: space-between;
  color: var(--ancla-navy-deep);
  font-size: 10.5px;
}

.ancla-alma-selector-title small {
  color: #667085;
  font-size: 9.5px;
  font-weight: 600;
}

.ancla-alma-pills {
  gap: 5px;
}

.ancla-alma-pill {
  flex-direction: column;
  gap: 1px;
  height: auto;
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  color: #475467;
  background: #ffffff;
  line-height: 1.1;
}

.ancla-alma-pill strong {
  font-size: 11px;
  font-weight: 800;
}

.ancla-alma-pill span {
  max-width: 100%;
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ancla-alma-pill.active {
  border-color: var(--ancla-navy-deep);
  background: var(--ancla-navy-deep);
  color: #ffffff;
  box-shadow: none;
}

.ancla-btn-alma {
  height: 40px;
  min-height: 40px;
  margin-top: 0;
  border: 1px solid var(--ancla-navy-deep);
  border-radius: 9px;
  background: #ffffff;
  font-size: 11.5px;
}

.ancla-card-single .ancla-card-header,
.ancla-card-single .ancla-specs-container,
.ancla-card-single .ancla-discount-tag-header,
.ancla-card-single .ancla-features-list,
.ancla-card-single .ancla-modality-section,
.ancla-card-single .ancla-extras-section {
  margin-bottom: 0 !important;
}

.ancla-card-single .ancla-discount-slot:not(.is-empty) {
  margin: 10px 0;
}

@media (max-width: 520px) {
  .ancla-pricing-wrapper {
    padding: 10px 12px 24px;
  }

  .ancla-card {
    padding: 16px;
  }

  .ancla-specs-container,
  .ancla-card:not(.ancla-card-single) .ancla-specs-container {
    gap: 4px;
  }

  .ancla-spec-chip {
    gap: 3px;
    padding: 5px 3px;
    font-size: 9.5px;
  }

  .ancla-spec-symbol {
    font-size: 11px;
  }

  .ancla-discount-title {
    font-size: 10px;
  }

  .ancla-features-list,
  .ancla-card:not(.ancla-card-single) .ancla-features-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .ancla-modality-name {
    font-size: 10px;
  }

  .ancla-price-qty-row {
    align-items: flex-end;
    flex-wrap: nowrap;
  }

  .ancla-price-amount {
    font-size: 28px;
  }
}
