/* ==========================================================
   义乌市铁要饰品厂（Yiwu Tieyao Jewelry Factory） — style.css
   按设计稿"主页.png"实现：暖米色 + 金棕色外贸饰品风格
   ========================================================== */

/* ---------- 变量与全局 ---------- */
:root {
    --primary-color: #c9a063;      /* 金棕主色 */
    --primary-dark: #b0854c;
    --secondary-color: #8a5a3b;    /* 深棕标题色 */
    --bg-light: #fffdf9;
    --bg-beige: #f3ece2;           /* 米色底 */
    --bg-cream: #faf5ee;
    --text-dark: #3d3428;
    --text-gray: #8c8377;
    --border-color: #eee5d8;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(138, 90, 59, 0.08);
    --shadow-hover: 0 12px 32px rgba(138, 90, 59, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 导航栏 ---------- */
.header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.header.scrolled {
    box-shadow: 0 2px 16px rgba(138, 90, 59, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    margin-right: 10px;
}

.logo-text h1 {
    font-size: 20px;
    color: var(--secondary-color);
    line-height: 1.15;
    letter-spacing: 2px;
}

.logo-text span {
    font-size: 10px;
    color: var(--text-gray);
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    margin: 0 14px;
    font-size: 15px;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -6px;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-dark);
}

.nav-actions {
    display: flex;
    align-items: center;
}

/* 中英文切换开关 */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 16px;
    padding: 3px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: #fff;
    transition: border-color 0.3s;
}

.lang-switch:hover {
    border-color: var(--primary-color);
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-gray);
    padding: 4px 12px;
    border-radius: 14px;
    line-height: 1.4;
    transition: color 0.3s, background 0.3s;
    white-space: nowrap;
}

.lang-btn:hover {
    color: var(--primary-dark);
}

.lang-btn.active {
    background: var(--primary-color);
    color: #fff;
    font-weight: 500;
}

.lang-sep {
    font-size: 13px;
    color: #d8cdbb;
    user-select: none;
}

/* 移动端菜单内的语言切换 */
.mobile-lang {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    align-self: flex-start;
    margin-top: 12px;
    padding: 3px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
}

.btn-quote {
    background: var(--primary-color);
    color: #fff;
    padding: 9px 24px;
    border-radius: 22px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
    white-space: nowrap;
}

.btn-quote:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: 12px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 8px 20px 16px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 11px 4px;
    border-bottom: 1px solid var(--bg-beige);
    font-size: 15px;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

