/**
 * 云端支付商城 - 移动端优化样式
 * 创建时间: 2025-10-24
 */

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #f7931e;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --dark-color: #333;
    --light-color: #f5f5f5;
    --white-color: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(255, 107, 53, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 25%, #dee2e6 50%, #ced4da 75%, #adb5bd 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 80px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========== 粒子背景 ========== */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.7; }
}

/* ========== 头部导航 ========== */
.mobile-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 12px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 22px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-header i {
    font-size: 14px;
}

/* ========== 主内容区 ========== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* ========== 公告区域 ========== */
.announcement-section {
    margin-bottom: 20px;
}

.announcement-banner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.announcement-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: bold;
    color: var(--primary-color);
}

.announcement-title i {
    font-size: 16px;
}

.toggle-icon {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.toggle-icon.expanded {
    transform: rotate(180deg);
}

.announcement-content {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    max-height: 1000px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.announcement-content.collapsed {
    max-height: 0;
    margin-top: 0;
}

.announcement-image {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.announcement-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: cover;
}

.announcement-text {
    white-space: pre-line;
}

/* ========== 商品展示区 ========== */
.products-section {
    margin-bottom: 20px;
}

.section-header {
    margin-bottom: 15px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    color: var(--dark-color);
}

.section-header i {
    color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px; /* 从15px减少到12px */
}

.product-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: breathingGlow 3s ease-in-out infinite;
}

/* 无图片商品卡片样式 */
.product-card.no-image {
    display: flex;
    flex-direction: column;
}

@keyframes breathingGlow {
    0%, 100% { box-shadow: var(--shadow); }
    50% { box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2); }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 从75%降低到60%，减少图片高度 */
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    overflow: hidden;
}

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.product-body {
    padding: 10px; /* 从15px减少到10px */
}

/* 无图片商品的body区域 */
.product-body.no-image-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 10px; /* 压缩padding */
}

/* 商品头部（名称+库存） */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px; /* 减少底部间距 */
}

.product-name {
    font-size: 14px; /* 从16px减少到14px */
    font-weight: bold;
    color: var(--dark-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin: 0;
}

/* 库存标签（紧凑版） */
.product-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px; /* 大幅压缩padding */
    border-radius: 12px;
    font-size: 11px; /* 从13px减少到11px */
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-stock-badge i {
    font-size: 10px;
}

.product-stock-badge.in-stock {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.product-stock-badge.out-of-stock {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.product-description {
    font-size: 12px; /* 从13px减少到12px */
    color: #666;
    margin-bottom: 8px; /* 从12px减少到8px */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px; /* 从12px减少到8px */
    border-top: 1px solid #eee;
}

.product-price {
    font-size: 18px; /* 从20px减少到18px */
    font-weight: bold;
    color: var(--primary-color);
}

.btn-buy {
    padding: 6px 16px; /* 从8px 20px压缩到6px 16px */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 16px; /* 从20px减少到16px */
    cursor: pointer;
    font-size: 13px; /* 从14px减少到13px */
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-buy:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.btn-buy:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ========== 加载状态 ========== */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.loading i {
    font-size: 32px;
    margin-bottom: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
}

/* ========== 弹窗样式 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--dark-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 15px; /* 从20px压缩到15px */
}

/* ========== 购买弹窗 ========== */
.product-summary {
    display: flex;
    gap: 12px; /* 从15px压缩到12px */
    margin-bottom: 15px; /* 从20px压缩到15px */
    padding: 12px; /* 从15px压缩到12px */
    background: #f9f9f9;
    border-radius: 8px; /* 从10px压缩到8px */
}

/* 无图片的商品摘要 */
.product-summary.no-image {
    display: block;
}

.product-summary .product-image {
    width: 70px; /* 从80px压缩到70px */
    height: 70px; /* 从80px压缩到70px */
    border-radius: 6px; /* 从8px压缩到6px */
    object-fit: cover;
    flex-shrink: 0;
}

.product-summary .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-summary h4 {
    font-size: 14px; /* 从16px压缩到14px */
    margin-bottom: 6px; /* 从8px压缩到6px */
    color: var(--dark-color);
    line-height: 1.4;
}

.product-summary .product-price {
    font-size: 18px; /* 从20px压缩到18px */
    font-weight: bold;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 15px; /* 从20px压缩到15px */
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 5px; /* 从6px压缩到5px */
    font-size: 13px; /* 从14px压缩到13px */
    font-weight: bold;
    margin-bottom: 8px; /* 从10px压缩到8px */
    color: var(--dark-color);
}

.form-group label i {
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
    width: 100%;
    padding: 10px 12px; /* 从12px 15px压缩到10px 12px */
    border: 1px solid #ddd;
    border-radius: 6px; /* 从8px压缩到6px */
    font-size: 13px; /* 从14px压缩到13px */
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1); /* 从3px压缩到2px */
}

.form-tip {
    font-size: 11px; /* 从12px压缩到11px */
    color: #999;
    margin-top: 4px; /* 从5px压缩到4px */
}

.payment-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 保持三列并排 */
    gap: 10px; /* 从8px增加到10px */
}

.payment-option {
    position: relative;
    cursor: pointer;
    width: 100%; /* 确保宽度填满 */
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* 垂直居中 */
    gap: 6px; /* 从4px增加到6px */
    padding: 15px 8px; /* 从12px 6px增加到15px 8px */
    min-height: 90px; /* 固定最小高度，确保三个按钮高度一致 */
    width: 100%; /* 确保宽度填满 */
    border: 2px solid #e0e0e0;
    border-radius: 12px; /* 从8px增加到12px */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    box-sizing: border-box; /* 包含padding和border在宽度内 */
}

.payment-option input[type="radio"]:checked + .option-content {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(247, 147, 30, 0.08));
    box-shadow: 
        0 4px 12px rgba(255, 107, 53, 0.2),
        0 0 0 1px rgba(255, 107, 53, 0.1) inset;
    transform: translateY(-2px);
}

