/* ============================================================
   리뷰 상세 패널 + Lightbox
   ============================================================ */

.rv-panel {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    pointer-events: none;
}

.rv-panel.is-open {
    display: block;
    pointer-events: auto;
}

.rv-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
}

.rv-panel__layout {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
}

.rv-panel__media-col {
    flex: 1;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    min-width: 0;
}

.rv-panel__media-close {
    display: none;
}

.rv-panel__media-main {
    max-width: min(720px, 100%);
    max-height: min(80vh, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rv-panel__media-main img,
.rv-panel__media-main video {
    max-width: 100%;
    max-height: min(80vh, 900px);
    object-fit: contain;
    border-radius: 4px;
    cursor: zoom-in;
}

.rv-panel__sidebar {
    width: 100%;
    max-width: 420px;
    background: #fff;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
}

.rv-panel__sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line-1, #eee);
    flex-shrink: 0;
}

.rv-panel__product {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rv-panel__product-thumb {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.rv-panel__product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rv-panel__product-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    word-break: break-word;
}

.rv-panel__close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}

.rv-panel__sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

.rv-panel__meta {
    margin-bottom: 14px;
}

.rv-panel__stars {
    color: #e74c3c;
    font-size: 14px;
    letter-spacing: 1px;
}

.rv-panel__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 8px;
    font-size: 13px;
    color: #777;
}

.rv-panel__cert {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #555;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

.rv-panel__cert::before {
    content: '✓';
    font-size: 10px;
    color: #047857;
}

.rv-panel__content {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
}

.rv-panel__content-title {
    font-weight: 600;
    margin: 0 0 8px;
}

.rv-panel__answers {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line-1, #eee);
}

.rv-panel__answers-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #111;
}

.rv-panel__answer-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.rv-panel__answer-item:last-child {
    margin-bottom: 0;
}

.rv-panel__answer-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 8px;
}

.rv-panel__answer-admin {
    font-weight: 700;
    color: #047857;
}

.rv-panel__answer-date {
    color: #999;
}

.rv-panel__answer-body {
    font-size: 13px;
    line-height: 1.65;
    color: #374151;
    white-space: pre-wrap;
}

.rv-panel__nav {
    display: flex;
    border-top: 1px solid var(--line-1, #eee);
    flex-shrink: 0;
}

.rv-panel__nav-btn {
    flex: 1;
    border: 0;
    background: #fff;
    padding: 14px 10px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: background 0.15s;
}

.rv-panel__nav-btn:hover:not(:disabled) {
    background: #f8f8f8;
}

.rv-panel__nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.rv-panel__nav-btn + .rv-panel__nav-btn {
    border-left: 1px solid var(--line-1, #eee);
}

/* Lightbox */
.rv-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: none;
    align-items: center;
    justify-content: center;
}

.rv-lightbox.is-open {
    display: flex;
}

.rv-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}

.rv-lightbox__stage {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rv-lightbox__stage img,
.rv-lightbox__stage video {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
}

.rv-lightbox__close,
.rv-lightbox__prev,
.rv-lightbox__next {
    position: absolute;
    z-index: 2;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rv-lightbox__close {
    top: 16px;
    right: 16px;
    font-size: 32px;
    background: transparent;
}

.rv-lightbox__prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.rv-lightbox__next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.rv-lightbox__prev:disabled,
.rv-lightbox__next:disabled {
    opacity: 0.25;
    cursor: default;
}

/* Desktop: media left + sidebar right */
@media (min-width: 768px) {
    .rv-panel__media-col {
        display: flex;
    }

    .rv-panel__sidebar {
        max-width: 400px;
    }
}

/* Mobile: centered popup */
@media (max-width: 767px) {
    .rv-panel__layout {
        align-items: center;
        justify-content: center;
        padding: 16px;
    }

    .rv-panel__sidebar {
        max-width: 100%;
        width: 100%;
        max-height: 90vh;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
    }

    .rv-panel__media-col {
        display: none !important;
    }
}

/* Clickable review items */
.rv-clickable {
    cursor: pointer;
    transition: background 0.15s;
}

.rv-clickable:hover {
    background: rgba(0, 0, 0, 0.02);
}
