/* Buy2 Page Styles - 专辑海报定制页面 */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 主容器 - 确保第一屏可见 */
.product-container {
    display: flex;
    flex-direction: column;
    min-height: auto;
}

@media (min-width: 1024px) {
    .product-container {
        flex-direction: row;
        gap: 40px;
        align-items: flex-start;
    }
}

/* 左侧图片区域 */
.gallery-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

@media (min-width: 1024px) {
    .gallery-section {
        max-width: 700px;
        position: sticky;
        top: 100px;
        align-self: flex-start;
        height: fit-content;
    }
}

/* 主图容器 - 移动端横向滚动 */
.main-image-scroll-container {
    position: relative;
    width: 100%;
}

/* PC端 - 单张显示 */
@media (min-width: 769px) {
    .main-image-scroll-container {
        display: block;
    }

        .main-image-scroll-container .main-image-container:not(:first-child) {
            display: none;
        }
}

/* 移动端 - 横向滚动 */
@media (max-width: 768px) {
    .main-image-scroll-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        /* 隐藏滚动条 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

        .main-image-scroll-container::-webkit-scrollbar {
            display: none;
        }

        .main-image-scroll-container .main-image-container {
            scroll-snap-align: center;
            flex-shrink: 0;
            width: 100%;
        }
}

/* 主图容器 - 固定高度，防止切换时抖动 */
.main-image-container {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 70vh;
    max-height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    box-sizing: border-box;
    overflow: hidden;
}

    .main-image-container .poster-frame {
        max-width: 100%;
        max-height: 100%;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }

        .main-image-container .poster-frame img {
            width: auto;
            height: auto;
            max-width: 100%;
            max-height: calc(70vh - 70px);
            object-fit: contain;
            cursor: zoom-in;
            transition: opacity 0.2s;
            display: block;
        }

        /* 壁纸模式 - 竖向手机壁纸 */
        .main-image-container .poster-frame.wallpaper-mode {
            background: transparent !important;
            background-image: none !important;
            padding: 0 !important;
            box-shadow: none !important;
            border: none !important;
        }

            .main-image-container .poster-frame.wallpaper-mode::before,
            .main-image-container .poster-frame.wallpaper-mode::after {
                display: none !important;
            }

            .main-image-container .poster-frame.wallpaper-mode img {
                max-height: calc(70vh - 40px);
                max-width: 100%;
                border-radius: 0;
                box-shadow: none;
                background: transparent;
            }

            /* 壁纸模式 - 横向 PC 壁纸 */
            .main-image-container .poster-frame.wallpaper-mode.wallpaper-landscape {
                width: 100%;
                display: flex;
                justify-content: center;
            }

                .main-image-container .poster-frame.wallpaper-mode.wallpaper-landscape img {
                    max-height: calc(70vh - 40px);
                    max-width: 95%;
                    border-radius: 0;
                    box-shadow: none;
                }

        /* T恤模式 */
        .main-image-container .poster-frame.tshirt-mode {
            background: transparent !important;
            padding: 0 !important;
            box-shadow: none !important;
        }

            .main-image-container .poster-frame.tshirt-mode img {
                max-height: calc(70vh - 40px);
                border-radius: 8px;
                box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            }

@media (max-width: 768px) {
    .main-image-container {
        padding: 10px 0;
        height: 55vh;
        min-height: 55vh;
        max-height: 55vh;
    }

        .main-image-container .poster-frame img {
            max-height: calc(55vh - 50px);
        }

        /* 移动端壁纸模式 */
        .main-image-container .poster-frame.wallpaper-mode img {
            max-height: calc(55vh - 20px);
            max-width: 100%;
        }

        .main-image-container .poster-frame.wallpaper-mode.wallpaper-landscape {
            width: 100%;
            display: flex;
            justify-content: center;
        }

            .main-image-container .poster-frame.wallpaper-mode.wallpaper-landscape img {
                max-height: calc(55vh - 20px);
                max-width: 95%;
            }

        /* 移动端T恤模式 */
        .main-image-container .poster-frame.tshirt-mode img {
            max-height: calc(55vh - 20px);
        }
}

/* 放大模式 */
.main-image-container .poster-frame.zoom-active {
    cursor: crosshair;
}

    .main-image-container .poster-frame.zoom-active img {
        cursor: crosshair;
    }

/* 放大层 - 覆盖在原图上 */
.zoom-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 200%;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.poster-frame.zoom-active .zoom-layer {
    opacity: 1;
    pointer-events: auto;
    cursor: crosshair;
}

/* 放大模式关闭按钮 */
.zoom-exit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background 0.2s;
}

    .zoom-exit-btn:hover {
        background: rgba(0,0,0,0.8);
    }

