/* ========================================
   assets/css/style.css - 全局公共样式
   所有页面共享的样式
   ======================================== */

/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 页面布局：footer 固定在底部 ===== */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* ===== 导航栏 ===== */
.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus,
.nav-link,
.nav-link:hover,
.nav-link:focus,
.lang-switch,
.lang-switch:hover,
.lang-switch:focus {
    text-decoration: none !important;
}

.navbar-brand {
    font-weight: 700;
    color: #1A3B5C;
}

.navbar-brand span {
    color: #C9A96E;
}

.nav-link {
    color: #1A3B5C;
    font-weight: 500;
}

.nav-link:hover {
    color: #C9A96E;
}

.lang-switch {
    color: #1A3B5C;
    font-weight: 500;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0.5rem 0;
}

.lang-switch i {
    margin-right: 4px;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
}

/* ===== Banner ===== */
.banner {
    background: linear-gradient(135deg, #1A3B5C 0%, #2C5F7A 100%);
    color: #fff;
    padding: 80px 0;
}

.banner h1 {
    font-size: 3rem;
    font-weight: 700;
}

.banner .gold {
    color: #C9A96E;
}

@media (max-width: 768px) {
    .banner {
        padding: 50px 0;
    }
    .banner h1 {
        font-size: 2rem;
    }
}

/* ===== 按钮 ===== */
.btn-gold {
    background: #C9A96E;
    color: #fff;
    border: 2px solid #C9A96E;
}

.btn-gold:hover {
    background: #b8955a;
    border-color: #b8955a;
    color: #fff;
}

.btn-outline-gold {
    border: 2px solid #C9A96E;
    color: #C9A96E;
}

.btn-outline-gold:hover {
    background: #C9A96E;
    color: #fff;
}

/* ===== 分类导航按钮（产品列表页） ===== */
.category-nav .btn {
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
}

/* ===== 产品卡片 ===== */
.product-card {
    transition: transform 0.3s;
    margin-bottom: 20px;
}

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

.product-card img {
    height: 200px;
    object-fit: cover;
}

.product-card .card-body {
    text-align: center;
}

.product-card .card-title {
    text-align: center;
}

.product-card .btn {
    display: inline-block;
}

/* ===== 区块标题（下划线完整覆盖全部文字） ===== */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
    text-align: left;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100% !important;
    height: 4px;
    background: #C9A96E;
}

.section-title.text-center {
    display: block;
    text-align: center;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
    width: 100% !important;
}

/* ========================================
   Footer 完整样式
   ======================================== */
.footer {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 50px 0 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 0px;
}

.footer-row {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap; /* 禁止自动换行，解决错位 */
    max-width: 1000px;
    margin: 0 auto;
    gap: 120px; /* 统一缩小间距，中英文共用，避免英文挤不下 */
}
.footer-col {
    flex: 1; /* 三栏自动均分宽度 */
    min-width: 180px;
    max-width: 280px;
}

.footer-row-en .footer-col {
    min-width: 180px !important;
    max-width: 280px !important;
}

.footer-row-en .footer-contact-list li {
    font-size: 0.8rem !important;
    gap: 8px !important;
}

.footer-row-en .footer-links li a {
    font-size: 0.8rem !important;
}

.footer-row-en .footer-slogan {
    font-size: 0.8rem !important;
}

.footer-row-en .brand {
    font-size: 1.1rem !important;
    white-space: nowrap !important;
}

/* 公共样式 */
.footer .brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1A3B5C;
    margin-bottom: 8px;
}

.footer .footer-slogan {
    font-size: 0.95rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 0;
}

.footer .footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1A3B5C;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}

.footer .footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #C9A96E;
    border-radius: 2px;
}

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

.footer .footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer .footer-contact-list li i {
    color: #C9A96E;
    font-size: 0.95rem;
    width: 18px;
    margin-top: 4px;
    flex-shrink: 0;
}

.footer .footer-contact-list li span {
    color: #495057;
}

.footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    column-count: 2;
    column-gap: 60px;
}
.footer .footer-links li {
    padding: 5px 0;
    break-inside: avoid;
}
.footer .footer-links li a {
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    position: relative;
    white-space: nowrap; /* 新增：禁止文字自动换行，单词保持一整行 */
}
.footer .footer-links li a:hover {
    color: #1A3B5C;
}
.footer .footer-links li a::before {
    content: '›';
    color: #C9A96E;
    margin-right: 8px;
    font-size: 1.1rem;
}

.footer .footer-social {
    display: flex;
    gap: 12px;
}

.footer .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e9ecef;
    color: #495057;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: default;
    position: relative;
}

.footer .social-link:hover {
    background: #1A3B5C;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(26, 59, 92, 0.25);
}

.footer .social-link i {
    pointer-events: none;
}

/* 微信二维码 */
.wechat-link {
    cursor: default !important;
}

.wechat-qrcode {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 100;
    width: 140px;
    height: 140px;
    pointer-events: none;
}

.wechat-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wechat-qrcode::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
}

.wechat-link:hover .wechat-qrcode {
    display: block;
}

.footer .footer-bottom {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 12px 0;
    margin-top: 30px;
    text-align: center;
}

.footer .footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: #adb5bd;
    line-height: 1;
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1A3B5C 0%, #2a5f8f 100%);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26, 59, 92, 0.35);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 0.4;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top.visible:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(26, 59, 92, 0.5);
    background: linear-gradient(135deg, #0f2a42 0%, #1A3B5C 100%);
}

.back-to-top:active {
    transform: scale(0.95);
}

/* ===== 响应式 Footer ===== */
@media (max-width: 992px) {
    .footer-row {
        gap: 40px !important;
    }
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .footer {
        padding: 35px 0 0;
    }

    .footer-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 30px !important;
    }

    .footer-col {
        max-width: 100% !important;
        text-align: center !important;
        min-width: unset !important;
        width: 100% !important;
    }

    .footer .footer-title::after {
        left: 50% !important;
        transform: translateX(-50%);
    }

    .footer .footer-title {
        text-align: center;
    }

    .footer .footer-contact-list li {
        justify-content: center !important;
    }

    .footer .footer-links {
        text-align: center;
    }

    .footer .footer-social {
        justify-content: center;
    }

    .footer .footer-bottom p {
        font-size: 0.75rem;
    }

    .wechat-qrcode {
        width: 120px;
        height: 120px;
        bottom: 40px;
    }
}

@media (max-width: 480px) {
    .footer .footer-contact-list li {
        font-size: 0.8rem !important;
    }
}

img, video, audio {
    user-select: none;
    pointer-events: none;
}

/* ========================================
   导航栏下拉菜单
   ======================================== */
/* ===== 一级菜单容器：宽度由内容撑开 ===== */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: auto !important;
    width: auto !important;
    background: #fff;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.dropdown-menu .dropdown-item {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 400;
    color: #2c3e50;
    transition: all 0.2s;
    text-align: left !important;
}

.dropdown-menu .dropdown-item:hover {
    background: #f0f2f5;
    color: #1A3B5C;
}

.dropdown-menu .dropdown-item i {
    margin-right: 10px;
    color: #C9A96E;
    width: 16px;
    text-align: center;
}

.nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

.nav-link.dropdown-toggle::after {
    margin-left: 4px;
    font-size: 0.6rem;
    vertical-align: middle;
}

/* ===== 二级菜单（子菜单） ===== */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: 2px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: auto !important;
    width: auto !important;
    background: #fff;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

.dropdown-submenu > .dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-submenu > .dropdown-item::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.6rem;
    margin-left: 20px;
    color: #C9A96E;
    flex-shrink: 0;
}

.dropdown-submenu:hover > .dropdown-item {
    background: #f0f2f5;
    color: #1A3B5C;
    border-radius: 8px 0 0 8px;
}

