/* ── EGUE CHECKOUT v3 ── */
:root {
  --bg: #111110;
  --bg-card: #1c1c1b;
  --bg-card2: #222221;
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --gold-dim: rgba(201,168,76,0.10);
  --gold-border: rgba(201,168,76,0.28);
  --text-white: #f5f5f3;
  --text-gray: #9a9a96;
  --text-light: #d2d2ce;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --r: 16px;
  --r-sm: 10px;
  --r-pill: 100px;
  --green: #2ecc71;
  --red: #e74c3c;
}

.egue-checkout {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
  font-family: var(--sans);
  color: var(--text-light);
}

/* ── PROGRESS ── */
.egue-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
  padding: 2rem 0 1rem;
}
.egue-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.35;
  transition: opacity .3s;
}
.egue-progress-step.active { opacity: 1; }
.egue-progress-step.done { opacity: 0.7; }
.egue-step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem;
  color: var(--text-gray);
  transition: all .3s;
}
.egue-progress-step.active .egue-step-circle {
  background: var(--gold);
  color: #111110;
  border-color: var(--gold);
  font-weight: 600;
}
.egue-progress-step.done .egue-step-circle {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: var(--gold-border);
}
.egue-progress-step span {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gray);
  white-space: nowrap;
}
.egue-progress-step.active span { color: var(--gold); }
.egue-progress-line {
  flex: 1;
  height: 1px;
  background: var(--gold-border);
  min-width: 40px;
  max-width: 80px;
  margin-bottom: 1.5rem;
}

/* ── STEP HEADER ── */
.egue-step-label {
  font-size: 0.67rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.egue-step-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  color: var(--text-white);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.egue-step-title em { font-style: italic; color: var(--gold); }
.egue-step-sub { font-size: 0.84rem; color: var(--text-gray); margin: 0 0 2rem; }

/* ── CALENDAR ── */
.egue-calendar-wrap {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr;
}

/* Nav ocupa todo el ancho */
.egue-cal-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(201,168,76,0.12);
}
.egue-cal-month-label {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text-white);
  font-weight: 300;
  text-transform: capitalize;
}
.egue-cal-prev, .egue-cal-next {
  background: none;
  border: 1px solid var(--gold-border);
  color: var(--gold);
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.egue-cal-prev:hover, .egue-cal-next:hover { background: var(--gold-dim); }

/* Columna izquierda: días del calendario */
.egue-cal-left {
  padding: 0.8rem 1rem 1.2rem;
  border-right: 1px solid rgba(201,168,76,0.12);
}

.egue-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 0.3rem;
}
.egue-cal-dow span {
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gray);
  padding: 0.4rem 0;
}

.egue-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.egue-cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: default;
  transition: all .2s;
  color: var(--text-gray);
  user-select: none;
}
.egue-cal-day.empty { opacity: 0; pointer-events: none; }
.egue-cal-day.past  { opacity: 0.18; cursor: not-allowed; }
.egue-cal-day.available {
  color: var(--text-white);
  cursor: pointer;
  border: 1px solid transparent;
}
.egue-cal-day.available:hover {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}
.egue-cal-day.selected {
  background: var(--gold) !important;
  color: #111110 !important;
  font-weight: 600;
  border-color: var(--gold) !important;
}
.egue-cal-day.today { border: 1px solid rgba(201,168,76,0.4); }

/* Columna derecha: slots */
.egue-slots-wrap {
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.egue-slots-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 0.8rem;
  text-align: center;
  padding: 1.5rem 0.5rem;
}
.egue-slots-empty-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.egue-slots-empty-title {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text-white);
  font-weight: 300;
}
.egue-slots-empty-sub {
  font-size: 0.76rem;
  color: var(--text-gray);
  line-height: 1.6;
  max-width: 200px;
}

.egue-slots-date {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(201,168,76,0.12);
}
.egue-slots-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.egue-slot {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--gold-border);
  background: var(--bg);
  color: var(--text-light);
  font-size: 0.84rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: all .2s;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.egue-slot.disponible:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}
