/* 自定义店招样式 */
header {
  background-color: #000 !important;
}

.top-wrap {
  background-color: #000 !important;
  color: #fff !important;
  border-bottom-color: #333 !important;
}

.header-content {
  background-color: #000 !important;
  border-bottom-color: #333 !important;
}

.header-content .nav-link {
  color: #fff !important;
}

/* 店招图标白色显示 */
.header-content .right-btn .nav-link img,
.header-mobile .nav-link img,
.header-mobile .nav-link svg,
.header-mobile .mobile-content .left > div i,
.header-mobile .mobile-content .left i,
.mobile-open-menu img {
    filter: brightness(0) invert(1) !important;
    color: #fff !important;
}

/* 语言切换和货币切换按钮样式 - 确保所有状态下背景保持黑色 */
#currency-dropdown,
#language-dropdown,
.btn.dropdown-toggle,
.btn.dropdown-toggle:hover,
.btn.dropdown-toggle:focus,
.btn.dropdown-toggle:active,
.btn.dropdown-toggle:visited,
.btn.dropdown-toggle.show {
    /* 基础样式 - 强制使用黑色背景 */
    color: #fff !important;
    background-color: #000 !important;
    border: none !important;
    padding: 0.5rem !important;
    border-radius: 0 !important;
    transition: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 确保按钮点击时背景不变 */
#currency-dropdown:active,
#language-dropdown:active,
.btn.dropdown-toggle:active {
    background-color: #000 !important;
    color: #fff !important;
    box-shadow: none !important;
    outline: none !important;
}

/* 确保按钮在下拉菜单显示状态下背景不变 */
#currency-dropdown.show,
#language-dropdown.show,
.btn.dropdown-toggle.show {
    background-color: #000 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
}

/* 按钮内部元素样式 - 确保符号和文字都保持黑色背景 */
#currency-dropdown *,
#language-dropdown *,
.btn.dropdown-toggle * {
    color: #fff !important;
    background-color: #000 !important;
}

/* 下拉菜单样式 - 确保下拉菜单本身背景为黑色 */
.dropdown-menu,
.dropdown-menu.show {
    background-color: #000 !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

/* 下拉菜单项样式 - 确保所有状态下背景都为黑色 */
.dropdown-item {
    color: #fff !important;
    background-color: #000 !important;
    transition: none !important;
    padding: 0.5rem 1rem !important;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active,
.dropdown-item:visited {
    background-color: #000 !important;
    color: #fff !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 确保下拉菜单中的所有元素（包括English选项）都保持黑色背景 */
.dropdown-menu * {
    background-color: #000 !important;
    color: #fff !important;
}

/* 确保下拉菜单中的链接元素也保持黑色背景 */
.dropdown-menu a {
    background-color: #000 !important;
    color: #fff !important;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
    background-color: #000 !important;
    color: #fff !important;
}

/* 确保货币符号和美元符号周围也保持黑色背景 */
#currency-dropdown span,
#currency-dropdown strong,
#currency-dropdown b,
#currency-dropdown i {
    background-color: #000 !important;
    color: #fff !important;
}

/* 确保移动设备上的一致性 */
@media (max-width: 768px) {
    #currency-dropdown,
    #language-dropdown,
    .btn.dropdown-toggle {
        background-color: #000 !important;
        color: #fff !important;
    }
}

.header-mobile {
  background-color: #000 !important;
  color: #fff !important;
  border-bottom-color: #333 !important;
}

.header-mobile .nav-link {
  color: #fff !important;
}

/* 调整价格和数量标签之间的距离为10px */
.new-price.fs-1 {
  margin-bottom: 10px !important;
}

/* 确保数量标签与价格之间保持10px间距 */
.title.text-muted:nth-of-type(1) {
  margin-top: 10px !important;
}

/* 调整old-price和In Stock之间的距离 */
.old-price.text-muted.text-decoration-line-through {
    margin-bottom: 10px !important;
}
.text-success {
    margin-top: 10px !important;
}

/* 调整产品详情页品牌、SKU和型号信息的对齐方式 */
/* 确保标签与值平行对齐 */
body.page-product .product-info { display: flex; flex-direction: column; }
/* 产品详情页品牌信息对齐：使用ID选择器和!important确保最高优先级 */
/* 产品详情页品牌信息对齐问题 */
/* 重置所有可能的父容器样式 */
#product-app, #product-app > div, body.page-product, body.product-view {
    box-sizing: border-box !important;
    position: relative !important;
}

/* 使用超级具体的选择器，包含ID和多个类选择器 */
#product-app div.product-info,
#product-app .stock-and-sku,
body.page-product #product-app div.product-info,
body.product-view #product-app div.product-info {
    /* 重置所有样式 */
    display: block !important;
    position: relative !important;
    z-index: 99999 !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 24px !important;
    text-align: left !important;
    white-space: normal !important;
    float: none !important;
    clear: both !important;
}

/* 针对品牌信息行的直接选择器 */
#product-app div.product-info > div,
#product-app .stock-and-sku > div,
body.page-product #product-app div.product-info > div,
body.product-view #product-app div.product-info > div {
    /* 强制单行显示 */
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: relative !important;
    z-index: 99999 !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 24px !important;
    text-align: left !important;
    white-space: nowrap !important;
    float: none !important;
    clear: both !important;
}

