/* ═════════════════════════════════════════════════════════════════
   CEFIRO_SOFT - Loyalty Card Styles v2
   ════════════════════════════════════════════════════════════════= */

/* FAB de lealtad — estilos en carrito.css (.fabs-group) */

/* ── Modal lookup (ingresar teléfono) ──────────────────────────── */
.loyalty-lookup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(0px);
  transition: background 0.45s ease, backdrop-filter 0.45s ease;
}

.loyalty-lookup-overlay.open {
  display: flex;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px);
  animation: lookupFadeIn 0.45s ease both;
}

@keyframes lookupFadeIn {
  from { background: rgba(0,0,0,0); backdrop-filter: blur(0px); }
  to   { background: rgba(0,0,0,0.78); backdrop-filter: blur(8px); }
}

.loyalty-lookup-box {
  background: linear-gradient(160deg, #1c1a12 0%, #161410 100%);
  border: 1px solid rgba(200,208,218,0.28);
  border-radius: 10px;
  padding: 38px 34px 32px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 60px rgba(200,208,218,0.07);
  animation: boxSlideUp 0.5s cubic-bezier(.16,1,.3,1) both;
}

@keyframes boxSlideUp {
  from { opacity: 0; transform: translateY(32px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Línea dorada superior */
.loyalty-lookup-box::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,208,218,0.6), transparent);
  border-radius: 1px;
}

/* Mensaje de agradecimiento */
.loyalty-greeting {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 12px;
  color: rgba(200,208,218,0.75);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  padding: 7px 16px;
  border: 1px solid rgba(200,208,218,0.15);
  border-radius: 20px;
  background: rgba(200,208,218,0.04);
  animation: greetingReveal 0.6s ease 0.3s both;
}

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

.loyalty-lookup-icon {
  font-size: 32px;
  color: #C8D0DA;
  margin-bottom: 12px;
  display: block;
  text-shadow: 0 0 24px rgba(200,208,218,0.4);
  animation: iconGlow 2.5s ease-in-out infinite;
}

@keyframes iconGlow {
  0%, 100% { text-shadow: 0 0 18px rgba(200,208,218,0.3); }
  50%       { text-shadow: 0 0 36px rgba(200,208,218,0.7); }
}

.loyalty-lookup-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: #C8D0DA;
  margin-bottom: 6px;
}

.loyalty-lookup-sub {
  font-size: 12px;
  color: #b8ae96;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.loyalty-phone-wrap {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(200,208,218,0.25);
  border-radius: 4px;
  margin-bottom: 14px;
  transition: border-color 0.3s;
  overflow: hidden;
}

.loyalty-phone-wrap:focus-within {
  border-color: rgba(200,208,218,0.6);
}

.loyalty-phone-prefix {
  padding: 12px 14px;
  background: rgba(200,208,218,0.1);
  border-right: 1px solid rgba(200,208,218,0.2);
  color: #C8D0DA;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  user-select: none;
}

.loyalty-lookup-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f5f0e8;
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  letter-spacing: 0.08em;
  min-width: 0;
}

.loyalty-lookup-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #C8D0DA 0%, #c9a227 100%);
  border: none;
  color: #0c0b09;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.loyalty-lookup-btn:hover { opacity: 0.9; }

.loyalty-lookup-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #b8ae96;
  font-size: 18px;
  cursor: pointer;
}

.loyalty-lookup-error {
  color: #f87171;
  font-size: 12px;
  margin-top: 10px;
  display: none;
}

/* ── Tarjeta principal ─────────────────────────────────────────── */
.loyalty-card-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 10002;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.loyalty-card-overlay.open {
  display: flex;
}

