/* Only the offer block disappears outside its dates; keep the product and pin. */
.monthly-hotspot__coupon[hidden],
.monthly-hotspot__time[hidden],
.monthly-hotspot__stroke[hidden] {
  display: none !important;
}

.monthly-hotspot-root {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.monthly-hotspot {
  --hotspot-popup-gap: 12px;
  --hotspot-pin-size: 30px;
  position: absolute;
  z-index: 1;
  width: 0;
  height: 0;
  pointer-events: auto;
}

.monthly-hotspot.is-open {
  z-index: 200;
}

/* 열린 핫스팟이 있을 때 다른 핀이 hover를 가로채지 않도록 */
.monthly-hotspot-root:has(.monthly-hotspot.is-open) .monthly-hotspot:not(.is-open) {
  pointer-events: none;
}

.monthly-hotspot__pin {
  --spot-cta-scale: 1;
  --spot-cta-before-scale: 1;
  --spot-cta-after-scale: 1;
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  z-index: 35;
}

.monthly-hotspot__pin-visual {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #a50034;
  transform: scale(var(--spot-cta-scale));
  transform-origin: center center;
  transition:
    transform 0.3s ease-in-out,
    background-color 0.3s ease-in-out;
  pointer-events: none;
}

.monthly-hotspot__pin-visual::before,
.monthly-hotspot__pin-visual::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition:
    transform 0.3s ease-in-out,
    width 0.3s ease-in-out,
    height 0.3s ease-in-out;
  pointer-events: none;
}

/* 후광 레이어 */
.monthly-hotspot__pin-visual::before {
  width: 40px;
  height: 40px;
  background: rgba(165, 0, 52, 0.2);
  filter: blur(5px);
  z-index: -1;
  transform: translate(-50%, -50%) scale(var(--spot-cta-before-scale));
}

/* 흰색 동그라미 */
.monthly-hotspot__pin-visual::after {
  width: 10px;
  height: 10px;
  background: #fff;
  transform: translate(-50%, -50%) scale(var(--spot-cta-after-scale));
}

.monthly-hotspot__popup {
  position: absolute;
  top: 56px;
  transform: translateY(6px);
  display: none;
  z-index: 2;
  opacity: 0;
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.25));
}

.monthly-hotspot.is-open .monthly-hotspot__popup {
  display: block;
  animation: monthly-hotspot-popup-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.monthly-hotspot__popup.is-measuring {
  visibility: hidden;
  display: block;
  animation: none;
  opacity: 0;
  transform: none;
}

@keyframes monthly-hotspot-popup-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .monthly-hotspot.is-open .monthly-hotspot__popup {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.monthly-hotspot__popup-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  width: 328px;
}

.monthly-hotspot__arrow {
  position: absolute;
  width: 32px;
  height: 23px;
  top: -22px;
  transform: translateX(-50%);
  pointer-events: none;
  color: #fff;
}

.monthly-hotspot__arrow img,
.monthly-hotspot__arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}

.monthly-hotspot__box {
  position: relative;
  box-sizing: border-box;
  background: #fff;
  width: 100%;
  padding: 30px;
  border-radius: 10px;
}

.monthly-hotspot__product {
  display: flex;
  align-items: flex-start;
  max-width: none;
  width: 100%;
}

