/* =========================================================
   昱隆贸易 Yulong Trade — 前台样式 (B2B 商务风)
   干净 / 专业 / 响应式
   ========================================================= */

:root {
    --c-primary:   #0b4f8a;   /* 主色 深蓝 */
    --c-primary-d: #083a66;
    --c-accent:    #18a999;   /* 点缀 青绿 */
    --c-accent-d:  #138577;
    --c-ink:       #1f2937;
    --c-muted:     #6b7280;
    --c-line:      #e5e7eb;
    --c-bg:        #ffffff;
    --c-bg-soft:   #f5f8fc;
    --c-bg-dark:   #0a2540;
    --radius:      12px;
    --shadow:      0 6px 24px rgba(11,79,138,.08);
    --shadow-lg:   0 14px 40px rgba(11,79,138,.14);
    --maxw:        1600px;
    --header-h:    68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    color: var(--c-ink);
    background: var(--c-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-accent-d); }

img { max-width: 100%; display: block; }

.container {
    width: 100%; max-width: min(1600px, 95vw);
    margin: 0 auto; padding: 0 5%;
}

/* PC 大屏：保证 5% 边距 */
@media (min-width: 1200px) {
    .container { max-width: min(1600px, 92vw); }
}
/* 笔记本 1440px：每列 ≈320px，大气 */
@media (min-width: 1400px) {
    .container { max-width: min(1600px, 90vw); }
}

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; border-radius: 999px;
    font-weight: 600; font-size: 15px; cursor: pointer;
    border: 1px solid transparent; transition: .2s; line-height: 1;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-d); color: #fff; }
.btn-accent  { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-d); color: #fff; }
.btn-outline { background: transparent; border-color: var(--c-primary); color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.section { padding: 64px 0; }
.section-soft { background: var(--c-bg-soft); }
.section-head { text-align: center; margin-bottom: 42px; }
.section-head h2 {
    font-size: clamp(24px, 3vw, 34px); margin: 0 0 10px;
    color: var(--c-ink); letter-spacing: -.5px;
}
.section-head p { color: var(--c-muted); margin: 0; }

/* ---------------- Header ---------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(11,79,138,.08);
    transition: background .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
    background: rgba(255,255,255,.88);
    box-shadow: 0 1px 12px rgba(0,0,0,.06);
}
.nav {
    display: Flex; align-items: center; justify-content: space-between;
    height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px;
}
.brand .logo img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.brand .name { font-weight: 700; font-size: 17px; color: var(--c-ink); line-height: 1.1; }
.brand .name small { display: block; font-weight: 500; font-size: 11px; color: var(--c-muted); letter-spacing: .5px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    padding: 8px 16px; border-radius: 10px; color: var(--c-ink);
    font-weight: 500; font-size: 15px; position: relative;
    transition: color .25s ease, background .25s ease, transform .2s ease;
}
/* 微交互：hover 时颜色翻转 + 轻微上浮 */
.nav-links a:not(.lang-switch a)::before {
    content: ""; position: absolute; inset: 0; border-radius: 10px;
    background: transparent; transition: background .25s ease;
    z-index: -1;
}
.nav-links a:not(.lang-switch a):hover {
    color: #fff; transform: translateY(-1px);
}
.nav-links a:not(.lang-switch a):hover::before {
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    box-shadow: 0 4px 14px rgba(11,79,138,.28);
}
/* active 当前页：主色描边胶囊 */
.nav-links a.active:not(.lang-switch a) {
    color: var(--c-primary); font-weight: 600;
    background: rgba(11,79,138,.08);
}
.nav-links a.active:not(.lang-switch a):hover {
    color: #fff;
}
.nav-links a.active:not(.lang-switch a):hover::before {
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
}

.lang-switch { display: inline-flex; border: 1px solid rgba(11,79,138,.15); border-radius: 999px; overflow: hidden; margin-left: 8px; }
.lang-switch a {
    padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--c-muted);
    transition: color .25s ease, background .25s ease;
}
.lang-switch a:hover { color: var(--c-primary); }
.lang-switch a.active { background: var(--c-primary); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--c-ink); }

/* ---------------- Hero / Banner ---------------- */
.hero { position: relative; }

/* 页面广告横条（导航下方） */
.page-ad-bar { width: 100%; overflow: hidden; line-height: 0; }
.page-ad-bar img { display: block; width: 100%; height: auto; }
.page-ad-bar a { display: block; }
.page-ad-bar a:hover img { opacity: .92; transition: opacity .2s; }

