/* ============================================
   上海拓霸实业有限公司 - 活动隔断官网样式
   Bootstrap 5.3 定制主题
   ============================================ */

:root {
    --primary: #1c4987;
    --primary-light: #2d5faa;
    --primary-dark: #112d52;
    --accent: #c89b3c;
    --accent-light: #e0b85c;
    --text-dark: #333;
    --text-light: #666;
    --bg-gray: #f5f6fa;
    --bg-white: #ffffff;
    --border-color: #e8e8e8;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.8;
}

a { color: var(--primary); transition: all 0.3s; }
a:hover { color: var(--accent); }

/* ========== 顶部信息栏 ========== */
.top-bar {
    background: var(--primary-dark);
    color: #ccc;
    font-size: 13px;
    padding: 6px 0;
}
.top-bar .top-phone {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
}
.top-bar .top-phone:hover { color: var(--accent-light); }

/* ========== 主导航 ========== */
#mainNav {
    background: var(--bg-white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 0;
}
#mainNav .navbar-brand {
    padding: 8px 0;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 24px;
}
.brand-logo-img {
    max-height: 46px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    line-height: 1.2;
}
.brand-sub {
    font-size: 10px;
    color: var(--text-light);
    letter-spacing: 2px;
}

#mainNav .nav-link {
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    padding: 20px 16px !important;
    position: relative;
    transition: all 0.3s;
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--accent);
}
#mainNav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

/* ========== Banner轮播 ========== */
.hero-banner .carousel-item {
    height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero-banner .carousel-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}
.hero-banner .carousel-caption {
    bottom: 50%;
    transform: translateY(50%);
    text-align: left;
    left: 10%;
    right: 10%;
}
.hero-banner .carousel-caption h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.hero-banner .carousel-caption p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 20px;
}
.hero-banner .banner-hl {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 3px 12px;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .hero-banner .carousel-item { height: 350px; }
    .hero-banner .carousel-caption h2 { font-size: 24px; }
    .hero-banner .carousel-caption p { font-size: 14px; }
}

/* ========== 通用区块标题 ========== */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}
.section-title .subtitle {
    color: var(--text-light);
    font-size: 15px;
}
.section-title .divider {
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 12px auto 0;
}

/* ========== 产品卡片 ========== */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    margin-bottom: 24px;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.product-card .card-img {
    height: 240px;
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
    position: relative;
    overflow: hidden;
}
.product-card .card-img .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    font-size: 48px;
    color: #adb5bd;
}
.product-card .card-body {
    padding: 20px;
}
.product-card .card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}
.product-card .card-title a {
    color: var(--primary);
    text-decoration: none;
}
.product-card .card-text {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.product-card .features .feature-tag {
    background: #f0f4f8;
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* ========== 案例卡片 ========== */
.case-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 280px;
    margin-bottom: 24px;
}
.case-card .case-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
    transition: transform 0.5s;
}
.case-card:hover .case-img { transform: scale(1.08); }
.case-card .case-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
}
.case-card .case-overlay h5 {
    font-size: 17px;
    margin-bottom: 4px;
}
.case-card .case-overlay .case-info {
    font-size: 12px;
    opacity: 0.8;
}

/* ========== 新闻列表 ========== */
.news-item {
    display: flex;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}
.news-item:hover { background: #fafbfc; padding-left: 10px; }
.news-item .news-thumb {
    width: 200px;
    height: 140px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
    flex-shrink: 0;
}
.news-item .news-body { flex: 1; }
.news-item .news-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}
.news-item .news-title a {
    color: var(--text-dark);
    text-decoration: none;
}
.news-item .news-title a:hover { color: var(--accent); }
.news-item .news-summary {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item .news-meta {
    font-size: 12px;
    color: #999;
}
.news-item .news-meta span { margin-right: 15px; }

@media (max-width: 768px) {
    .news-item { flex-direction: column; }
    .news-item .news-thumb { width: 100%; height: 180px; }
}

/* ========== 侧边栏 ========== */
.sidebar-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.sidebar-card h5 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin-bottom: 16px;
}
.sidebar-card .hot-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}
.sidebar-card .hot-list li a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    display: block;
    transition: all 0.3s;
    padding-left: 10px;
    position: relative;
}
.sidebar-card .hot-list li a::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 10px;
    top: 4px;
}
.sidebar-card .hot-list li a:hover {
    color: var(--accent);
    padding-left: 15px;
}

/* ========== 公司优势 ========== */
.advantage-section {
    background: var(--bg-gray);
    padding: 60px 0;
}
.advantage-item {
    text-align: center;
    padding: 30px 15px;
    transition: all 0.3s;
}
.advantage-item:hover { transform: translateY(-5px); }
.advantage-item .adv-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
}
.advantage-item h5 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.advantage-item p { font-size: 13px; color: var(--text-light); margin: 0; }

/* ========== 关于我们区块 ========== */
.about-section {
    padding: 60px 0;
    background: #fff;
}
.about-img {
    border-radius: 8px;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
    position: relative;
}
.about-img::after {
    content: '二十余年 · 品质保障';
    position: absolute;
    bottom: 20px;
    right: -20px;
    background: var(--accent);
    color: #fff;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
}

