/* =========================================================
   玩美手藝 — 手工藝 / 文創商品  共用樣式
   粉色系文青風格 · 全站共用一份 style.css
   ========================================================= */

:root {
  /* 配色 */
  --primary: #d98ba6;          /* 主色 — 玫瑰粉 */
  --primary-dark: #c06a8a;     /* 深粉 — hover / 強調 */
  --primary-soft: #f3d5de;     /* 淺粉 — 區塊底色 */
  --accent: #b98a6f;           /* 暖棕 — 點綴 */
  --bg: #fdf8f5;               /* 米白背景 */
  --bg-alt: #fbeef0;           /* 淡粉區塊背景 */
  --surface: #ffffff;          /* 卡片白 */
  --text: #4a4140;             /* 主文字 — 暖灰棕 */
  --text-soft: #8a807e;        /* 次要文字 */
  --line: #ecdfe0;             /* 分隔線 */

  /* 字體 */
  --font-serif: "Noto Serif TC", "Songti TC", serif;
  --font-sans: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;

  /* 版面 */
  --maxw: 1160px;
  --gutter: clamp(1.2rem, 4vw, 3rem);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(192, 106, 138, 0.10);
  --shadow-hover: 0 14px 38px rgba(192, 106, 138, 0.18);
  --transition: .28s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: clamp(15px, 1vw + 0.6rem, 17px);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.3; color: var(--text); }

/* ---------- 共用容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem, 5vw, 3rem); }
.section-head .eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  letter-spacing: .25em;
  font-size: .78rem;
  color: var(--primary-dark);
  margin-bottom: .8rem;
}
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.section-head p { color: var(--text-soft); margin-top: .8rem; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 500;
  padding: .7em 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn--ghost { background: transparent; color: var(--primary-dark); border-color: var(--primary); }
.btn--ghost:hover { background: var(--primary); color: #fff; }

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 248, 245, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; color: var(--primary-dark); }
.brand .brand-mark { font-size: 1.5rem; }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav-links a { font-size: .95rem; color: var(--text); position: relative; padding: .3rem 0; transition: color var(--transition); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--primary); transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--primary-dark); }
.nav-links a:hover::after, .nav-links a.is-active::after { width: 100%; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: .4rem;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; inset: 72px 0 auto 0;
    flex-direction: column; align-items: flex-start;
    gap: .2rem; padding: 1rem var(--gutter) 1.5rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: var(--transition);
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: .6rem; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(rgba(120, 60, 80, 0.42), rgba(120, 60, 80, 0.42)), var(--hero-img, var(--primary-soft)) center/cover no-repeat;
}
.hero__inner {
  display: flex; flex-direction: column; justify-content: center;
  min-height: clamp(420px, 64vh, 600px);
  padding-block: clamp(3rem, 8vw, 5rem);
  text-align: center; align-items: center;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.6rem); text-shadow: 0 2px 16px rgba(0,0,0,.25); }
.hero p { color: #fff; max-width: 36ch; margin: 1.2rem auto 2rem; font-size: clamp(1rem, 2vw, 1.2rem); text-shadow: 0 1px 10px rgba(0,0,0,.3); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero--page .hero__inner { min-height: clamp(260px, 38vh, 360px); }

/* =========================================================
   分類卡片 (categories)
   ========================================================= */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.6rem);
}
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 5; box-shadow: var(--shadow); transition: var(--transition);
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(120,60,80,.72)); }
.cat-card span {
  position: absolute; left: 0; right: 0; bottom: 1rem; z-index: 2;
  text-align: center; color: #fff; font-family: var(--font-serif);
  font-size: 1.15rem; font-weight: 600; letter-spacing: .05em;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.cat-card:hover img { transform: scale(1.06); }

/* =========================================================
   商品卡片 (products)
   ========================================================= */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: clamp(2rem, 5vw, 3rem); }
.chip {
  font-family: var(--font-sans); font-size: .9rem;
  padding: .45em 1.2em; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; transition: var(--transition);
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
}
.product-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: var(--transition); display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.product-card__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--primary-soft); }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-card__media img { transform: scale(1.05); }
.product-card__tag {
  position: absolute; top: .8rem; left: .8rem;
  background: rgba(255,255,255,.92); color: var(--primary-dark);
  font-size: .72rem; padding: .25em .8em; border-radius: 999px; font-weight: 500;
}
.product-card__body { padding: 1.1rem 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.product-card__body h3 { font-size: 1.08rem; }
.product-card__body p { font-size: .85rem; color: var(--text-soft); flex: 1; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: .6rem; }
.product-card__price { font-family: var(--font-serif); font-size: 1.2rem; color: var(--primary-dark); font-weight: 600; }
.product-card__price small { font-size: .75rem; color: var(--text-soft); font-weight: 400; }
.product-card__btn {
  font-size: .82rem; padding: .45em 1em; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark); transition: var(--transition);
}
.product-card:hover .product-card__btn { background: var(--primary); color: #fff; }
.is-hidden { display: none !important; }

/* =========================================================
   品牌故事 / 圖文區塊 (split)
   ========================================================= */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.split__text .eyebrow { display: inline-block; letter-spacing: .25em; font-size: .78rem; color: var(--primary-dark); margin-bottom: .8rem; }
.split__text h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 1rem; }
.split__text p { color: var(--text-soft); margin-bottom: 1rem; }

/* ---------- 特色 / 價值 (features) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(1.4rem, 3vw, 2rem); }
.feature { text-align: center; padding: 1.5rem 1rem; }
.feature__icon { font-size: 2rem; margin-bottom: .8rem; }
.feature h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.feature p { color: var(--text-soft); font-size: .92rem; }

/* =========================================================
   關於頁 / 內文
   ========================================================= */
.prose { max-width: 720px; margin-inline: auto; }
.prose p { margin-bottom: 1.2rem; color: var(--text-soft); }
.prose h3 { margin: 2rem 0 .8rem; color: var(--primary-dark); }

/* =========================================================
   聯絡頁
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(2rem, 5vw, 3.5rem); }
.contact-info li { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1.2rem; }
.contact-info .ci-icon { font-size: 1.3rem; }
.contact-info strong { display: block; font-family: var(--font-serif); }
.contact-info span { color: var(--text-soft); font-size: .92rem; }
.form { background: var(--surface); padding: clamp(1.5rem, 4vw, 2.4rem); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .88rem; margin-bottom: .4rem; font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: .75em 1em; font: inherit; font-size: .95rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); transition: var(--transition);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field textarea { resize: vertical; min-height: 130px; }

/* =========================================================
   CTA 區塊
   ========================================================= */
.cta-band { background: var(--primary-soft); border-radius: var(--radius); text-align: center; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter); }
.cta-band h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: .8rem; }
.cta-band p { color: var(--text-soft); max-width: 46ch; margin: 0 auto 1.8rem; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: #3b2f31; color: #e7dcdd; padding-block: clamp(2.8rem, 6vw, 4rem) 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(auto-fit, minmax(150px, 1fr)); gap: 2rem; }
.site-footer .brand { color: #fff; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col p, .footer-col a { color: #c9bcbd; font-size: .9rem; }
.footer-col li { margin-bottom: .6rem; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.5rem; text-align: center; font-size: .82rem; color: #a89c9d; }

/* ---------- 工具 ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
