/* wallpaper-store.css - 专用于壁纸商店的样式 */

/* 引入基础变量和全局样式 */
@import url('style.css'); /* 导入 style.css 中的所有全局规则 */

/* 覆盖/新增商店页面的特定样式 */
.shop-header {
    text-align: center;
    margin: 40px 0 30px;
}
.shop-title {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 商品卡片样式 (继承 .card 基础风格) */
.product-card {
    background: var(--card-bg);
    border: 1px solid #374151;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-outfit);
    box-shadow: 0 10px 25px -5px rgba(244, 114, 182, 0.15);
}

.prod-img-box {
    width: 100%;
    aspect-ratio: 1/1; /* 封面图比例 */
    background: #000;
    position: relative;
    overflow: hidden;
}
.prod-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.product-card:hover .prod-img-box img {
    transform: scale(1.05);
}

.prod-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.prod-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #f3f4f6;
    margin-bottom: 5px;
}
.prod-desc {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.4;
    margin-bottom: 15px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
}

.prod-footer {
    margin-top: auto;
    border-top: 1px dashed #374151;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-group {
    display: flex;
    flex-direction: column;
}
.price-cny {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-char);
}
.price-points {
    font-size: 0.75rem;
    color: #6b7280;
}

.btn-buy-card {
    background: linear-gradient(135deg, var(--accent-outfit) 0%, #db2777 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}
.btn-buy-card:hover { opacity: 0.9; }

/* ========================================= */
/* 🚀 QR CODE 绝对隔离区域 (只在商店生效) */
/* ========================================= */

#alipayQrModal {
    /* 确保模态框层级足够高 */
    z-index: 2000 !important;
}

#qrCodeContainer {
    /* 强制设置为 flex 容器，确保内容居中 */
    display: flex !important; 
    justify-content: center !important;
    align-items: center !important;
    /* 确保容器本身有白色背景 */
    background: white !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.5); /* 增加阴影，显得更突出 */
}

/* 强制 Base64 绘制出来的 IMG/Canvas 元素清除所有可能存在的默认边距 */
#qrCodeContainer img, #qrCodeContainer canvas {
    /* 强制居中显示，并消除可能的边距 */
    display: block !important; 
    margin: 0 auto !important; 
    padding: 0 !important;
    border: none !important;
    
    /* 核心：清除所有尺寸限制，只使用 JS 设置的 180x180 */
    max-width: 180px !important;
    max-height: 180px !important;

    /* 确保图片不会被其他元素遮挡 */
    z-index: 100 !important;
}

/* ========================================= */
/* 🚀 QR CODE 绝对隔离区域 (只在商店生效) */
/* ========================================= */
// ... (保留 #alipayQrModal 和 #qrCodeContainer 样式不变)

/* 强制 Base64 绘制出来的 IMG/Canvas 元素清除所有可能存在的默认边距 */
#qrCodeContainer img, #qrCodeContainer canvas {
    /* ... 保持不变 ... */
}

/* 🚨 【终极修复：强制隐藏 Canvas 元素】 */
#qrCodeContainer canvas {
    display: none !important; 
    visibility: hidden !important; 
}

/* 确保 IMG 元素是可见的 */
#qrCodeContainer img {
    display: block !important;
}