.poster-frame.zoom-active .zoom-exit-btn {
    display: flex;
}

/* 相框样式 - 立体阴影效果 */
.poster-frame {
    position: relative;
    padding: 14px;
    background-size: 50px 50px;
    max-width: 100%;
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.3), inset -1px -1px 3px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.15), 0 16px 32px rgba(0,0,0,0.1), 0 24px 48px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .poster-frame:hover {
        box-shadow: inset 2px 2px 4px rgba(255,255,255,0.3), inset -1px -1px 3px rgba(0,0,0,0.2), 0 4px 8px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.12), 0 16px 32px rgba(0,0,0,0.15), 0 32px 64px rgba(0,0,0,0.1);
    }

    /* 相框内边框效果 */
    .poster-frame::before {
        content: '';
        position: absolute;
        inset: 12px;
        border: 1px solid rgba(0,0,0,0.1);
        pointer-events: none;
        z-index: 1;
    }

    /* 相框外边框高光 */
    .poster-frame::after {
        content: '';
        position: absolute;
        inset: 0;
        border: 1px solid rgba(255,255,255,0.2);
        border-bottom-color: rgba(0,0,0,0.15);
        border-right-color: rgba(0,0,0,0.1);
        pointer-events: none;
    }

    .poster-frame img {
        display: block;
        background: #fff;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
    }

    /* 无相框模式 - 用于非海报图片 */
    .poster-frame.no-frame {
        padding: 0;
        background-image: none !important;
        box-shadow: none;
        transform: none;
    }

        .poster-frame.no-frame::before,
        .poster-frame.no-frame::after {
            display: none;
        }

        .poster-frame.no-frame:hover {
            transform: none;
            box-shadow: none;
        }

/* Loading 遮罩层 */
.poster-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    z-index: 100;
    border-radius: inherit;
}

    .poster-loading.active {
        display: flex;
    }

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e5e5;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

body.dark-theme .poster-loading {
    background: rgba(30, 30, 30, 0.9);
}

body.dark-theme .loading-spinner {
    border-color: #444;
    border-top-color: #fff;
}

body.dark-theme .loading-text {
    color: #aaa;
}

/* 相框材质 */
.frame-wood {
    background-image: url('/assets/frames/wood.svg');
}

.frame-dark-wood {
    background-image: url('/assets/frames/dark-wood.svg');
}

.frame-white {
    background-image: url('/assets/frames/white-frame.svg');
}

.frame-black {
    background-image: url('/assets/frames/black-frame.svg');
}

.frame-natural {
    background-image: url('/assets/frames/natural-wood.svg');
}

/* 缩略图网格 - PC端保持2行5列网格 */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 16px;
}

/* 移动端隐藏缩略图 */
@media (max-width: 768px) {
    .thumbnail-grid {
        display: none;
    }
}

/* 移动端轮播指示器 */
.carousel-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .carousel-dots {
        display: flex;
    }
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
}

    .carousel-dot.active {
        background: #333;
        width: 24px;
        border-radius: 4px;
    }

.thumbnail-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #f5f5f5;
}

/* PC端 - 使用aspect-ratio自适应网格 */
@media (min-width: 769px) {
    .thumbnail-item {
        aspect-ratio: 1;
        width: 100%;
    }
}

