/* =========================
  (mobile base) lucky coupon 202607 
========================= */

.lucky_banner {
  display:block;
  width:100%;
  margin-top:30px;
  padding:0;
  border:0;
  background:none;
}

.lucky_banner img {
  display:block;
  width:100%;
  cursor: pointer;
}

.lucky_layer {
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
}

.lucky_layer.is_active {
  display:block;
}

.lucky_layer__dim {
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
}

.lucky_layer__box {
  position:absolute;
  left:50%;
  top:50%;
  width:94vw;
  max-width:420px;
  aspect-ratio:768 / 1132;
  transform:translate(-50%, -50%);
  background:url("../img/event/lucky_coupon_bg.png") center/cover no-repeat;  
  border-radius:12px;
  overflow:hidden;
}

.lucky_layer__close {
  position:absolute;
  right:12px;
  top:12px;
  z-index:5;
  width:34px;
  height:34px;
  border:0;
  border-radius:50%;
  background:rgba(0,0,0,.45);
  color:#fff;
  font-size:0;
  cursor: pointer;
}

.lucky_layer__close::before,
.lucky_layer__close::after {
  content:"";
  position:absolute;
  left:9px;
  top:16px;
  width:16px;
  height:2px;
  background:#fff;
}

.lucky_layer__close::before {
  transform:rotate(45deg);
}

.lucky_layer__close::after {
  transform:rotate(-45deg);
}

.lucky_layer__content {
  width:100%;
  height:100%;
  padding:18% 0 0;
  box-sizing:border-box;
  text-align:center;
}

.lucky_coupon_card {
  width:76%;
  margin:52px auto 0;
  perspective:1000px;
  opacity:0;
  transform:scale(.9);
  transition:.25s ease;
}

.lucky_layer.is_active .lucky_coupon_card{
  opacity:1;
  transform:scale(1);
}

.lucky_coupon_card__inner {
  position:relative;
  width:100%;
  aspect-ratio:548 / 677;
  transform-style:preserve-3d;
  animation:couponFlip 1.2s ease .3s forwards;
}

/* 애니메이션 시작 */
.lucky_coupon_card__inner.is_play{
    animation:couponFlip 1.2s ease forwards;
}

.lucky_coupon_card__front,
.lucky_coupon_card__back {
  position:absolute;
  inset:0;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  overflow:hidden;
  background-size:100% 100%;
  padding:none;
}

.lucky_coupon_card__front{
    background:
      url("../img/event/lucky_coupon_back.png")
      center center / 100% 100%
      no-repeat;
}

.lucky_coupon_card__front img {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.lucky_coupon_card__back {
  background:
    url("../img/event/lucky_coupon_clover.png")
    center center / 100% 100% 
    no-repeat;  
  
  transform:rotateY(180deg);
  padding:16% 8%;
  box-sizing:border-box;

  display:flex;
  flex-direction:column;
  align-items:center;
}

@keyframes couponFlip {
  0% {
    transform:rotateY(0deg) scale(.96);
  }

  60% {
    transform:rotateY(540deg) scale(1.04);
  }

  100% {
    transform:rotateY(180deg) scale(1);
  }
}

.coupon_name {
  margin:0 0 6%;
  font-size:24px;
  font-weight:700;
  color:#35513f;
}

.coupon_clover {
  width:70%;
  aspect-ratio:1 / 1;
  margin:0 auto 8%;

  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;

  color:#fff;
  text-align:center;
}

.coupon_percent_wrap {
  display:flex;
  align-items:flex-end;
  justify-content:center;
  line-height:1;
  white-space:nowrap;
}

.coupon_percent {
  font-size:44px;
  font-weight:800;
  line-height:1;
}

.unit {
  font-size:26px;
  font-weight:500;
  line-height:1;
  margin-left:2px;
  transform:translateY(-2px);
}

.coupon_text {
  margin-top:4px;
  font-size:19px;
  font-weight:800;
  line-height:1.15;
}

.coupon_code {
  margin-top:8px;
  padding:3px 8px;
  background:#e7ff6a;
  color:#000;
  font-size:20px;
  font-style:normal;
  font-weight:900;
  line-height:1.1;
}

.coupon_date {
  margin-top:10px;
  font-size:16px;
  font-weight:700;
  color:#42624f;
}

.lucky_layer__btns {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  margin-top:2%;
}

.lucky_layer__btns button {
  flex:0 0 auto;
  width:auto;
  min-width:112px;
  height:52px;
  padding:0 24px;
  border:0;
  border-radius:28px;
  background:#0a3824;
  color:#e8ff79;
  font-size:17px;
  font-weight:700;
  white-space:nowrap;
  cursor: pointer;
}
