@import url('common.css');

/* 版本: 1.0.11 */

/* 模态框打开时的body样式 */
body.modal-open {
    overflow: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
   /* background: linear-gradient(135deg, rgba(10, 25, 47, 0.9) 0%, rgba(0, 0, 0, 0.9) 100%); /* 更时尚的渐变背景 */
   background:#fff; /* 更时尚的渐变背景 */
    opacity: 1;
}

/* 详情页公共样式 */
.detail-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-top: calc(var(--nav-height) + 50px);
    padding-bottom: 40px;
    padding-left: 4%;
    padding-right: 4%;
    position: relative;
    z-index: 2;
}

/* 面包屑导航 */
.breadcrumb {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 3;
}

.breadcrumb a {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
    padding: 2px 5px;
}

.breadcrumb a:hover {
    color: var(--cyan);
    background: rgba(100, 255, 218, 0.05);
    border-radius: 4px;
}

.breadcrumb i {
    font-size: 0.7rem;
    color: var(--cyan);
    opacity: 0.8;
}

.breadcrumb span {
    color: var(--cyan);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 2px 5px;
    background: rgba(100, 255, 218, 0.05);
    border-radius: 4px;
}

/* 产品详情布局 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    justify-items: center;
}

/* 产品图片区域 */
.product-gallery {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0;
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 12px;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 主图容器 */
.main-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 主图 */
.main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* 复制成功提示 */
.copy-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(100, 255, 218, 0.2);
    color: var(--cyan);
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--cyan);
}

.copy-success.show {
    opacity: 1;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* 缩略图容器 */
.thumbnail-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    width: 100%;
}

/* 缩略图 */
.thumbnail {
    position: relative;
    padding-bottom: 100%;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: rgba(255, 255, 255, 0.05);
}

.thumbnail.active {
    border-color: var(--cyan);
    box-shadow: 0 0 5px var(--cyan);
}

.thumbnail:hover {
    transform: translateY(-2px);
    border-color: var(--cyan);
    box-shadow: 0 0 3px var(--cyan);
}

/* 产品信息区域 */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    border-radius: 12px;
    height: 100%;
    width: 100%;
    justify-self: start;
    max-width: 500px;
}

.product-title {
    font-size: 0.95rem;
    color: var(--white);
    margin-bottom: 6px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.3px;
    font-family: 'Arial', sans-serif;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: block;
    white-space: normal;
    text-overflow: ellipsis;
    max-width: 100%;
}

.product-id {
    font-size: 0.75rem;
    color: #777;
    margin-bottom: 8px;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cyan);
    display: flex;
    align-items: center;
    position: relative;
}

/* 美元符号 */
.product-price::before {
    content: '$';
    font-size: 0.7em;
    margin-right: 4px;
    opacity: 0.9;
}

/* 确保美元符号显示 */
.product-price[data-currency="USD"]::before {
    content: '$';
}

.product-views {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 0.2px;
}

.product-views i {
    color: var(--cyan);
    font-size: 0.9rem;
}

.product-info-section {
    margin-top: 5px;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-description {
    color: var(--light-gray);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
    opacity: 0.9;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.2px;
}

/* 产品操作按钮容器 */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    position: relative;
    width: 100%;
}

/* 添加收藏和分享按钮的一排布局容器 */
.actions-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* 调整收藏按钮和分享按钮的宽度 */
.favorite-btn,
.copy-link-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 1px solid var(--glass-border);
}

/* 分享按钮容器去除宽度100% */
.share-container {
    flex: 1;
    display: flex;
}

.share-container .copy-link-btn {
    width: 100%;
}

.copy-link-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 1px solid var(--glass-border);
}

.copy-link-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.action-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.buy-now-btn {
    background:#c60a2d;
    border: 1px solid var(--cyan);
    color: #fff;
}

.buy-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.3);
}

/* 微店按钮样式 */
.weidian-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    text-decoration: none;
    border: 1px solid var(--glass-border);
}

.weidian-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.weidian-btn i {
    transition: all 0.3s ease;
}

.weidian-btn:hover i {
    transform: scale(1.1);
}

