/* 溯源系统样式 */
.scan-section {
    padding: 40px 0;
    background-color: #f8f9fa;
}

.scan-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.scan-input {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.qr-scanner {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-scanner i {
    font-size: 80px;
    color: #4CAF50;
    opacity: 0.7;
}

.scanner-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #4CAF50;
    box-shadow: 0 0 10px #4CAF50;
    opacity: 0;
}

.qr-scanner.scanning .scanner-animation {
    animation: scanning 2s ease-in-out infinite;
}

@keyframes scanning {
    0% { top: 0; opacity: 1; }
    50% { top: 197px; opacity: 1; }
    100% { top: 0; opacity: 1; }
}

.scan-actions {
    margin-top: 20px;
}

.scan-demo {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.scan-demo h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.demo-qrcodes {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.demo-item {
    width: 120px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.demo-item:hover {
    transform: translateY(-5px);
}

.demo-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

/* 溯源结果弹窗样式优化 */
.trace-result-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.trace-result-popup > div {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.result-header h3 {
    margin: 0;
    color: #333;
    font-size: 22px;
}

.close-btn {
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: #333;
    background-color: #f5f5f5;
}

/* 产品信息区域样式优化 */
.product-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.product-info img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.info-text {
    flex: 1;
}

.info-text h4 {
    margin: 0 0 10px;
    color: #333;
    font-size: 20px;
}

.info-text p {
    margin: 0 0 10px;
    color: #666;
    font-size: 15px;
}

.certification-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 5px 12px;
    background-color: #e8f5e9;
    color: #4CAF50;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.badge i {
    margin-right: 5px;
    font-size: 12px;
}

/* 溯源时间线样式优化 */
.process-timeline {
    margin-top: 40px;
    position: relative;
    padding: 0 20px;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background-color: #4CAF50;
    opacity: 0.3;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
    background-color: transparent;
}

.timeline-icon {
    width: 70px;
    height: 70px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-content {
    width: 45%;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 0;
    margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: auto;
}

.timeline-content h3 {
    color: #4CAF50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

.timeline-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-content li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.timeline-content li::before {
    content: '•';
    color: #4CAF50;
    font-weight: bold;
    margin-right: 10px;
}

/* 阶段图片样式 */
.stage-photos {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.stage-photo {
    width: calc(33.33% - 7px);
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.stage-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.stage-photo:hover img {
    transform: scale(1.1);
}

.stage-photo::after {
    content: '+';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.stage-photo:hover::after {
    opacity: 1;
}

/* 溯源操作按钮 */
.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.result-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.result-actions button i {
    margin-right: 8px;
}

.result-actions .btn-primary {
    background-color: #4CAF50;
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.result-actions .btn-primary:hover {
    background-color: #3d9140;
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.result-actions .btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.result-actions .btn-secondary:hover {
    background-color: #eee;
    transform: translateY(-2px);
}

/* 照片预览模态框 */
.photo-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.preview-content img {
    max-width: 100%;
    max-height: 90vh;
    border: 3px solid #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.preview-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    color: #fff;
    text-align: center;
    font-size: 16px;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .process-timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-icon {
        left: 30px;
        transform: none;
        margin-bottom: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
    }
    
    .product-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-info img {
        width: 100%;
        height: auto;
        max-height: 200px;
        margin-bottom: 15px;
    }
    
    .stage-photo {
        width: calc(50% - 5px);
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions button {
        width: 100%;
    }
}

/* 二维码样式 */
.qr-code {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    position: relative;
}

.qr-code-wrapper {
    width: 100%;
    height: 100%;
    background-color: white;
    padding: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.qr-inner {
    width: 100%;
    height: 100%;
    background-image: 
        repeating-conic-gradient(#4CAF50 0% 25%, transparent 0% 50%),
        repeating-conic-gradient(#4CAF50 0% 25%, transparent 0% 50%),
        repeating-conic-gradient(#4CAF50 0% 25%, transparent 0% 50%),
        repeating-conic-gradient(#4CAF50 0% 25%, transparent 0% 50%);
    background-position: 
        0 0, 
        100% 0,
        100% 100%,
        0 100%;
    background-size: 50% 50%;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 4px;
}

.qr-eye {
    position: absolute;
    width: 30%;
    height: 30%;
    background-color: white;
    border: 4px solid #4CAF50;
    box-sizing: border-box;
}

.qr-eye::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 50%;
    background-color: #4CAF50;
    top: 25%;
    left: 25%;
}

.qr-eye.top-left {
    top: 10%;
    left: 10%;
}

.qr-eye.top-right {
    top: 10%;
    right: 10%;
}

.qr-eye.bottom-left {
    bottom: 10%;
    left: 10%;
}

.qr-logo {
    position: absolute;
    width: 30%;
    height: 30%;
    background-color: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.qr-logo i {
    font-size: 1.5rem;
    color: #4CAF50;
}

/* 二维码扫描动画 */
.scanner-animation {
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.8);
    animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
    0% {
        top: 0;
    }
    50% {
        top: calc(100% - 3px);
    }
    100% {
        top: 0;
    }
}

/* 应用场景样式 */
.application-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.application-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
}

.application-card {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon i {
    font-size: 35px;
    color: #4CAF50;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin: 0 0 15px;
    color: #333;
    font-size: 20px;
}

.card-content p {
    flex: 1;
    margin: 0 0 25px;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .application-card {
        min-width: 100%;
    }
} 