/* mattressmagical.com — 美国神奇床垫 Mattress Magical */
:root {
    --primary-color: #5b4632;
    --primary-dark: #3e2f21;
    --gold: #b08d57;
    --gold-light: #e6d5b8;
    --teal: #16918d;
    --teal-dark: #0f6f6c;
    --cream: #f8f3ec;
    --sand: #efe6d9;
    --text: #2b2520;
    --muted: #6d6358;
    --line: #e4d9c9;
    --white: #ffffff;
    --dark-color: #2a2119;
    --accent-color: #e6c48a;
    --sale: #c0392b;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(62, 47, 33, .10);
    --transition: all .25s ease;
    --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--white); line-height: 1.8; font-size: 16px; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }
a:hover { color: var(--primary-color); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--primary-dark); line-height: 1.35; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 8px; z-index: 999; background: #fff; padding: 8px 12px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--primary-dark); color: var(--gold-light); font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar span + span::before { content: "·"; margin: 0 8px; opacity: .6; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.logo a { display: flex; align-items: center; gap: 10px; color: var(--primary-color); text-decoration: none; transition: opacity .3s; }
.logo a:hover { opacity: .8; }
.logo img { width: 150px; height: auto; }
.logo-text { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--primary-dark); white-space: nowrap; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.main-nav a { display: block; white-space: nowrap; padding: 8px 10px; color: var(--text); text-decoration: none; font-size: .96rem; border-radius: 8px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--teal-dark); background: var(--cream); }
.nav-cta { background: var(--teal) !important; color: #fff !important; font-weight: 600; }
.nav-cta:hover { background: var(--teal-dark) !important; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--primary-dark); margin: 4px auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 26px; border-radius: 40px; font-weight: 600; text-decoration: none; transition: var(--transition); border: 2px solid transparent; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--primary-color); color: #fff; }
.btn-outline { border-color: var(--primary-color); color: var(--primary-color); background: transparent; }
.btn-outline:hover { background: var(--primary-color); color: #fff; }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Hero slider ---------- */
.hero { position: relative; overflow: hidden; background: var(--cream); }
.hero-slides { position: relative; height: clamp(440px, 46vw, 620px); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero-content { position: absolute; inset: 0; display: flex; align-items: center; }
.hero-box { max-width: 560px; background: rgba(255, 255, 255, .82); padding: 30px 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-box .eyebrow { color: var(--gold); font-weight: 700; letter-spacing: .12em; font-size: .85rem; }
.hero-box p { color: var(--muted); }
.hero-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(91, 70, 50, .35); cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--primary-color); width: 26px; border-radius: 6px; }

/* ---------- Page header ---------- */
.page-hero { background: linear-gradient(120deg, rgba(42, 33, 25, .78), rgba(42, 33, 25, .35)), var(--hero-img, none) center / cover no-repeat, var(--primary-dark); color: #fff; padding: 70px 0 56px; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: rgba(255, 255, 255, .88); max-width: 720px; margin: 0; }
.breadcrumb { font-size: .88rem; margin-bottom: 14px; color: rgba(255, 255, 255, .8); }
.breadcrumb a { color: var(--accent-color); text-decoration: none; }
.breadcrumb span { margin: 0 6px; opacity: .6; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--cream); }
.section-sand { background: var(--sand); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.section-head .eyebrow, .eyebrow { display: inline-block; color: var(--gold); font-weight: 700; letter-spacing: .14em; font-size: .82rem; text-transform: uppercase; margin-bottom: 8px; }
.section-head p { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--muted); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: var(--transition); }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: block; }

.feature { text-align: center; padding: 22px 14px; }
.feature img { width: 72px; height: 72px; margin: 0 auto 12px; }
.feature h3 { font-size: 1.05rem; margin-bottom: .3em; }
.feature p { font-size: .92rem; color: var(--muted); margin: 0; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat { background: #fff; border-radius: var(--radius); padding: 22px 12px; border: 1px solid var(--line); }
.stat strong { display: block; font-family: var(--serif); font-size: 2rem; color: var(--teal-dark); line-height: 1.2; }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: var(--transition); position: relative; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.product-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.product-card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.product-card h3 a { color: var(--primary-dark); text-decoration: none; }
.product-card .spec { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.badge-sale { position: absolute; top: 12px; left: 12px; background: var(--sale); color: #fff; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.price { margin-top: auto; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price del { color: #9a8f84; font-size: .95rem; }
.price ins { text-decoration: none; color: var(--sale); font-size: 1.45rem; font-weight: 800; }
.product-card .btn { margin-top: 12px; text-align: center; padding: 10px 16px; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: start; }
.gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--cream); }
.gallery-main img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.gallery-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.gallery-thumbs button.active { border-color: var(--teal); }
.gallery-thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.buy-box .price ins { font-size: 2.2rem; }
.buy-box .save { display: inline-block; background: #fdecea; color: var(--sale); padding: 2px 10px; border-radius: 20px; font-size: .88rem; font-weight: 700; }
.spec-list { list-style: none; padding: 0; margin: 18px 0; border-top: 1px solid var(--line); }
.spec-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.spec-list li span:first-child { color: var(--muted); }
.spec-list li span:last-child { font-weight: 600; text-align: right; }
.size-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.size-switch a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 30px; text-decoration: none; color: var(--text); font-size: .9rem; }
.size-switch a[aria-current="page"] { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.order-note { background: var(--cream); border-radius: 10px; padding: 14px 16px; font-size: .95rem; margin-top: 16px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: #fff; min-width: 560px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--sand); color: var(--primary-dark); font-family: var(--serif); }
tr:last-child td { border-bottom: 0; }
td .sale { color: var(--sale); font-weight: 700; }

/* ---------- Prose ---------- */
.prose { font-size: 1.04rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--gold); background: var(--cream); border-radius: 0 10px 10px 0; }
.tldr { background: var(--cream); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 10px; padding: 18px 20px; margin-bottom: 1.6em; }
.tldr strong { color: var(--teal-dark); }
.article-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.2em; }

.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.sidebar { position: sticky; top: 100px; display: grid; gap: 18px; }
.side-card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.side-card h3 { font-size: 1.05rem; }
.side-card ul { list-style: none; padding: 0; margin: 0; }
.side-card li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.side-card li:last-child { border-bottom: 0; }
.side-card a { text-decoration: none; }
.side-phone { display: block; font-size: 1.5rem; font-weight: 800; color: var(--teal-dark); text-decoration: none; margin: 6px 0 10px; }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--primary-dark); list-style: none; position: relative; padding-right: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 1.4rem; color: var(--gold); }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 20px 16px; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }

