/* ============================================
   Mobile Responsive Styles (max-width: 768px)
   ============================================ */

@media only screen and (max-width: 768px) {

    /* ---------- 顶部导航区 ---------- */
    .top-nav-area {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

    .top-nav-area .main-navbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        max-width: 100%;
    }

    .top-nav-area .company-logo-left {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .top-nav-area .company-logo-left img {
        height: 35px !important;
    }

    .top-nav-area .contact-info {
        display: none;
    }

    .top-nav-area .nav-links {
        display: none;
    }

    /* 汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1002;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* 左侧抽屉导航 */
    .mobile-drawer {
        display: block;
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 1001;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    }

    .mobile-drawer.active {
        left: 0;
    }

    .mobile-drawer-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-drawer-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-drawer .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    .mobile-drawer .drawer-header img {
        height: 35px;
    }

    .mobile-drawer .drawer-close {
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        font-size: 24px;
        color: #666;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-drawer .drawer-contact {
        padding: 15px;
        background: #f8f9fa;
        border-bottom: 1px solid #eee;
    }

    .mobile-drawer .drawer-contact p {
        margin: 5px 0;
        font-size: 13px;
        color: #666;
    }

    .mobile-drawer .drawer-contact a {
        color: #1771FF;
        text-decoration: none;
    }

    .mobile-drawer ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-drawer ul li {
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-drawer ul li a {
        display: block;
        padding: 14px 20px;
        color: #333;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-drawer ul li a:hover,
    .mobile-drawer ul li a.active {
        background: #f0f7ff;
        color: #1771FF;
        font-weight: 600;
    }

    .mobile-drawer .drawer-submenu {
        display: none;
        background: #fafafa;
    }

    .mobile-drawer .drawer-submenu.active {
        display: block;
    }

    .mobile-drawer .drawer-submenu li a {
        padding-left: 40px;
        font-size: 14px;
        color: #666;
    }

    .mobile-drawer .has-submenu {
        position: relative;
    }

    .mobile-drawer .has-submenu > a::after {
        content: '+';
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 18px;
        color: #999;
        transition: transform 0.2s ease;
    }

    .mobile-drawer .has-submenu.active > a::after {
        content: '-';
    }

    /* ---------- 侧边联系栏 ---------- */
    .contact-sidebar {
        display: none;
    }

    .mobile-contact-bar {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #1771FF;
        z-index: 999;
        padding: 10px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-contact-bar a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #fff;
        text-decoration: none;
        font-size: 11px;
        padding: 5px;
    }

    .mobile-contact-bar a i {
        font-size: 20px;
        margin-bottom: 3px;
    }

    /* ---------- 主体内容区 ---------- */
    body {
        font-size: 14px;
        padding-top: 55px;
        padding-bottom: 60px;
    }

    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* ---------- Hero 轮播区 ---------- */
    .hero-section {
        height: 50vh !important;
        min-height: 300px;
    }

    .hero-section .video-background {
        object-position: center;
    }

    .hero-section .carousel-content {
        padding: 0 20px;
        text-align: center;
    }

    .hero-section .carousel-content h1 {
        font-size: 24px !important;
        margin-bottom: 10px;
    }

    .hero-section .carousel-content p {
        font-size: 14px !important;
        margin-bottom: 15px;
    }

    .hero-section .carousel-content .btn-main {
        padding: 10px 25px !important;
        font-size: 14px !important;
    }

    .hero-section .carousel-controls button {
        width: 35px !important;
        height: 35px !important;
        font-size: 18px !important;
    }

    /* ---------- Section 区块 ---------- */
    .section {
        min-height: auto !important;
        padding: 40px 0 !important;
    }

    .section .side-mask {
        padding: 0 15px !important;
    }

    .section .content-box {
        padding: 25px 15px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        margin: 15px !important;
        border-radius: 10px;
    }

    .section .section-title {
        font-size: 22px !important;
        margin-bottom: 12px !important;
    }

    .section .content-box p {
        font-size: 14px !important;
        margin-bottom: 15px !important;
    }

    .section .content-box .btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }

    /* ---------- 页面标题区 ---------- */
    .page-title-area {
        padding: 40px 0 !important;
    }

    .page-title-content h1 {
        font-size: 22px !important;
    }

    .page-title-content ul {
        padding-left: 0;
        list-style: none;
        display: flex;
        flex-wrap: wrap;
        gap: 5px 10px;
    }

    .page-title-content ul li {
        font-size: 13px;
    }

    /* ---------- 分类导航区 ---------- */
    .category-nav-area {
        padding: 15px 0 !important;
    }

    .category-nav-area .container-fluid {
        max-width: 100% !important;
    }

    .category-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .category-label {
        margin-bottom: 8px;
        font-size: 14px;
    }

    .category-tag-item {
        padding: 6px 12px !important;
        font-size: 12px !important;
        margin: 3px !important;
    }

    /* ---------- 产品列表区 ---------- */
    .products-area {
        padding: 20px 0 !important;
    }

    .products-area .container-fluid {
        max-width: 100% !important;
    }

    .product-search-bar {
        margin-bottom: 15px !important;
    }

    .custom-search-input {
        font-size: 14px !important;
        height: 42px !important;
    }

    .btn-search-submit {
        padding: 0 15px !important;
        font-size: 14px !important;
    }

    .view-mode-switch {
        display: none !important;
    }

    .product-list-header {
        display: none !important;
    }

    #product-list-container .col-lg-4,
    #product-list-container .col-md-6,
    #product-list-container .col-sm-12 {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 8px;
        padding-right: 8px;
    }

    .single-products-box {
        margin-bottom: 15px;
    }

    .single-products-box .image {
        padding: 10px;
    }

    .single-products-box .mini-img {
        height: 120px;
        object-fit: contain;
    }

    .single-products-box .product-title-wrapper a {
        font-size: 13px !important;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-sku-info {
        font-size: 12px !important;
    }

    .pagination-jump {
        font-size: 13px !important;
    }

    #jump-page-input {
        width: 40px !important;
    }

    /* ---------- 产品详情页 ---------- */
    .product-details-area {
        padding: 20px 0 !important;
    }

    .products-details-image {
        margin-bottom: 20px;
    }

    .products-details-desc h3 {
        font-size: 18px !important;
    }

    .products-info li {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }

    .buy-checkbox-btn {
        flex-direction: column;
        gap: 10px;
    }

    .buy-checkbox-btn .default-btn {
        width: 100%;
        text-align: center;
    }

    .pdf-container {
        padding: 10px !important;
    }

    .docx {
        width: 100% !important;
    }

    /* ---------- 时间线（关于我们） ---------- */
    .history-area {
        padding: 30px 0 !important;
    }

    .timeline-block {
        margin-bottom: 25px !important;
    }

    .timeline-content {
        padding: 15px !important;
    }

    .timeline-content h3 {
        font-size: 16px !important;
    }

    .timeline-content p {
        font-size: 13px !important;
    }

    .timeline-date span {
        font-size: 14px !important;
    }

    /* ---------- 联系我们 ---------- */
    .contact-info-area {
        padding: 20px 0 !important;
    }

    .single-contact-info-box {
        padding: 20px 15px !important;
        margin-bottom: 15px;
        width: 100% !important;
        margin-left: 0 !important;
    }

    .single-contact-info-box .icon {
        font-size: 28px !important;
    }

    .single-contact-info-box h3 {
        font-size: 16px !important;
    }

    .single-contact-info-box a {
        font-size: 24px !important;
    }

    .contact-area {
        padding: 20px 0 !important;
    }

    .contact-form {
        padding: 20px 15px !important;
    }

    .contact-form h2 {
        font-size: 20px !important;
    }

    .contact-form .form-group label {
        font-size: 13px !important;
    }

    .contact-form .form-control {
        font-size: 14px !important;
        height: 42px !important;
    }

    .contact-form textarea.form-control {
        height: auto !important;
    }

    .contact-form .default-btn {
        width: 100%;
        text-align: center;
    }

    /* ---------- 页脚区 ---------- */
    .footer-area {
        padding-top: 30px !important;
        padding-bottom: 20px !important;
    }

    .footer-area .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .footer-area [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }

    .single-footer-widget {
        margin-bottom: 25px;
        margin-left: 25%;
    }

    .single-footer-widget img {
        height: 35px !important;
        margin-bottom: 15px !important;
    }

    .single-footer-widget h3 {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }

    .single-footer-widget .footer-contact-info {
        padding-left: 0;
        list-style: none;
    }

    .single-footer-widget .footer-contact-info li {
        font-size: 13px !important;
        margin-bottom: 8px !important;
        word-break: break-all;
    }

    .single-footer-widget .footer-contact-info li a {
        font-size: 18px !important;
    }

    .footer-area .link-list {
        padding-left: 0;
        list-style: none;
    }

    .footer-area .link-list li {
        margin-bottom: 8px;
    }

    .footer-area .link-list li a {
        font-size: 13px !important;
        color: #666;
    }

    .footer-area .rounded-image {
        max-width: 60px;
        height: auto;
    }

    .footer-area hr {
        margin: 20px 0 15px !important;
    }

    .footer-area p {
        font-size: 12px !important;
        line-height: 1.6;
    }

    .footer-area p a {
        font-size: 12px !important;
    }

    /* ---------- 回到顶部按钮 ---------- */
    .go-top {
        right: 15px !important;
        bottom: 75px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
        line-height: 36px !important;
    }

    /* ---------- 学习中心 ---------- */
    .learning-center-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }

    .learning-center-tabs .tab-btn {
        padding: 8px 15px !important;
        font-size: 13px !important;
    }

    /* ---------- FAQ / 使用须知 ---------- */
    .faq-accordion .accordion-item {
        margin-bottom: 10px;
    }

    .faq-accordion .accordion-button {
        font-size: 14px !important;
        padding: 12px 15px !important;
    }

    .faq-accordion .accordion-body {
        font-size: 13px !important;
        padding: 12px 15px !important;
    }

    /* ---------- 购物车 / 结算页 ---------- */
    .cart-area,
    .checkout-area {
        padding: 20px 0 !important;
    }

    .cart-table {
        overflow-x: auto;
    }

    .cart-table table {
        min-width: 600px;
    }

    .cart-totals {
        margin-top: 20px !important;
        padding: 15px !important;
    }

    .cart-totals h3 {
        font-size: 18px !important;
    }

    .billing-details,
    .order-details {
        padding: 15px !important;
        margin-bottom: 15px;
    }

    .order-details {
        margin-top: 15px !important;
    }

    .order-table {
        overflow-x: auto;
    }

    .order-table table {
        min-width: 400px;
    }

    /* ---------- 登录页 ---------- */
    .profile-authentication-area {
        padding: 20px 0 !important;
    }

    .login-form,
    .register-form {
        padding: 20px 15px !important;
        margin-right: 0 !important;
    }

    .login-form h2,
    .register-form h2 {
        font-size: 20px !important;
    }

    .login-form .form-group label,
    .register-form .form-group label {
        font-size: 13px !important;
    }

    .login-form .form-control,
    .register-form .form-control {
        height: 42px !important;
        font-size: 14px !important;
    }

    .login-form button,
    .register-form button {
        width: 100%;
        padding: 12px !important;
    }

    /* ---------- Facility 区 ---------- */
    .facility-area {
        padding: 20px 0 !important;
    }

    .single-facility-box {
        padding: 15px !important;
        margin-bottom: 15px;
    }

    .single-facility-box .icon {
        font-size: 24px !important;
    }

    .single-facility-box h3 {
        font-size: 15px !important;
    }

    .single-facility-box p {
        font-size: 12px !important;
    }

    /* ---------- 品牌区 ---------- */
    .brands-area {
        padding: 20px 0 !important;
    }

    .single-brands-item {
        margin-bottom: 15px;
    }

    /* ---------- 公司政策信息组件 ---------- */
    .companypolicyinfo-area {
        padding: 20px 0 !important;
    }

    .companypolicyinfo-area .single-facility-box {
        margin-bottom: 10px;
    }
}