/* ===== 产品列表项（二级菜单中的产品名称） ===== */
.dropdown-submenu .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.375rem 1.2rem;
    white-space: nowrap;
    width: auto;
    text-align: left;
    font-size: 0.9rem;
    color: #2c3e50;
}

.dropdown-submenu .dropdown-menu .dropdown-item::after {
    content: none !important;
}

.dropdown-submenu .dropdown-menu .dropdown-item i {
    color: #C9A96E;
    font-size: 0.85rem;
}

.dropdown-submenu .dropdown-menu .dropdown-item:hover {
    background: #f0f2f5;
    color: #1A3B5C;
}

/* ===== 移动端适配 ===== */
@media (max-width: 991.98px) {
    .nav-item.dropdown:hover > .dropdown-menu {
        display: none;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 1.5rem;
        background: transparent;
        min-width: auto !important;
        width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none !important;
    }

    .dropdown-menu.show {
        display: block !important;
    }

    .dropdown-menu .dropdown-item {
        padding: 6px 0;
        color: #1A3B5C;
    }

    .dropdown-menu .dropdown-item:hover {
        background: transparent;
    }

    .dropdown-submenu > .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 1.5rem;
        background: transparent;
        min-width: auto !important;
        width: 100% !important;
    }

    .dropdown-submenu > .dropdown-item::after {
        content: '\f078';
        margin-left: auto;
    }

    .dropdown-submenu .dropdown-menu .dropdown-item {
        padding: 0.25rem 0 0.25rem 1.5rem;
        white-space: normal;
        width: 100%;
        text-align: left;
        gap: 0.5rem;
    }
}

/* ===== 首页产品无缝滚动 ===== */
.product-scroll-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0;
    cursor: default;
}

.product-scroll-track {
    display: flex;
    gap: 20px;
    width: max-content;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    animation: scrollProducts 25s linear infinite;
}

.product-scroll-wrapper:hover .product-scroll-track {
    animation-play-state: paused;
}

.product-scroll-item {
    flex: 0 0 220px;
    width: 220px;
}

.product-scroll-item .product-card {
    transition: transform 0.3s ease;
}

.product-scroll-item .product-card:hover {
    transform: translateY(-5px);
}

@keyframes scrollProducts {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 10px)); }
}

@media (max-width: 768px) {
    .product-scroll-item {
        flex: 0 0 160px;
        width: 160px;
    }
    .product-scroll-track {
        gap: 12px;
        animation-duration: 20s;
    }
    @keyframes scrollProducts {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-50% - 6px)); }
    }
    .product-scroll-item .card-title {
        font-size: 0.85rem;
    }
    .product-scroll-item .btn-sm {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .product-scroll-item {
        flex: 0 0 130px;
        width: 130px;
    }
    .product-scroll-track {
        gap: 10px;
        animation-duration: 16s;
    }
    @keyframes scrollProducts {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-50% - 5px)); }
    }
}

.product-detail-img {
    width: 60% !important;
    max-width: 620px !important;
    height: auto !important;
    border-radius: 8px !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
}

@media (max-width: 768px) {
    .product-detail-img {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .product-detail-img {
        max-width: 100%;
    }
}

.gold-flow-text {
    font-size: 56px;
    font-weight: 700;
    font-family: "Microsoft Yahei", SimHei, sans-serif;
    background: linear-gradient(
        90deg,
        #b8862b 0%,
        #ffe8b0 40%,
        #b8862b 60%,
        #ffe8b0 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: goldShine 7s linear infinite;
    letter-spacing: 6px;
    line-height: 1.3;
    will-change: background-position;
    transform: translateZ(0);
}

@keyframes goldShine {
    0% { background-position: 220% center; }
    100% { background-position: -220% center; }
}

@media (max-width: 768px) {
    .gold-flow-text {
        font-size: 32px;
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    .gold-flow-text {
        font-size: 24px;
        letter-spacing: 2px;
    }
}