/* 针对标签部分的超具体选择器 */
#product-app div.product-info > div > .title,
#product-app div.product-info > div > label,
#product-app .stock-and-sku > div > .title,
#product-app .stock-and-sku > div > label,
body.page-product #product-app div.product-info > div > .title,
body.page-product #product-app div.product-info > div > label,
body.product-view #product-app div.product-info > div > .title,
body.product-view #product-app div.product-info > div > label {
    /* 固定宽度的标签 */
    flex: 0 0 80px !important;
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    display: inline-block !important;
    text-align: left !important;
    vertical-align: baseline !important;
    line-height: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    float: none !important;
}

/* 针对值部分的超具体选择器 */
#product-app div.product-info > div > .value,
#product-app div.product-info > div > .sku,
#product-app div.product-info > div > .model,
#product-app div.product-info > div > span:not(.title):not(label),
#product-app .stock-and-sku > div > .value,
#product-app .stock-and-sku > div > .sku,
#product-app .stock-and-sku > div > .model,
#product-app .stock-and-sku > div > span:not(.title):not(label),
body.page-product #product-app div.product-info > div > .value,
body.page-product #product-app div.product-info > div > .sku,
body.page-product #product-app div.product-info > div > .model,
body.page-product #product-app div.product-info > div > span:not(.title):not(label),
body.product-view #product-app div.product-info > div > .value,
body.product-view #product-app div.product-info > div > .sku,
body.product-view #product-app div.product-info > div > .model,
body.product-view #product-app div.product-info > div > span:not(.title):not(label) {
    /* 值部分占据剩余空间 */
    flex: 1 1 auto !important;
    width: calc(100% - 85px) !important;
    min-width: calc(100% - 85px) !important;
    max-width: calc(100% - 85px) !important;
    display: inline-block !important;
    text-align: left !important;
    vertical-align: baseline !important;
    line-height: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    float: none !important;
}

/* 确保所有元素都使用相同的字体和行高 */
#product-app *,
body.page-product *,
body.product-view * {
    font-family: inherit !important;
    box-sizing: border-box !important;
}

/* 直接针对品牌、SKU、Model信息的超级选择器 */
[id*="brand"], [class*="brand"], [data-brand], [data-type="brand"],
[id*="sku"], [class*="sku"], [data-sku], [data-type="sku"],
[id*="model"], [class*="model"], [data-model], [data-type="model"] {
    line-height: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
    vertical-align: baseline !important;
}

