/* ═══════════════════════════════════════════════
   객실 360° 투어 — 레지던스 삼우 장천점
═══════════════════════════════════════════════ */

/* ── 랜딩 페이지 객실 스트립 ─────────────────── */
#room360-strip {
    width: 100%;
    max-width: 1100px;
    margin: 42px auto 0;
}
.r360-strip-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding: 0 4px 14px;
}
.r360-strip-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #1e3a5f;
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 1.2;
}
.r360-strip-title i { color: #0a9b8e; font-size: 1.25rem; }
.r360-strip-sub {
    margin-top: 5px;
    font-size: 0.82rem;
    color: #6b7684;
}
.r360-more {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(10, 155, 142, 0.4);
    background: rgba(255, 255, 255, 0.75);
    color: #0a9b8e;
    font-family: 'Pretendard', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s;
}
.r360-more:hover { background: #0a9b8e; color: #fff; transform: translateY(-2px); }
.r360-more i { font-size: 0.75rem; }

.r360-lane-wrap { position: relative; }
.r360-lane {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 6px 4px 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.r360-lane::-webkit-scrollbar { display: none; }
.r360-lane .r360-room {
    flex: 0 0 268px;
    scroll-snap-align: start;
}
.r360-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(255, 255, 255, 0.92);
    color: #35485c;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.r360-arrow:hover { background: #0a9b8e; color: #fff; }
.r360-arrow.prev { left: -14px; }
.r360-arrow.next { right: -14px; }

/* ── 호실 선택 오버레이 ────────────────────── */
#room360-container {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10;
    flex-direction: column;
    align-items: center;
    padding: 50px 20px;
}
#room360-container.open { display: flex; }

.r360-card {
    width: 100%;
    height: 100%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 26px 30px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
}
.r360-head { text-align: center; flex-shrink: 0; }
.r360-head h2 {
    font-size: 28px;
    color: #2c3e50;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.r360-head h2 i { color: #0a9b8e; }
.r360-head p {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6b7684;
}

/* 층 필터 */
.r360-floors {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 14px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.r360-floor-btn {
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid rgba(10, 155, 142, 0.35);
    background: rgba(255, 255, 255, 0.7);
    color: #0a9b8e;
    font-family: 'Pretendard', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s;
}
.r360-floor-btn:hover { background: rgba(10, 155, 142, 0.1); }
.r360-floor-btn.active {
    background: #0a9b8e;
    border-color: #0a9b8e;
    color: #fff;
    box-shadow: 0 6px 16px rgba(10, 155, 142, 0.3);
}

/* 카드 그리드 */
.r360-grid-wrap {
    flex: 1 1 auto;
    overflow-y: auto;
    margin-right: -12px;
    padding-right: 12px;
}
.r360-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    padding-bottom: 6px;
}

.r360-room {
    position: relative;
    border: none;
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    background: #e9edf1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(.2, .8, .3, 1), box-shadow 0.3s;
    font-family: 'Pretendard', sans-serif;
    text-align: left;
    aspect-ratio: 16 / 11;
    display: block;
}
.r360-room:hover,
.r360-room:focus-visible {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
    outline: none;
}
.r360-room:active { transform: translateY(-2px) scale(1.0); }

.r360-room .shot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.1s ease;
    transform: scale(1.04);
}
.r360-room .shot.on { opacity: 1; }

.r360-room .veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.34) 38%,
        rgba(0, 0, 0, 0) 68%);
}