.loyalty-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(160deg, #181610 0%, #111009 100%);
  border: 1px solid rgba(200,208,218,0.3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 60px rgba(200,208,218,0.08);
  position: relative;
  margin: 16px;
}

/* Patrón de fondo decorativo */
.loyalty-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(200,208,218,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.loyalty-card-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #b8ae96;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}
.loyalty-card-close:hover { color: #C8D0DA; }

/* ── Header de tarjeta ─────────────────────────────────────────── */
.lc-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid rgba(200,208,218,0.1);
}

.lc-brand {
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(200,208,218,0.6);
  margin-bottom: 6px;
}

.lc-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #f5f0e8;
  margin-bottom: 2px;
}

.lc-compras {
  font-size: 12px;
  color: rgba(200,208,218,0.7);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.lc-estrellas {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 14px;
}

.lc-estrellas span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b8ae96;
}

/* ── Estrellas (premios canjeados) ────────────────────────────── */
.lc-stars {
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(200,208,218,0.08);
  background: rgba(200,208,218,0.03);
  font-size: 16px;
  letter-spacing: 2px;
}

.lc-stars-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200,208,218,0.6);
  margin-left: 4px;
}

/* ── Stats ─────────────────────────────────────────────────────── */
.lc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(200,208,218,0.08);
}

.lc-stat {
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid rgba(200,208,218,0.08);
}

.lc-stat:last-child { border-right: none; }

.lc-stat-val {
  display: block;
  font-size: 22px;
  font-weight: 300;
  color: #C8D0DA;
  line-height: 1;
  margin-bottom: 4px;
}

.lc-stat-lbl {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b8ae96;
}

/* ── Sellos ────────────────────────────────────────────────────── */
.lc-stamps-section {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(200,208,218,0.08);
}

.lc-stamps-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(200,208,218,0.6);
  margin-bottom: 16px;
}

.lc-stamps-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 8px;
}

.lc-stamp {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1.5px solid rgba(200,208,218,0.2);
  background: rgba(255,255,255,0.02);
  transition: all 0.3s ease;
  position: relative;
}

.lc-stamp.earned {
  background: linear-gradient(135deg, rgba(200,208,218,0.2) 0%, rgba(200,208,218,0.08) 100%);
  border-color: rgba(200,208,218,0.6);
  box-shadow: 0 0 12px rgba(200,208,218,0.15);
}

.lc-stamp.earned::after {
  content: '✦';
  font-size: 18px;
  color: #C8D0DA;
}

.lc-stamp:not(.earned)::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(200,208,218,0.15);
}

.lc-stamps-caption {
  margin-top: 12px;
  font-size: 11px;
  color: #b8ae96;
  text-align: center;
}

.lc-stamps-caption strong {
  color: #C8D0DA;
}

/* ── Reward banner ─────────────────────────────────────────────── */
.lc-reward {
  margin: 0 28px 20px;
  padding: 14px 16px;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: rewardPulse 2.5s ease-in-out infinite;
}

@keyframes rewardPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.1); }
  50% { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}

.lc-reward-icon { font-size: 24px; flex-shrink: 0; }

.lc-reward-text strong {
  display: block;
  font-size: 13px;
  color: #4ade80;
  margin-bottom: 2px;
}

.lc-reward-text span {
  font-size: 11px;
  color: #b8ae96;
}

/* ── Footer ────────────────────────────────────────────────────── */
.lc-footer {
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(200,208,218,0.08);
}

.lc-footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  color: rgba(200,208,218,0.5);
  letter-spacing: 0.08em;
}

.lc-cambiar-btn {
  background: none;
  border: none;
  color: #b8ae96;
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 0;
  border-bottom: 1px solid rgba(107,101,85,0.3);
  transition: color 0.2s, border-color 0.2s;
}

.lc-cambiar-btn:hover {
  color: #C8D0DA;
  border-color: rgba(200,208,218,0.4);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .loyalty-fab {
    bottom: 20px;
    right: 20px;
  }

  .loyalty-fab-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .lc-stamps-grid { gap: 5px; }
  .lc-stamp { font-size: 13px; }
  .lc-stamp.earned::after { font-size: 14px; }
}
