/* ===== 연관 제품 플로팅 버튼/패널 (rel_float) =====
   아지트 글 상세(board_detail)·제품 상세(release_raffle_detail) 공용 — 마크업/JS 는 luckydraw/web/rel_float/rel_float.html */
.rel_float_fab {
    position: fixed;
    right: 20px;
    bottom: 124px; /* 스크롤탑 버튼(bottom 80px, 32px) 위 12px */
    z-index: 101;
    height: 52px;
    min-width: 52px;
    border-radius: 26px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    padding: 3px;
    cursor: pointer;
    transition: opacity 0.25s;
}
.rel_float_fab img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #f5f5f5;
    display: block;
}
.rel_float_fab__label {
    display: none;
    font-family: Pretendard;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    padding: 0 12px 0 9px;
    color: rgb(0, 0, 0);
}
.rel_float_fab.peek .rel_float_fab__label { display: inline; }
.rel_float_fab__badge {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}
.rel_float_fab.peek .rel_float_fab__badge { display: none; }
.rel_float_container.fab_hide .rel_float_fab {
    opacity: 0;
    pointer-events: none;
}
.rel_float_dim {
    position: fixed;
    left: 0; right: 0; top: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 1200;
    display: none;
}
.rel_float_container.open .rel_float_dim { display: block; }
.rel_float_panel {
    position: fixed;
    z-index: 1201;
    background: #fff;
    display: none;
}
.rel_float_container.open .rel_float_panel { display: flex; flex-direction: column; }
.rel_float_panel__list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    min-height: 0;
}
.rel_float_panel__handle {
    width: 44px;
    height: 4px;
    border-radius: 2px;
    background: #e0e0e0;
    margin: 2px auto 14px;
}
.rel_float_panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.rel_float_panel__title {
    font-family: Pretendard;
    font-size: 18px;
    font-weight: 700;
    color: rgb(0, 0, 0);
}
.rel_float_panel__close {
    border: none;
    background: none;
    padding: 0;
    width: 24px;
    height: 24px;
    color: #999;
    font-size: 19px;
    line-height: 22px;
    cursor: pointer;
}
.rel_float_panel__row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid #f2f2f2;
    text-decoration: none;
    color: inherit;
}
.rel_float_panel__row:last-child { border-bottom: none; }
.rel_float_panel__row img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #eee;
    background: #fafafa;
}
.rel_float_panel__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.rel_float_panel__brand {
    font-family: Oswald;
    font-size: 12px;
    color: rgb(0, 0, 0);
    font-weight: 500;
    text-decoration-line: underline;
}
.rel_float_panel__name {
    font-family: Pretendard;
    font-size: 14px;
    font-weight: 400;
    margin-top: 3px;
    color: rgb(0, 0, 0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rel_float_panel__price {
    font-family: Pretendard;
    font-size: 13px;
    color: rgb(0, 0, 0);
    font-weight: 500;
    margin-top: 3px;
}
.rel_float_panel__chev {
    color: #c4c4c4;
    font-size: 18px;
}
/* 제품 상세 전용 — 패널 최상단 '지금 보는 제품' + 바로 구매 버튼 (리스트 스크롤과 무관하게 고정) */
.rel_float_panel__current {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: #f6f6f6;
}
.rel_float_panel__current img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
}
.rel_float_panel__buy {
    flex-shrink: 0;
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    font-family: Pretendard;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.rel_float_panel__buy:hover { background: rgb(51, 51, 51); }
.rel_float_panel__subtitle {
    font-family: Pretendard;
    font-size: 15px;
    font-weight: 700;
    color: rgb(0, 0, 0);
    margin-bottom: 2px;
}
@media screen and (max-width: 767px) {
    /* 제품 상세: 모바일 하단 고정 구매 바(bottom 67px + 높이 65px) 위 12px */
    .rel_float_container--buybar .rel_float_fab { bottom: 144px; }
    .rel_float_panel {
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 72vh;
        border-radius: 20px 20px 0 0;
        padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    }
}
.rel_float_bar { display: none; }
@media screen and (min-width: 768px) {
    /* PC: 우하단 원형 버튼 대신 하단 스티키 바 */
    .rel_float_fab { display: none; }
    .rel_float_bar {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
        z-index: 1100;
        width: min(760px, calc(100% - 48px));
        display: flex;
        align-items: center;
        gap: 16px;
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 18px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
        padding: 12px 24px;
        cursor: pointer;
        font-family: Pretendard;
        transition: opacity 0.25s;
    }
    .rel_float_bar__title {
        font-size: 15px;
        font-weight: 700;
        color: rgb(0, 0, 0);
    }
    .rel_float_bar__thumbs { display: flex; }
    .rel_float_bar__thumbs img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px #eee;
        margin-left: -10px;
        background: #fafafa;
    }
    .rel_float_bar__thumbs img:first-child { margin-left: 0; }
    .rel_float_bar__chev {
        margin-left: auto;
        color: #999;
        font-size: 13px;
        font-weight: 500;
    }
    .rel_float_container.fab_hide .rel_float_bar {
        opacity: 0;
        pointer-events: none;
    }
    body:has(.rel_float_container) { padding-bottom: 88px; }

    .rel_float_panel {
        left: auto;
        right: max(20px, calc((100% - 760px) / 2));
        bottom: 96px;
        width: 344px;
        max-height: calc(100vh - 144px);
        border-radius: 16px;
        border: 1px solid #eaeaea;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
        padding: 16px 20px 8px;
    }
    .rel_float_panel__handle { display: none; }
    .rel_float_dim { background: transparent; }
    .rel_float_panel__title { font-size: 16px; }
}
