#promo-popup {
  position: fixed;
  top: auto !important; 
  left: auto !important; 
  right: 20px;
  bottom: 20px;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  z-index: 100001;        /* 高於手機版 Floating Icon 的 z-index */
  display: none;        /* JS 會控制顯示 */
  justify-content: center;
  align-items: flex-end;
  pointer-events: none; 
  animation: slideInRight 0.5s ease-out forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

#promo-popup .popup-content {
  position: relative;
  background: #ffffff !important;
  border-radius: 12px;
  padding: 25px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  color: #2b2b2b;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.15); 
  border: 1px solid #eeeeee;
  pointer-events: auto; 
}

/* 右上角關閉按鈕 */
#promo-popup .close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1000;
  background: transparent;
  border: none;
  font-size: 20px;           /* ×小一點 */
  cursor: pointer;
  font-weight: bold;
  color: #333;
  padding: 0;
  line-height: 1;
}

#promo-popup .close-btn:hover {
  color: #405369;            /* hover 顏色 */
}

/* 標題 h2 響應式 */
#promo-popup h2 {
  font-weight: bold;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

@media screen and (max-width: 768px) {
  #promo-popup {
    left: 0 !important;
    right: 0 !important;
    bottom: 110px !important; 
    margin: 0 auto;
    width: auto;
    justify-content: center;
    animation: slideUpPopup 0.5s ease-out forwards !important;
  }

  /* 取消桌機版動畫 */
  @keyframes slideInRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(0); opacity: 1; }
  }

  #promo-popup .popup-content {
    width: 100%; 
    max-width: 320px;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.15);
  }

/* 手機版由下往上滑入動畫定義 */
  @keyframes slideUpPopup {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  #promo-popup h2 {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  #promo-popup h2 {
    font-size: 1.2rem;
  }
}

/* 按鈕同一行 */
.popup-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top:1.5rem;
}

/* 按鈕樣式 - 確保背景色正確 */
.popup-buttons button {
  background-color: #406359 !important;
  color: #fff !important;
  padding: 16px 20px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  width: 40%;
}