/* 移动端 - 固定尺寸用于横向滚动 */
@media (max-width: 768px) {
    .thumbnail-item {
        width: 100px;
        height: 100px;
        min-width: 100px;
        flex-shrink: 0;
    }
}

.thumbnail-item:hover {
    border-color: #ccc;
}

.thumbnail-item.active {
    border-color: #333;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 带相框的缩略图 - 填充边距 */
.thumbnail-item.has-frame {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .thumbnail-item.has-frame img {
        width: calc(100% - 4px);
        height: calc(100% - 4px);
        object-fit: contain;
    }

    .thumbnail-item.has-frame img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

/* 右侧控制面板 */
.controls-section {
    width: 100%;
    padding: 20px 0;
}

@media (min-width: 1024px) {
    .controls-section {
        width: 460px;
        flex-shrink: 0;
        padding: 0;
        align-self: flex-start;
    }
}

/* 专辑搜索框样式 */
.album-search-wrapper {
    position: relative;
    width: 100%;
}

.album-search-input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: #fff;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
}

    .album-search-input:focus {
        border-color: #333;
        box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
    }

    .album-search-input::placeholder {
        color: #999;
    }

.album-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
    pointer-events: none;
}

.album-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: none;
}

    .album-search-results.show {
        display: block;
    }

/* 搜索加载动画 */
.search-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .search-loading::after {
        content: '';
        width: 16px;
        height: 16px;
        border: 2px solid #e0e0e0;
        border-top-color: #333;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.album-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

    .album-search-item:hover {
        background: #f9f9f9;
    }

    .album-search-item img {
        width: 44px;
        height: 44px;
        border-radius: 4px;
        object-fit: cover;
    }

.album-search-item-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.album-search-item-info p {
    font-size: 12px;
    color: #666;
    margin: 2px 0 0;
}

/* 更多专辑 */
.more-albums {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.more-album-btn {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    border: none;
    padding: 0;
    cursor: pointer;
}

    .more-album-btn img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* 选项按钮组 */
.option-group {
    margin-bottom: 16px;
}

.option-label {
    font-size: 15px;
    color: #111;
    margin-bottom: 10px;
    display: block;
    font-weight: 600;
    letter-spacing: 0.02em;
}

    .option-label span {
        color: #555;
        font-weight: 500;
    }

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Style 按钮组 - T恤底板图 */
#tshirtStyleGroup {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 8px;
    margin: -4px -2px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    #tshirtStyleGroup::-webkit-scrollbar {
        display: none;
    }

/* Design 按钮组 - 横向滚动 */
.btn-group.design-btn-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 12px;
    margin: -4px -2px -4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    /* 添加渐变遮罩提示可滚动 */
    mask-image: linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%);
    cursor: grab;
    user-select: none;
    outline: none;
}

    .btn-group.design-btn-group.dragging {
        cursor: grabbing;
        scroll-behavior: auto;
    }

        .btn-group.design-btn-group.dragging .design-opt {
            pointer-events: none;
        }

    .btn-group.design-btn-group::-webkit-scrollbar {
        display: none;
    }

/* Design 导航容器 */
.design-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* Design 导航箭头按钮 */
.design-nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

    .design-nav-arrow svg {
        width: 18px;
        height: 18px;
    }

    .design-nav-arrow:hover {
        background: #e8e8e8;
        transform: scale(1.05);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    }

    .design-nav-arrow:active {
        transform: scale(0.95);
    }

    .design-nav-arrow.hidden {
        opacity: 0;
        pointer-events: none;
    }

