/* =========================================
   LMM POPUP CLEAN
   Modal de invitado / popup promocional
========================================= */

body.lmm-modal-open {
  overflow: hidden;
}

.lmm-guest-modal[hidden] {
  display: none !important;
}

.lmm-guest-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.lmm-guest-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.42);
  backdrop-filter: blur(3px);
}

.lmm-guest-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(540px, 92vw);
  max-width: 540px;
  background: #fffdf8;
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  animation: lmmPopupFade 0.35s ease;
}

@keyframes lmmPopupFade {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.lmm-guest-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(70, 70, 70, 0.58);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lmm-guest-modal__close:hover {
  background: rgba(70, 70, 70, 0.72);
  transform: scale(1.05);
}

/* ===== Layout base ===== */

.lmm-guest-modal__promo-wrap {
  padding: 20px 20px 10px;
}

.lmm-guest-modal__promo-wrap--text-only {
  position: relative;
  display: block;
  padding: 14px 18px 8px;
}

.lmm-guest-modal__text-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 4px 8px 20px;
}

.lmm-guest-modal__text-block--full {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  padding: 4px 0 10px;
  max-width: 100%;
}

/* ===== Encabezados ===== */

.lmm-guest-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: #ff6a3d;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.lmm-guest-modal__text-block--full .lmm-guest-modal__eyebrow {
  margin-bottom: 8px;
  align-self: center;
}