.payment-option:hover .option-content {
    border-color: #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.payment-option input[type="radio"]:checked + .option-content:hover {
    border-color: var(--primary-color);
}

.option-content i {
    font-size: 28px; /* 从26px增加到28px */
    width: 32px; /* 固定图标容器宽度 */
    height: 32px; /* 固定图标容器高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0; /* 防止图标缩小 */
}

.payment-option input[type="radio"]:checked + .option-content i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.option-content span {
    font-size: 13px; /* 从12px增加到13px */
    font-weight: bold;
    white-space: nowrap; /* 防止文字换行 */
    color: #666;
    transition: color 0.3s ease;
    line-height: 1.2; /* 固定行高 */
    min-height: 16px; /* 最小高度，确保即使是短文字也占据相同空间 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-option input[type="radio"]:checked + .option-content span {
    color: var(--primary-color);
}

/* 支付方式图标颜色 */
.option-content .fa-alipay {
    color: #1677FF;
}

.payment-option input[type="radio"]:checked + .option-content .fa-alipay {
    color: #1677FF;
}

.option-content .fa-weixin {
    color: #07C160;
}

.payment-option input[type="radio"]:checked + .option-content .fa-weixin {
    color: #07C160;
}

.option-content .fa-qq {
    color: #12B7F5;
}

.payment-option input[type="radio"]:checked + .option-content .fa-qq {
    color: #12B7F5;
}

.btn-primary {
    padding: 10px 20px; /* 从12px 24px压缩到10px 20px */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 20px; /* 从25px压缩到20px */
    cursor: pointer;
    font-size: 14px; /* 从15px压缩到14px */
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* 从8px压缩到6px */
}

.btn-primary i {
    font-size: 14px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

/* 按钮文字响应式显示 */
.btn-text-short {
    display: none; /* PC端隐藏简短文字 */
}

.btn-text-full {
    display: inline; /* PC端显示完整文字 */
}

/* ========== 支付弹窗 ========== */
.payment-info {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row .label {
    color: #666;
}

.info-row .value {
    font-weight: bold;
    color: var(--dark-color);
}

.info-row .value.price {
    color: var(--primary-color);
    font-size: 16px;
}

.qr-code-container {
    text-align: center;
    margin: 20px 0;
}

#qrCodeImage {
    display: inline-block;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

#qrCodeImage img {
    display: block;
    width: 200px;
    height: 200px;
}

.qr-tip {
    font-size: 14px;
    color: #666;
}

.qr-tip span {
    color: var(--primary-color);
    font-weight: bold;
}

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
    padding: 12px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 8px;
    color: var(--warning-color);
    font-size: 14px;
}

#countdownTime {
    font-weight: bold;
    font-size: 16px;
}

.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 8px;
    color: var(--info-color);
    font-size: 14px;
}

