﻿/* ============================================================
   MyShopSite 产品展示模块样式
   文件：Content/site.product.css
   职责：
     1. 产品列表页布局（卡片模式、图片模式）
     2. 产品卡片样式（默认卡、图片卡）
     3. 产品详情页整体布局
     4. 多媒体画廊与缩略图
     5. SKU 列表与数量控件
     6. 产品属性、价格、收藏、购买按钮
     7. 背景色预览、产品标签
     8. 大图预览模态框
     9. 详情页运营标签（V27.1）
    10. 详情页虚拟产品画廊标签（V27.1）
    11. 详情页 SKU 点击激活双态 + 内层卡片（V27.1）
    12. 价格区两排布局 + 浅底（V27.1）
    13. 价格来源标签统一 .tag 体系（V27.1）
    14. SKU 强制同高与库存显示（V27.1）
    15. 详情页画廊预留 class（V27.5）
    16. 详情页主图区背景图（V27.5 需求 1）
   ============================================================ */

/* ==================== 1. 产品列表页布局 ==================== */

.product-list-card {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 30px 0px 10px 0px;
}

@media (max-width: 900px) {
    .product-list-card {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-list-card {
        grid-template-columns: 1fr;
    }
}

.product-list-grid {
    max-width: 1350px;
    margin: 0 auto;
    padding: 25px 0px 10px 0px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

@media (max-width: 900px) {
    .product-list-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .product-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-item {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 1/1;
    display: block;
}

    .grid-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.2s;
    }

    .grid-item:hover img {
        transform: scale(1.05);
    }

.empty-msg {
    text-align: center;
    color: #999;
    padding: 60px 0;
    grid-column: 1 / -1;
}

/* ==================== 2. 产品卡片 - 默认卡 ==================== */

.product-card {
    width: 408px;
    border: 1px solid #CCCCCC;
    border-radius: 4px;
    box-shadow: 4px 3px 8px rgba(0,0,0,0.2);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    background: #fff;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

    .product-card:hover {
        border-color: #3d61a5;
        box-shadow: none;
    }

.product-card-image-link {
    display: block;
    padding-top: 14px;
    padding-left: 14px;
    padding-right: 14px;
    text-decoration: none;
    outline: none;
    flex-shrink: 0;
    position: relative;
}

    .product-card-image-link:focus {
        outline: none;
    }

        .product-card-image-link:focus .product-card-image-wrap {
            outline: none;
            border-color: #dddddd;
        }

.product-card-image-wrap {
    width: 380px;
    height: 450px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: border-color 0.4s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.product-card-image-link:hover .product-card-image-wrap {
    border-color: #cccccc;
}

.product-card-image-bg {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f0f0;
    transition: transform 0.4s ease;
}

.product-card-image-link:hover .product-card-image-bg {
    transform: scale(1.06);
}

.product-card-table-wrap {
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 50px;
}

.product-card-table {
    width: 388px;
    margin: 0 auto;
    border-collapse: collapse;
    height: 100%;
}

    .product-card-table td {
        border: 1px solid #dddddd;
        padding: 0;
        vertical-align: middle;
        text-align: center;
    }

    .product-card-table .name-row td {
        height: 35px;
        background: #f6f6f6;
    }

    .product-card-table col.name-col {
        width: auto;
    }

    .product-card-table col.price-col {
        width: 100px;
    }

.product-name-info {
    color: #333333;
    font-size: 14px;
    font-weight: bold;
}

.product-collect-link {
    color: #0067b8;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
    display: inline-block;
}

    .product-collect-link:hover {
        color: #0067b8;
        transform: translate(1px, 2px);
        transition: transform 0.3s ease;
    }

.product-card-table .sku-row td {
    height: 30px;
    background: #fff;
}

.sku-fullname {
    color: #555;
    font-size: 13px;
}

.sku-price {
    color: #ff3333;
    font-weight: bold;
    font-size: 13px;
}

.sku-order-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    height: 100%;
}

.sku-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 28px;
    color: #fff !important;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    background: #0067b8;
    border-radius: 4px;
}

    .sku-order-btn:hover {
        transform: translate(1px, 2px);
        transition: transform 0.3s ease;
    }

.product-card-table .more-sku-row td {
    height: 35px;
    background: #fff;
}

.more-sku-link {
    color: #3d61a5;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.4s ease;
}

    .more-sku-link:hover {
        color: #ff6b00;
    }

.extra-sku-row {
    display: none;
}

/* ==================== 3. 产品卡片 - 图片卡 ==================== */

.img-card {
    width: 245px;
    border: 1px solid #CCCCCC;
    border-radius: 5px;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.12);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    background: #fff;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

    .img-card:hover {
        border-color: #3d61a5;
        box-shadow: none;
    }

.img-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

    .img-card-link:hover,
    .img-card-link:focus,
    .img-card-link:active,
    .img-card-link:visited {
        text-decoration: none;
        color: inherit;
    }

.img-card-image-link {
    display: block;
    padding: 10px 10px 0 10px;
    text-decoration: none;
    outline: none;
    position: relative;
}

    .img-card-image-link:focus {
        outline: none;
    }

.img-card-image-wrap {
    width: 225px;
    height: 280px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 3px;
    border: 1px solid #ffffff;
    transition: border-color 0.4s ease;
}

.img-card-image-link:hover .img-card-image-wrap {
    border-color: #CCCCCC;
}

.img-card-image-bg {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f0f0;
    transition: transform 0.4s ease;
}

.img-card-image-link:hover .img-card-image-bg {
    transform: scale(1.08);
}

.img-card-name {
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #eaeefc;
    border: 1px solid #b3cafb;
    border-radius: 3px;
    padding: 6px 8px;
    margin: 6px 8px 10px 8px;
}

.img-card-sku-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(232, 237, 253, 0.85);
    border-top: 1px solid #3d61a5;
    padding: 8px 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    pointer-events: none;
    border-radius: 0 0 3px 3px;
    max-height: 180px;
    overflow-y: auto;
}

.img-card:hover .img-card-sku-overlay {
    opacity: 1;
    transform: translateY(0);
}

.img-card-sku-single {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #3d61a5;
    border-radius: 3px;
}

.img-card-sku-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.img-card-sku-item {
    flex: 1 1 auto;
    text-align: center;
    font-size: 11px;
    background: #f5f5f5;
    border: 1px solid #3d61a5;
    border-radius: 3px;
    padding: 4px 6px;
}

.img-card-sku-name {
    color: #555;
    font-size: 14px;
}

.img-card-sku-price {
    color: #e33;
    font-size: 14px;
    font-weight: bold;
    margin-top: 2px;
}

/* ==================== 4. 产品详情页整体布局 ==================== */

.detail-card {
    max-width: 1050px;
    margin: 0 auto;
    background: #fafcff;
    border: 1px solid #3d61a5;
    border-radius: 8px;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    font-family: 'Microsoft YaHei', sans-serif;
}

.detail-card-bar {
    height: 4px;
    background: #3d61a5;
    width: 100%;
}

.detail-card-inner {
    padding: 20px;
}

.detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 0px;
}