/* ---------- Video ---------- */
.video-box { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-box video { width: 100%; }

/* ---------- Steps ---------- */
.steps { counter-reset: s; display: grid; gap: 16px; }
.step { position: relative; padding: 18px 20px 18px 70px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 18px; top: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step h3 { margin-bottom: .2em; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); }

/* ---------- Blog list ---------- */
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: 10px; margin-bottom: 12px; }
.post-card .tag { font-size: .8rem; color: var(--gold); font-weight: 700; }
.post-card h3 { font-size: 1.1rem; margin: 4px 0 6px; }
.post-card p { color: var(--muted); font-size: .94rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--primary-dark), var(--primary-color)); color: #fff; padding: 56px 0; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta-phone { font-size: 1.7rem; font-weight: 800; color: var(--accent-color); text-decoration: none; }

/* ---------- Contact ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-list .ico { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--cream); display: flex; align-items: center; justify-content: center; color: var(--gold); font-weight: 700; }
.info-list strong { display: block; color: var(--primary-dark); }
.map-box { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-box iframe { width: 100%; height: 360px; border: 0; display: block; }
.contact-form { display: grid; gap: 12px; }
.contact-form input, .contact-form textarea, .contact-form select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: 2px solid var(--teal); border-color: transparent; }
.contact-form button { border: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Footer ---------- */
footer { background: var(--dark-color); color: var(--white); padding: 3rem 0 1rem; margin-top: 0; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section h3 { color: var(--white); margin-bottom: 1rem; font-size: 1.15rem; }
.footer-section p, .footer-section a { color: rgba(255, 255, 255, .8); line-height: 1.8; }
.footer-section p { margin: 0 0 .5rem; }
.footer-section a { text-decoration: none; }
.footer-section a:hover { color: var(--accent-color); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .6); }
.footer-bottom p { margin-bottom: .5rem; }
.footer-partner { margin-top: 1rem; font-size: .9rem; color: rgba(255, 255, 255, .7); }
.footer-partner a { color: var(--accent-color); text-decoration: none; transition: var(--transition); }
.footer-partner a:hover { color: var(--white); }
.lang-en { display: none; }

/* ---------- Floating call ---------- */
.float-call { position: fixed; right: 16px; bottom: 16px; z-index: 60; background: var(--teal); color: #fff; border-radius: 40px; padding: 12px 18px; text-decoration: none; font-weight: 700; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .product-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1180px) {
    .nav-toggle { display: block; }
    .main-nav { position: fixed; top: 0; right: 0; height: 100dvh; width: min(300px, 82vw); background: #fff; box-shadow: -10px 0 30px rgba(0, 0, 0, .15); transform: translateX(100%); transition: transform .3s ease; padding: 80px 20px 20px; overflow-y: auto; z-index: 70; }
    .main-nav.open { transform: none; }
    .main-nav ul { flex-direction: column; align-items: stretch; }
    .main-nav a { padding: 12px 10px; font-size: 1rem; }
    .nav-close { position: absolute; top: 18px; right: 18px; }
}
@media (max-width: 900px) {
    .split, .product-detail, .layout-side, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .float-call { display: block; }
    .section { padding: 54px 0; }
}
@media (max-width: 560px) {
    .product-grid, .grid-4 { grid-template-columns: 1fr; }
    .logo img { width: 120px; }
    .logo-text { display: none; }
    .hero-box { padding: 22px 20px; margin: 0; }
    .hero-slides { height: 520px; }
    .hero-slide img { object-position: 78% center; }
    .form-row { grid-template-columns: 1fr; }
    .topbar .hide-sm { display: none; }
    .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1181px) { .nav-close { display: none; } }
.section .breadcrumb { color: var(--muted); }
.section .breadcrumb a { color: var(--teal-dark); }
@media (min-width: 1181px) { .logo-text { display: none; } .logo img { width: 140px; } }
.hero-box h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
.buy-box h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