.payment-status.success {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.payment-status.error {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

/* ========== 页脚 ========== */
.mobile-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
    z-index: 999;
}

.mobile-footer p {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
}

.mobile-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-footer a:hover {
    color: var(--secondary-color);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr; /* 移动端显示单列 */
        gap: 15px; /* 增加间距 */
    }
    
    .btn-header span {
        display: none;
    }
    
    .btn-header {
        padding: 8px 10px;
    }
    
    .logo span {
        font-size: 16px;
    }
    
    /* 移动端扩大商品卡片 */
    .product-card {
        max-width: 100%;
    }
    
    .product-body {
        padding: 15px; /* 从8px增加到15px */
    }
    
    .product-name {
        font-size: 16px; /* 从13px增加到16px */
    }
    
    .product-description {
        font-size: 14px; /* 从11px增加到14px */
        -webkit-line-clamp: 2; /* 显示两行描述 */
    }
    
    .product-price {
        font-size: 20px; /* 从16px增加到20px */
    }
    
    .btn-buy {
        padding: 10px 20px; /* 从5px 12px增加到10px 20px */
        font-size: 15px; /* 从12px增加到15px */
    }
    
    .product-stock-badge {
        font-size: 13px; /* 增大库存标签 */
        padding: 4px 10px;
    }
    
    /* 购买弹窗平板优化 */
    .payment-types {
        grid-template-columns: repeat(3, 1fr); /* 平板保持三列 */
        gap: 9px;
    }
    
    .option-content {
        padding: 14px 7px;
        min-height: 85px; /* 平板固定高度 */
    }
    
    .option-content i {
        font-size: 26px;
        width: 30px;
        height: 30px;
    }
    
    .option-content span {
        font-size: 12px;
        min-height: 15px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    #qrCodeImage img {
        width: 160px;
        height: 160px;
    }
    
    /* 购买弹窗移动端优化 */
    .modal-body {
        padding: 12px; /* 移动端进一步压缩 */
    }
    
    .product-summary {
        gap: 10px;
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .product-summary .product-image {
        width: 60px; /* 移动端图片更小 */
        height: 60px;
    }
    
    .product-summary h4 {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .product-summary .product-price {
        font-size: 16px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group input[type="email"] {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    /* 支付方式保持三列并排 */
    .payment-types {
        grid-template-columns: repeat(3, 1fr); /* 保持三列 */
        gap: 8px; /* 移动端适中间距 */
    }
    
    .option-content {
        padding: 12px 6px; /* 移动端紧凑但舒适 */
        gap: 5px;
        min-height: 80px; /* 手机固定高度 */
    }
    
    .option-content i {
        font-size: 24px; /* 移动端图标适中 */
        width: 28px;
        height: 28px;
    }
    
    .option-content span {
        font-size: 12px; /* 移动端文字适中 */
        min-height: 14px;
    }
    
    .btn-primary {
        padding: 9px 16px;
        font-size: 13px;
        gap: 4px;
    }
    
    /* 移动端显示简短按钮文字 */
    .btn-text-short {
        display: inline;
    }
    
    .btn-text-full {
        display: none;
    }
    
    .form-tip {
        font-size: 10px;
    }
    
    /* 小屏幕单列显示 */
    .products-grid {
        grid-template-columns: 1fr; /* 改为单列 */
        gap: 12px;
    }
    
    .main-content {
        padding: 12px;
    }
    
    /* 小屏幕商品卡片扩大 */
    .product-body {
        padding: 12px; /* 从6px增加到12px */
    }
    
    .product-header {
        gap: 8px; /* 从5px增加到8px */
        margin-bottom: 6px;
    }
    
    .product-name {
        font-size: 15px; /* 从12px增加到15px */
    }
    
    .product-stock-badge {
        padding: 3px 8px; /* 从2px 6px增加 */
        font-size: 12px; /* 从10px增加到12px */
        gap: 3px;
    }
    
    .product-stock-badge i {
        font-size: 11px; /* 从9px增加到11px */
    }
    
    .product-description {
        font-size: 13px; /* 从10px增加到13px */
        margin-bottom: 8px;
        -webkit-line-clamp: 2; /* 显示2行 */
    }
    
    .product-footer {
        padding-top: 8px;
    }
    
    .product-price {
        font-size: 18px; /* 从14px增加到18px */
    }
    
    .btn-buy {
        padding: 8px 16px; /* 从4px 10px增加到8px 16px */
        font-size: 14px; /* 从11px增加到14px */
    }
    
    .product-image-wrapper {
        padding-top: 60%; /* 优化图片比例 */
    }
}

/* ========== 商品详情拟态化窗口 ========== */
.product-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.product-detail-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.product-detail-content {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 20px;
    width: 85%; /* 从90%减少到85% */
    max-width: 500px; /* 从600px减少到500px */
    max-height: 75vh; /* 从85vh减少到75vh */
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    animation: slideUpDetail 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpDetail {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 关闭按钮 */
.product-detail-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.product-detail-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

/* 商品图片区域 */
.product-detail-image {
    width: 100%;
    height: 250px; /* 从300px减少到250px */
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    position: relative;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-status {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-detail-status.in-stock {
    color: var(--success-color);
}

.product-detail-status.out-of-stock {
    color: var(--danger-color);
}

/* 商品信息区域 */
.product-detail-info {
    padding: 20px; /* 从25px减少到20px */
}

.product-detail-header {
    margin-bottom: 15px; /* 从20px减少到15px */
    padding-bottom: 12px; /* 从15px减少到12px */
    border-bottom: 2px solid #f0f0f0;
}

.product-detail-title {
    font-size: 20px; /* 从24px减少到20px */
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 8px; /* 从10px减少到8px */
    line-height: 1.4;
}

.product-detail-price {
    font-size: 28px; /* 从32px减少到28px */
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.product-detail-price small {
    font-size: 18px;
    color: #999;
}

/* 商品描述 */
.product-detail-section {
    margin-bottom: 15px; /* 从20px减少到15px */
}

.product-detail-section h4 {
    font-size: 15px; /* 从16px减少到15px */
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 8px; /* 从10px减少到8px */
    display: flex;
    align-items: center;
    gap: 6px; /* 从8px减少到6px */
}

.product-detail-section h4 i {
    color: var(--primary-color);
    font-size: 14px;
}

.product-detail-description {
    font-size: 14px; /* 从15px减少到14px */
    color: #666;
    line-height: 1.6; /* 从1.8减少到1.6 */
    white-space: pre-line;
    background: rgba(0, 0, 0, 0.02);
    padding: 12px; /* 从15px减少到12px */
    border-radius: 8px; /* 从10px减少到8px */
}

/* 商品规格 */
.product-detail-specs {
    display: grid;
    gap: 8px; /* 从10px减少到8px */
}

.product-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px; /* 从12px 15px减少到10px 12px */
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px; /* 从8px减少到6px */
}

.product-spec-label {
    font-size: 13px; /* 从14px减少到13px */
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px; /* 从6px减少到5px */
}

.product-spec-label i {
    font-size: 11px; /* 从12px减少到11px */
    color: var(--primary-color);
}

.product-spec-value {
    font-size: 14px; /* 从15px减少到14px */
    font-weight: bold;
    color: var(--dark-color);
}

/* 购买按钮 */
.product-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px; /* 从25px减少到18px */
    padding-top: 15px; /* 从20px减少到15px */
    border-top: 2px solid #f0f0f0;
}

.btn-detail-buy {
    flex: 1;
    padding: 12px 24px; /* 从15px 30px减少到12px 24px */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 20px; /* 从25px减少到20px */
    cursor: pointer;
    font-size: 15px; /* 从16px减少到15px */
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* 从10px减少到8px */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-detail-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-detail-buy:active {
    transform: translateY(0);
}

.btn-detail-buy:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .product-detail-content {
        width: 90%; /* 从95%减少到90% */
        max-width: 450px; /* 添加最大宽度 */
        max-height: 80vh; /* 从90vh减少到80vh */
    }
    
    .product-detail-image {
        height: 200px; /* 从250px减少到200px */
    }
    
    .product-detail-info {
        padding: 18px; /* 从20px减少到18px */
    }
    
    .product-detail-title {
        font-size: 18px; /* 从20px减少到18px */
    }
    
    .product-detail-price {
        font-size: 24px; /* 从28px减少到24px */
    }
}

@media (max-width: 480px) {
    .product-detail-content {
        width: 90%; /* 从100%改为90%，不占满屏幕 */
        max-width: 380px; /* 添加最大宽度 */
        max-height: 75vh; /* 从100vh减少到75vh */
        border-radius: 15px; /* 从0改为15px，保持圆角 */
    }
    
    .product-detail-image {
        height: 180px; /* 从200px减少到180px */
        border-radius: 15px 15px 0 0; /* 从0改为保持圆角 */
    }
    
    .product-detail-info {
        padding: 15px; /* 保持15px */
    }
    
    .product-detail-title {
        font-size: 16px; /* 从18px减少到16px */
    }
    
    .product-detail-price {
        font-size: 22px; /* 从24px减少到22px */
    }
    
    .product-detail-description {
        font-size: 13px; /* 从14px减少到13px */
        padding: 10px; /* 从12px减少到10px */
        line-height: 1.5;
    }
    
    .btn-detail-buy {
        padding: 10px 20px; /* 从12px 24px减少到10px 20px */
        font-size: 14px; /* 从15px减少到14px */
    }
    
    .product-spec-item {
        padding: 8px 10px; /* 从10px 12px减少到8px 10px */
    }
    
    .product-spec-label {
        font-size: 12px; /* 从13px减少到12px */
    }
    
    .product-spec-value {
        font-size: 13px; /* 从14px减少到13px */
    }
    
    .product-detail-section {
        margin-bottom: 12px; /* 从15px减少到12px */
    }
    
    .product-detail-section h4 {
        font-size: 14px; /* 从15px减少到14px */
        margin-bottom: 6px; /* 从8px减少到6px */
    }
    
    .product-detail-header {
        margin-bottom: 12px; /* 从15px减少到12px */
        padding-bottom: 10px; /* 从12px减少到10px */
    }
    
    .product-detail-actions {
        margin-top: 15px; /* 从18px减少到15px */
        padding-top: 12px; /* 从15px减少到12px */
    }
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

