/* 产品详情页面手机端参数样式 */

/* 桌面端和手机端显示控制 */
@media (max-width: 768px) {
    /* 隐藏桌面端的banner参数 */
    .product-detail-page .desktop_only {
        display: none !important;
    }
    
    /* 显示手机端参数区域 */
    .product-detail-page .mobileonly {
        display: block !important;
    }
}

@media (min-width: 769px) {
    /* 桌面端隐藏手机端参数区域 */
    .product-detail-page .mobileonly {
        display: none !important;
    }
    
    /* 显示桌面端的banner参数 */
    .product-detail-page .desktop_only {
        /* display: block !important; */
    }
}

/* 手机端产品参数区域样式 */
@media (max-width: 768px) {
    .product-detail-page .product_spec_mobile {
        background: #f8f9fa;
        padding: 2rem 0;
        margin: 0;
        border-bottom: 1px solid #e9ecef;
    }

    .product-detail-page .product_spec_mobile .container {
        padding: 0 2rem;
    }

    .product-detail-page .spec_mobile_title {
        font-size: 1.8rem;
        font-weight: 600;
        color: #2c3e50;
        margin: 0 0 1.5rem 0;
        text-align: center;
        position: relative;
    }

    .product-detail-page .spec_mobile_title::after {
        content: '';
        position: absolute;
        bottom: -0.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 3rem;
        height: 0.2rem;
        background: linear-gradient(90deg, #036FBE, #0284c7);
        border-radius: 0.1rem;
    }

    .product-detail-page .spec_mobile_list {
        display: flex;
        flex-direction: column;
        gap: 0;
        background: white;
        border-radius: 1rem;
        overflow: hidden;
        box-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.08);
    }

    .product-detail-page .spec_mobile_item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.2rem 1.5rem;
        border-bottom: 1px solid #f1f5f9;
        transition: background-color 0.2s ease;
    }

    .product-detail-page .spec_mobile_item:last-child {
        border-bottom: none;
    }

    .product-detail-page .spec_mobile_item:hover {
        background-color: #f8fafc;
    }

    .product-detail-page .spec_mobile_label {
        font-size: 1.4rem;
        font-weight: 500;
        color: #64748b;
        flex: 1;
        text-align: left;
    }

    .product-detail-page .spec_mobile_value {
        font-size: 1.4rem;
        font-weight: 600;
        color: #036FBE;
        flex: 1;
        text-align: right;
        background: linear-gradient(90deg, #036FBE, #0284c7);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* 如果值很长，允许换行 */
    .product-detail-page .spec_mobile_value {
        word-break: break-word;
        hyphens: auto;
    }

    /* 为长文本提供更好的布局 */
    .product-detail-page .spec_mobile_item.long_text {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .product-detail-page .spec_mobile_item.long_text .spec_mobile_label {
        text-align: left;
    }

    .product-detail-page .spec_mobile_item.long_text .spec_mobile_value {
        text-align: left;
        -webkit-text-fill-color: #036FBE;
        background: none;
    }
}

/* 确保在所有屏幕尺寸下都有合适的间距 */
@media (max-width: 480px) {
    .product-detail-page .product_spec_mobile .container {
        padding: 0 1.5rem;
    }

    .product-detail-page .spec_mobile_item {
        padding: 1rem 1.2rem;
    }

    .product-detail-page .spec_mobile_label,
    .product-detail-page .spec_mobile_value {
        font-size: 1.3rem;
    }

    .product-detail-page .spec_mobile_title {
        font-size: 1.6rem;
    }
}

/* 动画效果 */
@media (max-width: 768px) {
    .product-detail-page .product_spec_mobile {
        animation: slideInUp 0.6s ease-out;
    }

    .product-detail-page .spec_mobile_item {
        animation: fadeInUp 0.4s ease-out;
        animation-fill-mode: both;
    }

    .product-detail-page .spec_mobile_item:nth-child(1) { animation-delay: 0.1s; }
    .product-detail-page .spec_mobile_item:nth-child(2) { animation-delay: 0.2s; }
    .product-detail-page .spec_mobile_item:nth-child(3) { animation-delay: 0.3s; }
    .product-detail-page .spec_mobile_item:nth-child(4) { animation-delay: 0.4s; }
    .product-detail-page .spec_mobile_item:nth-child(5) { animation-delay: 0.5s; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 特殊情况：如果没有参数，显示提示信息 */
@media (max-width: 768px) {
    .product-detail-page .spec_mobile_list:empty::after {
        content: 'No specifications available';
        display: block;
        text-align: center;
        padding: 2rem;
        color: #94a3b8;
        font-style: italic;
    }
}