.monthly-hotspot__img {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.monthly-hotspot__img img {
  display: block;
  max-width: 120%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.monthly-hotspot__text {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.monthly-hotspot__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  letter-spacing: -0.2px;
}

.monthly-hotspot__model {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
  color: #767676;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.monthly-hotspot__title {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
  color: #000;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
}

.monthly-hotspot__cta {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  height: auto;
  padding: 10px 16px;
  border: 1px solid #94928d;
  border-radius: 8px;
  background: #fff;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  align-self: flex-start;
}

.monthly-hotspot__cta:hover {
  background: #f7f7f7;
}

.monthly-hotspot__close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.monthly-hotspot__close img,
.monthly-hotspot__close svg {
  display: block;
  width: 24px;
  height: 24px;

  @media (min-width: 769px) {
    width: 28px;
    height: 28px;
  }
}

.monthly-hotspot__stroke {
  --hs-stroke: #c72c48;
  --hs-stroke-gap: #fff;
  flex: 0 0 auto;
  width: calc(100% - 20px);
  margin-inline: 10px;
  height: 2px;
  align-self: stretch;
  background: repeating-linear-gradient(to right,
      var(--hs-stroke) 0 3px,
      var(--hs-stroke-gap) 3px 6px);
}

.monthly-hotspot__coupon {
  --hs-coupon-bg: #c72c48;
  --hs-coupon-fg: #fff;
  --hs-coupon-btn-bg: #262626;
  --hs-coupon-btn-fg: #fff;
  --hs-coupon-btn-hover-bg: #fff;
  --hs-coupon-btn-hover-fg: #000;
  --hs-coupon-btn-hover-border: #646464;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  padding: 15px 30px;
  background: var(--hs-coupon-bg);
  border-radius: 10px;
  color: var(--hs-coupon-fg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

/* MT0004 .coupon-code-box 컬러 클래스와 동일
 * white / green: 버튼 오버라이드 없음 → c-button highlight(#ea1917)와 동일 */
.monthly-hotspot__coupon.white {
  --hs-coupon-bg: #fff;
  --hs-coupon-fg: #000;
  --hs-coupon-btn-bg: #ea1917;
  --hs-coupon-btn-fg: #fff;
}

.monthly-hotspot__coupon.gray {
  --hs-coupon-bg: #4b4b4b;
  --hs-coupon-fg: #fff;
  --hs-coupon-btn-bg: hsla(0, 0%, 100%, 0.8);
  --hs-coupon-btn-fg: #000;
}

.monthly-hotspot__coupon.beige {
  --hs-coupon-bg: #d9c6b5;
  --hs-coupon-fg: #33251f;
  --hs-coupon-btn-bg: #33251f;
  --hs-coupon-btn-fg: #fff;
}

.monthly-hotspot__coupon.brown {
  --hs-coupon-bg: #5c4033;
  --hs-coupon-fg: #fff;
  --hs-coupon-btn-bg: #33251f;
  --hs-coupon-btn-fg: #fff;
}

.monthly-hotspot__coupon.green {
  --hs-coupon-bg: #093b30;
  --hs-coupon-fg: #fff;
  --hs-coupon-btn-bg: #ea1917;
  --hs-coupon-btn-fg: #fff;
}

.monthly-hotspot__coupon.red {
  --hs-coupon-bg: #c72c48;
  --hs-coupon-fg: #fff;
  --hs-coupon-btn-bg: #262626;
  --hs-coupon-btn-fg: #fff;
}

.monthly-hotspot__stroke:has(+ .monthly-hotspot__coupon.white) {
  --hs-stroke: #000;
}

.monthly-hotspot__stroke:has(+ .monthly-hotspot__coupon.gray) {
  --hs-stroke: #4b4b4b;
}

.monthly-hotspot__stroke:has(+ .monthly-hotspot__coupon.beige) {
  --hs-stroke: #d9c6b5;
}

.monthly-hotspot__stroke:has(+ .monthly-hotspot__coupon.brown) {
  --hs-stroke: #5c4033;
}

.monthly-hotspot__stroke:has(+ .monthly-hotspot__coupon.green) {
  --hs-stroke: #093b30;
}

.monthly-hotspot__stroke:has(+ .monthly-hotspot__coupon.red) {
  --hs-stroke: #c72c48;
}

.monthly-hotspot__coupon-top {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.monthly-hotspot__coupon-row {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
}

.monthly-hotspot__special {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  font-weight: 400;
  letter-spacing: -0.2px;
  color: inherit;
}

.monthly-hotspot__discount {
  position: absolute;
  right: 0;
  bottom: -6px;
  margin: 0;
  color: inherit;
  line-height: 40px;
}

.monthly-hotspot__discount-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.monthly-hotspot__discount-unit {
  font-size: 24px;
  font-weight: 700;
}

.monthly-hotspot__discount-off {
  font-size: 24px;
  font-weight: 400;
}

.monthly-hotspot__time {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 88px);
  margin-top: 0;
  font-size: 14px;
  line-height: 14px;
  font-weight: 600;
  color: inherit;
}

.monthly-hotspot__time img,
.monthly-hotspot__time svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: inherit;
}

.monthly-hotspot__time-text {
  margin: 0;
}

.monthly-hotspot__code {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 100px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  margin: 0;
  border: 1px solid transparent !important;
  border-radius: 6px;
  background: var(--hs-coupon-btn-bg) !important;
  color: var(--hs-coupon-btn-fg);
  cursor: pointer;
  font-size: 16px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

@media (hover: hover) and (pointer: fine) {
  .monthly-hotspot__code:hover {
    background: var(--hs-coupon-btn-hover-bg) !important;
    border-color: var(--hs-coupon-btn-hover-border) !important;
    color: var(--hs-coupon-btn-hover-fg);
  }
}

.monthly-hotspot__code img,
.monthly-hotspot__code svg {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: inherit;
}

.monthly-hotspot__code-label {
  white-space: nowrap;
}

@media (min-width: 769px) {
  .monthly-hotspot {
    --hotspot-pin-size: clamp(2.8125rem, 4.375vw, 4.375rem);
  }

  .monthly-hotspot__popup {
    top: 65px;
  }

  .monthly-hotspot__popup.is-measuring {
    display: block;
  }

  .monthly-hotspot__pin {
    --spot-cta-size: clamp(2.8125rem, 4.375vw, 4.375rem);
    --spot-cta-size-hover: 3.125rem;
    --spot-cta-before-size: clamp(3.4375rem, 5vw, 5rem);
    --spot-cta-before-size-hover: 3.75rem;
    --spot-cta-after-size: clamp(1rem, 1.5625vw, 1.5625rem);
    --spot-cta-after-size-hover: 0.9375rem;
    width: var(--spot-cta-size);
    height: var(--spot-cta-size);
  }

  /* hover — hit area stays at --spot-cta-size; only the inner visual scales. */
  @media (hover: hover) and (pointer: fine) {
    .monthly-hotspot__pin:hover {
      --spot-cta-scale: calc(var(--spot-cta-size-hover) / var(--spot-cta-size));
      --spot-cta-before-scale: calc((var(--spot-cta-before-size-hover) / var(--spot-cta-before-size)) / var(--spot-cta-scale));
      --spot-cta-after-scale: calc((var(--spot-cta-after-size-hover) / var(--spot-cta-after-size)) / var(--spot-cta-scale));
    }
  }

  .monthly-hotspot__pin-visual::before {
    width: var(--spot-cta-before-size);
    height: var(--spot-cta-before-size);
  }

  .monthly-hotspot__pin-visual::after {
    width: var(--spot-cta-after-size);
    height: var(--spot-cta-after-size);
  }

  .monthly-hotspot.is-open .monthly-hotspot__popup {
    display: block;
  }

  .monthly-hotspot__popup-inner {
    flex-direction: row;
    width: auto;
  }

  .monthly-hotspot__popup-inner.is-coupon-stack {
    flex-direction: column;
    width: 440px;
    max-width: calc(100vw - 32px);
  }

  .monthly-hotspot__popup-inner.is-coupon-stack .monthly-hotspot__box {
    width: 100%;
  }

  .monthly-hotspot__popup-inner.is-coupon-stack .monthly-hotspot__stroke {
    flex: 0 0 auto;
    width: calc(100% - 24px);
    height: 2px;
    margin-inline: 12px;
    align-self: stretch;
    background: repeating-linear-gradient(to right,
        var(--hs-stroke) 0 3px,
        var(--hs-stroke-gap) 3px 6px);
  }

  .monthly-hotspot__popup-inner.is-coupon-stack .monthly-hotspot__coupon {
    width: 100%;
    min-height: 0;
    gap: 14px;
  }

  .monthly-hotspot__popup-inner.is-coupon-stack .monthly-hotspot__coupon-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
  }

  .monthly-hotspot__popup-inner.is-coupon-stack .monthly-hotspot__discount {
    position: absolute;
    right: 0;
    bottom: -6px;
    line-height: 40px;
  }

  .monthly-hotspot__popup-inner.is-coupon-stack .monthly-hotspot__time {
    max-width: calc(100% - 88px);
    margin-top: 0;
    line-height: 14px;
    font-weight: 600;
  }

  .monthly-hotspot__box {
    width: 440px;
    padding: 40px 30px 30px;
    border-radius: 20px;
  }

  .monthly-hotspot__product {
    max-width: 380px;
  }

  .monthly-hotspot__title {
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
  }

  .monthly-hotspot__cta {
    height: 36px;
    padding: 0 24px;
    font-size: 14px;
    line-height: 20px;
  }

  .monthly-hotspot__close {
    width: 44px;
    height: 44px;
  }

  .monthly-hotspot__stroke {
    flex: 0 0 4px;
    width: 4px;
    height: 168px;
    align-self: center;
    background: repeating-linear-gradient(to bottom,
        var(--hs-stroke) 0 6px,
        var(--hs-stroke-gap) 6px 12px);
    margin-inline: 0;
  }

  .monthly-hotspot__coupon {
    flex: 0 0 auto;
    width: max-content;
    min-width: 223px;
    min-height: 208px;
    padding: 30px;
    border-radius: 20px;
    gap: 0;
  }

  /* 
  .monthly-hotspot__special {
    margin: 0 0 4px;
  } */

  .monthly-hotspot__coupon-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .monthly-hotspot__discount {
    position: static;
    line-height: 48px;
    white-space: nowrap;
  }

  .monthly-hotspot__discount-num {
    font-size: 48px;
  }

  .monthly-hotspot__discount-unit {
    font-size: 32px;
  }

  .monthly-hotspot__discount-off {
    font-size: 32px;
    white-space: nowrap;
  }

  .monthly-hotspot__time {
    max-width: none;
    margin-top: -6px;
    line-height: 20px;
    font-weight: 400;
  }

  .monthly-hotspot__code {
    justify-content: space-between;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
  }

  .monthly-hotspot__code img,
  .monthly-hotspot__code svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
  }
}