/* 确保br标签被完全隐藏 */
#product-app br,
body.page-product br,
body.product-view br {
    display: none !important;
    content: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 确保没有任何元素影响对齐 */
#product-app *::before,
#product-app *::after,
body.page-product *::before,
body.page-product *::after,
body.product-view *::before,
body.product-view *::after {
    display: none !important;
    content: none !important;
}

/* 媒体查询：确保在所有屏幕尺寸上都能正确显示 */
@media (max-width: 768px) {
    #product-app div.product-info,
    #product-app .stock-and-sku {
        font-size: 12px !important;
        line-height: 20px !important;
    }
    
    #product-app div.product-info > div,
    #product-app .stock-and-sku > div {
        height: 20px !important;
        line-height: 20px !important;
    }
    
    #product-app div.product-info > div > .title,
    #product-app div.product-info > div > label,
    #product-app .stock-and-sku > div > .title,
    #product-app .stock-and-sku > div > label {
        flex: 0 0 70px !important;
        width: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
        font-size: 12px !important;
    }
    
    #product-app div.product-info > div > .value,
    #product-app div.product-info > div > .sku,
    #product-app div.product-info > div > .model,
    #product-app div.product-info > div > span:not(.title):not(label),
    #product-app .stock-and-sku > div > .value,
    #product-app .stock-and-sku > div > .sku,
    #product-app .stock-and-sku > div > .model,
    #product-app .stock-and-sku > div > span:not(.title):not(label) {
        width: calc(100% - 75px) !important;
        min-width: calc(100% - 75px) !important;
        max-width: calc(100% - 75px) !important;
        font-size: 12px !important;
    }
}

body.page-product .product-info,
body.page-product div.product-info,
body.product-view .product-info,
body.product-view div.product-info {
    display: block !important;
    width: 100% !important;
    position: relative !important;
    z-index: 99999 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 每一行样式 - 使用grid布局确保精确对齐 */
body.page-product .product-info > div,
body.page-product div.product-info > div,
body.product-view .product-info > div,
body.product-view div.product-info > div {
    display: grid !important;
    grid-template-columns: 80px 1fr !important;
    gap: 10px !important;
    align-items: center !important;
    margin-bottom: 5px !important;
    width: 100% !important;
    height: 24px !important;
    position: relative !important;
    clear: both !important;
    overflow: visible !important;
    z-index: 99998 !important;
    background: transparent !important;
}

/* 标签样式 - 强制固定宽度和对齐 */
body.page-product .product-info > div > strong,
body.page-product .product-info > div > span:first-child,
body.page-product div.product-info > div > strong,
body.page-product div.product-info > div > span:first-child,
body.product-view .product-info > div > strong,
body.product-view .product-info > div > span:first-child {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    font-weight: bold !important;
    display: block !important;
    text-align: left !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 24px !important;
    height: 24px !important;
    float: none !important;
    position: static !important;
    z-index: 99997 !important;
    background: transparent !important;
    color: inherit !important;
    font-size: inherit !important;
}

/* 值样式 - 确保正确的位置和对齐 */
body.page-product .product-info > div > span:not(:first-child),
body.page-product .product-info > div > a,
body.page-product .product-info > div > b,
body.page-product div.product-info > div > span:not(:first-child),
body.page-product div.product-info > div > a,
body.page-product div.product-info > div > b,
body.product-view .product-info > div > span:not(:first-child),
body.product-view .product-info > div > a,
body.product-view .product-info > div > b {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    display: block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 24px !important;
    height: 24px !important;
    float: none !important;
    position: static !important;
    z-index: 99997 !important;
    background: transparent !important;
    color: inherit !important;
    font-size: inherit !important;
}

/* 确保所有文本元素样式一致 */
body.page-product .product-info *,
body.product-view .product-info * {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: 24px !important;
    height: 24px !important;
    color: inherit !important;
    background: transparent !important;
}

/* 确保没有多余的间距 */
body.page-product .product-info br,
body.product-view .product-info br {
    display: none !important;
}

/* 直接针对Brand、SKU和Model行的特殊处理 */
body.page-product .product-info > div:nth-child(1),
body.page-product .product-info > div:nth-child(2),
body.page-product .product-info > div:nth-child(3),
body.product-view .product-info > div:nth-child(1),
body.product-view .product-info > div:nth-child(2),
body.product-view .product-info > div:nth-child(3) {
    height: 24px !important;
    margin-bottom: 2px !important;
}

/* 确保所有浏览器兼容性 */
_:-ms-lang(x), body.page-product .product-info > div {
    display: -ms-grid !important;
    -ms-grid-columns: 80px 1fr !important;
}

_:-ms-lang(x), body.page-product .product-info > div > strong {
    -ms-grid-column: 1 !important;
}

_:-ms-lang(x), body.page-product .product-info > div > span:not(:first-child) {
    -ms-grid-column: 2 !important;
}

/* 将产品标题"Aqara M3 Hub M3 with"下移10px */
body.page-product h1, 
body.page-product .product-title, 
body.page-product .page-title {
    margin-top: 10px !important;
}

/* 产品详情页按钮位置调整 - 最强优先级 */
@media (min-width: 768px) {
  /* 关键修复：针对正确的类名 'd-flex flex-fill'（英文/中文环境） */
  body.page-product .product-btns .quantity-btns .d-flex.flex-fill {
    margin-top: 10px !important;
    position: relative !important;
    display: block !important;
    clear: both !important;
    z-index: 9999 !important;
    text-align: left !important;
    width: auto !important;
    float: none !important;
  }
  
  /* 同时支持其他语言环境的类名 */
  body.page-product .product-btns .quantity-btns .add-cart-btns {
    margin-top: 10px !important;
    position: relative !important;
    display: block !important;
    clear: both !important;
    z-index: 9999 !important;
    text-align: left !important;
    width: auto !important;
    float: none !important;
  }
  
  /* 直接针对按钮元素 */
  body.page-product .product-btns .quantity-btns button {
    margin-top: 10px !important;
    position: relative !important;
    margin-left: 0 !important;
  }
  
  /* 直接针对添加购物车按钮 */
  body.page-product .product-btns .quantity-btns .d-flex.flex-fill button.add-cart {
    margin-top: 10px !important;
    position: relative !important;
    margin-left: 0 !important;
  }
  
  /* 直接针对立即购买按钮 */
  body.page-product .product-btns .quantity-btns .d-flex.flex-fill button.btn-buy-now {
    margin-top: 10px !important;
    position: relative !important;
    margin-left: 0 !important;
  }
}
/* 产品信息行间距设置 - 高优先级覆盖规则 */
#product-app div.product-info > div,
#product-app .stock-and-sku > div {
    /* 移除固定高度限制 */
    height: auto !important;
    /* 增加垂直间距 */
    margin-bottom: 15px !important;
    padding: 8px 0 !important;
    /* 确保足够的行高 */
    line-height: 1.8 !important;
    /* 提高优先级 */
    position: relative !important;
    z-index: 99999 !important;
}