.egue-slot.disponible:hover::after {
  content: '→';
  color: var(--gold);
  font-size: 0.9rem;
}
.egue-slot.selected {
  background: var(--gold) !important;
  color: #111110 !important;
  border-color: var(--gold) !important;
  font-weight: 500;
}
.egue-slot.selected::after { content: '✓'; color: #111110; font-weight: 700; }
.egue-slot.ocupado {
  opacity: 0.4;
  cursor: not-allowed;
  background: transparent;
  border-color: rgba(255,255,255,0.06);
  color: var(--text-gray);
}
.egue-slot-tag {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(200,80,60,0.6);
  background: rgba(200,80,60,0.08);
  padding: 2px 7px;
  border-radius: 4px;
}
.egue-no-slots {
  font-size: 0.8rem;
  color: var(--text-gray);
  font-style: italic;
  margin: 0.5rem 0;
}

/* Loading dentro del slot panel */
.egue-cal-loading {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 2rem 1rem;
  color: var(--text-gray);
  font-size: 0.82rem;
}

/* Botón próxima fecha disponible */
#btn-next-available {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-pill);
  padding: 0.7rem 1.5rem;
  font-size: 0.78rem;
  font-family: var(--sans);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all .25s;
  margin-bottom: 1.2rem;
}
#btn-next-available:hover {
  background: var(--gold);
  color: #111110;
  border-color: var(--gold);
}

/* Mensaje sin disponibilidad en el mes */
.egue-month-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-gray);
  border-top: 1px solid rgba(201,168,76,0.08);
}

/* Responsive */
@media (max-width: 600px) {
  .egue-calendar-wrap {
    grid-template-columns: 1fr;
  }
  .egue-cal-left {
    border-right: none;
    border-bottom: 1px solid rgba(201,168,76,0.12);
  }
  .egue-cal-loading { grid-column: 1; }
}

.egue-cal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 2rem;
  color: var(--text-gray);
  font-size: 0.84rem;
}

/* ── SPINNER ── */
.egue-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--gold-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: egue-spin .8s linear infinite;
}
@keyframes egue-spin { to { transform: rotate(360deg); } }

/* ── SELECTED SUMMARY ── */
.egue-selected-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  padding: 0.5rem 1.2rem;
  border-radius: var(--r-pill);
}

/* ── STEP ACTIONS ── */
.egue-step-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ── BUTTONS ── */
.egue-btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: #111110;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: var(--r-pill);
  border: none;
  cursor: pointer;
  transition: background .25s, transform .2s;
}
.egue-btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.egue-btn-gold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.egue-btn-ghost {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.6rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold-border);
  cursor: pointer;
  transition: all .2s;
}
.egue-btn-ghost:hover { background: var(--gold-dim); border-color: var(--gold); }

.egue-btn-back {
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: color .2s;
}
.egue-btn-back:hover { color: var(--text-white); }

/* ── FORM ── */
.egue-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--r);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.egue-field-group { display: flex; flex-direction: column; gap: 0.4rem; }
.egue-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.egue-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.egue-input, .egue-select {
  background: var(--bg);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--r-sm);
  color: var(--text-white);
  font-family: var(--sans);
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.egue-input::placeholder { color: var(--text-gray); }
.egue-input:focus, .egue-select:focus {
  outline: none;
  border-color: var(--gold);
}
.egue-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A84C' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.egue-select option { background: #1c1c1b; color: var(--text-white); }

/* ── COUPON ── */
.egue-coupon-row { display: flex; gap: 0.6rem; }
.egue-coupon-row .egue-input { flex: 1; }
#egue-cupon-msg {
  font-size: 0.8rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--r-sm);
  margin-top: 0.3rem;
}
#egue-cupon-msg.success { color: var(--green); background: rgba(46,204,113,0.1); border: 1px solid rgba(46,204,113,0.2); }
#egue-cupon-msg.error   { color: var(--red);   background: rgba(231,76,60,0.1);  border: 1px solid rgba(231,76,60,0.2); }

/* ── RESUMEN ── */
.egue-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.egue-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid rgba(201,168,76,0.08);
  font-size: 0.84rem;
}
.egue-summary-row:last-child { border-bottom: none; }
.egue-summary-row .label { color: var(--text-gray); }
.egue-summary-row .value { color: var(--text-white); }
.egue-summary-row.total .value { color: var(--gold); font-size: 1rem; font-weight: 500; }
.egue-summary-row.descuento .value { color: var(--green); }

/* ── PAY LOADING ── */
.egue-pay-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.5rem;
  color: var(--text-gray);
  font-size: 0.84rem;
}
.egue-error-msg {
  color: var(--red);
  background: rgba(231,76,60,0.1);
  border: 1px solid rgba(231,76,60,0.2);
  border-radius: var(--r-sm);
  padding: 0.8rem 1.2rem;
  font-size: 0.84rem;
  margin-top: 0.5rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .egue-field-row { grid-template-columns: 1fr; }
  .egue-progress-line { min-width: 20px; max-width: 40px; }
  .egue-progress-step span { font-size: 0.6rem; }
  .egue-form-wrap { padding: 1.2rem; }
  .egue-step-actions { flex-direction: column; align-items: stretch; }
  .egue-btn-gold { justify-content: center; }
}