/* ============================================
   超小屏幕适配 (max-width: 480px)
   ============================================ */

@media only screen and (max-width: 480px) {

    #product-list-container .col-lg-4,
    #product-list-container .col-md-6,
    #product-list-container .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .hero-section {
        height: 40vh !important;
        min-height: 250px;
    }

    .hero-section .carousel-content h1 {
        font-size: 20px !important;
    }

    .hero-section .carousel-content p {
        font-size: 12px !important;
    }

    .section .content-box {
        padding: 20px 12px !important;
        margin: 10px !important;
    }

    .section .section-title {
        font-size: 18px !important;
    }

    .page-title-content h1 {
        font-size: 18px !important;
    }

    .category-tag-item {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }

    .single-contact-info-box a {
        font-size: 20px !important;
    }

    .mobile-drawer {
        width: 260px;
        left: -260px;
    }
}

/* ============================================
   平板适配 (769px - 992px)
   ============================================ */

@media only screen and (min-width: 769px) and (max-width: 992px) {

    .top-nav-area .main-navbar {
        padding: 10px 20px;
    }

    .top-nav-area .contact-info span {
        font-size: 12px;
    }

    .top-nav-area .nav-links ul li a {
        font-size: 14px;
        margin: 0 8px;
    }

    .section .content-box {
        padding: 30px 20px !important;
        margin: 20px !important;
    }

    .footer-area [class*="col-"] {
        margin-bottom: 20px;
    }
}

