/* 右下の販促カード（templates/components/promo_popup.html.twig・promo-popup.js）
   重なり順: ヘッダー/メニュー(2506)・動画や絞り込みのモーダル(9999)・Bootstrap のモーダル(1055) より下に置く */
.promo-popup {
    position: fixed;
    z-index: 1000;
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: min(300px, calc(100vw - 32px));
    background: #fff;
    color: #222;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateX(calc(100% + 24px));
    transition: transform 700ms cubic-bezier(0.2, 1.3, 0.4, 1), opacity 300ms ease-out;
}
.promo-popup[hidden] {
    display: none !important;
}
.promo-popup.is-in {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .promo-popup {
        transform: none;
        transition: opacity 300ms ease-out;
    }
}
@media (min-width: 768px) {
    .promo-popup {
        right: 24px;
        bottom: 24px;
        width: 320px;
    }
}

.promo-popup__link {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 16px 12px 12px;
    color: inherit;
    text-decoration: none;
}
.promo-popup__link:hover {
    color: inherit;
    text-decoration: none;
}
.promo-popup__img {
    flex: none;
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f3f3;
}
.promo-popup__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    line-height: 1.35;
}
.promo-popup__label {
    background: #d61f26;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
}
.promo-popup__title {
    margin-top: 4px;
    font-size: 0.875rem;
    font-weight: 700;
}
.promo-popup__note {
    font-size: 0.8125rem;
    color: #555;
}
.promo-popup__cta {
    margin-top: 6px;
    background: #d61f26;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 4px;
}
.promo-popup__link:hover .promo-popup__cta {
    background: #b40000;
}

/* ✕: カードの角からはみ出す黒い丸。押せる範囲は見た目より広くする */
.promo-popup__close {
    position: absolute;
    z-index: 1;
    top: -12px;
    right: -8px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}
.promo-popup__close svg {
    display: block;
}
.promo-popup__close::before {
    content: "";
    position: absolute;
    inset: -8px;
}
.promo-popup__close:focus-visible {
    outline: 3px solid #d61f26;
    outline-offset: 2px;
}

/* カードが出ている間は「上へ戻る」(common.css の .c_totop・右下 bottom 40px) をカードの上へ逃がす */
body.promo-popup-open .c_totop:not(.is_footer) {
    bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 768px) {
    body.promo-popup-open .c_totop:not(.is_footer) {
        bottom: 160px;
    }
}