.detail-gallery {
    flex: 0 0 auto;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-self: flex-start;
}

.detail-info {
    flex: 1;
    min-width: 280px;
}

/* ==================== 5. 多媒体画廊与缩略图 ==================== */

.detail-gallery-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.thumb-column {
    width: 70px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumb-item {
    width: 70px;
    height: 70px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #cccccc;
    transition: transform 0.2s ease;
    background-color: #f5f5f5;
}

    .thumb-item:hover {
        transform: scale(0.95);
        border: 1px solid #cccccc;
    }

    .thumb-item.active {
        border: 1px solid #cccccc;
    }

.gallery-thumb-item {
    overflow: hidden;
}

    .gallery-thumb-item img,
    .gallery-thumb-item .video-thumb-frame {
        transition: transform 0.3s ease;
        object-fit: cover;
    }

    .gallery-thumb-item:hover img,
    .gallery-thumb-item:hover .video-thumb-frame {
        transform: scale(1.2);
    }

.main-image-container {
    flex: 1;
    background-color: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border: 1px solid #cccccc;
    cursor: pointer;
    position: relative;
}

    .main-image-container:hover {
        border-color: #3d61a5;
    }

.main-image {
    width: 100%;
    aspect-ratio: 1 / 1.38;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    display: block;
}

/* ==================== 6. 产品类型信息栏 ==================== */

.product-type-info {
    margin-top: 0px;
    padding: 8px 12px;
    background: #f8fbfe;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e2e8f0;
    width: 100%;
    box-sizing: border-box;
}

.type-label {
    color: #1a2634;
    font-weight: 500;
}

.type-link {
    color: #3d61a5;
    text-decoration: none;
    font-weight: 500;
}

    .type-link:hover {
        text-decoration: underline;
    }

.type-disabled {
    color: #999;
    font-weight: normal;
}

/* ==================== 7. 产品标题与收藏 ==================== */

.product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 16px;
    border-bottom: 1px solid #cccccc;
    padding-bottom: 12px;
}