/* 如何购买按钮样式优化 */
.how-to-buy-btn {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 1px solid var(--glass-border);
    transition: background-color 0.3s ease;
}

.how-to-buy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* QC照片区域优化 */
.qc-photos {
    margin: 40px 0;
    padding: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.section-title {
    font-size: 1.6rem;
    color: var(--white);
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: -0.5px;
    font-weight: 600;
}

.qc-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.qc-photo {
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.qc-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qc-photo:hover img {
    transform: scale(1.05);
}

/* 产品列表区域优化 */
.product-list {
    margin-top: 40px;
    padding: 25px;
   
    position: relative;
    z-index: 1;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

/* 重写产品卡片样式 */
.product-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    border: 1px solid var(--glass-border);
}

/* 添加伪元素作为背景 */
.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
}

.product-image {
    width: 100%;
    position: relative;
    overflow: hidden;
    display: block;
    background: rgba(255, 255, 255, 0.05);
    padding-bottom: 100%; /* 强制保持1:1比例 */
    min-height: auto; /* 移除固定高度 */
    height: auto; /* 移除固定高度 */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.product-card .product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: auto;
    
    color: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: 0;
    max-width: 100%;
    justify-self: auto;
    position: relative;
    z-index: 2;
}

.product-card .product-name {
    font-size: 0.95rem;
    color: #000;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.product-card .product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.product-card .product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cyan);
}

.product-card .product-views {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--light-gray);
    font-size: 0.85rem;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.product-card .buy-btn {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    background: #c60a2d;
    border: 1px solid var(--cyan);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 8px;
    position: relative;
    z-index: 2;
}

.product-card .buy-btn:hover {
    background: #c60a2d;
    transform: translateY(-2px);
}

/* 产品卡片悬停效果 */
.product-card:hover {
   background: #c60a2d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* 通用兼容性样式 - 适用于所有浏览器 */
.ios-safari,
.ios-safari-card {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

/* Safari/iOS特定样式 - 使用两种不同的检测方法确保兼容性 */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) and (stroke-color:transparent) {
        .product-list {
            background-color: rgb(18, 29, 51) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
        }
        
        .product-card {
            background-color: rgb(18, 29, 51) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
        }
        
        .product-card::before {
            background-color: rgb(18, 29, 51) !important;
        }
        
        .product-grid {
            display: grid !important;
        }
        
        .product-image {
            background: rgba(0, 0, 0, 0.2) !important;
        }
        
        .product-card .buy-btn {
            opacity: 1 !important;
            background-color: transparent !important;
            border: 1px solid var(--cyan) !important;
        }
    }
}

/* iOS专用代码 */
@supports (-webkit-touch-callout: none) {
    .product-list {
        background-color: rgb(18, 29, 51) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .product-card {
        background-color: rgb(18, 29, 51) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 12px !important;
    }
    
    .product-card .product-name {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .product-card .buy-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 1 !important;
        visibility: visible !important;
        background-color: transparent !important;
    }
    
    .product-card .buy-btn span {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    @media (max-width: 480px) {
        .product-grid {
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        }
    }
}

/* 文章详情页优化 */
.article-detail {
    width: 100%;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 40px;
    position: relative;
}

.article-title-detail {
    position: relative;
    font-size: 1.8rem;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.2px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
}

.article-title-detail::after {
    display: none;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes widthExpand {
    0% { width: 0; }
    100% { width: 0; }
}

.article-meta-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    color: var(--light-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.article-meta-detail span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: var(--transition);
}

.article-meta-detail span:hover {
    background: rgba(255, 255, 255, 0.1);
}

.article-meta-detail i {
    color: var(--cyan);
    opacity: 0.9;
}

.article-category-detail {
    display: inline-block;
    background: rgba(100, 255, 218, 0.1);
    color: var(--cyan);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    transition: var(--transition);
}

.article-category-detail:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: translateY(-2px);
}

.article-content-detail {
    color: var(--light-gray);
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-content-detail h2 {
    color: var(--white);
    font-size: 1.8rem;
    margin: 50px 0 25px;
    position: relative;
    padding-bottom: 15px;
}

.article-content-detail h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--cyan);
    border-radius: 2px;
}

.article-content-detail h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin: 35px 0 20px;
}

.article-content-detail p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.article-content-detail ul, 
.article-content-detail ol {
    margin: 25px 0;
    padding-left: 25px;
}

.article-content-detail li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 5px;
}

