/**
 * 产品相关页面样式
 */

/* 产品陈列区样式 */
.product-zone {
    margin-bottom: 60px;
}

.zone-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.zone-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
    align-items: stretch;
}

.product-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.product-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60px;
}

.product-card-footer {
    margin-top: auto;
    padding-top: 20px;
}

.product-card-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.product-card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.product-card-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* 产品空状态样式 */
.product-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.product-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 产品套餐页面样式 */
.product-sets-main {
    padding: 120px 0 80px;
    min-height: 100vh;
}

.product-sets-container {
    max-width: 1200px;
    margin: 0 auto;
}

.product-sets-header {
    text-align: center;
    margin-bottom: 60px;
}

.product-sets-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.product-sets-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

.product-set-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.product-set-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.product-set-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-set-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.product-set-card-header {
    margin-bottom: 24px;
}

.product-set-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.product-set-card-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.product-set-card-price {
    font-size: 2rem;
    font-weight: 700;
    color: #1890ff;
    margin-bottom: 24px;
}

.product-set-card-price .currency {
    font-size: 1rem;
    font-weight: 500;
}

.product-set-card-footer {
    text-align: center;
}

.product-set-card-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.product-set-card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.product-set-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.product-set-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.product-set-loading {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.product-set-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 产品购买页面样式 */
.product-buy-main {
    padding: 20px 0 10px;
    min-height: 100vh;
}

.product-buy-container {
    max-width: 800px;
    margin: 0 auto;
}

.product-buy-header {
    text-align: center;
    margin-bottom: 15px;
}

.product-buy-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.product-buy-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 购买页顶端消息区域 */
.product-buy-message {
    margin: 0 auto 16px auto;
    max-width: 520px;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}
.product-buy-message-error { background: #ffecec; color: #d4380d; border: 1px solid #ffccc7; }
.product-buy-message-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.product-buy-message-warning { background: #fff7e6; color: #d48806; border: 1px solid #ffe58f; }
.product-buy-message-info { background: #e6f4ff; color: #0958d9; border: 1px solid #91caff; }

.order-summary {
    margin-bottom: 20px;
}

.order-summary h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-name {
    font-weight: 500;
    color: #333;
}

.order-item-price {
    font-weight: 600;
    color: #1890ff;
    font-size: 1.1rem;
}

.payment-methods {
    margin-bottom: 20px;
}

.payment-methods h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.payment-option.selected {
    border-color: #667eea;
    background: #f8f9ff;
}

.payment-option input[type="radio"] {
    margin-right: 10px;
}

.payment-option-label {
    font-weight: 500;
    color: #333;
}

.pay-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.pay-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 微信支付弹窗样式 */
.wechat-pay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.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;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #666;
}

.modal-body {
    padding: 25px;
    text-align: center;
}

.payment-info {
    margin-bottom: 25px;
}

.payment-info p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.payment-info .amount {
    color: #1890ff;
    font-weight: 600;
    font-size: 16px;
}

.qrcode-container {
    margin-bottom: 25px;
}

.qrcode-container #qrcode {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.qrcode-tip {
    color: #999;
    font-size: 14px;
    margin: 0;
}

.payment-status {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.payment-status p {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* 产品套餐状态标识 */
.product-set-card-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    z-index: 2;
}

.product-set-card.activated .product-set-card-status {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.product-set-card.not-activated .product-set-card-status {
    background: linear-gradient(135deg, #faad14, #ffc53d);
    color: white;
    box-shadow: 0 2px 8px rgba(250, 173, 20, 0.3);
}

/* 状态文字样式区分 */
.product-set-card-status.status-activated {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.product-set-card-status.status-not-activated {
    background: linear-gradient(135deg, #faad14, #ffc53d);
    color: white;
    box-shadow: 0 2px 8px rgba(250, 173, 20, 0.3);
}

/* 按钮样式少许区分 */
.product-set-card-button.use-button {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    border: none;
}

.product-set-card-button.use-button:hover {
    background: linear-gradient(135deg, #389e0d, #52c41a);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(82, 196, 26, 0.4);
}

.product-set-card-button.use-button:active {
    transform: translateY(0);
}

.product-set-card-button.order-button {
    /* 保持原有样式，无需额外定义 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }
    
    .product-card {
        padding: 30px 20px;
    }
    
    .product-set-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-buy-content {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
    }
    
    .product-set-card-status {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}