.product-title-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.product-name {
    font-size: 26px;
    font-weight: 700;
    color: #1a2634;
    margin: 0;
    line-height: 1.3;
}

.product-sku {
    font-size: 14px;
    color: #000000;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #3d61a5;
    color: #3d61a5;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-right: 0px;
    margin-top: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

    .btn-favorite:hover {
        background: #3d61a5;
        color: #fff;
        transform: translate(1px, 2px);
    }

    .btn-favorite:active {
        transform: scale(0.96);
    }

/* ==================== 8. 价格区域 ==================== */
/* ★ V27.1：两排布局，外边框浅黄 + 内部浅底 */

.price-section {
    background: #f7efd8;
    border: 2px solid #f4e9c8;
    padding: 14px 18px;
    border-radius: 12px;
    margin: 16px 0 20px 0;
    box-sizing: border-box;
}

/* -------- 兼容保留的基础类 -------- */
.price-label {
    font-size: 13px;
    color: #7c8ea0;
    margin-bottom: 4px;
}

.price-value {
    font-size: 28px;
    font-weight: 800;
    color: #e83e3e;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.price-unit {
    font-size: 14px;
    font-weight: normal;
    color: #7c8ea0;
    margin-left: 6px;
}

.price-original {
    color: #999;
    font-size: 14px;
    font-weight: normal;
    text-decoration: line-through;
    margin-left: 4px;
}

/* -------- 两排布局 -------- */
/* 第一排：销售价/素材下载 + 划线价，左对齐 */
.price-row-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: #7c8ea0;
    margin-bottom: 6px;
}

    .price-row-top .price-label {
        font-size: 13px;
        color: #7c8ea0;
        margin-bottom: 0;
    }

    .price-row-top .price-original {
        font-size: 13px;
        color: #999;
        text-decoration: line-through;
        margin-left: 0;
    }

/* 第二排：标签 + 实际价格，水平居中，间距 30px，整体左移 20px */
.price-row-main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    font-size: 28px;
    font-weight: 800;
    color: #e83e3e;
    position: relative;
    left: -20px;
}

/* ==================== 9. 返回按钮 ==================== */

.detail-return-wrapper {
    margin: 20px 0 16px 0;
}

.detail-return-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f0f2f5;
    border: 1px solid #d0d0d0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 0;
    border-radius: 48px;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 2px;
    width: 100%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

    .detail-return-btn:hover {
        background: #e0e4ec;
        border-color: #3d61a5;
        color: #3d61a5;
        transform: translateY(2px);
    }

.detail-return-arrow {
    font-size: 24px;
    font-weight: bold;
}

/* ==================== 10. 产品属性展示 ==================== */

.product-attr-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.preview-bg-row .product-attr-label {
    width: 116px;
    padding-left: 15px;
    color: #666;
}

.product-attr-label {
    width: 115px;
    font-size: 16px;
    color: #1a2634;
    font-weight: normal;
    letter-spacing: 1px;
    padding-left: 15px;
}

.product-attr-value {
    flex: 1;
    font-size: 15px;
    color: #1a2634;
    font-weight: normal;
    letter-spacing: 1px;
}

    .product-attr-value .highlight {
        color: #ff3333;
        font-weight: bold;
    }

/* ==================== 11. 背景色预览块 ==================== */

