/* ============================================================
   Rey Club Popup — reyclubpopup.css
   PrestaShop 8 module styles
   ============================================================ */

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

/* ── Animaciones ── */
@keyframes reyFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes reyPopupIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Tipografía global del componente ── */
#reyClubPopup,
#reyClubPopup *,
.rey-club-banner,
.rey-club-banner * {
  font-family: 'Montserrat', sans-serif !important;
  box-sizing: border-box;
}

/* ── Enlace / banner ── */
.rey-club-banner {
  text-align: center;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: #f5f0ec;
}

.rey-club-trigger {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease;
}

.rey-club-trigger:hover {
  color: #8c6f62;
}

/* ── Popup wrapper ── */
#reyClubPopup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999999;
}

#reyClubPopup.is-open {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: reyFadeIn .25s ease;
}

/* ── Overlay ── */
.rey-club-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, .45);
  backdrop-filter: blur(4px);
}

/* ── Modal ── */
.rey-club-modal {
  position: relative;
  width: 900px;
  max-width: calc(100% - 32px);
  max-height: 92vh;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
  animation: reyPopupIn .32s ease;
  z-index: 2;
}

/* ── Botón cerrar ── */
.rey-club-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(255, 255, 255, .9);
  color: #111;
  font-size: 28px;
  line-height: 30px;
  cursor: pointer;
  z-index: 5;
  transition: background .15s ease;
}

.rey-club-close:hover {
  background: #fff;
}

/* ── Columna izquierda (imagen) ── */
.rey-club-left {
  min-height: 540px;
}

.rey-club-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Columna derecha (formulario) ── */
.rey-club-right {
  padding: 42px 42px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.rey-club-title-img {
  width: 100%;
  max-width: 355px;
  display: block;
  margin: 0 0 20px 0;
}

/* ── Campos ── */
.rey-club-field {
  margin-bottom: 8px;
}

.rey-club-form input[type="text"],
.rey-club-form input[type="email"],
.rey-club-form input[type="tel"],
.rey-club-form input[type="date"] {
  width: 100%;
  height: 40px;
  border: 1px solid #d5cec9;
  background: #faf9f7;
  color: #111;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 400;
  outline: none;
  border-radius: 0;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.rey-club-form input[type="text"]:focus,
.rey-club-form input[type="email"]:focus,
.rey-club-form input[type="tel"]:focus,
.rey-club-form input[type="date"]:focus {
  border-color: #111;
  background: #fff;
  box-shadow: 0 0 0 1px #111 inset;
}

.rey-club-form input::placeholder {
  color: #777;
  font-weight: 400;
}

/* Error de campo requerido */
.rey-club-required {
  display: none;
  color: #c00;
  font-size: 11px;
  margin-top: 3px;
}

.rey-club-field.has-error .rey-club-required {
  display: block;
}

.rey-club-field.has-error input {
  border-color: #c00;
  box-shadow: 0 0 0 1px #c00 inset;
}

/* ── Checkbox privacidad ── */
.rey-privacy-wrapper {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 16px;
  font-size: 13px;
  font-weight: 400;
  color: #222;
  cursor: pointer;
}

.rey-privacy-wrapper input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #111;
  border-radius: 50%;
  display: grid;
  place-content: center;
  cursor: pointer;
  background: #fff;
  margin: 0;
  flex-shrink: 0;
}

.rey-privacy-wrapper input[type="checkbox"]::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111;
  transform: scale(0);
  transition: .12s ease;
}

.rey-privacy-wrapper input[type="checkbox"]:checked::after {
  transform: scale(1);
}

.rey-privacy-wrapper a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rey-privacy-wrapper a:hover {
  color: #8c6f62;
}

/* ── Botón submit ── */
.rey-club-submit {
  width: 100%;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  padding: 14px 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}

.rey-club-submit:hover {
  background: #fff;
  color: #000;
}

/* ── Nota legal ── */
.rey-club-note {
  text-align: center;
  font-size: 8px;
  line-height: 1.35;
  color: #777;
  margin: 10px 0 0;
}

/* ── Mensaje de éxito ── */
.rey-club-success {
  text-align: center;
  padding: 24px 0;
}

.rey-club-success p {
  font-size: 15px;
  font-weight: 500;
  color: #111;
  margin-bottom: 8px;
}

.rey-club-success small {
  font-size: 12px;
  color: #666;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .rey-club-modal {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }

  .rey-club-left {
    display: none;
  }

  .rey-club-right {
    padding: 42px 24px 28px;
  }

  .rey-club-title-img {
    max-width: 280px;
    margin: 0 auto 20px;
  }
}
