/* assets/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Inter", sans-serif;
    color: #444;
    background: #fff;
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: inherit;
}
.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    position: sticky;
    top:0;
    z-index: 99;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:18px 0;
}
.logo {
    font-size:24px;
    font-weight:700;
    color:#222;
}
nav.desktop-nav {
    display:flex;
    gap:32px;
    align-items:center;
}
nav.desktop-nav a {
    font-size:15px;
    color:#333;
    transition: color 0.25s;
}
nav.desktop-nav a:hover {
    color:#b88646;
}
.lang-switch {
    display:flex;
    gap:10px;
    border-left:1px solid #ddd;
    padding-left:16px;
}
.lang-switch span {
    cursor:pointer;
    font-size:14px;
    padding:4px 6px;
}
.lang-switch span:hover {
    color:#b88646;
}
.menu-btn {
    display:none;
    font-size:22px;
}
.mobile-nav {
    display:none;
    padding-bottom:16px;
}
.mobile-nav a {
    display:block;
    padding:10px 0;
}

/* Swiper 首页轮播（CIVO同款全屏轮播） */
.swiper {
    width:100%;
    height: 95vh;
}
.swiper-slide {
    position:relative;
    display:flex;
    align-items:center;
}
.slide-bg {
    position:absolute;
    inset:0;
    background:#333;
}
.slide-content {
    position:relative;
    z-index:2;
    color:#fff;
    padding-left:4%;
    max-width:650px;
}
.slide-content h2 {
    font-size: clamp(2rem,5vw,3.4rem);
    margin-bottom:16px;
    font-weight:600;
}
.slide-content p {
    font-size:18px;
    margin-bottom:28px;
    opacity:0.92;
}
.btn-primary {
    display:inline-block;
    background:#b88646;
    color:#fff;
    padding:12px 28px;
    border-radius:2px;
    transition: background 0.3s;
}
.btn-primary:hover {
    background:#a07038;
}
.swiper-button-next, .swiper-button-prev {
    color:#fff;
}
.swiper-pagination-bullet {
    background:#fff;
    opacity:0.6;
}
.swiper-pagination-bullet-active {
    background:#b88646;
    opacity:1;
}

/* Section通用 */
.section {
    padding:70px 0;
}
.section-title {
    text-align:center;
    font-size:28px;
    margin-bottom:48px;
    color:#222;
}
.grid-4 {
    display:grid;
    grid-template-columns: repeat(4,1fr);
    gap:24px;
}
.grid-3 {
    display:grid;
    grid-template-columns: repeat(3,1fr);
    gap:24px;
}
.grid-2 {
    display:grid;
    grid-template-columns: repeat(2,1fr);
    gap:32px;
    align-items:center;
}
.card {
    background:#fff;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    overflow:hidden;
}
.card-img {
    height:220px;
    background:#e9ecef;
}
.card-body {
    padding:18px;
}
.card-body h4 {
    margin-bottom:10px;
}
.card-body a {
    color:#b88646;
    font-size:14px;
}

/* 证书板块 */
.cert-card {
    padding:20px;
    text-align:center;
    border:1px solid #eee;
}
.cert-block {
    height:140px;
    background:#dee2e6;
    margin-bottom:12px;
}

/* Footer */
footer {
    background:#1f1f1f;
    color:#bbb;
    padding:40px 0;
    text-align:center;
    font-size:14px;
}

/* 悬浮联系按钮 全局右下角 */
.fixed-contact {
    position:fixed;
    bottom:24px;
    right:24px;
    z-index:999;
    display:flex;
    flex-direction:column;
    gap:12px;
}
.fixed-contact a {
    width:50px;
    height:50px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:20px;
    box-shadow:0 4px 14px rgba(0,0,0,0.18);
}
.whatsapp-btn {
    background:#25D366;
}
.email-btn {
    background:#3498db;
}

/* 产品详情页 */
.detail-top {
    padding:50px 0;
}
.detail-img-block {
    height:420px;
    background:#e9ecef;
}

/* 响应式 */
@media(max-width:768px){
    nav.desktop-nav {
        display:none;
    }
    .menu-btn {
        display:block;
    }
    .mobile-nav.active {
        display:block;
    }
    .grid-4,.grid-3,.grid-2 {
        grid-template-columns:1fr;
    }
    .swiper {
        height:70vh;
    }
}


/* Arabic / RTL language support */
/* 修复阿拉伯语首页轮播异常 */
.mySwiper {
    direction: ltr !important;
}

.mySwiper .swiper-wrapper {
    direction: ltr !important;
}

.mySwiper .swiper-slide {
    direction: ltr !important;
}

/* 阿拉伯语轮播文字仍然保持从右向左 */
html[dir="rtl"] .mySwiper .slide-content {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body, body.rtl {
    font-family: "Tahoma", "Arial", sans-serif;
    text-align: right;
}
html[dir="rtl"] .header-wrap,
html[dir="rtl"] nav.desktop-nav,
html[dir="rtl"] .lang-switch,
html[dir="rtl"] .fixed-contact {
    direction: rtl;
}
html[dir="rtl"] .lang-switch {
    border-left: 0;
    border-right: 1px solid #ddd;
    padding-left: 0;
    padding-right: 16px;
}
html[dir="rtl"] .slide-content {
    padding-left: 0;
    padding-right: 4%;
    text-align: right;
}
html[dir="rtl"] .swiper-button-next { right: auto; left: 10px; }
html[dir="rtl"] .swiper-button-prev { left: auto; right: 10px; }
html[dir="rtl"] .fixed-contact {
    right: auto;
    left: 24px;
}
html[dir="rtl"] .mobile-nav,
html[dir="rtl"] .mobile-nav a,
html[dir="rtl"] .card-body,
html[dir="rtl"] .detail-top,
html[dir="rtl"] .section {
    text-align: right;
}
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .btn-primary,
html[dir="rtl"] .card-body a {
    direction: rtl;
}
html[dir="rtl"] .logo { direction: ltr; }
@media(max-width:768px) {
    html[dir="rtl"] .slide-content { padding-right: 6%; padding-left: 6%; }
    html[dir="rtl"] .fixed-contact { left: 16px; right: auto; }
}
