/* 商品详情页优化样式 */

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #666;
    font-size: 14px;
}

/* 商品轮播图优化 */
.product-banner {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 0 0 15px 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-swiper {
    width: 100%;
    height: 300px;
}

.product-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image-link img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.product-image-link:hover img {
    transform: scale(1.05);
}

.image-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 10;
}

/* 商品信息区域 */
.product-info-container {
    background: #fff;
    margin-top: 10px;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-header {
    margin-bottom: 20px;
}

.product-code {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

/* 商品属性样式 */
.product-attributes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f8f8;
}

.attribute-item:last-child {
    border-bottom: none;
}

.attribute-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    min-width: 80px;
}

.attribute-value {
    font-size: 14px;
    color: #333;
    text-align: right;
    flex: 1;
    word-break: break-all;
}

.product-badge {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.badge-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.badge-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.product-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    margin: 10px 0;
}

.product-type {
    font-size: 14px;
    color: #667eea;
    font-weight: normal;
}

.product-subtitle {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.property-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* 价格区域 */
.product-price-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.price-item:last-child {
    border-bottom: none;
}

.price-item.bonus {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    margin: 10px -15px -15px -15px;
    padding: 12px 15px;
    border-radius: 0 0 12px 12px;
}

.price-label {
    font-size: 14px;
    color: #666;
}

.price-value {
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
}

.price-item.bonus .price-value {
    color: #d63031;
}

/* 分割线 */
.product-details-divider {
    text-align: center;
    position: relative;
    margin: 30px 0 20px;
}

.product-details-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
}

.product-details-divider span {
    background: #fff;
    padding: 0 20px;
    color: #999;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* 商品内容区域 */
.product-content-container {
    background: #fff;
    margin-top: 10px;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-description {
    line-height: 1.6;
    color: #333;
    margin-bottom: 30px;
}

.product-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* 商品属性选择 */
.product-options {
    margin-top: 30px;
}

.options-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.option-values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-value {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-value:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.option-value.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
}

/* 通知提示 */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.notification-warning {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: #fff;
}

.notification-success {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: #fff;
}

/* 底部操作栏优化 */
.m-tabbar {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.tabbar-item {
    transition: all 0.3s ease;
}

.tabbar-item:hover {
    background: #f8f9fa;
}

.tabbar-item.tabbar-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* 响应式设计 */
@media screen and (max-width: 480px) {
    .product-swiper {
        height: 250px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .price-value {
        font-size: 14px;
    }
    
    .option-values {
        gap: 8px;
    }
    
    .option-value {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 添加过渡动画效果 */
.product-info-container,
.product-content-container {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 轮播图导航按钮样式优化 */
.swiper-button-next,
.swiper-button-prev {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255,255,255,0.95);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 16px;
    color: #667eea;
}

/* 隐藏轮播图导航按钮中的文字 */
.swiper-button-next::after,
.swiper-button-prev::after {
    content: none !important;
}

/* 使用背景图标代替文字 */
.swiper-button-next,
.swiper-button-prev {
    background-image: none !important;
}

/* 设置纯箭头样式 */
.swiper-button-next::before {
    content: "›" !important;
    font-size: 24px;
    color: #667eea;
    font-weight: bold;
    line-height: 30px;
    display: block;
    text-align: center;
}

.swiper-button-prev::before {
    content: "‹" !important;
    font-size: 24px;
    color: #667eea;
    font-weight: bold;
    line-height: 30px;
    display: block;
    text-align: center;
}

/* 分页器样式优化 */
.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #fff;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #667eea;
    transform: scale(1.2);
}