.banner { position: relative; height: clamp(360px, 56vh, 540px); overflow: hidden; background: var(--c-bg-dark); }
.banner-track { display: flex; height: 100%; transition: transform .6s ease; }
.banner-slide { position: relative; min-width: 100%; height: 100%; }
.banner-slide img, .banner-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-slide video { background: var(--c-bg-dark); } /* 封面/加载前底色，避免白闪 */
.banner-slide::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(10,37,64,.78) 0%, rgba(10,37,64,.35) 55%, rgba(10,37,64,.1) 100%);
}
.banner-caption {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; justify-content: center;
    max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
    color: #fff;
}
.banner-caption .inner { max-width: 560px; }
.banner-caption h1 { font-size: clamp(28px, 4.4vw, 50px); margin: 0 0 14px; line-height: 1.15; letter-spacing: -.5px; }
.banner-caption p { font-size: clamp(15px, 1.6vw, 19px); margin: 0 0 24px; opacity: .92; }
.banner-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.banner-dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; }
.banner-dots button.active { background: #fff; width: 26px; border-radius: 6px; }
.banner-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255,255,255,.2); color: #fff; font-size: 22px; display: grid; place-items: center;
    backdrop-filter: blur(4px); transition: .2s;
}
.banner-arrow:hover { background: rgba(255,255,255,.4); }
.banner-arrow.prev { left: 18px; }
.banner-arrow.next { right: 18px; }