/* 覆盖标签和值部分的固定高度 */
#product-app div.product-info > div > .title,
#product-app div.product-info > div > label,
#product-app .stock-and-sku > div > .title,
#product-app .stock-and-sku > div > label,
#product-app div.product-info > div > .value,
#product-app div.product-info > div > .sku,
#product-app div.product-info > div > .model,
#product-app div.product-info > div > span:not(.title):not(label),
#product-app .stock-and-sku > div > .value,
#product-app .stock-and-sku > div > .sku,
#product-app .stock-and-sku > div > .model,
#product-app .stock-and-sku > div > span:not(.title):not(label) {
    height: auto !important;
    line-height: 1.8 !important;
}
/* 产品信息行间距设置 - 超级高优先级覆盖规则 */
html body #product-app div.product-info > div,
html body #product-app .stock-and-sku > div {
    /* 移除固定高度限制 */
    height: auto !important;
    /* 精确设置垂直间距为4px */
    margin-bottom: 4px !important;
    padding: 2px 0 !important;
    /* 确保足够的行高 */
    line-height: 1.8 !important;
    /* 最高优先级 */
    position: relative !important;
    z-index: 999999 !important;
}

/* 同时覆盖之前的规则 */
#product-app div.product-info > div,
#product-app .stock-and-sku > div {
    margin-bottom: 4px !important;
    padding: 2px 0 !important;
    height: auto !important;
    line-height: 1.8 !important;
}
