/* =====================================================
   Custom Joinery — responsive bilingual theme
   Palette: warm oak + deep forest green
   ===================================================== */
:root {
  --green: #1e382f;
  --green-2: #27493d;
  --oak: #c49e70;
  --oak-d: #9c764e;
  --cream: #f5f1e8;
  --paper: #faf8f3;
  --ink: #23241f;
  --muted: #6f6a5f;
  --line: #e4ddcf;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(30, 56, 47, .10);
  --max: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink); background: var(--paper); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 10px; top: 10px; background: var(--green); color: #fff; padding: 8px 14px; z-index: 99; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,248,243,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; max-width: var(--max); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--green); font-size: 1.15rem; }
.brand-logo { width:116px; height:auto; object-fit:contain; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--green); color: var(--oak); font-size: 1.2rem; }
.brand-text small { display: block; font-weight: 500; color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 20px; font-size: .95rem; }
.main-nav a { color: var(--ink); }
.main-nav a.active { color: var(--green); font-weight: 700; }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--green); margin: 5px 0; border-radius: 2px; }

/* buttons */
.btn { display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 700; transition: .2s; border: 0; cursor: pointer; font-size: .95rem; }
.btn-primary { background: var(--green); color: #fff !important; }
.btn-primary:hover { background: var(--green-2); text-decoration: none; transform: translateY(-1px); }
.btn-outline { border: 2px solid var(--green); color: var(--green) !important; }
.btn-outline:hover { background: var(--green); color: #fff !important; text-decoration: none; }
.btn-nav { background: var(--green); color: #fff !important; padding: 9px 20px; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* hero */
.hero { position: relative; min-height: 74vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(20,38,32,.86) 18%, rgba(20,38,32,.45) 55%, rgba(20,38,32,.15)); }
.hero .container { position: relative; z-index: 2; padding: 90px 20px; max-width: 820px; margin-right: auto; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.15; letter-spacing: -.01em; }
.hero p { margin: 18px 0 30px; font-size: clamp(1rem, 1.6vw, 1.2rem); color: #e9e4d8; max-width: 620px; }
.hero .eyebrow { color: var(--oak); text-transform: uppercase; letter-spacing: .2em; font-weight: 700; font-size: .8rem; margin-bottom: 14px; display: block; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* stat strip */
.stats { background: var(--green); color: #fff; }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 34px 20px; text-align: center; }
.stats b { font-size: 1.7rem; color: var(--oak); display: block; }
.stats span { font-size: .88rem; color: #cfd8d2; }

/* sections */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 46px; }
.section-head .eyebrow { color: var(--oak-d); text-transform: uppercase; letter-spacing: .18em; font-weight: 700; font-size: .78rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--green); margin: 8px 0 10px; }
.section-head p { color: var(--muted); }

/* grids & cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .25s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(30,56,47,.16); }
.card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card .body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card .cat { color: var(--oak-d); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.card h3 { color: var(--green); font-size: 1.12rem; margin: 6px 0 8px; line-height: 1.35; }
.card p { color: var(--muted); font-size: .92rem; flex: 1; }
.card .more { margin-top: 14px; font-weight: 700; }
.center { text-align: center; margin-top: 40px; }

/* category tile */
.cat-tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; display: block; }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile .label { position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; background: linear-gradient(transparent, rgba(20,38,32,.85)); color: #fff; font-weight: 700; }

/* why us */
.why { background: var(--cream); }
.why-item { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.why-item .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--green); color: var(--oak); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 16px; }
.why-item h3 { color: var(--green); margin-bottom: 8px; }
.why-item p { color: var(--muted); font-size: .94rem; }

/* split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* product image gallery */
.pgallery { min-width: 0; }
.pgallery-stage { position: relative; aspect-ratio: 1600/1100; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--cream); }
.pgallery-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease; pointer-events: none; }
.pgallery-slide.is-active { opacity: 1; pointer-events: auto; }
.pgallery-slide picture, .pgallery-slide img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: none; }
.pgallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.86); color: var(--green); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.pgallery-nav:hover { background: #fff; }
.pgallery-prev { left: 12px; }
.pgallery-next { right: 12px; }
.pgallery-count { position: absolute; right: 14px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(30,56,47,.78); color: #fff; font-size: .78rem; letter-spacing: .04em; }
.pgallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pgallery-thumb { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; opacity: .65; transition: .2s; }
.pgallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 5px; }
.pgallery-thumb:hover, .pgallery-thumb.is-active { opacity: 1; border-color: var(--green); }
.split h2 { color: var(--green); font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
.split p { color: var(--muted); margin-bottom: 14px; }
.checklist { list-style: none; margin: 18px 0 26px; }
.checklist li { padding: 6px 0 6px 32px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--oak); color: #fff; font-size: .8rem; display: grid; place-items: center; font-weight: 700; }

/* CTA band */
.cta-band { background: var(--green); color: #fff; text-align: center; border-radius: 20px; padding: 64px 24px; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 12px; color: #fff; }
.cta-band p { color: #ffffff; margin-bottom: 28px; opacity: 1; }
.cta-band a { color: #fff; }

/* article */
.prose { max-width: 800px; margin: 0 auto; }
.prose h2 { color: var(--green); margin: 34px 0 12px; font-size: 1.45rem; }
.prose h3 { color: var(--green-2); margin: 26px 0 10px; font-size: 1.18rem; }
.prose p, .prose li { color: #3c3a33; margin-bottom: 12px; }
.prose ul { padding-left: 22px; }
.prose .cta-band p, .prose .cta-band h2 { color: #ffffff; }
.prose img { border-radius: var(--radius); margin: 20px 0; }
.meta { color: var(--muted); font-size: .88rem; margin-bottom: 24px; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 22px 0; }
.breadcrumb a { color: var(--muted); }

/* forms */
.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px; max-width: 640px; margin: 0 auto; }
.form-card label { font-weight: 600; font-size: .9rem; display: block; margin: 14px 0 6px; }
.form-card input, .form-card textarea, .form-card select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--paper);
}
.form-card input:focus, .form-card textarea:focus { outline: 2px solid var(--oak); border-color: transparent; }
.notice { padding: 14px 18px; border-radius: 10px; margin: 16px 0; font-size: .93rem; }
.notice.ok { background: #e7f2ec; color: #1e5c40; }
.notice.err { background: #f8e7e4; color: #8c3125; }

/* table */
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.spec-table th, .spec-table td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: .93rem; }
.spec-table th { background: var(--cream); color: var(--green); width: 30%; }

/* footer */
.site-footer { background: #14251f; color: #cfd8d2; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 36px; padding: 60px 20px 40px; }
.site-footer h3 { color: #fff; margin-bottom: 12px; }
.site-footer h4 { color: var(--oak); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; margin-bottom: 14px; }
.site-footer a { display: block; color: #cfd8d2; padding: 4px 0; font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: .93rem; }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); font-size: .72rem; font-weight: 700; }
.social a:hover { background: var(--oak); color: #14251f; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255,255,255,.1); padding: 20px; font-size: .85rem; }
.muted { color: var(--muted); }
.site-footer .muted { color: #8ba096; }

.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.wa-float:hover { transform: scale(1.06); text-decoration: none; }

.post-nav { margin: 44px 0; gap: 16px; }
.post-nav-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; transition: .2s; }
.post-nav-card:hover { border-color: var(--oak); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.post-nav-card span { color: var(--oak-d); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.post-nav-card b { color: var(--green); font-size: .98rem; line-height: 1.4; }
.post-nav-card.next { text-align: right; }

/* pagination */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pager a, .pager span { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: .9rem; }
.pager .cur { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 18px 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  body.nav-open .main-nav { display: flex; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .brand-logo { width:88px; }
  .pgallery-thumb { width:52px; height:52px; }
  section { padding: 52px 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero { min-height: 66vh; }
  .hero .container { padding: 60px 20px; }
}

/* ================= AEO lightweight blocks (v1.5) ================= */
.aeo-answer {
  background: linear-gradient(180deg, #fdfbf6, #f8f4ea);
  border-left: 4px solid var(--oak);
  border-radius: 0 12px 12px 0;
  padding: 16px 22px; margin: 0 auto 34px; max-width: 760px;
}
.aeo-answer-label { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--oak-d); margin-bottom: 4px; }
.aeo-answer p { margin: 0; font-size: .98rem; color: #2a2c26; }

.aeo-takeaways { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 24px; margin: 26px auto; max-width: 760px; box-shadow: var(--shadow); }
.aeo-takeaways strong { color: var(--green); font-size: .95rem; display: block; margin-bottom: 8px; }
.aeo-takeaways ul { list-style: none; margin: 0; }
.aeo-takeaways li { position: relative; padding: 3px 0 3px 22px; font-size: .9rem; color: #3c3a33; }
.aeo-takeaways li::before { content: "✓"; position: absolute; left: 0; color: var(--oak); font-weight: 700; }

.aeo-ace { margin: 26px 0; }
.aeo-ace h2, .aeo-ace h3 { color: var(--green); margin-bottom: 12px; }
.aeo-ace-a, .aeo-ace-c, .aeo-ace-e { padding: 13px 18px; border-radius: 10px; margin-bottom: 8px; font-size: .93rem; }
.aeo-ace-a { background: #eaf3ee; border: 1px solid #d3e4da; }
.aeo-ace-c { background: #fbf7ee; border: 1px solid #eee2c8; }
.aeo-ace-e { background: #f4f5f7; border: 1px solid var(--line); }
.aeo-ace span { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--oak-d); margin-bottom: 3px; }
.aeo-ace p { margin: 0; color: #333a34; }

.aeo-panel, .aeo-faq { margin: 22px auto; max-width: 760px; }
.aeo-panel > summary, .aeo-faq-item > summary {
  cursor: pointer; list-style: none; padding: 12px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  font-weight: 600; color: var(--green); font-size: .93rem; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.aeo-panel > summary::-webkit-details-marker, .aeo-faq-item > summary::-webkit-details-marker { display: none; }
.aeo-panel > summary::after, .aeo-faq-item > summary::after { content: "+"; color: var(--oak); font-weight: 700; flex-shrink: 0; }
details[open] > summary::after { content: "−"; }
.aeo-panel-body, .aeo-faq-a { padding: 4px 6px 14px; font-size: .92rem; color: #45413a; }

.aeo-tablewrap { overflow-x: auto; margin: 16px 0; }
.aeo-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: .9rem; }
.aeo-table caption { text-align: left; font-size: .8rem; color: var(--muted); padding: 0 0 6px; }
.aeo-table th, .aeo-table td { padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--line); }
.aeo-table thead th { background: var(--green); color: #fff; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.aeo-table tbody th { background: var(--cream); color: var(--green); font-weight: 600; }

@media (max-width: 600px) {
  .aeo-answer { padding: 13px 16px; }
  .aeo-takeaways { padding: 15px 18px; }
  .aeo-tablewrap { margin: 14px -18px; }
  .aeo-table { min-width: 520px; }
}
.aeo-byline { display:block; font-size:.74rem; color:var(--muted,#7a756a); margin-top:6px; }

/* phone field with country dial-code selector */
.phone-row { display: flex; gap: 10px; }
.phone-row select { flex: 0 0 190px; width: 190px; }
.phone-row input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 600px) {
  .phone-row { flex-direction: column; gap: 8px; }
  .phone-row select { width: 100%; flex: none; }
}