/* ========== 联系我们区域 ========== */
.contact-section {
    padding: 50px 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.contact-section h3 { font-size: 28px; margin-bottom: 10px; }
.contact-section .contact-phone {
    font-size: 36px;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
}
.contact-section .contact-phone:hover { color: var(--accent-light); }

/* ========== 页脚 ========== */
.site-footer {
    background: #1a1f2b;
    color: #bbb;
    padding-top: 50px;
}
.site-footer .footer-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.site-footer .footer-about {
    font-size: 14px;
    line-height: 1.8;
}
.site-footer .footer-contact p {
    margin-bottom: 6px;
    font-size: 14px;
}
.site-footer .footer-contact i { color: var(--accent); margin-right: 6px; }
.site-footer .footer-links {
    list-style: none;
    padding: 0;
}
.site-footer .footer-links li { margin-bottom: 10px; }
.site-footer .footer-links li a {
    color: #bbb;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    padding-left: 12px;
    position: relative;
}
.site-footer .footer-links li a::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
}
.site-footer .footer-links li a:hover {
    color: var(--accent);
    padding-left: 18px;
}
.site-footer .footer-bottom {
    background: #141820;
    padding: 16px 0;
    margin-top: 40px;
    font-size: 13px;
    color: #BBBBBB;
}
.site-footer .footer-bottom a {
    color: #BBBBBB;
    text-decoration: none;
}
.site-footer .footer-bottom a:hover {
    color: var(--accent);
}
.footer-qr .qr-placeholder {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.footer-qr-img {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
}
.footer-qr-text {
    color: #BBBBBB;
}

/* ========== 右侧悬浮工具 ========== */
.side-tools {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.side-tools .side-item {
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
}
.side-tools .side-item:last-child {
    margin-bottom: 0;
}
.side-tools .side-item:hover {
    background: var(--accent);
    width: 150px;
    justify-content: flex-start;
    padding-left: 14px;
}
.side-tools .side-item i { font-size: 20px; flex-shrink: 0; }
.side-tools .side-text {
    white-space: nowrap;
    margin-left: 8px;
    font-size: 13px;
    display: none;
}
.side-tools .side-item:hover .side-text { display: inline; }
.side-tools .back-top { background: var(--accent); }

/* ========== 快速留言弹窗 ========== */
.quick-form {
    position: fixed;
    right: -320px;
    bottom: 100px;
    width: 300px;
    z-index: 1000;
    transition: right 0.3s ease;
}
.quick-form.show { right: 20px; }
.quick-form-inner {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
}

/* ========== 移动端悬浮电话 ========== */
.mobile-phone-fix {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}
.mobile-phone-fix .btn {
    font-size: 14px;
    padding: 10px 20px;
}
.mobile-phone-fix .btn i {
    animation: phoneRing 1.5s infinite;
}
@keyframes phoneRing {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

/* ========== 面包屑 ========== */
.breadcrumb-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 30px 0;
    color: #fff;
}
.breadcrumb-section h2 { font-size: 28px; margin: 0; }
.breadcrumb-section .breadcrumb {
    margin-bottom: 0;
    padding-top: 8px;
}
.breadcrumb-section .breadcrumb-item a { color: rgba(255,255,255,0.8); text-decoration: none; }
.breadcrumb-section .breadcrumb-item.active { color: var(--accent); }
.breadcrumb-section .breadcrumb-item+.breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ========== 详情页 ========== */
.detail-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    line-height: 2;
}
.detail-content img { max-width: 100%; height: auto; border-radius: 4px; }
.detail-content table { width: 100%; border-collapse: collapse; margin: 15px 0; }
.detail-content table th,
.detail-content table td { border: 1px solid #ddd; padding: 8px 12px; text-align: left; }
.detail-content table th { background: #f5f6fa; font-weight: 600; }

/* 产品上/下一个导航 */
.product-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
}
.product-nav-left,
.product-nav-right {
    flex: 1;
    max-width: 48%;
}
.product-nav-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #fff;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
    height: 100%;
}
.product-nav-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.product-nav-item .nav-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}
.product-nav-item .nav-title {
    color: #1c4987;
    font-weight: 500;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-nav-item:hover .nav-title { color: #c89b3c; }
.product-nav-right .product-nav-item { text-align: right; }
.detail-header { margin-bottom: 20px; }
.detail-header h1 { font-size: 26px; color: var(--primary); }
.detail-header .meta { color: #999; font-size: 13px; margin-top: 10px; }
.detail-header .meta span { margin-right: 15px; }

/* ========== 联系页面 ========== */
.contact-info-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}
.contact-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.contact-info-card .ci-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}
.contact-info-card h6 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 6px;
}
.contact-info-card p {
    font-size: 14px;
    color: var(--text-dark);
}

/* 留言表单卡片 */
.contact-form-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.contact-form-card h3 {
    margin-bottom: 6px;
}
.contact-form-card .form-label {
    font-weight: 500;
    margin-bottom: 4px;
}

/* ========== 搜索框 ========== */
.search-box .input-group {
    border-radius: 20px;
    overflow: hidden;
}
.search-box .form-control {
    border-right: none;
    border-radius: 20px 0 0 20px;
}
.search-box .btn {
    border-radius: 0 20px 20px 0;
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ========== 产品详情页 ========== */
.product-gallery .main-img {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}
.product-gallery .main-img img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    background: #e9ecef;
}
.product-gallery .thumb-list {
    display: flex;
    gap: 10px;
}
.product-gallery .thumb-list img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    background: #e9ecef;
}
.product-gallery .thumb-list img:hover,
.product-gallery .thumb-list img.active {
    border-color: var(--accent);
}
.product-info h3 { font-size: 24px; color: var(--primary); }
.product-info .feature-list { list-style: none; padding: 0; }
.product-info .feature-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 14px;
}
.product-info .feature-list li i { color: var(--accent); margin-right: 8px; }

/* ========== 404页面 ========== */
.error-page { text-align: center; padding: 80px 0; }
.error-page .error-code { font-size: 120px; color: var(--primary); font-weight: 700; }
.error-page .error-msg { font-size: 20px; color: var(--text-light); margin-bottom: 30px; }

/* ========== 分页 ========== */
.pagination .page-link {
    color: var(--primary);
    border-radius: 4px;
    margin: 0 3px;
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}
.pagination .page-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
