/* ==========================================================================
   BuyerBuy Odoo Capsule Header Styles v1.4.4 (Updated 2026-08-30)
   ========================================================================== */

/* 1. Header 整体布局规范 (1200px 居中对齐) */
body .site-header,
body #masthead {
    background-color: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
    z-index: 99;
}
body .site-primary-header-wrap.ast-builder-grid-row-container {
    max-width: var(--ast-normal-container-width, 1200px);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}
body .ast-primary-header-bar {
    border-bottom: none;
    padding: 0;
    display: flex;
    align-items: center;
}
body .site-header .ast-builder-grid-row,
body .site-primary-header-wrap .ast-builder-grid-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    grid-gap: 16px;
}

/* 2. 左侧 Logo 模块 */
body .site-header-primary-section-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
body .site-header-primary-section-left .custom-logo {
    display: block;
    max-height: 64px;
    object-fit: contain;
}

/* 3. 中间导航栏 —— 浅灰圆角胶囊容器 (Navigation Pill) */
body .site-header-primary-section-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 auto;
}
body .site-header-primary-section-center .main-header-bar-navigation,
body .site-header-primary-section-center nav.site-navigation,
body .site-header-primary-section-center .main-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}
body .site-header-primary-section-center .main-header-menu {
    background: #f1f3f5;
    border-radius: 9999px;
    padding: 4px 5px;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    white-space: nowrap;
    align-items: center;
    gap: 3px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02);
    margin: 0;
    list-style: none;
    height: 38px;
    box-sizing: border-box;
}
body .main-header-menu .menu-item {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    height: 100%;
}
body .main-header-menu .menu-item > a.menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    height: 30px;
    border-radius: 9999px;
    color: #1f2937;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-decoration: none;
    background: transparent;
    transition: all 0.18s ease-in-out;
    line-height: 1;
    box-sizing: border-box;
}
/* 鼠标悬停未激活项 */
body .main-header-menu .menu-item:not(.current-menu-item):not(.current_page_item) > a.menu-link:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #000000;
}
/* 当前激活项（如 HOME） —— 纯白高亮浮起小胶囊 */
body .main-header-menu .menu-item.current-menu-item > a.menu-link,
body .main-header-menu .menu-item.current_page_item > a.menu-link {
    background: #ffffff;
    color: #000000;
    font-weight: 800;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 1px rgba(0, 0, 0, 0.04);
}

/* 4. 右侧区域 —— 浅灰圆角胶囊容器 (Actions Pill) */
body .site-header-primary-section-right {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    background: #f1f3f5;
    border-radius: 9999px;
    padding: 0 14px 0 12px;
    height: 38px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02);
    gap: 8px;
    box-sizing: border-box;
}
body .site-header-primary-section-right .site-header-primary-section-right-center {
    display: none;
}

/* 搜索组件 —— 购物车左侧（v1.4.3 恢复显示） */
body .site-header-primary-section-right .ast-header-search {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* 购物车组件 */
body .site-header-primary-section-right .ast-header-woo-cart {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}
body .site-header-primary-section-right .ast-site-header-cart {
    border: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
}
body .site-header-primary-section-right .ast-site-header-cart a.cart-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 4px 4px;
    color: #18181b;
    text-decoration: none;
    border: none;
    background: transparent;
}
body .site-header-primary-section-right .ast-site-header-cart #ast-cart-svg path {
    fill: #18181b;
    opacity: 1;
}
/* 购物车角标 —— 暗勃艮第红圆形徽章 */
.site-header-primary-section-right .ast-site-header-cart i.ast-icon-shopping-cart::after,
body .site-header-primary-section-right .ast-site-header-cart .ast-header-cart-total,
body .site-header-primary-section-right .ast-site-header-cart .count,
body .site-header-primary-section-right .ast-site-header-cart .ast-cart-count {
    background-color: #683d5a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    border-radius: 50%;
    text-align: center;
    padding: 0;
    position: absolute;
    top: -7px;
    right: -9px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

/* 用户账户 (Administrator) */
body .site-header-primary-section-right .ast-header-account {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}
body .site-header-primary-section-right .ast-header-account-wrap {
    display: inline-flex;
    align-items: center;
}
body .site-header-primary-section-right .ast-header-account-wrap a.ast-header-account-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #374151;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    padding: 0 0 0 6px;
    line-height: 1;
    background: transparent;
    border: none;
    transition: color 0.18s ease;
}
body .site-header-primary-section-right .ast-header-account-wrap a.ast-header-account-link:hover {
    color: #000000;
}
/* 用户名右侧小下拉倒三角 */
body .site-header-primary-section-right .ast-header-account-wrap a.ast-header-account-link::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    vertical-align: middle;
    border-top: 4px solid #4b5563;
    border-right: 3.5px solid transparent;
    border-left: 3.5px solid transparent;
    border-bottom: 0;
}