/* 设计选择按钮 - 统一样式 */
.design-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    width: 100px;
    flex-shrink: 0;
    padding: 8px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #f8f8f8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    overflow: hidden;
    position: relative;
}

    /* 图片按钮 - 海报比例 2:3 */
    .design-opt.has-thumb {
        padding: 6px 6px 6px;
        justify-content: flex-start;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .design-opt .design-opt-thumb {
        width: 100%;
        aspect-ratio: 2 / 3;
        object-fit: cover;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

/* 壁纸设计按钮 - 设备图标统一尺寸 */
.wallpaper-design-group .design-opt.wallpaper-design-opt {
    aspect-ratio: auto;
    height: auto;
    min-width: 100px;
    padding: 16px 12px 12px;
    background: linear-gradient(145deg, #fafafa 0%, #f5f5f5 100%);
}

    .wallpaper-design-group .design-opt.wallpaper-design-opt .design-opt-thumb {
        aspect-ratio: auto;
        object-fit: contain;
        max-height: 100px;
        width: auto;
        max-width: 100%;
    }

    /* 壁纸设备图标容器 - 统一尺寸 */
    .wallpaper-design-group .design-opt.wallpaper-design-opt .design-default-icon {
        width: 60px;
        height: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }

        .wallpaper-design-group .design-opt.wallpaper-design-opt .design-default-icon svg {
            width: 100%;
            height: 100%;
            color: #333;
        }

/* iPhone/Android 竖屏设备 - 较窄的图标 */
.wallpaper-design-group .design-opt.device-iphone .design-default-icon,
.wallpaper-design-group .design-opt.device-android .design-default-icon {
    width: 50px;
}

/* PC 横屏设备 - 较宽的图标 */
.wallpaper-design-group .design-opt.device-pc .design-default-icon {
    width: 80px;
    height: 60px;
}

/* 壁纸按钮名称 */
.wallpaper-design-group .design-opt.wallpaper-design-opt .design-opt-name {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

/* 壁纸按钮激活状态 */
.wallpaper-design-group .design-opt.wallpaper-design-opt.active {
    background: #fff;
    border-color: #333;
}

    .wallpaper-design-group .design-opt.wallpaper-design-opt.active .design-default-icon svg {
        color: #000;
    }

/* 文字标签 */
.design-opt .design-opt-name {
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 4px 2px 0;
    flex-shrink: 0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.design-opt.has-thumb .design-opt-name {
    font-size: 11px;
    padding-top: 4px;
}

/* 无图片按钮 - 居中文字 */
.design-opt:not(.has-thumb) {
    aspect-ratio: 2 / 3;
    padding: 12px 6px 16px;
    background: linear-gradient(145deg, #f8f8f8 0%, #efefef 100%);
}

    .design-opt:not(.has-thumb) .design-opt-name {
        padding: 0;
        font-size: 12px;
        color: #555;
        font-weight: 600;
    }

/* Hover 效果 */
.design-opt:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

    .design-opt:hover .design-opt-thumb {
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .design-opt:hover .design-opt-name {
        color: #333;
    }

/* Active 按压效果 - 仅非拖拽时生效 */
.design-opt:active:not(.no-click) {
    transform: scale(0.97);
    transition-duration: 0.08s;
}

/* 选中状态 */
.design-opt.active {
    border-color: #000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .design-opt.active .design-opt-name {
        color: #000;
        font-weight: 600;
    }

    .design-opt.active .design-opt-thumb {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

/* T恤设计选项 - 合并到 Design 区域 */
.tshirt-design-group .tshirt-design-opt {
    aspect-ratio: 1 / 1;
}

    .tshirt-design-group .tshirt-design-opt.has-thumb {
        aspect-ratio: 1 / 1;
    }

    .tshirt-design-group .tshirt-design-opt .design-opt-thumb {
        aspect-ratio: 1 / 1;
    }

/* T恤白板图标 */
.tshirt-blank-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 4px;
}

    .tshirt-blank-icon svg {
        width: 36px;
        height: 36px;
        color: #bbb;
    }

.tshirt-design-opt.active .tshirt-blank-icon {
    background: #eee;
}

    .tshirt-design-opt.active .tshirt-blank-icon svg {
        color: #666;
    }

/* 深色主题 - T恤设计选项 */
.dark-theme .tshirt-blank-icon {
    background: #333;
}

    .dark-theme .tshirt-blank-icon svg {
        color: #666;
    }

.dark-theme .tshirt-design-opt.active .tshirt-blank-icon {
    background: #444;
}

    .dark-theme .tshirt-design-opt.active .tshirt-blank-icon svg {
        color: #999;
    }

/* T恤 Style 按钮 - 底板图切换 */
.style-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    width: 80px;
    height: auto;
    padding: 8px 6px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    background: #f8f8f8;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    overflow: hidden;
}

    .style-opt:hover {
        background: #fff;
        border-color: #ccc;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .style-opt.active {
        border-color: #000;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

        .style-opt.active .style-opt-name {
            color: #000;
            font-weight: 600;
        }

    /* Style 按钮带缩略图 */
    .style-opt.has-thumb {
        padding: 6px;
    }

    .style-opt .style-opt-thumb {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 6px;
        margin-bottom: 4px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .style-opt .style-opt-name {
        width: 100%;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 11px;
        color: #666;
        padding-top: 2px;
    }

/* Style 默认图标 */
.mockup-default-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 8px;
    margin-bottom: 4px;
}

    .mockup-default-icon svg {
        width: 28px;
        height: 28px;
        color: #bbb;
    }

.style-opt.active .mockup-default-icon {
    background: #e8e8e8;
}

    .style-opt.active .mockup-default-icon svg {
        color: #666;
    }

/* 深色主题 - Style 按钮 */
.dark-theme .style-opt {
    background: #2a2a2a;
    border-color: #444;
    color: #aaa;
}

    .dark-theme .style-opt:hover {
        background: #333;
        border-color: #555;
    }

    .dark-theme .style-opt.active {
        border-color: #fff;
        background: #333;
    }

        .dark-theme .style-opt.active .style-opt-name {
            color: #fff;
        }

    .dark-theme .style-opt .style-opt-name {
        color: #999;
    }

.dark-theme .mockup-default-icon {
    background: #333;
}

    .dark-theme .mockup-default-icon svg {
        color: #666;
    }

.dark-theme .style-opt.active .mockup-default-icon {
    background: #444;
}

    .dark-theme .style-opt.active .mockup-default-icon svg {
        color: #999;
    }

/* 相框选择按钮 */
.frame-opt {
    width: 48px;
    height: 48px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: transparent;
}

    .frame-opt:hover {
        border-color: #ccc;
    }

    .frame-opt.active {
        border-color: #000;
    }

    .frame-opt img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* 尺寸选择按钮 */
.size-opt {
    width: 52px;
    height: 44px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
}

    .size-opt:hover {
        border-color: #999;
    }

    .size-opt.active {
        background: #000;
        color: #fff;
        border-color: #000;
    }

/* 信任徽章 */
.trust-badges {
    padding: 16px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 16px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.5;
}

    .trust-item svg {
        width: 20px;
        height: 20px;
        color: #666;
        flex-shrink: 0;
    }

/* 价格区域 */
.price-section {
    padding: 16px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 8px;
}

/* 添加购物车按钮 */
.add-to-cart {
    width: 100%;
    padding: 18px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    margin-top: 20px;
}

    .add-to-cart:hover {
        background: #222;
    }

    .add-to-cart:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .add-to-cart.loading {
        position: relative;
        color: transparent;
    }

        .add-to-cart.loading::after {
            content: 'Loading...';
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            color: #fff;
        }

/* 产品特性图标 */
.product-features {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

.feature-item {
    flex: 1;
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-item p {
    font-size: 12px;
    color: #333;
    margin: 0;
    line-height: 1.4;
    font-weight: 600;
}

    .feature-item p small {
        font-size: 11px;
        color: #666;
        font-weight: 400;
    }

/* FAQ 折叠面板 */
.faq-section {
    margin-top: 28px;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

    .faq-header svg {
        width: 20px;
        height: 20px;
        transition: transform 0.2s;
    }

.faq-item.open .faq-header svg {
    transform: rotate(180deg);
}

.faq-content {
    display: none;
    padding-bottom: 18px;
    font-size: 14px;
    color: #444;
    line-height: 1.7;
}

.faq-item.open .faq-content {
    display: block;
}

#posterCanvas {
    display: none;
}

/* 分享和评价 */
.share-reviews {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
}

.reviews {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.stars {
    color: #fbbf24;
    font-size: 16px;
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 100;
    display: flex;
    background: #f0f0f0;
    border-radius: 30px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.theme-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: #666;
}

    .theme-btn.active {
        background: #fff;
        color: #333;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    .theme-btn:hover:not(.active) {
        color: #333;
    }

/* =============================================
   暗色主题
   ============================================= */
body.dark-theme {
    background-color: #0a0a0a;
    color: #f5f5f5;
}

    body.dark-theme .theme-toggle {
        background: #2a2a2a;
    }

    body.dark-theme .theme-btn {
        color: #999;
    }

        body.dark-theme .theme-btn.active {
            background: #3a3a3a;
            color: #fff;
        }

    body.dark-theme .controls-section h1,
    body.dark-theme .option-label {
        color: #f5f5f5;
    }

        body.dark-theme .option-label span {
            color: #999;
        }

    body.dark-theme .album-search-input {
        background: #1a1a1a;
        border-color: #333;
        color: #f5f5f5;
    }

        body.dark-theme .album-search-input::placeholder {
            color: #666;
        }

    body.dark-theme .album-search-results {
        background: #1a1a1a;
        border-color: #333;
    }

    body.dark-theme .album-search-item:hover {
        background: #2a2a2a;
    }

    body.dark-theme .album-search-item-info h4 {
        color: #f5f5f5;
    }

    body.dark-theme .album-search-item-info p {
        color: #999;
    }

    body.dark-theme .design-opt,
    body.dark-theme .size-opt {
        background: #1a1a1a;
        border-color: #333;
        color: #ccc;
    }

        body.dark-theme .design-opt:hover,
        body.dark-theme .size-opt:hover {
            border-color: #555;
        }

        body.dark-theme .design-opt.active,
        body.dark-theme .size-opt.active {
            background: #333;
            border-color: #fff;
            color: #fff;
        }

    body.dark-theme .frame-opt {
        background: #1a1a1a;
        border-color: #333;
    }

        body.dark-theme .frame-opt.active {
            border-color: #fff;
        }

    body.dark-theme .thumbnail-item.active {
        border-color: #fff;
    }

    body.dark-theme .thumbnail-item:hover {
        border-color: #666;
    }

    body.dark-theme .thumbnail-item.has-frame {
        background: #2a2a2a;
    }

    body.dark-theme .carousel-dot {
        background: #444;
    }

        body.dark-theme .carousel-dot.active {
            background: #fff;
        }

@media (max-width: 768px) {
    body.dark-theme .main-image-container .poster-frame.frame-wood {
        background: #2a2a2a;
    }
}

body.dark-theme .add-to-cart {
    background: #fff;
    color: #0a0a0a;
}

    body.dark-theme .add-to-cart:hover {
        background: #e0e0e0;
    }

body.dark-theme .price-section {
    border-color: #333;
}

body.dark-theme .trust-badges {
    border-color: #333;
}

body.dark-theme .trust-item {
    color: #ccc;
}

    body.dark-theme .trust-item svg {
        color: #999;
    }

/* 暗色主题相框阴影 */
body.dark-theme .poster-frame {
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.1), inset -1px -1px 3px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3), 0 4px 8px rgba(0,0,0,0.3), 0 8px 16px rgba(0,0,0,0.4), 0 16px 32px rgba(0,0,0,0.3), 0 24px 48px rgba(0,0,0,0.2), 0 0 60px rgba(255,255,255,0.05);
}

    body.dark-theme .poster-frame:hover {
        box-shadow: inset 2px 2px 4px rgba(255,255,255,0.1), inset -1px -1px 3px rgba(0,0,0,0.4), 0 4px 8px rgba(0,0,0,0.35), 0 8px 16px rgba(0,0,0,0.35), 0 16px 32px rgba(0,0,0,0.4), 0 32px 64px rgba(0,0,0,0.3), 0 0 80px rgba(255,255,255,0.08);
    }

body.dark-theme .share-reviews {
    border-color: #333;
}

body.dark-theme .share-btn,
body.dark-theme .reviews {
    color: #ccc;
}

body.dark-theme .faq-header {
    color: #f5f5f5;
}

body.dark-theme .faq-item {
    border-color: #333;
}

body.dark-theme .faq-content {
    color: #999;
}

body.dark-theme .product-features {
    border-color: #333;
}

body.dark-theme .feature-icon {
    background: #2a2a2a;
}

    body.dark-theme .feature-icon svg {
        stroke: #ccc;
    }

body.dark-theme .feature-item p {
    color: #ccc;
}

    body.dark-theme .feature-item p small {
        color: #888;
    }

body.dark-theme .trust-badges {
    border-color: #333;
}

body.dark-theme .trust-item {
    color: #999;
}

    body.dark-theme .trust-item svg {
        color: #666;
    }

body.dark-theme .text-neutral-400 {
    color: #666 !important;
}

body.dark-theme .text-neutral-500 {
    color: #777 !important;
}

    body.dark-theme .text-neutral-500 a {
        color: #999;
    }

/* ==================== 搜索框清空按钮 ==================== */
.album-search-clear {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #999;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    z-index: 10;
}

    .album-search-clear:hover {
        background: #f0f0f0;
        color: #333;
    }

    .album-search-clear.show {
        display: flex;
    }

body.dark-theme .album-search-clear:hover {
    background: #333;
    color: #fff;
}

/* ==================== 移动端全屏放大按钮 ==================== */
.mobile-fullscreen-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 15;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

    .mobile-fullscreen-btn:active {
        transform: scale(0.95);
        background: rgba(0, 0, 0, 0.8);
    }

/* 仅在移动端显示 */
@media (max-width: 768px) {
    .mobile-fullscreen-btn {
        display: flex;
    }
}

/* ==================== 全屏图片查看器 ==================== */
.fullscreen-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
    z-index: 9999;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s;
}

    .fullscreen-viewer.active {
        display: flex;
        opacity: 1;
    }

.fullscreen-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

.fullscreen-close-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .fullscreen-close-btn:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.2);
    }

.fullscreen-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    touch-action: none;
}

    .fullscreen-image-container img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transition: transform 0.3s ease-out;
        user-select: none;
        -webkit-user-select: none;
    }

.fullscreen-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    z-index: 10;
}

.fullscreen-control-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .fullscreen-control-btn:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.2);
    }

