html.popup-open,
body.popup-open {
    overflow: hidden !important;
    height: 100%;
}

body.popup-open #x-header-host {
    display: none !important;
}

body.popup-open #btc_main-header {
    display: none !important;
} 
/* ポップアップ表示中はTOPボタン非表示 */
body.popup-open #page-top {
    display: none !important;
}

/* ポップアップ外側の背景（オーバーレイ） */
.popup-overlay {
    display: none; /* 初期は非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}

/* ポップアップ本体 */
.popup-content {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: popupShow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes popupShow {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 画像エリア */
.popup-image {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    text-align: center;
}

.popup-image img {
    width: 100%;
    height: auto;
    display: block;
    background: #f9f9f9;
}

/* 本文テキストエリア */
.popup-body {
    padding: 20px 25px;
    line-height: 1.7;
    color: #444;
}

.popup-main-text {
    font-size: 0.95rem;
    margin: 0 0 15px 0;
}

.popup-highlight {
    color: #c4391d;
    font-weight: bold;
    border-bottom: 2px solid #f8d7da;
}

.popup-sub-text {
    font-size: 0.75rem;
    color: #1a2a40;
    margin: 0;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

/* フッターボタンエリア（時差表示制御。JSは #popup-footer に is-visible/is-show を付与する） */
.popup-footer {
    padding: 20px 25px 25px;
    min-height: 80px; /* ボタン出現時のガタつき防止 */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* 最初は透明 */
    visibility: hidden; /* クリックもできないように */
    transition: opacity 0.8s ease, visibility 0.8s;
}

/* JavaScriptでこのクラスを付与して表示させる（ページによって is-visible / is-show どちらも使われるため両対応） */
.popup-footer.is-visible,
.popup-footer.is-show {
    opacity: 1;
    visibility: visible;
}

.popup-btn-confirm {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 16px;
    background: #3b547b;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    -webkit-appearance: none;
}

/* カート内ポップアップ（.cart-index配下）はボタン単体を時差表示：JSがボタンにis-showを付与する */
.cart-index .popup-btn-confirm {
    background: #0b6315;
    opacity: 0; /* 最初は透明 */
    visibility: hidden; /* クリックもできない状態 */
    transition: opacity 0.8s ease-in, visibility 0.8s; /* ふわっと出すアニメーション */
}
.cart-index .popup-btn-confirm.is-show {
    opacity: 1;
    visibility: visible;
}

.popup-btn-confirm:active {
    opacity: 0.7;
}

/* デモ用表示ボタン */
.popup-demo-btn {
    padding: 15px 30px;
    font-size: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}