/* 搜索图标 toggle —— 与购物车图标同风格 (v1.4.3) */
body .site-header-primary-section-right .ast-header-search .ast-search-menu-icon {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    position: relative;
}
body .site-header-primary-section-right .ast-header-search .ast-search-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
body .site-header-primary-section-right .ast-header-search a.astra-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    margin: 0;
    color: #18181b;
    background: transparent;
    border: none;
    transition: opacity 0.18s ease;
}
body .site-header-primary-section-right .ast-header-search a.astra-search-icon:hover {
    opacity: 0.6;
    background: transparent;
}
body .site-header-primary-section-right .ast-header-search .ast-icon svg {
    width: 15px;
    height: 15px;
    fill: #18181b;
}
/* 滑出搜索框：胶囊下方白色圆角浮层 */
body .site-header-primary-section-right .ast-header-search .search-form {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 240px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    border: 1px solid #eceef1;
    padding: 6px 10px;
    visibility: hidden;
    opacity: 0;
    z-index: 999;
    display: flex;
    align-items: center;
}
body .site-header-primary-section-right .ast-header-search .ast-search-menu-icon.ast-dropdown-active .search-form {
    visibility: visible;
    opacity: 1;
}
body .site-header-primary-section-right .ast-header-search .search-field {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    font-size: 13px;
    color: #18181b;
    width: 100%;
    height: 30px;
    padding: 0 4px;
}
body .site-header-primary-section-right .ast-header-search .search-submit {
    background: transparent;
    border: none;
    color: #18181b;
    padding: 0 2px;
    display: inline-flex;
    align-items: center;
}
body .site-header-primary-section-right .ast-header-search .search-submit svg {
    width: 14px;
    height: 14px;
    fill: #18181b;
}

/* v1.4.3：表单内部 label 水平化 + 展开时保留放大镜图标 */
body .site-header-primary-section-right .ast-header-search .search-form label {
    display: flex;
    align-items: center;
    flex: 1;
    margin: 0;
}
body .site-header-primary-section-right .ast-header-search .ast-search-menu-icon.ast-dropdown-active .ast-search-icon {
    opacity: 1;
    visibility: visible;
    display: inline-flex;
}
body .site-header-primary-section-right .ast-header-search .search-field:focus {
    background: transparent;
}
/* ==========================================================================
   Hello Elementor Header Flexbox & Capsule Styling
   ========================================================================== */
.bb-header-wrap {
    background: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    width: 100%;
}
.bb-header-container {
    max-width: var(--bb-container-width, 1200px);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}
.bb-header-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
.bb-header-left .custom-logo,
.bb-header-left img {
    height: 34px;
    width: auto;
    display: block;
}
.bb-header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
}
.bb-capsule-nav {
    display: inline-flex;
    align-items: center;
    background: #f5f6f8;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 4px 6px;
}
.bb-capsule-nav ul,
.bb-capsule-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.bb-capsule-menu li {
    margin: 0;
    padding: 0;
}
.bb-capsule-menu li a {
    display: block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}
.bb-capsule-menu li a:hover,
.bb-capsule-menu li.current-menu-item > a {
    background: #111827;
    color: #ffffff;
}
.bb-header-right {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
.bb-header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.bb-header-icon {
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
}
.bb-header-icon svg {
    display: block;
}
.bb-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #111827;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9999px;
    padding: 2px 6px;
    line-height: 1;
}
@media (max-width: 921px) {
    .bb-header-center {
        display: none;
    }
}

/* ==========================================================================
   Guarantee Single-Row Capsule Header Styling (BuyerBuy Standard)
   ========================================================================== */
.bb-header-wrap {
    background: #ffffff !important;
    border-bottom: 1px solid #f3f4f6 !important;
    width: 100% !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
}
.bb-header-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 12px 20px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
}
.bb-header-left {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}
.bb-header-left img.custom-logo,
.bb-header-left a img {
    height: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    display: block !important;
}
.bb-header-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
}
.bb-capsule-nav {
    display: inline-flex !important;
    align-items: center !important;
    background: #f5f6f8 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 9999px !important;
    padding: 4px 6px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}