/* 双指缩放动画 */
@keyframes zoomPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.fullscreen-image-container.zooming img {
    transition: none;
}

/* Toast 提示样式 */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 90%;
    text-align: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .toast-message.show {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

@media (min-width: 769px) {
    .toast-message {
        max-width: 500px;
    }
}

/* =============================================
   产品类型切换
   ============================================= */
.product-type-group {
    display: flex;
    gap: 8px;
}

.product-type-opt {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .product-type-opt:hover {
        border-color: #999;
    }

    .product-type-opt.active {
        border-color: #1a1a1a;
        background: #1a1a1a;
        color: #fff;
    }

    .product-type-opt svg {
        opacity: 0.7;
    }

    .product-type-opt.active svg {
        opacity: 1;
    }

    .product-type-opt span {
        font-size: 13px;
        font-weight: 500;
    }

/* 深色主题 */
.dark-theme .product-type-opt {
    border-color: #444;
    background: #2a2a2a;
    color: #fff;
}

    .dark-theme .product-type-opt:hover {
        border-color: #666;
    }

    .dark-theme .product-type-opt.active {
        border-color: #fff;
        background: #fff;
        color: #1a1a1a;
    }

/* =============================================
   壁纸模板选择
   ============================================= */
.wallpaper-template-group {
    display: flex;
    gap: 12px;
    width: 100%;
}

.wallpaper-opt {
    flex: 1;
    min-width: 0;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .wallpaper-opt:hover {
        border-color: #999;
        transform: translateY(-2px);
    }

    .wallpaper-opt.active {
        border-color: #1a1a1a;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .wallpaper-opt span {
        font-size: 12px;
        font-weight: 500;
        color: #666;
    }

    .wallpaper-opt.active span {
        color: #1a1a1a;
    }

/* 设备 Logo 标识 */
.device-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}

    .device-logo svg {
        width: 14px;
        height: 14px;
        color: #666;
        flex-shrink: 0;
    }

    .device-logo span {
        font-size: 12px;
        font-weight: 500;
        color: #666;
    }

.wallpaper-opt.active .device-logo svg {
    color: #1a1a1a;
}

.wallpaper-opt.active .device-logo span {
    color: #1a1a1a;
}

/* 设备预览框 */
.device-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 90px; /* 固定高度确保所有设备预览对齐 */
    justify-content: flex-end; /* 底部对齐 */
}

.phone-preview .device-frame {
    width: 50px;
    height: 90px;
    border: 2px solid #333;
    border-radius: 8px;
    position: relative;
    background: #111;
    overflow: hidden;
    flex-shrink: 0;
}

.iphone-frame {
    border-radius: 10px !important;
}

.device-screen {
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    width: auto;
    height: auto;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    z-index: 0;
}

.iphone-frame .device-notch {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 6px;
    background: #111;
    border-radius: 0 0 4px 4px;
    z-index: 1;
}

.android-frame {
    border-radius: 6px !important;
}

.pc-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .pc-preview .device-frame {
        width: 80px;
        height: 50px;
        border: 2px solid #333;
        border-radius: 4px;
        background: #111;
        overflow: hidden;
        position: relative;
        flex-shrink: 0;
    }

    .pc-preview .device-screen {
        top: 2px;
        left: 2px;
        right: 2px;
        bottom: 2px;
    }

.pc-stand {
    width: 24px;
    height: 6px;
    background: linear-gradient(180deg, #555 0%, #333 100%);
    margin-top: -1px;
    border-radius: 0 0 3px 3px;
}

/* 深色主题 */
.dark-theme .wallpaper-opt {
    border-color: #444;
    background: #2a2a2a;
}

    .dark-theme .wallpaper-opt:hover {
        border-color: #666;
    }

    .dark-theme .wallpaper-opt.active {
        border-color: #fff;
    }

    .dark-theme .wallpaper-opt span {
        color: #999;
    }

    .dark-theme .wallpaper-opt.active span {
        color: #fff;
    }

.dark-theme .device-logo svg {
    color: #999;
}

.dark-theme .device-logo span {
    color: #999;
}

.dark-theme .wallpaper-opt.active .device-logo svg {
    color: #fff;
}

.dark-theme .wallpaper-opt.active .device-logo span {
    color: #fff;
}

/* =============================================
   T恤模板选择
   ============================================= */
.tshirt-template-group {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}

    .tshirt-template-group::-webkit-scrollbar {
        height: 4px;
    }

    .tshirt-template-group::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }

    .tshirt-template-group::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }

.tshirt-opt {
    flex-shrink: 0;
    width: 80px;
    height: 90px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    scroll-snap-align: start;
    position: relative;
}

    .tshirt-opt:hover {
        border-color: #999;
        transform: scale(1.02);
    }

    .tshirt-opt.active {
        border-color: #1a1a1a;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }

    .tshirt-opt img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .tshirt-opt .tshirt-label {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 4px;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        font-size: 10px;
        text-align: center;
    }

    /* 白板图特殊样式 */
    .tshirt-opt.blank-tshirt {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f9f9f9;
    }

        .tshirt-opt.blank-tshirt svg {
            width: 40px;
            height: 40px;
            color: #ccc;
        }

/* 深色主题 */
.dark-theme .tshirt-opt {
    border-color: #444;
    background: #2a2a2a;
}

    .dark-theme .tshirt-opt:hover {
        border-color: #666;
    }

    .dark-theme .tshirt-opt.active {
        border-color: #fff;
    }

    .dark-theme .tshirt-opt.blank-tshirt {
        background: #333;
    }

        .dark-theme .tshirt-opt.blank-tshirt svg {
            color: #666;
        }

/* T恤尺寸按钮 */
#tshirtSizeGroup .size-opt {
    min-width: 50px;
}
