/* ============================================================
   场景查看器页面样式
   ============================================================ */

/* 全屏场景详情页 */
.scene-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111111;
    z-index: 9998;
    overflow-y: auto;
}

/* 退出按钮 */
.exit-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ffffff;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 25px;
}

.exit-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* 图片画廊区域 */
.gallery-section {
    padding-top: 0;
}

.gallery-item {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    border-bottom: none;
}

.gallery-item:last-child {
    border-bottom: none;
}

.gallery-image-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    display: block;
}

.gallery-image-wrapper.dark-mode img {
    filter: grayscale(100%) brightness(0.7);
}

/* 模式切换按钮 */
.mode-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ffffff;
    border-radius: 25px;
    overflow: hidden;
}

.mode-toggle button {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-toggle button.active {
    background: var(--primary);
    color: #ffffff;
}

.mode-toggle button:hover:not(.active) {
    background: rgba(0, 147, 128, 0.2);
    color: var(--primary);
}

/* 购物车悬浮按钮 */
.cart-toggle {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.cart-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: scale(1.1);
}

/* 购物清单弹出层 */
.cart-popup {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 280px;
    max-height: 320px;
    background: #1a1a1a;
    border: 1px solid var(--primary);
    transition: all 0.3s ease;
    z-index: 20;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    border-radius: 12px;
}

.cart-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-popup-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 147, 128, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-popup-header h4 {
    color: #ffffff;
    font-size: 1rem;
    margin: 0;
}

.cart-popup-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.cart-popup-close:hover {
    color: var(--primary);
}

.cart-popup-content {
    padding: 12px 16px;
}

.cart-popup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    font-size: 0.9rem;
}

.cart-popup-item:last-child {
    border-bottom: none;
}

.cart-popup-item .price {
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
}

.cart-popup-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 147, 128, 0.3);
    background: rgba(0, 147, 128, 0.1);
}

.cart-popup-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.cart-popup-total span:last-child {
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.cart-popup-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.cart-popup-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 147, 128, 0.4);
}

/* 响应式 */
@media (max-width: 768px) {
    .gallery-image-wrapper img {
        height: auto;
        min-height: 200px;
    }

    .mode-toggle {
        top: 10px;
        left: 10px;
    }

    .mode-toggle button {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .exit-btn {
        top: 10px;
        right: 10px;
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .cart-toggle {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        bottom: 10px;
        right: 10px;
    }

    .cart-popup {
        width: 260px;
        bottom: 54px;
    }

    .cart-popup.active {
        transform: translateY(0);
    }
}
