/* 汉魏优选 - 样式文件 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, li {
    list-style: none;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部深色栏 */
.top-bar {
    background: linear-gradient(90deg, #1a2332 0%, #2c3e50 100%);
    color: #fff;
    padding: 8px 0;
    font-size: 12px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-right a {
    color: #b0b8c4;
    margin-left: 20px;
    display: inline-block;
}

.top-right a:hover {
    color: #fff;
}

.top-icon {
    font-size: 14px;
    margin-right: 5px;
    vertical-align: middle;
    display: inline-block;
}

.top-right .cart-count {
    background: #e74c3c;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
    font-size: 11px;
}

.btn-register {
    background: #3498db;
    color: #fff !important;
    padding: 4px 15px;
    border-radius: 3px;
}

.btn-register:hover {
    background: #2980b9;
}

/* 主导航栏 */
.main-nav {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo img {
    height: 50px;
}

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 0 20px;
    height: 70px;
    line-height: 70px;
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.nav-menu > li > a:hover,
.nav-menu > li.active > a {
    color: #3498db;
    border-bottom: 3px solid #3498db;
}

.arrow-down {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #666;
}

/* 二级菜单 */
.nav-menu > li {
    position: relative;
    z-index: 1;
}

.has-submenu > .arrow-down {
    transition: transform 0.3s;
}

.has-submenu:hover > .arrow-down {
    transform: rotate(180deg);
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    min-width: 200px;
    z-index: 9999;
    padding: 10px 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.has-submenu:hover > .submenu {
    display: block;
}

.submenu li {
    position: relative;
}

.submenu li a {
    display: block;
    padding: 12px 25px;
    color: #555;
    font-size: 14px;
    transition: all 0.3s;
}

.submenu li a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding-left: 30px;
}

.submenu li:last-child a {
    border-bottom: none;
}

/* 主内容区 */
.main-content {
    padding: 40px 0;
    background: #fff;
    min-height: 600px;
}

/* Banner */
.banner {
    height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.banner h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.banner p {
    font-size: 20px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #2ecc71;
    color: #fff;
}

.btn-secondary:hover {
    background: #27ae60;
}

/* 服务卡片 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.service-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.service-card p {
    color: #666;
    margin-bottom: 20px;
}

.service-card .price {
    font-size: 28px;
    color: #e74c3c;
    font-weight: bold;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination a:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination .active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* 底部 */
.site-footer {
    background: #1a2332;
    color: #b0b8c4;
    margin-top: 0;
}

.footer-links {
    padding: 60px 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-col h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a:hover {
    color: #3498db;
}

.contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.footer-qrcode {
    margin-top: 20px;
    text-align: center;
}

.footer-qrcode img {
    width: 120px;
    height: 120px;
    border-radius: 4px;
}

.footer-qrcode p {
    font-size: 12px;
    margin-top: 8px;
}

.footer-bottom {
    padding: 20px 0;
}

.footer-nav {
    text-align: center;
    margin-bottom: 15px;
}

.footer-nav a {
    margin: 0 10px;
    font-size: 13px;
}

.footer-nav a:hover {
    color: #3498db;
}

.copyright {
    text-align: center;
    font-size: 12px;
    color: #7f8c8d;
}

/* 在线客服 */
.online-service {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 1000;
}

.service-btn {
    background: #3498db;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.service-btn span {
    font-size: 10px;
    margin-top: 3px;
}

.service-popup {
    display: none;
    position: absolute;
    right: 70px;
    bottom: 0;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    width: 280px;
    border: 1px solid #ecf0f1;
}

.service-popup h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
    text-align: center;
}

.service-time,
.service-phone,
.service-qq {
    margin-bottom: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.service-time:last-child,
.service-phone:last-child,
.service-qq:last-child {
    border-bottom: none;
}

.service-wechat {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.service-wechat img {
    width: 160px;
    height: 160px;
    border-radius: 8px;
    border: 2px solid #ecf0f1;
    margin-bottom: 10px;
}

.service-wechat p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* 按钮和标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #2ecc71;
    color: #fff;
}

.badge-warning {
    background: #f39c12;
    color: #fff;
}

.badge-danger {
    background: #e74c3c;
    color: #fff;
}

.badge-info {
    background: #3498db;
    color: #fff;
}

/* 通知消息 */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* 加载动画 */
.spinner {
    width: 40px;
    height: 40px;
    margin: 100px auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