.bg-color-preview {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bg-color-block {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ccc;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

    .bg-color-block:hover {
        transform: scale(0.85);
        border-color: #3d61a5;
    }

    .bg-color-block.active {
        border: 2px solid #3d61a5;
        box-shadow: 0 0 4px rgba(61, 97, 165, 0.5);
        transform: scale(1.02);
    }

/* ==================== 12. 产品标签（旧版 badge，保留兼容） ==================== */

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #fff;
}

.badge-special {
    background: #e83e3e;
}

.badge-top {
    background: #3d61a5;
}

.badge-hot {
    background: #f97316;
}

.badge-new {
    background: #28a745;
}

/* ==================== 13. SKU 列表与数量控件 ==================== */

.sku-list {
    margin: 20px 0 5px 0;
}

.sku-item {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 6px 0;
    margin-bottom: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
}

/* SKU 缩略图：固定 60×60 正方形，垂直居中，去掉手型/拖拽/选中 */
.sku-thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    align-self: center;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    display: block;
}

.sku-item .sku-thumb {
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

    .sku-item .sku-thumb img {
        pointer-events: none;
        -webkit-user-drag: none;
        user-select: none;
    }

.sku-card {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fafafa;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sku-item-inactive .sku-card {
    border-color: #e5e5e5;
    background: #fafafa;
}

.sku-item-inactive:hover .sku-card {
    border-color: #d0d0d0;
    background: #f0f0f0;
}

.sku-item-active .sku-card {
    border: 2px solid #3d61a5;
    background: #f0f5ff;
    padding: 7px 11px;
}

/* 左侧信息（名称 + 库存） */
.sku-info {
    flex: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 10px;
    padding-left: 10px;
}

/* 通用 SKU 名称（列表页等） */
.sku-fullname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #555;
    font-size: 13px;
}

/* 详情页 SKU 卡片：名称用主色 */
.sku-item .sku-fullname {
    color: #3d61a5;
}

/* 可售库存文字 */
.sku-stock-info {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    white-space: nowrap;
}

    /* 无可售库存红字 */
    .sku-stock-info.sku-stock-out {
        color: #d9534f;
        font-weight: 700;
    }

/* 价格 */
.sku-price {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 详情页 SKU 卡片：价格后面的单位（/ 个）用主色 */
.sku-item .sku-price .price-unit {
    color: #3d61a5;
}

.sku-qty-slot {
    flex: 0 0 140px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 32px;
}

.sku-qty-placeholder {
    display: none;
    color: #999;
    font-size: 13px;
    white-space: nowrap;
    user-select: none;
}

/* 详情页 SKU 卡片：“点击选择”用主色 */
.sku-item .sku-qty-placeholder {
    color: #3d61a5;
}

    /* 缺货：“产品已售罄”红字，优先级高于主色 */
    .sku-item .sku-qty-placeholder.sku-sold-out-text {
        color: #d9534f;
        font-weight: 700;
    }

.sku-quantity {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .sku-quantity input {
        width: 50px;
        height: 30px;
        text-align: center;
        border: 1px solid #cccccc;
        font-size: 14px;
    }

    .sku-quantity button {
        width: 26px;
        height: 26px;
        border-radius: 20px;
        background: #f1f5f9;
        border: 1px solid #cccccc;
        font-size: 22px;
        font-weight: bold;
        cursor: pointer;
        display: inline-flex;
        justify-content: center;
        line-height: 0.95;
        padding: 0;
    }

        .sku-quantity button:hover {
            background: #2c4a8c;
            border-color: #2c4a8c;
            color: #ffffff;
        }

        .sku-quantity button:active {
            transform: scale(0.9);
            transition: all 0.05s ease;
        }

.sku-item-inactive .sku-qty-placeholder {
    display: inline-block;
}

.sku-item-inactive .sku-quantity {
    display: none;
}

.sku-item-active .sku-qty-placeholder {
    display: none;
}

.sku-item-active .sku-quantity {
    display: flex;
}

/* 缺货置灰 */
.sku-out-of-stock {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.detail-hint {
    text-align: left;
    color: #8a99b4;
    font-size: 12px;
    margin: 2px 0 8px 0;
    border-top: 1px dashed #eef2f7;
    border-bottom: 1px dashed #eef2f7;
    background: #fafcff;
    line-height: 1.4;
    padding-left: 15px;
}

/* ==================== 14. 全局操作按钮 ==================== */

.global-actions {
    display: flex;
    gap: 16px;
    margin-top: 15px;
}

.btn-cart,
.btn-buy {
    flex: 1;
    padding: 14px 0;
    border-radius: 60px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

.btn-cart {
    background: #3d61a5;
    color: white;
    box-shadow: 0 2px 6px rgba(61,97,165,0.3);
}

    .btn-cart:hover {
        background: #2c4a8c;
        transform: translateY(-2px);
    }

.btn-buy {
    background: #f97316;
    color: white;
    box-shadow: 0 2px 6px rgba(249,115,22,0.3);
}

    .btn-buy:hover {
        background: #ea5a0c;
        transform: translateY(-2px);
    }

.detail-placeholder {
    margin-top: 32px;
    padding: 32px;
    text-align: center;
    background: #f8fbfe;
    border-radius: 16px;
    font-size: 24px;
    color: #3d61a5;
    font-weight: 600;
}

/* ==================== 15. 大图预览模态框 ==================== */

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

    .image-modal.show {
        display: block;
    }

/* 内容包裹层：纵向排列，图片行 + 提示文字，间距 30px */
.modal-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    cursor: default;
}

/* 图片行：左右按钮 + 图片，按钮跟随图片两侧 24px */
.modal-image-row {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* 图片容器：520 宽，1:1.36，带边框，背景色由 JS 继承主图区 */
.modal-image-bg {
    width: 520px;
    max-width: 70vw;
    aspect-ratio: 1 / 1.36;
    max-height: 78vh;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

/* 左右按钮：白色外圈 + 阴影；圆位置固定，三角靠 padding 微调 */
.modal-nav {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    color: #CCCCCC;
    font-size: 28px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background 0.2s, transform 0.15s;
}

/* 左按钮：三角往左偏 3px（右内边距 6px，内容区中心左移 3px）；圆本身不动 */
.modal-nav-left {
    padding-right: 6px;
}

/* 右按钮：三角往右偏 3px（左内边距 6px，内容区中心右移 3px）；圆本身不动 */
.modal-nav-right {
    padding-left: 6px;
}

    /* 可用态 hover / active：只缩放，不再位移，圆保持原位 */
    .modal-nav-left:not(.modal-nav-disabled):hover,
    .modal-nav-right:not(.modal-nav-disabled):hover {
        background: rgba(0, 0, 0, 0.75);
        transform: scale(1.05);
    }

    .modal-nav-left:not(.modal-nav-disabled):active,
    .modal-nav-right:not(.modal-nav-disabled):active {
        transform: scale(0.96);
    }

/* 到头禁用：只用 class；点击能命中按钮并 stopPropagation，不冒泡关闭 */
.modal-nav.modal-nav-disabled {
    opacity: 0.3;
    cursor: default;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.55);
}

/* 键盘触发时的临时按压反馈 */
.modal-nav.modal-nav-kbd-press {
    transform: scale(0.94);
    background: rgba(0, 0, 0, 0.75);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

    .modal-close:hover {
        color: #bbb;
    }

/* 提示文字：图片下方 30px（由 modal-stage 的 gap 控制），字体加大 */
.modal-caption {
    color: #ddd;
    font-size: 16px;
    text-align: center;
    pointer-events: none;
    letter-spacing: 0.5px;
}

/* ==================== 16. 产品列表收藏按钮 ==================== */

.product-fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    background: #ffffff;
    border: 1px solid #999999;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: #999999;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0;
    line-height: 1;
}

    .product-fav-btn:hover {
        color: #ff4d4f;
        border-color: #ff4d4f;
        background: #ffffff;
    }

    .product-fav-btn.favorited {
        color: #ff4d4f;
        border-color: #ff4d4f;
    }

    .product-fav-btn.product-fav-text {
        position: static;
        display: inline-block;
        width: auto;
        height: auto;
        border: none;
        border-radius: 4px;
        background: none;
        color: #0067b8;
        font-size: 16px;
        font-weight: bold;
        box-shadow: none;
        padding: 4px 8px;
    }

        .product-fav-btn.product-fav-text:hover {
            color: #0067b8;
            background: none;
            transform: translate(1px, 2px);
        }

        .product-fav-btn.product-fav-text.favorited {
            color: #ff4d4f;
        }

/* ==================== 17. 虚拟产品角标（列表页卡片） ==================== */

.product-virtual-badge {
    position: absolute;
    z-index: 4;
    background: #f97316;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 3px;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

    .product-virtual-badge.purchased {
        background: #28a745;
    }

.product-card-image-link .product-virtual-badge {
    top: 14px;
    left: 14px;
}

.img-card-image-link .product-virtual-badge {
    top: 10px;
    left: 10px;
}

/* ==================== 18. 已购买提示卡（虚拟产品详情页） ==================== */

.purchase-owned-card {
    background: #f0f9ff;
    border: 1px solid #b6d4fe;
    border-radius: 8px;
    padding: 32px 24px;
    text-align: center;
    margin: 20px 0 5px 0;
}

    .purchase-owned-card .purchase-icon {
        font-size: 48px;
        line-height: 1;
        margin-bottom: 12px;
    }

    .purchase-owned-card .purchase-title {
        font-size: 18px;
        font-weight: 600;
        color: #0d6efd;
        margin-bottom: 8px;
    }

    .purchase-owned-card .purchase-sub {
        font-size: 13px;
        color: #6c757d;
        margin-bottom: 20px;
    }

    .purchase-owned-card .btn-goto-assets {
        display: inline-block;
        background: #0d6efd;
        color: #fff;
        padding: 10px 32px;
        border-radius: 4px;
        text-decoration: none;
        font-size: 14px;
        transition: background 0.2s;
    }

        .purchase-owned-card .btn-goto-assets:hover {
            background: #0a58ca;
            color: #fff;
            text-decoration: none;
        }

/* ==================== 19. 产品运营角标（右上角，V27.0 新增） ==================== */

.product-badge-wrap {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 90px;
    height: 90px;
    overflow: hidden;
    border-top-right-radius: 4px;
    pointer-events: none;
    z-index: 3;
}

    .product-badge-wrap > svg {
        display: block;
        width: 100%;
        height: 100%;
    }

/* ============================================================
   20. 详情页改造新增（V27.1）
   包含：
     - A1 运营标签（.tag / .tag-hot / .tag-sale / .tag-combo / .tag-member）
     - A4 画廊虚拟产品标签（.gallery-wrapper / .gallery-virtual-badge）
     - A3 收藏按钮修正（#addToFavoriteBtn）
   ============================================================ */

/* ---------- A1：运营标签（统一标签体系） ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    -webkit-font-smoothing: antialiased;
    flex-shrink: 0;
    line-height: 1;
}

    .tag svg {
        width: 13.8px;
        height: 13.8px;
        margin-right: 4px;
        fill: currentColor;
        flex-shrink: 0;
        display: block;
    }

/* 热销：橙红渐变 */
.tag-hot {
    background: linear-gradient(135deg, #FF6B00 0%, #FF2A00 100%);
    box-shadow: 0 2px 5px rgba(255, 42, 0, 0.35), inset 0 1px 1px rgba(255,255,255,0.25);
}

/* 特价：红橙渐变 */
.tag-sale {
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    box-shadow: 0 2px 5px rgba(255, 65, 108, 0.35), inset 0 1px 1px rgba(255,255,255,0.25);
}

/* 特价热销：红橙强渐变 + 方角 */
.tag-combo {
    background: linear-gradient(90deg, #E60023 0%, #FF5A00 100%);
    padding: 0 12px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(230, 0, 35, 0.35), inset 0 0 0 1px rgba(255,255,255,0.2);
}

/* 会员价：蓝色渐变，与主色 #3d61a5 同色系 */
.tag-member {
    background: linear-gradient(135deg, #4f7dd1 0%, #3d61a5 100%);
    box-shadow: 0 2px 5px rgba(61, 97, 165, 0.35), inset 0 1px 1px rgba(255,255,255,0.25);
}

/* ---------- A4：详情页画廊左上角虚拟产品标签 ---------- */
.gallery-wrapper {
    position: relative;
}

.gallery-virtual-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: inline-block;
    padding: 3px 10px;
    background: #f97316;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    border-radius: 4px;
    letter-spacing: 1px;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ---------- A3：详情页收藏按钮（复用 .product-fav-btn 形态，覆盖定位） ---------- */
#addToFavoriteBtn.product-fav-btn {
    position: static;
    width: 32px;
    height: 32px;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 5px;
}

/* ============================================================
   21. 详情页画廊（V27.5）

   21.1 / 21.2 为「预留 class」：视图和 JS 当前仍使用内联样式，
   替换后视觉无变化；后续迁移视图/JS 时直接使用这些 class。

   21.3 / 21.4 为「当前生效」：
     - 21.3 缩略图滚动容器 position: relative，配合 getBoundingClientRect
     - 21.4 主图区背景图（需求 1），右键无「图片另存为」，拖拽不可取图
   ============================================================ */

/* ---------- 21.1 缩略图项与高亮（预留 class） ---------- */
.gallery-thumb-item {
    border: 2px solid #ddd;
    transition: border-color 0.15s ease;
}

    .gallery-thumb-item.gallery-thumb-active {
        border-color: #3d61a5;
    }

/* ---------- 21.2 视频缩略图胶片边框（预留 class） ---------- */
.gallery-video-filmstrip {
    position: relative;
    width: 100%;
    height: 100%;
}

    .gallery-video-filmstrip .film-bar {
        position: absolute;
        left: 0;
        right: 0;
        height: 3px;
        background: #333;
        z-index: 3;
    }

        .gallery-video-filmstrip .film-bar.top {
            top: 0;
        }

        .gallery-video-filmstrip .film-bar.bottom {
            bottom: 0;
        }

    .gallery-video-filmstrip .film-holes {
        position: absolute;
        left: 0;
        right: 0;
        height: 4px;
        background: repeating-linear-gradient(to right, #ddd 0px, #ddd 4px, #333 4px, #333 8px);
        z-index: 3;
    }

        .gallery-video-filmstrip .film-holes.top {
            top: 3px;
        }

        .gallery-video-filmstrip .film-holes.bottom {
            bottom: 3px;
        }

    .gallery-video-filmstrip .video-thumb-frame {
        position: absolute;
        top: 10px;
        left: 0;
        width: 100%;
        height: calc(100% - 20px);
        object-fit: cover;
        display: none;
        z-index: 1;
    }

    .gallery-video-filmstrip .video-play-overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 30px;
        height: 30px;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 16px;
        z-index: 4;
    }

/* ---------- 21.3 缩略图滚动容器（当前生效辅助） ---------- */
.gallery-thumb-scroll {
    position: relative;
}

.gallery-thumb-inner {
    position: relative;
}

/* ---------- 21.4 主图区背景图（当前生效，需求 1） ----------
   主图由 <img> 改为 <div class="gallery-slide-image">，
   背景图无右键「图片另存为」、不可拖拽，失败兜底由 JS new Image() 控制。
*/
.gallery-slide-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* ---------- 21.5 主图区左右箭头（当前生效） ----------
   - 默认：圆形半透明黑底 + 白色三角，无外圈
   - hover：背景加深 + 轻微放大
   - active：轻微缩小
   - 三角用 padding 在圆内左/右微调 2px，圆本身不动
*/
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: background 0.2s, transform 0.15s;
}

/* 左按钮：三角往左偏 2px（右内边距 4px，内容区中心左移 2px）；圆本身不动 */
.gallery-arrow-left {
    left: 5px;
    padding-right: 4px;
}

/* 右按钮：三角往右偏 2px（左内边距 4px，内容区中心右移 2px）；圆本身不动 */
.gallery-arrow-right {
    right: 5px;
    padding-left: 4px;
}

.gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.08);
}

.gallery-arrow:active {
    transform: translateY(-50%) scale(0.94);
}
/* ---------- 21.6 缩略图导航栏左右箭头（当前生效） ----------
   - 默认：透明背景，深灰三角
   - hover：背景不变，三角变主色 + 变大
   - active：背景变深 + 按钮轻微缩放
   - 到头禁用：由 JS 设 opacity:0.3 + pointer-events:none，本规则不覆盖
*/
.gallery-thumb-nav-left,
.gallery-thumb-nav-right {
    width: 50px;
    height: 78px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #555;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: background 0.2s, color 0.2s, font-size 0.2s, transform 0.15s;
}

    .gallery-thumb-nav-left:hover,
    .gallery-thumb-nav-right:hover {
        background: transparent;
        color: #3d61a5;
        font-size: 22px;
    }

    .gallery-thumb-nav-left:active,
    .gallery-thumb-nav-right:active {
        background: #c5d9ff;
        color: #3d61a5;
        transform: scale(0.94);
    }