.bb-capsule-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
}
.bb-capsule-menu li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
    white-space: nowrap !important;
}
.bb-capsule-menu li a {
    display: block !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-decoration: none !important;
    border-radius: 9999px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
}
.bb-capsule-menu li a:hover,
.bb-capsule-menu li.current-menu-item > a,
.bb-capsule-menu li.current_page_item > a {
    background: #111827 !important;
    color: #ffffff !important;
}
.bb-header-right {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}
.bb-header-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 18px !important;
}
.bb-header-icon {
    color: #111827 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    text-decoration: none !important;
}
.bb-header-icon svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
}
.bb-cart-badge {
    position: absolute !important;
    top: -6px !important;
    right: -8px !important;
    background: #111827 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    padding: 2px 6px !important;
    line-height: 1 !important;
}
@media (max-width: 921px) {
    .bb-header-center {
        display: none !important;
    }
}

/* ==========================================================================
   Right-Side Action Icons Capsule Pill (Search, Cart, Account)
   ========================================================================== */
.bb-header-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    background: #f1f3f5 !important;
    border-radius: 9999px !important;
    padding: 0 16px 0 14px !important;
    height: 38px !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02) !important;
    gap: 14px !important;
    box-sizing: border-box !important;
}
.bb-header-actions .bb-header-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #4b5563 !important;
    position: relative !important;
    text-decoration: none !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}
.bb-header-actions .bb-header-icon:hover {
    color: #000000 !important;
    transform: scale(1.05);
}
.bb-header-actions .bb-header-icon svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
}
.bb-header-actions .bb-cart-badge {
    position: absolute !important;
    top: -5px !important;
    right: -7px !important;
    background: #111827 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    padding: 1px 5px !important;
    line-height: 1.2 !important;
}

/* ==========================================================================
   Elementor Theme Builder Header & Capsule Navigation (Exact Pixel Match)
   ========================================================================== */
.elementor-location-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    width: 100% !important;
    border-bottom: 1px solid #f3f4f6 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}
.elementor-location-header .e-con-inner,
.elementor-location-header .bb-header-wrap {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
}
/* Logo */
.elementor-location-header .bb-header-left img {
    height: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    display: block !important;
}
/* Center Capsule Nav */
.elementor-location-header .bb-capsule-nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f5f6f8 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 9999px !important;
    padding: 4px 6px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}
.elementor-location-header .bb-capsule-nav .elementor-nav-menu,
.elementor-location-header .bb-capsule-nav ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 4px !important;
    white-space: nowrap !important;
}
.elementor-location-header .bb-capsule-nav .elementor-nav-menu li,
.elementor-location-header .bb-capsule-nav ul li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    display: inline-block !important;
}
.elementor-location-header .bb-capsule-nav .elementor-nav-menu a,
.elementor-location-header .bb-capsule-nav ul li a {
    display: block !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-decoration: none !important;
    border-radius: 9999px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
}
.elementor-location-header .bb-capsule-nav .elementor-nav-menu a:hover,
.elementor-location-header .bb-capsule-nav .elementor-nav-menu li.current-menu-item > a,
.elementor-location-header .bb-capsule-nav ul li a:hover,
.elementor-location-header .bb-capsule-nav ul li.current-menu-item > a {
    background: #111827 !important;
    color: #ffffff !important;
}
/* Right Actions Pill */
.elementor-location-header .bb-header-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    background: #f1f3f5 !important;
    border-radius: 9999px !important;
    padding: 0 16px 0 14px !important;
    height: 38px !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02) !important;
    gap: 14px !important;
    box-sizing: border-box !important;
}
.elementor-location-header .bb-header-actions .bb-header-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    line-height: 1 !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}
.elementor-location-header .bb-header-actions .bb-header-icon:hover {
    color: #000000 !important;
    transform: scale(1.05);
}
.elementor-location-header .bb-header-actions .bb-header-icon svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
}
@media (max-width: 921px) {
    .elementor-location-header .bb-capsule-nav {
        display: none !important;
    }
}

/* Action Icons Data-URIs */
.bb-icon {
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    transition: filter 0.2s ease !important;
}
.bb-icon-search {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") !important;
}
.bb-icon-cart {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'%3E%3C/path%3E%3Cline x1='3' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'%3E%3C/path%3E%3C/svg%3E") !important;
}
.bb-icon-account {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E") !important;
}
.bb-header-icon:hover .bb-icon {
    filter: brightness(0) !important;
}
