/* 栗子窩 — colors taken from the store banner / avatar artwork */
:root {
  --cream: #F3E7DA;
  --cream-2: #FAF4ED;
  --paper: #FFFFFF;
  --sand: #E3C49A;
  --line-soft: #EADBC8;
  --brown: #5A3418;
  --brown-2: #9C5A33;
  --text: #3B2414;
  --muted: #8A6B52;
  --green: #7FA65A;
  --pink: #E07D74;
  --shop: #E8722C;      /* 7-11 賣貨便 orange */
  --line: #06C755;      /* LINE green */
  --radius: 18px;
  --shadow: 0 2px 10px rgba(90, 52, 24, .08);
  --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream-2);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brown-2); }
h1, h2, h3 { color: var(--brown); line-height: 1.3; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); filter: brightness(1.04); }
.btn-primary { background: var(--brown-2); color: #fff; }
.btn-shop { background: var(--shop); color: #fff; }
.btn-line { background: var(--line); color: #fff; }
.btn-sm { padding: 7px 16px; font-size: 14px; }
.btn-lg { padding: 15px 28px; font-size: 17px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 244, 237, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brown); font-weight: 800; font-size: 20px; letter-spacing: .08em; }
.brand img { border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--brown-2); }

/* hero */
.hero { background: var(--cream); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(52px, 9vw, 96px); letter-spacing: .12em; font-weight: 900; }
.hero-tagline { font-size: clamp(20px, 3vw, 28px); color: var(--brown-2); font-weight: 700; margin: 6px 0 18px; }
.hero-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 16px; }
.hero-tags li { background: #fff; border: 2px solid var(--sand); border-radius: 999px; padding: 4px 16px; font-weight: 700; color: var(--brown); }
.hero-sub { color: var(--muted); margin: 0 0 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { width: 100%; height: auto; max-width: 480px; justify-self: center; border-radius: 32px; }

/* sections */
.section { padding: 64px 0; }
.section-title { font-size: 28px; margin-bottom: 24px; }

/* products */
.products-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.products-head .section-title { margin-bottom: 0; }
.search {
  font: inherit; padding: 10px 18px; border-radius: 999px; min-width: 240px;
  border: 2px solid var(--line-soft); background: #fff; color: var(--text);
}
.search:focus { outline: none; border-color: var(--sand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.chip {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 6px 16px; border-radius: 999px;
  border: 2px solid var(--line-soft); background: #fff; color: var(--brown);
}
.chip small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.chip.is-active { background: var(--brown-2); border-color: var(--brown-2); color: #fff; }
.chip.is-active small { color: #F3E7DA; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(90, 52, 24, .14); }
.card-img { position: relative; aspect-ratio: 1; background: var(--cream); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 12px; font-weight: 700; color: var(--green); letter-spacing: .05em; }
.card-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { margin-top: auto; font-size: 18px; font-weight: 800; color: var(--pink); }
.card.is-sold .card-img img { opacity: .5; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-sold { background: #6B5A4C; color: #fff; }
.card-img .badge { position: absolute; top: 10px; left: 10px; }
.badge-ok { background: #EAF3E1; color: #4E7A2B; }

.empty { text-align: center; color: var(--muted); padding: 32px 0; }
.synced { color: var(--muted); font-size: 13px; margin-top: 28px; text-align: center; }

/* how to buy */
.how { background: var(--cream); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step-no {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brown-2); color: #fff; font-weight: 800; margin-bottom: 10px;
}
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); }
.how-note { margin: 24px 0 0; text-align: center; }

/* about */
.about-lead { font-size: 18px; max-width: 640px; margin: 0 0 28px; }
.family { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.member { background: #fff; border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); }
.member img { width: 120px; height: 120px; margin: 0 auto 12px; object-fit: contain; }
.member h3 { font-size: 20px; margin-bottom: 4px; }
.member p { margin: 0; color: var(--muted); }

/* LINE */
.line-box { background: var(--cream); padding: 48px 0; }
.line-inner { display: flex; align-items: center; gap: 32px; justify-content: center; flex-wrap: wrap; }
.line-inner img { border-radius: 16px; background: #fff; padding: 8px; box-shadow: var(--shadow); }
.line-inner h2 { font-size: 24px; margin-bottom: 8px; }
.line-inner p { margin: 0 0 16px; }

/* footer */
.site-footer { background: var(--brown); color: #F3E7DA; padding: 28px 0; font-size: 14px; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* product page */
.crumbs { padding-top: 20px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brown-2); }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 20px; padding-bottom: 48px; align-items: start; }
.gallery { position: sticky; top: 84px; }
.gallery-main { background: #fff; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--brown-2); }
.info h1 { font-size: 26px; margin: 6px 0 14px; }
.price-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.price { font-size: 32px; font-weight: 800; color: var(--pink); }
.buy { display: flex; flex-wrap: wrap; gap: 12px; }
.buy-tip { color: var(--muted); font-size: 14px; margin: 10px 0 24px; }
.specs, .desc { background: #fff; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.specs h2, .desc h2 { font-size: 17px; margin-bottom: 10px; }
.specs ul { list-style: none; padding: 0; margin: 0; }
.specs li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line-soft); }
.specs li:first-child { border-top: 0; }
.specs li.is-sold { color: var(--muted); text-decoration: line-through; }
.desc p { margin: 0 0 12px; }
.desc p:last-child { margin-bottom: 0; }
.related { padding-top: 16px; }

/* mobile */
@media (max-width: 820px) {
  .nav a:not(.btn) { display: none; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-tags, .hero-cta { justify-content: center; }
  .hero-art { max-width: 280px; grid-row: 1; }
  .steps, .family { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .gallery { position: static; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .search { min-width: 0; width: 100%; }
  .section { padding: 44px 0; }
  .card-body { padding: 10px 12px 14px; }
  .card-price { font-size: 16px; }
}