.r360-room .info {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 14px 16px;
    color: #fff;
}
.r360-room .num {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.r360-room .num small { font-size: 0.9rem; font-weight: 700; opacity: 0.85; margin-left: 3px; }
/* 공용 공간 카드: 번호 대신 장소 이름 */
.r360-room.is-place .num {
    font-size: 1.18rem;
    line-height: 1.28;
    letter-spacing: -0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.r360-room .meta {
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}
.r360-room .chip {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    backdrop-filter: blur(4px);
}

.r360-badge {
    position: absolute;
    top: 11px; right: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(10, 155, 142, 0.9);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.r360-badge i { font-size: 0.78rem; animation: r360-spin 3.4s linear infinite; }
@keyframes r360-spin { to { transform: rotate(360deg); } }

.r360-dots {
    position: absolute;
    top: 14px; left: 13px;
    display: flex;
    gap: 4px;
}
.r360-dots span {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transition: background 0.4s, width 0.4s;
}
.r360-dots span.on { background: #fff; width: 14px; border-radius: 3px; }

.r360-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #8a94a0;
    padding: 60px 20px;
    font-size: 0.95rem;
}

.r360-back {
    flex-shrink: 0;
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 18px auto 0;
    padding: 15px;
    background: #fff;
    color: #0a9b8e;
    border: 1px solid #0a9b8e;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    transition: all 0.25s;
}
.r360-back:hover { background: #0a9b8e; color: #fff; }

/* ── 파노라마 뷰어 ─────────────────────────── */
#pano-viewer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 60;
    background: #10141a;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
#pano-viewer.open { display: block; }
#pano-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}
#pano-canvas.grabbing { cursor: grabbing; }

.pano-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 18px 20px 44px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.62), rgba(0,0,0,0));
    pointer-events: none;
    z-index: 3;
}
.pano-title { color: #fff; pointer-events: none; }
.pano-title .rnum {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.pano-title .rsub {
    margin-top: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pano-title .rsub .dot { opacity: 0.5; }

.pano-btn {
    pointer-events: auto;
    width: 48px; height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.pano-btn:hover { background: rgba(255,255,255,0.22); transform: scale(1.07); }
.pano-btn:active { transform: scale(0.96); }

.pano-tools {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3;
}

/* 좌우 호실 이동 */
.pano-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 54px; height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(0,0,0,0.32);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.pano-nav:hover { background: rgba(255,255,255,0.22); }
.pano-nav.prev { left: 18px; }
.pano-nav.next { right: 88px; }

/* 하단 시점 썸네일 */
.pano-bottom {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 60px 20px 22px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 3;
}
.pano-shots {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.pano-shots button {
    width: 104px; height: 66px;
    padding: 0;
    border-radius: 11px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
    background: #222;
    cursor: pointer;
    opacity: 0.62;
    transition: all 0.25s;
}
.pano-shots button { position: relative; }
.pano-shots button img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 공용 공간처럼 컷마다 이름이 있으면 썸네일 아래에 표시 */
.pano-shots button .cap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 3px 4px;
    background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0));
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pano-shots button:hover { opacity: 0.9; }
.pano-shots button.active {
    opacity: 1;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.35);
    transform: translateY(-3px);
}

/* 드래그 안내 */
.pano-hint {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    padding: 13px 24px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    transition: opacity 0.6s;
}
.pano-hint i { animation: pano-swipe 2s ease-in-out infinite; }
@keyframes pano-swipe {
    0%, 100% { transform: translateX(-7px); }
    50%      { transform: translateX(7px); }
}
.pano-hint.hide { opacity: 0; }

/* 로딩 */
.pano-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(16, 20, 26, 0.82);
    color: #fff;
    transition: opacity 0.45s;
}
.pano-loading.hide { opacity: 0; pointer-events: none; }
.pano-spin {
    width: 46px; height: 46px;
    border: 4px solid rgba(255,255,255,0.18);
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: r360-spin 0.9s linear infinite;
}
.pano-loading span { font-size: 0.88rem; opacity: 0.8; font-weight: 600; }

.pano-error {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #10141a;
    color: #fff;
    text-align: center;
    padding: 30px;
}
.pano-error.show { display: flex; }
.pano-error i { font-size: 2.4rem; color: #f59e0b; }

/* ── 세로형 키오스크 / 모바일 ───────────────── */
@media (max-width: 820px) {
    #room360-strip { margin-top: 32px; }
    .r360-strip-title { font-size: 1.2rem; }
    .r360-lane .r360-room { flex-basis: 230px; }
    .r360-arrow.prev { left: -6px; }
    .r360-arrow.next { right: -6px; }
    #room360-container { padding: 24px 12px; }
    .r360-card { padding: 20px 16px 18px; border-radius: 20px; }
    .r360-head h2 { font-size: 23px; }
    .r360-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .r360-room .num { font-size: 1.35rem; }
    .pano-title .rnum { font-size: 1.5rem; }
    .pano-nav { width: 46px; height: 46px; }
    .pano-nav.next { right: 76px; }
    .pano-shots button { width: 74px; height: 48px; }
    .pano-tools { right: 14px; gap: 8px; }
    .pano-btn { width: 42px; height: 42px; font-size: 1rem; }
}