.article-content-detail li::before {
    content: '•';
    color: var(--cyan);
    position: absolute;
    left: -15px;
    top: 0;
}

.article-content-detail img {
    max-width: 100%;
    border-radius: 12px;
    margin: 35px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.article-content-detail img:hover {
    transform: scale(1.02);
}

.article-content-detail blockquote {
    border-left: 4px solid var(--cyan);
    padding: 20px 30px;
    margin: 35px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--white);
}

.article-content-detail blockquote p {
    margin: 0;
}

.article-tags {
    display: flex;
    gap: 12px;
    margin-top: 50px;
    flex-wrap: wrap;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.article-tag {
    background: rgba(100, 255, 218, 0.1);
    color: var(--cyan);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-tag:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: translateY(-2px);
}

.article-tag i {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 文章导航 */
.article-navigation {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-article {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-article:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-article.prev {
    text-align: left;
}

.nav-article.next {
    text-align: right;
}

.nav-label {
    font-size: 0.85rem;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.nav-article.next .nav-label {
    justify-content: flex-end;
}

.nav-title {
    color: var(--white);
    font-size: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 响应式布局优化 */
@media (max-width: 1200px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        justify-items: center;
    }
    
    .product-gallery {
        max-width: 450px;
        justify-self: end;
    }
    
    .product-info {
        max-width: 450px;
        padding: 18px;
        justify-self: start;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1.6rem;
    }
    
    /* 以下是相关产品的响应式布局，保持不变 */
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .product-card .product-name {
        font-size: 0.9rem;
    }
    
    .product-card .product-price {
        font-size: 1rem;
    }
}

@media (max-width: 992px) {
    .detail-container {
        padding-top: calc(var(--nav-height) + 45px);
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* 使用grid布局 */
    .product-detail {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        max-width: 900px;
        align-items: start;
    }
    
    .product-gallery {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
        max-width: 100%;
        justify-self: end;
    }
    
    .main-image {
        padding-bottom: 100%;
    }
    
    .thumbnail-container {
        grid-template-columns: repeat(6, 1fr);
        gap: 5px;
    }
    
    .product-info {
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
        max-width: 100%;
        justify-self: start;
    }
    
    .product-title {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        padding: 6px 12px;
        margin-bottom: 15px;
    }
    
    /* 以下是相关产品的响应式布局，保持不变 */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .product-list {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .article-title-detail {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .article-title-detail::after {
        width: 60px;
        height: 3px;
    }
    
    @keyframes widthExpand {
        0% { width: 0; }
        100% { width: 60px; }
    }
    
    .article-detail {
        padding: 30px;
    }
}

/* 从992px到768px的综合查询 */
@media (max-width: 992px) and (min-width: 769px) {
    .detail-container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .product-detail {
        gap: 20px;
        max-width: 100%;
    }
    
    .product-gallery {
        padding: 8px;
        max-width: 95%;
    }
    
    .product-info {
        padding: 10px;
        max-width: 95%;
    }
    
    .action-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .product-description {
        font-size: 0.9rem;
    }
    
    .product-views {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .article-detail {
        padding: 25px;
    }
    
    .article-title-detail {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    body.modal-open {
        /* 使用与全局样式一致的属性，只是为了确保优先级 */
        overflow: hidden !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .detail-container {
        padding-top: calc(var(--nav-height) + 45px);
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* 使用grid布局 */
    .product-detail {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        max-width: 900px;
        align-items: start;
    }
    
    .product-gallery {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
        max-width: 100%;
        justify-self: end;
    }
    
    .main-image {
        padding-bottom: 100%;
    }
    
    .thumbnail-container {
        grid-template-columns: repeat(6, 1fr);
        gap: 5px;
    }
    
    .product-info {
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
        max-width: 100%;
        justify-self: start;
    }
    
    .product-title {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        padding: 6px 12px;
        margin-bottom: 15px;
    }
    
    /* 以下是相关产品的响应式布局，保持不变 */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .product-list {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .article-title-detail {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .article-title-detail::after {
        width: 60px;
        height: 3px;
    }
    
    @keyframes widthExpand {
        0% { width: 0; }
        100% { width: 60px; }
    }
    
    .article-detail {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    body.modal-open {
        /* 使用与全局样式一致的属性，只是为了确保优先级 */
        overflow: hidden !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .detail-container {
        padding-top: calc(var(--nav-height) + 35px);
        padding-left: 10px;
        padding-right: 10px;
        overscroll-behavior: none;
    }
    
    /* 确保面包屑在移动端显示 */
    .breadcrumb {
        display: flex;
        padding: 6px 10px;
        margin-bottom: 15px;
        font-size: 0.8rem;
    }
    
    .breadcrumb a, .breadcrumb span {
        font-size: 0.75rem;
    }
    
    .product-detail {
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-width: 500px;
        width: 100%;
        margin: 0 auto;
    }

    .product-gallery,
    .product-info {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
    
    .product-gallery {
        padding: 8px;
    }
    
    .main-image {
        padding-bottom: 100%;
        max-width: 100%;
    }
    
    .thumbnail-container {
        max-width: 100%;
        margin: 0 auto;
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-title {
        font-size: 0.85rem;
        margin-bottom: 8px;
        line-height: 1.4;
    }
    
    .product-price {
        font-size: 1.4rem;
    }
    
    .product-id {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
    
    .product-views {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .action-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .product-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* 小屏幕时的布局调整 */
    .actions-row {
        flex-direction: column;
        gap: 12px;
    }
    
    /* 相关产品的样式 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .product-list {
        padding: 12px;
        margin-top: 25px;
        border-radius: 10px;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .product-card .product-name {
        font-size: 0.85rem;
    }
    
    .product-card .product-price {
        font-size: 0.95rem;
    }
    
    .product-card .product-views {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .product-card .buy-btn {
        padding: 6px;
        font-size: 0.8rem;
    }
    
    /* 确保小屏幕图片保持正方形比例 */
    .product-image {
        padding-bottom: 100%;
        min-height: auto;
        height: auto;
    }
    
    /* 减少卡片内边距，使布局更紧凑 */
    .product-card .product-info {
        padding: 8px;
        gap: 6px;
    }
    
    .article-detail {
        padding: 15px;
        border-radius: 10px;
    }
    
    .article-title-detail {
        font-size: 1.4rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .article-title-detail::after {
        width: 50px;
        height: 3px;
    }
    
    @keyframes widthExpand {
        0% { width: 0; }
        100% { width: 50px; }
    }
    
    .article-meta-detail {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .article-meta-detail span {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .article-header {
        margin-bottom: 25px;
    }
    
    .article-content-detail {
        font-size: 1rem;
    }
    
    .article-navigation {
        margin-top: 30px;
        padding-top: 20px;
        gap: 15px;
        grid-template-columns: 1fr;
    }
    
    .nav-article {
        padding: 15px;
    }
    
    .nav-article.next .nav-label {
        justify-content: flex-start;
    }
    
    .nav-article.next {
        text-align: left;
    }
}

@media (max-width: 359px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .product-card .product-name {
        font-size: 0.8rem;
    }
    
    .product-card .buy-btn {
        padding: 5px;
        font-size: 0.75rem;
    }
    
    .product-card .product-views {
        display: none;
    }
    
    /* 确保超小屏幕图片也保持正方形比例 */
    .product-image {
        padding-bottom: 100%;
        min-height: auto;
        height: auto;
    }
    
    /* 更小的内边距 */
    .product-card .product-info {
        padding: 6px;
        gap: 4px;
    }
    
    .article-title-detail {
        font-size: 1.25rem;
    }
    
    .article-meta-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 平台选择模态框 */
.platform-modal,
.social-share-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    overscroll-behavior: contain;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 50px 0;
    box-sizing: border-box;
}

.platform-modal-content,
.social-share-content {
    background: linear-gradient(135deg, var(--deep-blue), rgba(32, 18, 77, 0.95));
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    padding: 25px;
    position: relative;
    border: 1px solid var(--cyan);
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.4);
    margin: 0 auto;
    max-height: calc(100vh - 100px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.close-modal,
.close-share {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--cyan);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.close-modal:hover,
.close-share:hover {
    color: var(--pink);
    transform: scale(1.1);
}

.platform-modal h3,
.social-share-title {
    color: var(--cyan);
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.modal-note,
.social-share-note {
    text-align: center;
    color: var(--light-slate);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.platform-list,
.social-share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
    scrollbar-width: thin;
    scrollbar-color: var(--cyan) var(--deep-blue);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.platform-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: 1px solid transparent;
}

.platform-option:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-5px);
    border-color: var(--cyan);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
}

.platform-option img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 8px;
}

.platform-option span {
    color: var(--lightest-slate);
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.social-share-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
    border: 1px solid transparent;
    color: var(--white);
}

.social-share-item:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-5px);
    border-color: var(--cyan);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
    color: var(--cyan);
}

.social-share-item i {
    width: 30px;
    font-size: 1.2rem;
    margin-right: 10px;
    text-align: center;
}

.social-share-item span {
    font-size: 1rem;
}

/* 移动端优化 - 确保两个模态框使用相同的媒体查询 */
@media (min-width: 481px) {
    .social-share-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .platform-list,
    .social-share-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platform-modal-content,
    .social-share-content {
        padding: 20px 15px;
        width: 90%;
    }
}

@media (max-width: 480px) {
    .platform-option,
    .social-share-item {
        padding: 10px;
    }
    
    .platform-option img {
        width: 40px;
        height: 40px;
    }
    
    .platform-option span,
    .social-share-item span {
        font-size: 0.8rem;
    }
    
    .social-share-item i {
        width: 25px;
        font-size: 1rem;
    }
    
    .social-share-title,
    .platform-modal h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .social-share-note,
    .modal-note {
        font-size: 0.8rem;
        margin-bottom: 15px;
    }
}

/* 收藏按钮样式 */
.favorite-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    text-decoration: none;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    position: relative;
}

.favorite-btn::before {
    content: "\f004";
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-right: 4px;
}


.favorite-btn span:empty::after {
    content: "Favorites";
}


.favorite-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.favorite-btn:hover::before {
    transform: scale(1.1);
}

/* 已收藏状态 - 使用易优CMS的类名 */
.favorite-btn.on::before {
    color: #ff6b6b;
    font-weight: 900;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .favorite-btn {
        padding: 12px;
        gap: 6px;
    }
    
    .favorite-btn::before {
        font-size: 14px;
    }
}

/* 收藏通知样式优化 */
.favorite-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.favorite-notification i {
    color: #4caf50;
    font-size: 18px;
}

.favorite-notification.show {
    opacity: 1;
    animation: fadeInOut 2s ease forwards;
}

/* 添加淡入淡出动画 */
@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

/* 错误提示样式 */
.favorite-notification.error i {
    color: #ff6b6b;
}

/* 添加消息类型判断 */
.favorite-notification[data-type="error"] i {
    color: #ff6b6b;
}

.favorite-notification[data-type="success"] i {
    color: #4caf50;
}

.favorite-notification[data-type="info"] i {
    color: #2196f3;
}

/* Safari/iOS专用样式修复 */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    /* Safari和iOS特定样式 */
    .product-list {
      
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    .product-card {
        background-color: var(--glass-bg) !important;
        border: 1px solid var(--glass-border) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }
    
    .product-image {
        padding-bottom: 100% !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .product-image img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .product-card .buy-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* 专为Mac和iOS添加额外的兼容性代码 */
@supports (-webkit-touch-callout: none) {
    /* iOS设备特定样式 */
    .product-list {
        background-color: var(--glass-bg) !important;
        border: 1px solid var(--glass-border) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    .product-card {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        display: flex !important;
        flex-direction: column !important;
        background-color: var(--glass-bg) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 12px !important;
    }
    
    /* 强制重绘产品卡片 */
    .product-card .product-name {
        position: relative;
        will-change: transform;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .product-card .buy-btn {
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .product-card .buy-btn span {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* 针对移动设备的网格布局尺寸调整 */
    @media (max-width: 480px) {
        .product-grid {
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        }
    }
}