/* ---------- Hero 首屏 ---------- */
.hero {
    background: linear-gradient(120deg, #f7f1e8 0%, #f0e6d8 55%, #ecdfcd 100%);
    padding: 50px 0;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-content h2 {
    font-size: clamp(30px, 4.2vw, 46px);
    color: var(--secondary-color);
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: 2px;
}

.sub-title {
    font-size: clamp(16px, 2vw, 20px);
    color: #6f6152;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sub-title .divider {
    display: inline-block;
    width: 1px;
    height: 1em;
    background: #c9bba8;
}

.hero-tags span {
    display: inline-block;
    background: rgba(201, 160, 99, 0.16);
    border: 1px solid rgba(201, 160, 99, 0.35);
    color: var(--primary-dark);
    padding: 7px 20px;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
}

.hero-tags span:hover {
    background: rgba(201, 160, 99, 0.28);
    transform: translateY(-2px);
}

.hero-image {
    flex: 1.15;
    min-width: 0;
}

.hero-image img {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 20px 48px rgba(138, 90, 59, 0.18);
    object-fit: cover;
    aspect-ratio: 680 / 380;
}

/* ---------- 通用标题 ---------- */
.section-title {
    text-align: center;
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: 2px;
}

/* ---------- 产品展示 ---------- */
.products-section {
    padding: 64px 0;
    background: var(--bg-cream);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.product-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px 14px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
    background: #f0ebe4;
}

.product-image img {
    width: 100%;
    aspect-ratio: 580 / 400;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.product-card p {
    font-size: 13px;
    color: var(--text-gray);
    letter-spacing: 1px;
}

/* ---------- 核心优势 ---------- */
.advantages-section {
    padding: 64px 0;
    background: var(--bg-beige);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.advantage-card {
    background: #fff;
    padding: 30px 14px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.adv-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: block;
}

.advantage-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.advantage-card p {
    font-size: 13px;
    color: var(--text-gray);
}

/* ---------- 样品索取 ---------- */
.sample-section {
    padding: 64px 0;
    background: var(--bg-cream);
}

.sample-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: var(--bg-beige);
    padding: 44px 48px;
    border-radius: var(--radius);
}

.sample-header {
    flex: 1;
    min-width: 220px;
}

.sample-header h2 {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.sample-header p {
    color: #7d7263;
    font-size: 15px;
}

.sample-features {
    flex: 2;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 12px;
}

.sample-item {
    text-align: center;
    margin: 6px 10px;
    min-width: 96px;
}

.sample-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    display: block;
}

.sample-item span {
    font-size: 14px;
    color: var(--text-dark);
    white-space: nowrap;
}

/* ---------- 联系我们 ---------- */
.contact-section {
    padding: 64px 0;
    background: var(--bg-beige);
}

.contact-container {
    display: flex;
    gap: 28px;
    align-items: stretch;
}

.contact-info {
    flex: 1;
    background: #fff;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-info h2 {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--secondary-color);
    letter-spacing: 2px;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    margin-bottom: 16px;
    font-size: 14px;
    color: #6f6557;
    display: flex;
    align-items: flex-start;
}

.contact-info li strong {
    color: var(--text-dark);
    font-weight: 600;
    flex-shrink: 0;
}

.contact-info a {
    color: var(--primary-dark);
    text-decoration: none;
    word-break: break-all;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-info li.with-icon {
    align-items: center;
}

.contact-info li.with-icon::before { display: none; }

.contact-info li.with-icon strong {
    margin-left: 26px;
}

.icon-mail strong, .icon-globe strong { position: relative; }

.icon-mail strong::before,
.icon-globe strong::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-mail strong::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c9a063' d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

.icon-globe strong::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c9a063' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm7.93 9h-3.02a15.7 15.7 0 0 0-1.2-5.03A8.03 8.03 0 0 1 19.93 11zM12 4.04c.83 1.2 1.7 3.16 1.94 5.96h-3.88c.24-2.8 1.1-4.76 1.94-5.96zM4.07 13h3.02c.16 1.87.58 3.58 1.2 5.03A8.03 8.03 0 0 1 4.07 13zm3.02-2H4.07a8.03 8.03 0 0 1 4.22-5.03A15.7 15.7 0 0 0 7.09 11zM12 19.96c-.83-1.2-1.7-3.16-1.94-5.96h3.88c-.24 2.8-1.1 4.76-1.94 5.96zM14.9 13h3.02a8.03 8.03 0 0 1-4.22 5.03c.62-1.45 1.04-3.16 1.2-5.03z'/%3E%3C/svg%3E");
}

.contact-form-wrapper {
    flex: 1.15;
    background: #fff;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 84px 1fr;
    align-items: center;
    gap: 12px;
}

.form-row label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-cream);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    background: #fff;
}

.contact-form textarea {
    min-height: 88px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 11px 32px;
    border-radius: 22px;
    font-size: 15px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.2s;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.form-tip {
    font-size: 13px;
    color: #4f8a5b;
    min-height: 18px;
    text-align: right;
}

.form-tip.error {
    color: #c0564f;
}

/* ---------- 页脚 ---------- */
.footer {
    background: var(--bg-beige);
    border-top: 1px solid #e8dfd0;
    padding: 22px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-left p {
    font-size: 13px;
    color: var(--text-gray);
}

.footer-left a {
    color: var(--text-gray);
    text-decoration: none;
    margin: 0 4px;
}

.footer-left a:hover {
    color: var(--primary-dark);
}

.footer-left .sep {
    color: #d8cdbb;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-social .social-icon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-social .social-icon svg {
    width: 20px;
    height: 20px;
}

.footer-social .social-icon:hover {
    color: var(--primary-dark);
}

/* ---------- 滚动显现动画 ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
    .nav-links { display: none; }
    .lang-switch { display: none; }
    .nav-toggle { display: flex; }

    .hero-container { flex-direction: column; text-align: center; }
    .sub-title { justify-content: center; }
    .hero-image { width: 100%; max-width: 640px; }

    .advantages-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }

    .sample-container { flex-direction: column; text-align: center; padding: 36px 24px; }
    .sample-features { justify-content: center; }

    .contact-container { flex-direction: column; }
}

@media (max-width: 600px) {
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .form-row label { padding-left: 2px; }
    .contact-info, .contact-form-wrapper { padding: 28px 22px; }
    .footer-container { flex-direction: column; }
    .btn-quote { padding: 8px 16px; }
}
