/*
Theme Name: ShareVDI Clean Theme
Theme URI: https://www.sharevdi.com/
Author: Custom Developer
Description: Clean B2B WordPress Theme featuring Products & Solutions Mega Menu.
Version: 2.0.0
Text Domain: sharevdi-theme
*/

/* ==========================================================================
   设计令牌 — 严格对标 sharevdi.com 配色
   ========================================================================== */
:root {
    --sv-dark:        #020228;   /* 顶栏 / Header / Footer 深蓝黑 */
    --sv-primary:     #0F8FCA;   /* 品牌蓝：导航 / 按钮 / 分类栏 */
    --sv-hover:       #009B4C;   /* 按钮悬停绿（sharevdi 特征色） */
    --sv-text-main:   #333333;   /* 正文主色 */
    --sv-text-muted:  #666666;   /* 辅助文字 */
    --sv-text-light:  #999999;   /* 更浅文字 */
    --sv-bg-light:    #F4F7F9;   /* 浅色区块背景 */
    --sv-bg-lighter:  #F9F9F9;   /* 更浅背景 */
    --sv-border:      #f0f0f0;   /* 边框 */
    --sv-white:       #ffffff;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    padding-top: 113px; /* top-bar(33px) + site-header(80px) */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    color: var(--sv-text-main);
    background-color: var(--sv-white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.25s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================================================
   顶部栏 (Top Bar) — 深蓝黑底白字
   ========================================================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: var(--sv-dark);
    color: #cccccc;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left span {
    margin-right: 18px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* 绀句氦濯掍綋鍥炬爣 */
.top-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-social .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.top-social .social-icon:hover {
    transform: translateY(-2px);
    opacity: 0.85;
}

.top-social .social-facebook  { background: #1877F2; }
.top-social .social-x         { background: #000000; }
.top-social .social-youtube   { background: #FF0000; }
.top-social .social-whatsapp  { background: #25D366; }

/* Polylang 璇█鍒囨崲 */
.lang-switcher select {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.lang-switcher select:hover {
    border-color: var(--sv-primary);
}

.lang-switcher select option {
    color: #333;
    background: #fff;
}

/* Polylang 鍒楄〃寮忥紙闈炰笅鎷夋椂锛?*/
.lang-switcher ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
}

.lang-switcher li a {
    color: #cccccc;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 3px;
}

.lang-switcher li.current-lang a {
    color: var(--sv-primary);
}

/* ==========================================================================
   主 Header — 深蓝黑底 + 白色导航
   ========================================================================== */
.site-header {
    position: fixed;
    top: 33px;
    left: 0;
    right: 0;
    background: var(--sv-dark);
    z-index: 9999;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    position: relative;
}

.site-logo img {
    max-height: 48px;
    width: auto;
    display: block;
}

.site-nav {
    height: 100%;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.main-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.main-nav > li {
    height: 100%;
    display: flex;
    align-items: center;
}

.main-nav > li > a {
    padding: 0 16px;
    color: #ffffff;
    font-weight: 500;
    font-size: 15px;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    transition: color 0.25s ease;
}

.main-nav > li:hover > a {
    color: var(--sv-primary);
}

/* 当前激活项 */
.main-nav > li.current-menu-item > a,
.main-nav > li.current-page-ancestor > a {
    color: var(--sv-primary);
}

.main-nav > li.current-menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 22px;
    right: 22px;
    height: 3px;
    background: var(--sv-primary);
}

/* CTA 按钮 */


/* 鎼滅储妗?*/
.header-search {
    display: flex;
    align-items: center;
    margin: 0 16px;
    flex-shrink: 0;
}

.search-form {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.25s ease;
}

.search-form:focus-within {
    box-shadow: 0 2px 12px rgba(15, 143, 202, 0.35);
}

.search-input {
    border: none;
    outline: none;
    padding: 0 14px;
    height: 38px;
    width: 150px;
    font-size: 13px;
    color: #333;
    background: transparent;
}

.search-input::placeholder {
    color: #999;
}

.search-submit {
    border: none;
    background: var(--sv-primary);
    color: #ffffff;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.search-submit:hover {
    background: var(--sv-hover);
}

/* ==========================================================================
   Mega Menu 全宽下拉面板
   ========================================================================== */
.main-nav > li.has-mega-menu {
    position: static !important;
}

.mega-menu-dropdown {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--sv-white);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-top: 3px solid var(--sv-primary);
    padding: 30px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
    pointer-events: none;
    z-index: 1000;
}

.main-nav > li.has-mega-menu:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ==========================================================================
   Mega Menu 卡片网格 — 对标 sharevdi 下拉卡片
   ========================================================================== */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 卡片外层：浅灰底 + 细边框 */
.mega-catalog-card {
    display: flex;
    flex-direction: column;
    background: var(--sv-bg-lighter);
    border: 1px solid var(--sv-border);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.mega-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 143, 202, 0.12);
    border-color: var(--sv-primary);
}

/* 顶部长方形产品图区域 */
.card-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 18px;
    height: 150px;
    transition: background 0.3s ease;
}

.mega-catalog-card:hover .card-img-wrapper {
    background: #f0f9fc;
}

.card-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.mega-catalog-card:hover .card-img {
    transform: scale(1.06);
}

/* 二级分类标题栏：品牌蓝底 + 白字 */
.card-category-bar {
    background-color: var(--sv-primary);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 16px;
    display: block;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.3s ease;
}

.card-category-bar:hover {
    background-color: var(--sv-hover);
    color: #ffffff !important;
}

/* 底部三级列表区域 */
.card-sub-body {
    padding: 12px 16px 16px 16px;
    flex-grow: 1;
}

.card-sub-list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.card-sub-list li {
    margin-bottom: 8px;
}

.card-sub-list li:last-child {
    margin-bottom: 0;
}

.card-sub-list li a {
    color: #222222;
    font-size: 13px;
    display: block;
    line-height: 1.5;
    transition: color 0.2s ease, transform 0.2s ease, padding-left 0.2s ease;
}

.card-sub-list li a::before {
    content: '›';
    color: var(--sv-primary);
    margin-right: 6px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card-sub-list li a:hover {
    color: var(--sv-primary);
    padding-left: 4px;
}

.card-sub-list li a:hover::before {
    opacity: 1;
}

/* ==========================================================================
   传统文字下拉菜单 (Simple Dropdown)
   ========================================================================== */
.main-nav > li.has-simple-dropdown {
    position: relative !important;
}

.simple-dropdown {
    position: absolute;
    top: 80px;
    left: 0;
    min-width: 220px;
    background: var(--sv-white);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--sv-primary);
    border-radius: 0 0 6px 6px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    z-index: 1000;
}

.main-nav > li.has-simple-dropdown:hover .simple-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.simple-dropdown li {
    width: 100%;
}

.simple-dropdown li a {
    display: block;
    padding: 10px 20px;
    color: var(--sv-text-main);
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s, padding-left 0.2s;
}

.simple-dropdown li a:hover {
    background-color: var(--sv-bg-light);
    color: var(--sv-primary);
    padding-left: 26px;
}

/* ==========================================================================
   首页区块通用
   ========================================================================== */
.sec-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--sv-bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 32px;
    color: #1a252f;
    margin: 0 0 10px 0;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--sv-primary);
    margin: 12px auto 0 auto;
    border-radius: 2px;
}

/* ==========================================================================
   Footer — 深蓝黑底白字
   ========================================================================== */
.site-footer {
    background: var(--sv-dark);
    color: #cccccc;
    padding: 50px 0 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h5 {
    color: #ffffff;
    font-size: 16px;
    margin: 0 0 18px 0;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--sv-primary);
}

.footer-col p {
    font-size: 13px;
    line-height: 1.8;
    margin: 0 0 8px 0;
    color: #b0b0b0;
}

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

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #b0b0b0;
    font-size: 13px;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-col ul li a:hover {
    color: var(--sv-primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 992px) {
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .mega-menu-grid {
        grid-template-columns: 1fr;
    }
    .footer-top {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   登录态 WordPress Admin Bar 偏移（避免遮挡固定头部）
   ========================================================================== */
body.admin-bar {
    padding-top: 145px; /* 113px(header) + 32px(adminbar) */
}

body.admin-bar .top-bar {
    top: 32px;
}

body.admin-bar .site-header {
    top: 65px; /* 32px(adminbar) + 33px(top-bar) */
}

body.admin-bar .hero-section {
    margin-top: -145px;
    padding-top: 255px; /* 223px + 32px */
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        padding-top: 159px; /* 113px + 46px */
    }
    body.admin-bar .top-bar {
        top: 46px;
    }
    body.admin-bar .site-header {
        top: 79px; /* 46px + 33px */
    }
    body.admin-bar .hero-section {
        margin-top: -159px;
        padding-top: 269px; /* 223px + 46px */
    }
}