/* 可复用组件样式 */

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 15px;
    max-width: 900px;
    width: 95%;
    height: 90vh;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #2c5aa0 #e9ecef;
}

.modal-body::-webkit-scrollbar {
    width: 12px;
}

.modal-body::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 6px;
    margin: 5px 0;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2c5aa0, #4a90e2);
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1e3a5f, #2c5aa0);
}

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

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

.modal h3 {
    color: #2c5aa0;
    margin-bottom: 15px;
}

.modal p {
    color: #666;
    margin-bottom: 20px;
}

/* 产品详情图片样式 */
.product-detail-image {
    width: 100%;
    height: 350px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.1);
    padding: 15px;
}

/* 产品详情模态框样式 */
.product-detail {
    display: block;
    min-height: 100%;
}

.product-detail-header {
    background: linear-gradient(135deg, #2c5aa0, #4a90e2);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.product-detail-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.product-detail-header .product-cas {
    margin: 0 0 15px 0;
    opacity: 0.9;
    font-size: 1.2rem;
    font-weight: 500;
}

.product-detail-header .product-description {
    margin: 0;
    opacity: 0.95;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.product-detail-content {
    padding: 30px;
    background: #f8f9fa;
    position: relative;
}

.product-detail-content::before {
    content: '↓ 滚动查看更多信息';
    position: absolute;
    top: 10px;
    right: 20px;
    background: rgba(44, 90, 160, 0.1);
    color: #2c5aa0;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}


.detail-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.detail-section h3 {
    color: #2c5aa0;
    margin: 0 0 25px 0;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 3px solid #e9ecef;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
}

.detail-section h3:before {
    content: '';
    width: 4px;
    height: 20px;
    background: #2c5aa0;
    margin-right: 12px;
    border-radius: 2px;
}

.specifications-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.specifications-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: top;
    font-size: 15px;
}

.specifications-table td:first-child {
    font-weight: 600;
    color: #495057;
    width: 35%;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
}

.specifications-table td:last-child {
    color: #6c757d;
    font-weight: 500;
}

.specifications-table tr:last-child td {
    border-bottom: none;
}

.specifications-table tr:hover td {
    background: #f8f9fa;
}

.applications-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.applications-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    position: relative;
    padding-left: 30px;
    color: #495057;
    font-size: 15px;
    transition: all 0.2s ease;
}

.applications-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
    width: 20px;
    height: 20px;
    background: #d4edda;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.applications-list li:last-child {
    border-bottom: none;
}

.applications-list li:hover {
    background: #f8f9fa;
    padding-left: 35px;
}

/* 关闭按钮样式 */
.close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        height: 95vh;
        max-height: 95vh;
    }
    
    .product-detail-header {
        padding: 25px 20px;
    }
    
    .product-detail-header h2 {
        font-size: 1.8rem;
    }
    
    .product-detail-header .product-cas {
        font-size: 1.1rem;
    }
    
    .product-detail-header .product-description {
        font-size: 1rem;
    }
    
    .product-detail-content {
        padding: 25px 20px;
    }
    
    .product-detail-image {
        height: 300px;
    }
    
    .product-detail-content::before {
        font-size: 11px;
        padding: 4px 8px;
        top: 8px;
        right: 15px;
    }
    
    .detail-section {
        padding: 25px 20px;
    }
    
    .detail-section h3 {
        font-size: 1.2rem;
    }
    
    .specifications-table td {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .applications-list li {
        font-size: 14px;
        padding: 10px 0;
        padding-left: 25px;
    }
    
    .close {
        top: 15px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 98%;
        height: 98vh;
        max-height: 98vh;
    }
    
    .product-detail-header {
        padding: 20px 15px;
    }
    
    .product-detail-header h2 {
        font-size: 1.5rem;
    }
    
    .product-detail-header .product-cas {
        font-size: 1rem;
    }
    
    .product-detail-content {
        padding: 20px 15px;
    }
    
    .product-detail-image {
        height: 250px;
    }
    
    .product-detail-content::before {
        font-size: 10px;
        padding: 3px 6px;
        top: 6px;
        right: 10px;
    }
    
    .detail-section {
        padding: 20px 15px;
    }
    
    .detail-section h3 {
        font-size: 1.1rem;
    }
    
    .specifications-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .specifications-table td:first-child {
        width: 40%;
    }
    
    .applications-list li {
        font-size: 13px;
        padding: 8px 0;
        padding-left: 22px;
    }
    
    .close {
        top: 12px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

.modal .btn {
    margin: 0 10px;
}

/* 提示消息 */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

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

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 卡片组件 */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
}

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

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

/* 标签组件 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: #e9ecef;
    color: #495057;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 2px;
}

.tag-primary {
    background: #2c5aa0;
    color: white;
}

.tag-success {
    background: #28a745;
    color: white;
}

.tag-warning {
    background: #ffc107;
    color: #212529;
}

.tag-danger {
    background: #dc3545;
    color: white;
}

/* 分页组件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    color: #333;
    border: 1px solid #e1e5e9;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #2c5aa0;
    color: white;
    border-color: #2c5aa0;
}

.pagination .active {
    background: #2c5aa0;
    color: white;
    border-color: #2c5aa0;
}

.pagination .disabled {
    color: #6c757d;
    cursor: not-allowed;
}

/* 进度条 */
.progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: #2c5aa0;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #1e3f73;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ccc;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background: #f8f9fa;
}

.table-striped tr:nth-child(even) {
    background: #f8f9fa;
}

/* 搜索框 */
.search-box {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2c5aa0;
}

.search-box .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: pointer;
}

/* 折叠面板 */
.accordion {
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.accordion-item {
    border-bottom: 1px solid #e1e5e9;
}

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

.accordion-header {
    background: #f8f9fa;
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-content.active {
    padding: 20px;
    max-height: 500px;
}

/* 响应式组件 */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        padding: 20px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .table {
        font-size: 14px;
    }

    .table th,
    .table td {
        padding: 10px 8px;
    }

    .accordion-header {
        padding: 15px;
    }

    .accordion-content.active {
        padding: 15px;
    }
}
