/* 西螺肉鬆第三代 — 靜態網站樣式 */
:root {
  --red: #9b1c1c;
  --red-dark: #761313;
  --ink: #2b1d14;
  --brown: #6b4a32;
  --muted: #8a7666;
  --gold: #b8894a;
  --paper: #fffdf8;
  --cream: #f7efe2;
  --line: #e6d9c6;
  --c-fb: #1877f2;
  --black: #1b1815; /* matches images/banner_bot.jpg background */
  --gold-light: #e2c38c;
  --hero-bg: #f0e9e1; /* matches the banner photo's paper tone */
  --on-dark: #efe4d4;
  --on-dark-muted: #d9cbb8;
  --card-dark: #2a2420;
  --icon-bg: #b8894a;
  --icon-color: #ffffff;
  --lineart-opacity: .14;
  /* shape */
  --radius: 10px;
  --radius-lg: 12px;
  --btn-radius: 999px;
  --btn-arrow-radius: 999px;
  --shadow: 0 2px 10px rgba(60, 30, 10, .08);
  /* type */
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  --en-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --fs-body: 16px;
  --lh-body: 1.8;
  --fs-hero: clamp(2rem, 4.6vw, 3.4rem);
  --fs-section: clamp(1.5rem, 3vw, 2.1rem);
  --fs-panel: clamp(1.6rem, 3.2vw, 2.4rem);
  --fs-page-title: clamp(1.6rem, 4vw, 2.3rem);
  --fs-card-title: 1.08rem;
  --fs-lead: 1.1rem;
  --fs-small: .85rem;
  --fs-price: 1.25rem;
  --fs-btn: 1rem;
  --fs-en: .9rem;
  /* layout */
  --wrap: 1160px;
  --section-space: clamp(48px, 8vw, 88px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* safety net against stray sideways scroll. Only on body: setting it on html stops body overflow from propagating to the viewport, which breaks the sticky header when the menu sets body overflow: hidden */
body { overflow-x: clip; margin: 0; font-family: var(--sans); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.35; margin: 0 0 .5em; letter-spacing: .02em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 860px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.sm-only { display: none; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .7em 1.4em; border-radius: var(--btn-radius); border: 2px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; font-size: var(--fs-btn); line-height: 1.2; transition: filter .15s, background .15s; font-family: inherit; }
.btn:hover { filter: brightness(1.08); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { color: #fff; background: var(--red-dark); }
.btn-outline { border-color: var(--red); color: var(--red); background: transparent; }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--red); }
.btn-tel { background: var(--red); color: #fff; }
.btn-fb { background: var(--c-fb); color: #fff; }
.btn-tel:hover, .btn-fb:hover { color: #fff; }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 1.5em 0; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); border-bottom: 1px solid #000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.logo img { width: 200px; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: 8px 12px; color: var(--on-dark); text-decoration: none; font-weight: 600; border-radius: 6px; }
.site-nav ul a:hover, .site-nav ul a[aria-current] { color: var(--gold-light); background: rgba(255, 255, 255, .08); }
.nav-actions { display: flex; gap: 8px; }
.nav-call, .nav-download { padding: .55em 1.1em; font-size: .95rem; }
.btn-gold-outline { border-color: var(--gold); color: var(--gold-light); background: transparent; }
.btn-gold-outline:hover { background: var(--gold); color: var(--black); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.nav-toggle span:first-child, .nav-toggle span:first-child::before, .nav-toggle span:first-child::after { position: absolute; left: 10px; width: 24px; height: 2px; background: var(--on-dark); content: ""; transition: transform .2s; }
.nav-toggle span:first-child { top: 21px; }
.nav-toggle span:first-child::before { left: 0; top: -7px; }
.nav-toggle span:first-child::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] span:first-child { background: transparent; }
.nav-toggle[aria-expanded="true"] span:first-child::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:first-child::after { transform: translateY(-7px) rotate(-45deg); }

/* ---- hero ---- */
/* hero background matches the banner photo's paper tone so the crop blends in */
.hero { background: var(--hero-bg); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 24px; min-height: clamp(420px, 56vh, 600px); }
.hero-text { padding: 40px 0; }
.hero-img img { width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 92%, transparent); }
.hero h1 { font-size: var(--fs-hero); font-weight: 900; color: var(--ink); }
.hero-since { font-family: var(--serif); letter-spacing: .2em; color: var(--red); font-weight: 600; margin-bottom: .6em; }
.hero p { max-width: 30em; font-size: 1.08rem; color: var(--brown); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: .5em; }

/* ---- sections ---- */
.section { padding: var(--section-space) 0; }
.section + .section { padding-top: 0; }
.eyebrow { font-family: var(--serif); color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-size: var(--fs-small); margin-bottom: .3em; }
.eyebrow a { color: inherit; text-decoration: none; margin-right: .8em; }
.eyebrow.light { color: #f3d9a4; }
.section-title { font-size: var(--fs-section); color: var(--ink); position: relative; }
.section-title.center::after { content: ""; display: block; width: 48px; height: 3px; background: var(--red); margin: .5em auto 0; border-radius: 2px; }
.lead { font-size: var(--fs-lead); color: var(--brown); }
.link-more { font-weight: 700; text-decoration: none; }

.story { background: var(--cream); padding-top: var(--section-space) !important; }
.story-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.story-img img { margin: 0 auto; max-height: 460px; width: auto; }
.cats { padding-top: var(--section-space) !important; }
.cat-list { list-style: none; padding: 0; margin: 1.5em 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cat-list a { display: block; padding: .8em 1.6em; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.cat-list a:hover { border-color: var(--red); color: var(--red); }

/* ---- product grid ---- */
.grid { list-style: none; padding: 0; margin: 1.5em 0 2em; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card a { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.card a:hover { box-shadow: 0 8px 24px rgba(60, 30, 10, .12); transform: translateY(-2px); }
.card-img { position: relative; aspect-ratio: 1; background: var(--cream); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: .05em; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: var(--fs-card-title); margin-bottom: .3em; }
.card-summary { font-size: .88rem; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { margin: auto 0 0; color: var(--red); font-size: .9rem; }
.price b { font-size: var(--fs-price); }

.filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.filter a { padding: .45em 1.1em; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: #fff; }
.filter a[aria-current] { background: var(--red); border-color: var(--red); color: #fff; }

/* ---- order band ---- */
/* dollArea (原站首頁區塊) + order steps: one continuous black band */
.doll-area { background: var(--black); padding-top: clamp(24px, 5vw, 56px); }
.doll-area img { margin: 0 auto; width: 100%; max-width: 1160px; }
.order-band { background: var(--black); color: var(--on-dark); padding-top: clamp(32px, 5vw, 56px) !important; margin-bottom: var(--section-space); }
.order-band .section-title { color: #fff; }
.order-band .section-title.center::after { background: var(--gold); }
.order-band .eyebrow.light { color: var(--gold-light); }
.order-band .steps li { background: rgba(255, 255, 255, .05); border-color: rgba(226, 195, 140, .25); }
.order-band .steps h3 { color: var(--gold-light); }
.order-band .steps p { color: var(--on-dark-muted); }
.steps { list-style: none; padding: 0; margin: 2em 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }
.steps li { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.steps h3 { font-size: 1.15rem; margin: .4em 0 .3em; }
.steps p { margin: 0; font-size: .95rem; color: var(--brown); }
.step-no { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #fff; font-family: var(--serif); font-weight: 900; }

/* ---- news ---- */
.news-list { list-style: none; padding: 0; margin: 1.5em auto; max-width: 760px; }
.news-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.news-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
.news-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.news-list a:hover { color: var(--red); }
.tag { display: inline-block; font-size: .78rem; padding: 1px 8px; border-radius: 4px; background: var(--cream); color: var(--brown); border: 1px solid var(--line); }
.news-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.news-cards a { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
.news-cards a:hover { border-color: var(--red); }
.news-cards img { border-radius: 6px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.news-cards h2 { font-size: 1.2rem; }
.news-cards p { margin: 0; color: var(--brown); font-size: .95rem; }
.meta { display: flex; gap: 10px; align-items: center; color: var(--muted); margin-bottom: .4em; }
.article { max-width: 800px; }
.article-title { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.article .prose { line-height: 2; }
.news-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 1.5em 0; }
.news-images img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--line); }

/* ---- visit / map ---- */
.visit { background: var(--cream); padding-top: var(--section-space) !important; }
.visit-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: center; margin-top: 2em; }
.visit .visit-grid { margin-top: 0; }
.map { width: 100%; aspect-ratio: 16/10; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--line); }
.info-list { list-style: none; padding: 0; margin: 0 0 1em; }
.info-list li { padding: 4px 0; }
.info-list b { display: inline-block; min-width: 3.5em; color: var(--brown); }

/* ---- page head ---- */
.page-head { background: var(--cream); border-bottom: 1px solid var(--line); padding: 36px 0 28px; text-align: center; }
.page-head .en { font-family: var(--serif); color: var(--gold); letter-spacing: .25em; text-transform: uppercase; font-size: var(--fs-small); margin: 0; }
.page-head h1 { font-size: var(--fs-page-title); margin: .1em 0 .3em; }
.crumbs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; font-size: var(--fs-small); color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }

/* ---- product detail ---- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: var(--cream); border: 1px solid var(--line); }
.gallery-main img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.gallery-thumbs { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; width: 100%; }
.gallery-thumbs button[aria-current] { border-color: var(--red); }
.gallery-thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.product-name { font-size: clamp(1.5rem, 3vw, 2rem); }
.spec-table { width: 100%; border-collapse: collapse; margin: 0 0 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-table caption { text-align: left; font-weight: 700; color: var(--brown); padding: 0 0 8px; }
.spec-table th, .spec-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.spec-table thead th { background: var(--cream); font-size: .9rem; color: var(--brown); font-weight: 700; }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table .num { text-align: right; white-space: nowrap; color: var(--red); font-weight: 700; }
.spec-table th:last-child { text-align: right; }
.price-ask { color: var(--red); font-weight: 700; }
.order-box { background: var(--cream); border-radius: var(--radius); padding: 20px; }
.order-box h3 { font-size: 1.15rem; }
.order-box p { margin-bottom: .6em; }
.order-notes { margin: 0 0 .6em; padding-left: 1.2em; font-size: .92rem; color: var(--brown); }
.order-box .contact-buttons { justify-content: flex-start; margin: 1em 0 0; }
.order-box .contact-buttons .btn { flex: 1 1 100%; }
.order-box .hint a { margin-right: 1em; }
.hint { font-size: var(--fs-small); color: var(--muted); margin: .8em 0 0; }
.product-details { margin-top: clamp(32px, 6vw, 56px); display: grid; gap: 24px; }
.detail-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); }
.detail-title { font-size: 1.3rem; padding-left: 12px; border-left: 4px solid var(--red); margin-bottom: 1em; }
.detail-card .prose { line-height: 2; }
.detail-card .prose + .prose { margin-top: 1.2em; }
.price-figure img { max-width: min(100%, 640px); }
.prose { overflow-wrap: anywhere; }
.prose img { margin: 1em auto; border-radius: 6px; }
.prose ul { margin: .5em 0; }
.related { background: var(--cream); padding-top: var(--section-space) !important; }

/* ---- info cards / faq / contact ---- */
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 2.5em 0; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.info-card h2 { font-size: 1.15rem; color: var(--red); }
.info-card ul { margin: 0; padding-left: 1.2em; }
.info-card p:last-child { margin: 0; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 700; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--red); }
.faq details[open] summary::after { content: "−"; }
.faq .prose { padding: 0 20px 16px; color: var(--brown); }
.note-box { background: var(--cream); border-radius: var(--radius); padding: 24px; text-align: center; margin-top: 2em; }
.note-box h2 { font-size: 1.3rem; }
.contact-cards { list-style: none; padding: 0; margin: 2em 0 1em; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.contact-cards li { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); padding: 22px; text-align: center; }
.contact-cards .cc-fb { border-top-color: var(--c-fb); }
.contact-cards .cc-mail { border-top-color: var(--gold); }
.contact-cards h2 { font-size: 1.2rem; }
.contact-cards p { margin: 0 0 .3em; overflow-wrap: anywhere; }
.contact-cards .btn { margin-top: .8em; }
.about .poem { margin: 0 auto 2em; display: flex; justify-content: center; }
.about .prose { font-size: 1.05rem; }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: #e9dccb; padding: 48px 0 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer h2 { font-size: 1.05rem; color: #f3d9a4; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: 32px; }
.footer-logo { margin-bottom: 12px; }
.footer-social { display: flex; gap: 12px; flex-wrap: wrap; }
.copyright { text-align: center; color: #a8968a; font-size: .85rem; border-top: 1px solid rgba(255, 255, 255, .1); margin: 32px 0 0; padding: 16px; }

/* ---- mobile contact bar ---- */
.contact-bar { display: none; }

/* collapsed menu: hidden with display (not translated off-screen, which causes sideways scroll on iOS Safari) */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: fixed; top: var(--header-h, 73px); left: 0; right: 0; bottom: 0; background: var(--black); flex-direction: column; align-items: stretch; padding: 8px 16px 32px; gap: 16px; overflow-y: auto; overscroll-behavior: contain; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 14px 12px; font-size: 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .1); border-radius: 0; }
  .nav-actions { flex-direction: column; }
  .nav-actions .btn { width: 100%; padding: .8em 1em; }
  body.menu-open { overflow: hidden; }
  body.menu-open .contact-bar { display: none; }
}
@media (max-width: 1100px) and (max-height: 640px) {
  .site-nav ul a { padding: 10px 12px; font-size: 1.05rem; }
}
@media (max-width: 960px) {
  .story-grid, .visit-grid, .product, .hero-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 0; min-height: 0; }
  .hero-text { padding: 36px 0 8px; }
  .hero-img { margin: 0 -16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  body { padding-bottom: 64px; }
  .sm-only { display: inline; }
  .logo img { width: 160px; }
  .header-inner { min-height: 60px; }
  :root { --header-h: 61px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 10px 12px 12px; }
  .card-body h3 { font-size: .98rem; }
  .news-cards a { grid-template-columns: 1fr; }
  .contact-bar { display: grid; grid-template-columns: repeat(2, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; box-shadow: 0 -2px 10px rgba(0, 0, 0, .12); padding-bottom: env(safe-area-inset-bottom); background: #fff; }
  .contact-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 60px; color: #fff; text-decoration: none; font-size: .85rem; font-weight: 700; }
  .contact-bar span { font-size: 1.2rem; line-height: 1; }
  .cb-tel { background: var(--red); }
  .cb-fb { background: var(--c-fb); }
}
