/*
Theme Name: SWYFY Corporate
Theme URI: https://swyfy.cn
Author: SWYFY
Description: 晟沃源（山东）肥业科技有限公司官网主题 - 像素级还原 swyfy.cn，支持中文/英文/阿拉伯语/越南语多语言
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: swyfy
*/

/* 保持与原站一致：所有样式由镜像的 wezhan CSS 提供，此处仅补充语言切换器 */
body#smart-body,
html.smart-design-mode body {
    background: #ffffff !important;
    color: #333333;
}
/* 保持与原站一致：桌面端最小宽度 1200px */
@media (min-width: 992px) {
    body#smart-body,
    html.smart-design-mode body {
        min-width: 1200px;
    }
}

#mainContentWrapper {
    background-color: #ffffff !important;
}
.swyfy-lang-nav-wrap {
    display: inline-flex;
    align-items: center;
    height: 27px;
    padding: 0 8px;
    white-space: nowrap;
}

.swyfy-lang-field {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    cursor: pointer;
}

.swyfy-lang-label {
    font-size: 12px;
    line-height: 27px;
    color: #666;
    white-space: nowrap;
}

.swyfy-lang-select {
    height: 22px;
    line-height: 22px;
    padding: 0 22px 0 6px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 6px center;
    background-size: 8px 5px;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 88px;
    max-width: 120px;
}

.swyfy-lang-select:focus {
    outline: none;
    border-color: #68b030;
}

.swyfy-lang-top-nav-item {
    position: relative;
    z-index: 20;
}

.swyfy-lang-top-nav-item .w-nav-item-line {
    display: none;
}

.header [ctype="nav"]:has(.swyfy-lang-top-nav-item) {
    width: auto !important;
    min-width: 340px !important;
    max-width: none !important;
}

.nav_pc_t_1:has(.swyfy-lang-top-nav-item) .w-nav-inner:not(.swyfy-lang-top-nav-item) {
    width: auto !important;
    min-width: 0;
    padding: 0 6px;
}

.nav_pc_t_1:has(.swyfy-lang-top-nav-item) .w-nav {
    display: flex;
    align-items: center;
    width: auto !important;
}

/* 阿拉伯语：页面结构保持 LTR，仅文本区域 RTL，避免幻灯片错位 */
html[lang="ar"] body,
html[lang="ar"] body.swyfy-rtl,
html[lang="ar"] #mainContentWrapper,
html[lang="ar"] .header,
html[lang="ar"] #smv_Area0,
html[lang="ar"] #smv_AreaMainWrapper,
html[lang="ar"] #smv_MainContent {
    direction: ltr;
}

/* 幻灯片/轮播必须 LTR，否则 jssor 计算位置会乱 */
html[lang="ar"] [ctype="slideset"],
html[lang="ar"] [ctype="slideset"] *,
html[lang="ar"] [ctype="productSlideBind"],
html[lang="ar"] [ctype="productSlideBind"] *,
html[lang="ar"] .w-slide,
html[lang="ar"] .w-slide-inner,
html[lang="ar"] .w-slider,
html[lang="ar"] .w-slider-wrap,
html[lang="ar"] .w-slide-arrowl,
html[lang="ar"] .w-slide-arrowr,
html[lang="ar"] .w-slide-btn-box,
html[lang="ar"] .slideset_Style1,
html[lang="ar"] .productSlideBind_Style4,
html[lang="ar"] .content-box-inner,
html[lang="ar"] [ctype="listproduct"],
html[lang="ar"] [ctype="listproduct"] *,
html[lang="ar"] .w-list,
html[lang="ar"] .w-list-ul,
html[lang="ar"] .w-product-list,
html[lang="ar"] #ulList_con_149_57,
html[lang="ar"] #ulList_con_149_57 * {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: isolate;
}

/* 文本区域 RTL 阅读 */
html[lang="ar"] .w-nav-item-link,
html[lang="ar"] .w-link-txt,
html[lang="ar"] .w-title,
html[lang="ar"] h1,
html[lang="ar"] h5,
html[lang="ar"] p,
html[lang="ar"] .w-crumbs-item,
html[lang="ar"] .w-previous,
html[lang="ar"] .w-next,
html[lang="ar"] .w-previous-caption,
html[lang="ar"] .w-next-caption,
html[lang="ar"] .w-previous-title,
html[lang="ar"] .w-next-title,
html[lang="ar"] .w-list-titlelink,
html[lang="ar"] .companyinfo,
html[lang="ar"] .text_Style1,
html[lang="ar"] .w-detail,
html[lang="ar"] .bottom-words {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: right;
}

html[lang="ar"] .w-nav ul.w-nav {
    direction: rtl;
}

html[lang="ar"] .breadcrumb_Style1,
html[lang="ar"] .w-crumbs-item {
    text-align: right;
}

/* 仅面包屑箭头翻转，幻灯片箭头保持原样 */
html[lang="ar"] .breadcrumb_Style1 .w-arrowicon,
html[lang="ar"] .w-crumbs-item + .w-arrowicon {
    display: inline-block;
    transform: scaleX(-1);
}

html[lang="ar"] .w-company-info,
html[lang="ar"] .w-company-info li {
    direction: rtl;
    text-align: right;
}

html[lang="ar"] .w-guestbook,
html[lang="ar"] .w-guestbook-code,
html[lang="ar"] .w-guestbook-codeimg {
    direction: ltr;
    text-align: left;
}

html[lang="ar"] .w-guestbook-title {
    direction: rtl;
    text-align: right;
}

/* 产品页上下篇：RTL 下对调左右位置 */
html[lang="ar"] [ctype="productPreviousBind"] {
    left: 899px !important;
}

html[lang="ar"] [ctype="productNextBind"] {
    left: 299px !important;
}

/* 越南语等其余语言保持 LTR */
html[lang="vi"] body {
    direction: ltr;
}