/* 移动端专用隐藏/显示 */
.mobile-only {
    display: none;
}

@media only screen and (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    .section {
        height: 100vh !important; /* 强制占据 100% 视口高度 */
        display: flex !important;
        align-items: center;      /* 垂直居中内容 */
        justify-content: center;   /* 水平居中内容 */
        padding: 0 !important;    /* 移除之前的上下内边距 */
    }

    .section, .hero-section {
        /* 100vh 在移动端有时会被工具栏遮挡，100dvh 是动态视口高度 */
        height: 100vh !important; 
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }

    /* 确保背景视频强制铺满，不受 JS 报错影响 */
    .video-background {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        transform: translate(-50%, -50%) !important;
        object-fit: cover !important;
        z-index: -1;
    }
    /* 调整侧边遮罩/内容容器 */
    .section .side-mask {
        background-color: transparent !important; /* 移除全屏遮罩颜色，改用 content-box 的遮罩 */
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100% !important;
    }

    /* 调整内容盒子的样式，使其在背景上更清晰 */
    .section .content-box {
        background: rgba(255, 255, 255, 0.85) !important; /* 移动端建议用浅色半透明，更具质感 */
        backdrop-filter: blur(5px);
        width: 90%;             /* 宽度占据 90% */
        max-height: 80vh;       /* 防止内容过长超出屏幕 */
        overflow-y: auto;       /* 内容过多时允许内部滚动 */
        padding: 30px 20px !important;
        margin: 0 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    /* 修复文字颜色：既然 content-box 变浅色了，文字要变深 */
    .section .content-box .section-title,
    .section .content-box p {
        color: #333 !important;
    }

    /* 针对 ID 为 row-1 的 Hero Section 也可以统一高度 */
    .section, .hero-section {
        height: 100vh !important;
        height: 100dvh !important; /* 适配移动端动态工具栏 */
    }


    .section .content-box h2.section-title,
    .section .content-box p {
        color: #333333 !important; /* 使用深黑色，比纯黑更具质感 */
    }


    /* 1. 整体页脚左右留白，防止贴边 */
    .footer-area .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* 2. 第一部分：公司联系信息区域 居中且完整展开 */
    .footer-area .col-lg-4.col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        margin-bottom: 40px !important;
    }

    .footer-area .footer-contact-info {
        display: inline-block; /* 使容器宽度随内容变化，方便居中 */
        text-align: left;      /* 内部文字保持左对齐，方便阅读 */
        padding: 0 !important;
    }

    .footer-area .footer-contact-info li {
        white-space: nowrap;   /* 强制不换行，确保每行内容完整展开 */
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }

    /* 3. 第二、三、四部分：两列显示样式 */
    /* 针对 col-lg-1-5 和 col-lg-2 进行两列平分处理 */
    .footer-area .row > .col-lg-1-5,
    .footer-area .col-lg-2 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 30px !important;
        padding: 0 10px !important;
        box-sizing: border-box;
    }

    /* 4. 标题与列表微调，确保两列排版整齐 */
    .single-footer-widget h3 {
        font-size: 16px !important;
        margin-bottom: 15px !important;
        text-align: left;
    }

    .link-list {
        padding: 0 !important;
        list-style: none !important;
        text-align: left;
    }

    .link-list li a {
        font-size: 13px !important;
        display: block;
        padding: 4px 0;
    }

    /* 5. 品牌墙微调：在 50% 的宽度内依然保持垂直或小网格 */
    .footer-brands-wrapper {
        align-items: flex-start !important; /* 对齐左侧 */
        padding-top: 10px;
    }

    .footer-brands-wrapper .text-center {
        text-align: left !important; /* 配合两列布局左对齐 */
        margin-bottom: 15px !important;
    }

    .footer-area .rounded-image {
        max-width: 50px !important; /* 稍微缩小图片以适应两列空间 */
    }

    single-footer-widget{
        padding-left: 15px;
    }


    .footer-area .col-lg-2 {
        flex: 0 0 100% !important; /* 如果您希望品牌墙单独占一行并居中，设为100% */
        max-width: 100% !important;
        display: flex;
        justify-content: center;   /* 水平居中 */
        margin-top: 20px;
    }

    /* 2. 针对内部的 flex 容器 */
    .footer-brands-wrapper {
        display: flex !important;
        flex-direction: row !important; /* 移动端通常横向排列更省空间 */
        flex-wrap: wrap !important;     /* 允许折行 */
        justify-content: center !important; /* 核心：让内部图标整体居中 */
        align-items: flex-start !important;
        gap: 20px;                      /* 图标之间的间距 */
        width: 100%;
    }

    /* 3. 针对每一个图标项 */
    .footer-brands-wrapper .text-center {
        flex: 0 0 auto !important;      /* 宽度根据内容自适应 */
        margin-bottom: 10px !important;
        text-align: center !important;  /* 文字居中 */
    }

    /* 4. 图片大小微调 */
    .footer-area .rounded-image {
        display: block;
        margin: 0 auto;                 /* 图片自身居中 */
        max-width: 60px !important;
    }
}
/* ============================================
   超小屏幕优化 (max-width: 480px)
   ============================================ */
@media only screen and (max-width: 480px) {
    .single-footer-widget h3 {
        font-size: 15px !important;
    }

    /* 在极窄屏幕下，链接居中对齐可能更整齐 */
    .single-footer-widget {
        text-align: left; /* 或者 center，取决于您的审美 */
    }
}
