/* 主导航：深灰蓝 */
.main-navigation {
  background: #2F3E4D !important;
  background-image: none !important;
}

/* ===== 家具五金专业网站基础配色 ===== */

/* 顶部导航栏 */
.top-bar {
    background: #1F2937 !important;
}

/* 主导航栏 */
.main-navigation,
#site-navigation {
    background: #2F3E4D !important;
    background-image: none !important;
    border: none !important;
}

/* 导航栏文字 */
.main-navigation a,
#site-navigation a {
    color: #FFFFFF !important;
    font-weight: 600;
}

/* 鼠标悬停颜色 */
.main-navigation a:hover,
#site-navigation a:hover {
    color: #C5A36A !important;
}

/* 网站整体背景 */
body {
    background-color: #F5F3EF;
}

/* 按钮统一金色 */
button,
.button,
input[type="submit"] {
    background-color: #C5A36A;
    border-color: #C5A36A;
}

/* 按钮悬停 */
button:hover,
.button:hover,
input[type="submit"]:hover {
    background-color: #A9854E;
}

/* ===== GLUSHI 深蓝色主导航 ===== */

html body nav.main-navigation,
html body #site-navigation,
html body .main-navigation,
html body .main-navigation .container,
html body .main-navigation .nav-content,
html body .main-navigation .nav-center,
html body .main-navigation ul.nav-links {
    background-color: #0F3556 !important;
    background-image: none !important;
}

/* 导航文字 */
html body .main-navigation a,
html body #site-navigation a {
    color: #FFFFFF !important;
}

/* 鼠标悬停 */
html body .main-navigation a:hover,
html body #site-navigation a:hover {
    color: #D7262C !important;
}

/* GLUSHI Logo 尺寸优化 */
#masthead img.custom-logo,
.site-header img.custom-logo,
.custom-logo-link img {
    width: auto !important;
    max-width: 220px !important;
    max-height: 100px !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Logo 容器 */
.site-branding {
    max-width: 240px !important;
}

/* GLUSHI：统一页眉背景为浅灰白 */
html body header#masthead,
html body #masthead.site-header,
html body #masthead .header-main,
html body #masthead .header-middle,
html body #masthead .header-inner {
    background-color: #F5F7FA !important;
    background-image: none !important;
}

/* 页眉内部容器 */
html body #masthead .container,
html body #masthead .header-content {
    background-color: transparent !important;
    background-image: none !important;
}

/* GLUSHI页眉图标颜色 */
html body #masthead a,
html body #masthead i {
    color: #0F3556 !important;
}

/* 页眉图标 */
html body #masthead svg {
    color: #0F3556 !important;
    fill: none;
    stroke: #0F3556 !important;
}

/* 搜索按钮保持白色图标 */
html body #masthead button,
html body #masthead .search-submit {
    color: #FFFFFF !important;
}

/* GLUSHI 搜索按钮图标 */
html body #masthead .search-submit svg,
html body #masthead button.search-submit svg,
html body #masthead .search-form button svg {
    stroke: #FFFFFF !important;
    color: #FFFFFF !important;
}

/* 搜索按钮保持黑色背景 */
html body #masthead .search-submit {
    background-color: #0F3556 !important;
}



/* GLUSHI 导航下拉菜单修复 */
@media (min-width: 768px) {
  .main-navigation ul li {
    position: relative;
  }

  .main-navigation ul ul {
    display: none !important;
    position: absolute !important;
    top: 100%;
    left: 0;
    min-width: 230px;
    z-index: 9999;
    background: #0F3556 !important;
  }

  .main-navigation ul li:hover > ul,
  .main-navigation ul li:focus-within > ul {
    display: block !important;
  }

  .main-navigation ul ul li {
    display: block !important;
    width: 100%;
  }
}
  


/* Keep the catalogue menu within the mobile and portrait tablet viewport. */
@media (max-width: 768px) {
  body nav.main-navigation #primary-menu {
    display: none !important;
  }
  body nav.main-navigation #primary-menu.active {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: static !important;
    transform: none !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 0;
  }
  body nav.main-navigation #primary-menu li {
    display: block !important;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
  body nav.main-navigation #primary-menu a {
    display: flex;
    justify-content: flex-start;
    white-space: normal;
    overflow-wrap: anywhere;
    padding: 10px 12px;
  }
  body nav.main-navigation #primary-menu ul {
    display: block !important;
    position: static !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100%;
    margin: 0;
    padding: 0 0 0 16px;
    box-shadow: none;
    list-style: none;
  }
  .wpcf7-form label { display: block; }
  .wpcf7-form input:not([type="hidden"]):not([type="submit"]),
  .wpcf7-form textarea {
    display: block;
    width: 100%;
    max-width: 32rem;
    box-sizing: border-box;
    min-height: 40px;
  }
  .wpcf7-form input[type="submit"] { min-height: 44px; }
}

@media (max-width: 768px) {
  body.menu-open > details[lang="ru"] { display: none; }
}