/* 静音/取消静音按钮 */
.banner-unmute {
    position: absolute; bottom: 20px; right: 18px; z-index: 3;
    width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center;
    backdrop-filter: blur(4px); transition: .2s; padding: 0;
}
.banner-unmute:hover { background: rgba(0,0,0,.65); transform: scale(1.08); }
.banner-unmute.is-unmuted { background: var(--c-primary, #0b4f8a); }
.banner-unmute.is-unmuted:hover { background: #0d5a9e; }

/* ---------------- Product grid ---------------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.product-card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    overflow: hidden; transition: .25s; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-card .thumb { aspect-ratio: 4/3; background: var(--c-bg-soft); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-card .cat { font-size: 12px; color: var(--c-accent-d); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.product-card h3 { margin: 6px 0 10px; font-size: 18px; }
.product-card h3 a { color: var(--c-ink); }
.product-card p { color: var(--c-muted); font-size: 14px; margin: 0 0 16px; flex: 1; }
.product-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------------- Category filter ---------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.chip {
    padding: 8px 18px; border-radius: 999px; border: 1px solid var(--c-line);
    background: #fff; color: var(--c-muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: .2s;
}
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ---------------- Category cards (overview + homepage) ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    padding: 20px; transition: .25s; display: flex; flex-direction: column;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cat-card h3 { margin: 0 0 4px; font-size: 17px; }
.cat-card h3 a { color: var(--c-ink); }
.cat-card h3 a:hover { color: var(--c-primary); }
.cat-count { font-size: 13px; color: var(--c-muted); }
.cat-arrow {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--c-line); color: var(--c-muted); font-size: 16px; transition: .2s;
}
.cat-card:hover .cat-arrow, .cat-arrow:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.cat-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.cat-thumb { aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--c-bg-soft); }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .35s; }
.cat-thumb:hover img { transform: scale(1.08); }
.cat-empty {
    margin-top: 16px; border: 1px dashed var(--c-line); border-radius: 8px;
    color: var(--c-muted); font-size: 13px; text-align: center; padding: 14px;
}
/* 首页轻量分类胶囊 */
.cat-mini {
    display: flex; flex-direction: column; gap: 6px; padding: 20px;
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    transition: .22s; min-height: 92px; justify-content: center;
}
.cat-mini:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat-mini-name { font-size: 17px; font-weight: 600; color: var(--c-ink); }
.cat-mini:hover .cat-mini-name { color: var(--c-primary); }
.cat-mini-count { font-size: 13px; color: var(--c-muted); }

/* ---------------- Product detail ---------------- */
.breadcrumb { font-size: 13px; color: var(--c-muted); margin: 18px 0; }
.breadcrumb a { color: var(--c-muted); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.detail-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-info h1 { font-size: 28px; margin: 0 0 6px; }
.detail-info .cat { color: var(--c-accent-d); font-weight: 600; font-size: 13px; text-transform: uppercase; }
.detail-info .desc { color: #374151; margin: 18px 0; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--c-line); font-size: 14px; }
.spec-table th { background: var(--c-bg-soft); color: var(--c-muted); font-weight: 600; width: 40%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

/* ---------------- Inquiry form ---------------- */
.form-card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow);
}
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; color: var(--c-ink); }
.form-row .req { color: #e0245e; }
.form-control {
    width: 100%; padding: 11px 14px; border: 1px solid var(--c-line); border-radius: 10px;
    font-size: 15px; font-family: inherit; background: #fff; transition: .2s;
}
.form-control:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(11,79,138,.12); }
textarea.form-control { min-height: 120px; resize: vertical; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 询盘大卡片（产品详情页 #inquiry，更宽更大气） */
.inquiry-section { background: linear-gradient(180deg, #fff 0%, var(--c-bg-soft) 100%); padding: 72px 0; }
.inquiry-wrap { max-width: 1120px; }
.inquiry-section .section-head h2 {
    font-size: clamp(24px, 3vw, 34px); margin: 0 0 8px;
}
.inquiry-section .section-head p { font-size: 15px; }
.form-card-lg {
    padding: 46px 50px 50px;
    border: 1px solid var(--c-line);
    border-top: 4px solid var(--c-primary);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    background: #fff;
}
.form-card-lg .form-row { margin-bottom: 22px; }
.form-card-lg label { font-size: 15px; font-weight: 600; margin-bottom: 9px; color: var(--c-ink); }
.form-card-lg .two-col { gap: 22px 24px; }
.form-card-lg .form-control {
    padding: 14px 18px;
    font-size: 15px;
    border-radius: 12px;
    border: 1px solid #d6dce4;
    background: #fcfdff;
    transition: .2s;
}
.form-card-lg .form-control:hover { border-color: #b9c4d1; }
.form-card-lg .form-control:focus {
    outline: none;
    border-color: var(--c-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(11, 79, 138, .10);
}
.form-card-lg textarea.form-control { min-height: 150px; }
.form-card-lg .btn-submit {
    width: 100%; padding: 16px 24px; margin-top: 6px;
    font-size: 16px; font-weight: 600; letter-spacing: .03em;
    border-radius: 12px; box-shadow: 0 8px 22px rgba(11, 79, 138, .22);
    transition: .2s;
}
.form-card-lg .btn-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(11, 79, 138, .28); }
@media (max-width: 720px) {
    .inquiry-section { padding: 48px 0; }
    .form-card-lg { padding: 28px 20px 32px; border-radius: 14px; }
    .form-card-lg .btn-submit { padding: 14px 20px; font-size: 15px; }
}

.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------------- WhatsApp float ---------------- */
.wa-float {
    position: fixed; right: 22px; bottom: 22px; z-index: 60;
    display: flex; align-items: center; gap: 10px;
    background: #25D366; color: #fff; padding: 12px 18px 12px 14px;
    border-radius: 999px; box-shadow: 0 10px 30px rgba(37,211,102,.4);
    font-weight: 600; transition: .2s;
}
.wa-float:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 14px 36px rgba(37,211,102,.5); }
.wa-float .ic { width: 30px; height: 30px; display: grid; place-items: center; background: rgba(255,255,255,.2); border-radius: 50%; }
.wa-float .label { font-size: 14px; }
@media (max-width: 600px) { .wa-float .label { display: none; } .wa-float { padding: 12px; } }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--c-bg-dark); color: #cbd5e1; padding: 54px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin: 0 0 16px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 14px; margin: 6px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 18px; text-align: center; font-size: 13px; color: #94a3b8; }

/* ---------------- About / generic ---------------- */
.prose { max-width: 760px; }
.prose p { color: #374151; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .nav-links {
        position: absolute; top: var(--header-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: rgba(255,255,255,.92);
        backdrop-filter: blur(16px) saturate(180%);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
        border-bottom: 1px solid rgba(11,79,138,.08);
        max-height: 0; overflow: hidden; transition: max-height .3s ease;
    }
    .nav-links.open { max-height: 480px; }
    .nav-links a { padding: 14px 20px; border-radius: 0; border-bottom: 1px solid rgba(11,79,138,.06); }
    .nav-links a:not(.lang-switch a)::before { display: none; }
    .nav-links a:not(.lang-switch a):hover { color: var(--c-primary); transform: none; background: rgba(11,79,138,.06); }
    .nav-links .lang-switch { margin: 12px 20px; }
    .nav-toggle { display: block; }
    .grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .section { padding: 44px 0; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
}