.lmm-guest-modal__offer {
  margin: 8px 0 2px !important;
  font-size: clamp(42px, 5.6vw, 54px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #185a35;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  transform-origin: center;
  will-change: transform;
  animation: lmmOfferPulse 3.4s ease-in-out infinite;
}

@keyframes lmmOfferPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

.lmm-guest-modal__subtitle {
  margin-top: 2px !important;
  margin-bottom: 18px !important;
  color: #185a35;
  font-size: 15px;
  line-height: 1.08;
  font-weight: 700;
  max-width: 100%;
  width: 100%;
  text-align: center;
}

/* ===== Shipping box ===== */

.lmm-guest-modal__shipping {
  position: relative;
  overflow: hidden;
  margin: 10px auto 0;
  width: min(100%, 430px);
  max-width: 100%;
  background: #ffe81c;
  border: 2px dashed rgba(201, 111, 0, 0.45);
  border-radius: 20px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
  color: #114d2f;
  box-sizing: border-box;
}

.lmm-guest-modal__shipping strong,
.lmm-guest-modal__shipping span {
  display: block;
  text-align: center;
}

.lmm-guest-modal__shipping strong {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.lmm-guest-modal__shipping span {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 700;
  margin-top: 3px;
}

.lmm-guest-modal__shipping::after {
  content: "";
  position: absolute;
  top: 0;
  left: -35%;
  width: 30%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-18deg);
  animation: lmmShippingShine 9s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lmmShippingShine {
  0%, 70%, 100% {
    left: -38%;
    opacity: 0;
  }
  74% {
    opacity: 1;
  }
  88% {
    left: 108%;
    opacity: 1;
  }
  100% {
    left: 108%;
    opacity: 0;
  }
}

/* ===== Countdown ===== */

.lmm-guest-modal__countdown {
  margin: 8px auto 0;
  width: min(100%, 430px);
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8ef 0%, #fff 100%);
  border: 1px solid rgba(24, 90, 53, 0.1);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  box-sizing: border-box;
}

.lmm-guest-modal__countdown-title {
  width: 100%;
  text-align: left;
  font-size: 13px;
  font-weight: 900;
  color: #185a35;
  line-height: 1.15;
}

.lmm-guest-modal__countdown-subtitle {
  width: 100%;
  text-align: left;
  margin-top: 1px;
  font-size: 11px;
  color: #52606d;
  line-height: 1.3;
}

.lmm-guest-modal__timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.lmm-guest-modal__timer > span {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  min-width: 48px;
  padding: 7px 9px;
  border-radius: 11px;
  background: #185a35;
  color: #fff;
  box-shadow: 0 10px 22px rgba(24, 90, 53, 0.16);
  transform-origin: center center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.lmm-guest-modal__timer > span span {
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.lmm-guest-modal__timer > span small {
  font-size: 10px;
  line-height: 1.1;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.9;
}

.lmm-guest-modal__timer > span.is-flip {
  animation: lmmTimerFlip 0.45s ease;
}

@keyframes lmmTimerFlip {
  0% { transform: translateY(0) rotateX(0deg); }
  35% { transform: translateY(-1px) rotateX(18deg); }
  100% { transform: translateY(0) rotateX(0deg); }
}

.lmm-guest-modal__expired {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 800;
  color: #b42318;
}

/* ===== Media / image ===== */

.lmm-guest-modal__promo-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

/* ===== Decorative shapes/icons ===== */

.lmm-guest-modal__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.lmm-guest-modal__decor-circle {
  position: absolute;
  border-radius: 50%;
  background: #e8f000;
}

.lmm-guest-modal__decor-circle--top {
  width: 62px;
  height: 62px;
  top: 12px;
  right: 12px;
  opacity: 0.9;
}

.lmm-guest-modal__decor-circle--bottom {
  width: 68px;
  height: 68px;
  left: 10px;
  bottom: 96px;
  opacity: 0.58;
}

.lmm-guest-modal__decor-icons {
  position: absolute;
  inset: 0;
}

.lmm-guest-modal__decor-icons .lmm-side-icon {
  position: absolute;
}

.lmm-side-icon {
  display: inline-block;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 6px 12px rgba(16, 24, 40, 0.1));
  opacity: 0.95;
}

.lmm-side-icon--bag {
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M16 22h32l-3 28a4 4 0 0 1-4 4H23a4 4 0 0 1-4-4z' fill='%232e6f43'/%3E%3Cpath d='M23 26v-5a9 9 0 0 1 18 0v5' fill='none' stroke='%23f7f4ea' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M24 33h16' stroke='%23f1d54a' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.lmm-side-icon--croissant {
  width: 28px;
  height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 64'%3E%3Cpath d='M18 45c-8-3-13-10-13-18 0-7 4-13 10-16 2 7 7 13 14 17-4 5-7 11-11 17z' fill='%23f5a623'/%3E%3Cpath d='M66 45c8-3 13-10 13-18 0-7-4-13-10-16-2 7-7 13-14 17 4 5 7 11 11 17z' fill='%23f5a623'/%3E%3Cpath d='M20 45c4-14 14-25 22-25s18 11 22 25c-5 7-13 11-22 11S25 52 20 45z' fill='%23f6b443'/%3E%3Cpath d='M31 24c3 4 6 11 7 19' stroke='%23d88718' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M43 23c3 4 6 12 7 20' stroke='%23d88718' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

.lmm-side-icon--cart {
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='26' cy='52' r='5' fill='%236f7a85'/%3E%3Ccircle cx='46' cy='52' r='5' fill='%236f7a85'/%3E%3Cpath d='M12 14h7l5 23h23l5-16H24' fill='none' stroke='%236f7a85' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M26 18l2 14M36 18v14M46 18l-2 14' stroke='%236f7a85' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

.lmm-guest-modal__decor-icons .lmm-side-icon--bag {
  top: 16px;
  right: 112px;
}

.lmm-guest-modal__decor-icons .lmm-side-icon--croissant {
  top: 16px;
  right: 76px;
}

.lmm-guest-modal__decor-icons .lmm-side-icon--cart {
  top: auto;
  bottom: 96px;
  right: 20px;
}

/* ===== Actions ===== */

.lmm-guest-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px 18px 16px;
}

.lmm-guest-modal__actions--stacked {
  grid-template-columns: 1fr;
}

.lmm-guest-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.lmm-guest-btn--primary {
  background: #39c75a;
  color: #fff;
  border-color: #39c75a;
}

.lmm-guest-btn--secondary {
  background: #fff;
  color: #101828;
}

/* ===== Legal ===== */

.lmm-guest-modal__legal {
  margin: 10px auto 8px;
  max-width: 420px;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: #6b7280;
}

.lmm-guest-modal__legal a {
  color: #374151;
  text-decoration: underline;
}

/* ===== Responsive ===== */

@media (max-width: 767px) {
  .lmm-guest-modal {
    padding: 10px;
    align-items: center;
  }

  .lmm-guest-modal__dialog {
    width: min(340px, calc(100vw - 28px));
    max-width: 340px;
    border-radius: 20px;
  }

  .lmm-guest-modal__promo-wrap {
    padding: 14px 14px 8px;
  }

  .lmm-guest-modal__promo-wrap--text-only {
    padding: 14px 14px 10px;
  }

  .lmm-guest-modal__text-block {
    gap: 4px;
    padding: 2px 2px 14px;
  }

  .lmm-guest-modal__text-block--full {
    text-align: center;
    align-items: center;
    padding: 2px 2px 6px;
  }

  .lmm-guest-modal__eyebrow {
    font-size: 12px;
    padding: 7px 16px;
    margin-bottom: 8px;
  }

  .lmm-guest-modal__offer {
    font-size: clamp(40px, 10vw, 50px);
    line-height: 1;
    margin: 6px 0 2px !important;
  }

  .lmm-guest-modal__subtitle {
    font-size: 15px;
    line-height: 1.2;
    margin-top: 2px !important;
    margin-bottom: 16px !important;
  }

  .lmm-guest-modal__shipping {
    margin-top: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .lmm-guest-modal__shipping strong {
    font-size: 24px;
  }

  .lmm-guest-modal__shipping span {
    font-size: 14px;
  }

  .lmm-guest-modal__countdown {
    margin-top: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .lmm-guest-modal__timer {
    gap: 6px;
  }

  .lmm-guest-modal__timer > span {
    min-width: 46px;
    padding: 7px 8px;
  }

  .lmm-guest-modal__timer > span span {
    font-size: 16px;
  }

  .lmm-guest-modal__actions {
    padding: 6px 14px 14px;
    gap: 10px;
  }

  .lmm-guest-btn {
    min-height: 46px;
    font-size: 15px;
    border-radius: 14px;
  }

  .lmm-guest-modal__close {
    width: 44px;
    height: 44px;
    top: 12px;
    right: 12px;
  }

  .lmm-guest-modal__decor-circle--top {
    width: 58px;
    height: 58px;
    top: 12px;
    right: 12px;
  }

  .lmm-guest-modal__decor-circle--bottom {
    width: 62px;
    height: 62px;
    left: 8px;
    bottom: 92px;
  }

  .lmm-side-icon--bag {
    width: 20px;
    height: 20px;
  }

  .lmm-side-icon--croissant {
    width: 28px;
    height: 22px;
  }

  .lmm-side-icon--cart {
    width: 24px;
    height: 24px;
  }

  .lmm-guest-modal__decor-icons .lmm-side-icon--bag {
    top: 16px;
    right: 98px;
    bottom: auto;
  }

  .lmm-guest-modal__decor-icons .lmm-side-icon--croissant {
    top: auto;
    bottom: 96px;
    right: 70px;
  }

  .lmm-guest-modal__decor-icons .lmm-side-icon--cart {
    top: auto;
    bottom: 94px;
    right: 20px;
  }

  .lmm-guest-modal__legal {
    max-width: 100%;
    font-size: 11px;
    margin: 8px auto 8px;
  }
}