/* 就是愛美麗 力曼商城 — 依「就是愛美麗 CIS 品牌手冊 v1」：露白為主場、墨承載文字、촉촉綠點綴；圓潤大圓角；Noto Sans TC ＋ Baloo 2 */
:root {
  --paper: #FCFCFA;
  --ink: #312D43;
  --ink-soft: #66627A;
  --green: #C6D6B6;
  --green-soft: #E9EFE1;
  --leaf: #3A4A2A;
  --sand: #F4F2EC;
  --line: #E4E2DA;
  --danger: #B5573A;
  --ok: #3F7A5A;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;
  --font-tc: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-en: "Baloo 2", "Noto Sans TC", sans-serif;
  --container: 1160px;
  --gutter: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-tc); font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; text-wrap: balance; font-weight: 700; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 18px; }
p { margin: 0 0 14px; }
.en { font-family: var(--font-en); }
.num { font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 頂部 ── */
.topbar {
  background: var(--green); color: var(--ink); font-size: 13px; text-align: center;
  padding: 7px var(--gutter); letter-spacing: .02em;
}
.topbar b { font-weight: 700; }
.header {
  position: sticky; top: 0; z-index: 50; background: rgba(252, 252, 250, .94);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--green-soft); text-decoration: none; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 14px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--paper);
  font-weight: 700; cursor: pointer;
}
.cart-btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.cart-btn svg { width: 20px; height: 20px; }
.cart-btn .count {
  font-family: var(--font-en); font-size: 13px; line-height: 1; padding: 4px 8px;
  background: var(--green); color: var(--ink); border-radius: 999px; min-width: 22px; text-align: center;
}
.cart-btn .count[hidden] { display: none; }

/* ── 通用元件 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: 16px;
  cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; background: #46405e; border-color: #46405e; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--green-soft); }
.btn.green { background: var(--green); border-color: var(--green); color: var(--ink); }
.btn.green:hover { background: #b6c9a3; border-color: #b6c9a3; }
.btn.block { width: 100%; }
.btn.lg { padding: 16px 32px; font-size: 17px; }
.tag {
  display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--green);
  color: var(--ink); font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
}
.tag.soft { background: var(--green-soft); }
.eyebrow {
  font-family: var(--font-en); font-weight: 700; font-size: 14px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--leaf); margin-bottom: 10px; display: block;
}
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; list-style: none; }
.pill-list li { padding: 5px 12px; border-radius: 999px; background: var(--green-soft); font-size: 14px; }
.section { padding-block: 64px; }
.section.tint { background: var(--green-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head p { color: var(--ink-soft); margin: 0; max-width: 60ch; }
.card-photo { border-radius: var(--r-lg); overflow: hidden; background: var(--sand); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ── 首頁 hero ── */
.hero { padding-block: 56px 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { font-size: 17px; color: var(--ink-soft); max-width: 46ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-photo { position: relative; }
.hero-photo .card-photo { aspect-ratio: 4 / 5; }
.sticker {
  position: absolute; left: -22px; bottom: 34px; width: 112px; height: 112px;
  background: var(--green); border-radius: 26px; display: grid; place-items: center;
  transform: rotate(-7deg); box-shadow: 0 12px 30px rgba(49, 45, 67, .14);
}
.sticker img { width: 64px; height: 64px; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.trust > div {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: #fff;
}
.trust > div > div { flex: 1; min-width: 0; }
.trust .ico { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--green-soft); display: grid; place-items: center; }
.trust .ico svg { width: 22px; height: 22px; }
.trust b { display: block; font-size: 15px; }
.trust span { font-size: 13.5px; color: var(--ink-soft); }

/* ── 三大系列 ── */
.brand-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.brand-card { display: block; border-radius: var(--r-lg); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease; }
.brand-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(49, 45, 67, .10); text-decoration: none; }
.brand-card .card-photo { aspect-ratio: 4 / 3; border-radius: 0; }
.brand-card .body { padding: 20px 22px 24px; }
.brand-card .en { font-size: 13px; letter-spacing: .14em; color: var(--leaf); text-transform: uppercase; font-weight: 700; }
.brand-card h3 { margin: 4px 0 6px; font-size: 20px; }
.brand-card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ── 商品卡 ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; gap: 10px; }
.card .card-photo { aspect-ratio: 1 / 1; }
.card .card-photo img { transition: transform .3s ease; }
.card:hover .card-photo img { transform: scale(1.03); }
.card:hover { text-decoration: none; }
.card .tag { align-self: flex-start; }
.card .name { font-weight: 500; font-size: 15.5px; line-height: 1.45; }
.card .name small { display: block; color: var(--ink-soft); font-size: 12.5px; font-family: var(--font-en); letter-spacing: .02em; }
.price { font-family: var(--font-en); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.price small { font-size: 13px; font-weight: 600; margin-right: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  cursor: pointer; font-size: 14.5px; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.empty-note { color: var(--ink-soft); padding: 40px 0; text-align: center; }

/* ── 購物流程 ── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.steps div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 20px 20px; position: relative; }
.steps div::before {
  counter-increment: step; content: counter(step);
  font-family: var(--font-en); font-weight: 700; font-size: 22px; line-height: 1;
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--green); margin-bottom: 12px;
}
.steps b { display: block; margin-bottom: 4px; }
.steps span { font-size: 14px; color: var(--ink-soft); }

/* ── 商品頁 ── */
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; padding-block: 40px 64px; }
.gallery-main { aspect-ratio: 1 / 1; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs button { width: 76px; height: 76px; padding: 0; border: 2px solid transparent; border-radius: 14px; overflow: hidden; background: var(--sand); cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 4px; }
.pdp-info .en-name { font-family: var(--font-en); color: var(--ink-soft); font-size: 15px; margin-bottom: 14px; }
.pdp-info .price { font-size: 30px; margin-bottom: 4px; }
.pdp-info .size { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }
.pdp-info .blurb { font-size: 16px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 500; font-size: 14.5px; margin-bottom: 6px; }
select, input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; min-height: 46px;
}
select:focus, input:focus, textarea:focus { border-color: var(--ink); outline: none; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; font-size: 20px; font-family: var(--font-en); }
.qty button:hover { background: var(--green-soft); }
.qty input { width: 52px; min-height: 0; text-align: center; border: 0; padding: 0; font-family: var(--font-en); font-weight: 700; font-size: 17px; border-radius: 0; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input { -moz-appearance: textfield; appearance: textfield; }
.buy-row { display: flex; gap: 14px; align-items: center; margin: 8px 0 22px; flex-wrap: wrap; }
.notes { list-style: none; padding: 18px 20px; margin: 0; background: var(--green-soft); border-radius: var(--r-md); font-size: 14px; }
.notes li { display: flex; gap: 10px; padding-block: 4px; }
.notes li::before { content: "✓"; color: var(--leaf); font-weight: 700; }
.breadcrumb { font-size: 13.5px; color: var(--ink-soft); padding-top: 18px; }
.breadcrumb a:hover { color: var(--ink); }

/* ── 購物車／結帳 ── */
.page-head { padding-block: 44px 28px; }
.page-head p { color: var(--ink-soft); margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 36px; align-items: start; padding-bottom: 72px; }
.cart-rows { display: flex; flex-direction: column; gap: 14px; }
.row {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px;
}
.row .card-photo { width: 92px; height: 92px; border-radius: 14px; }
.row .info b { display: block; font-weight: 500; }
.row .info span { color: var(--ink-soft); font-size: 13.5px; }
.row .info .qty { margin-top: 8px; }
.row .right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.row .remove { border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.row .remove:hover { color: var(--danger); }
.summary { position: sticky; top: 92px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.summary h3 { margin-bottom: 14px; }
.summary .line { display: flex; justify-content: space-between; padding-block: 7px; font-size: 15px; }
.summary .line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-weight: 700; font-size: 17px; }
.summary .hint { font-size: 13px; color: var(--ink-soft); margin: 10px 0 16px; }
.summary .mini { display: flex; gap: 10px; align-items: center; font-size: 14px; padding-block: 6px; }
.summary .mini img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--sand); }
.summary .mini .n { flex: 1; line-height: 1.35; }
.summary .mini .n small { display: block; color: var(--ink-soft); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; margin-bottom: 20px; }
.form-card h3 { margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.form-card h3 .step { font-family: var(--font-en); width: 30px; height: 30px; border-radius: 9px; background: var(--green); display: inline-grid; place-items: center; font-size: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.choices { display: grid; gap: 10px; margin-bottom: 16px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--green-soft); }
.choice input { margin-top: 5px; accent-color: var(--ink); }
.choice b { display: block; font-weight: 700; }
.choice span { font-size: 13.5px; color: var(--ink-soft); }
.choice .fee { margin-left: auto; font-family: var(--font-en); font-weight: 700; white-space: nowrap; }
.err { color: var(--danger); font-size: 13.5px; margin: -8px 0 12px; }
.err:empty { display: none; }
.alert { padding: 14px 18px; border-radius: 14px; background: #FBEDE8; color: var(--danger); margin-bottom: 18px; }
.alert:empty { display: none; }
[hidden] { display: none !important; }

/* ── 內容頁 ── */
.prose { max-width: 72ch; padding-bottom: 72px; }
.prose h2 { font-size: 22px; margin-top: 36px; }
.prose h3 { margin-top: 24px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { border-collapse: collapse; width: 100%; margin: 14px 0 22px; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--green-soft); font-weight: 700; }
.info-box { background: var(--green-soft); border-radius: var(--r-md); padding: 20px 24px; margin: 18px 0; }
.info-box b { display: block; }
.thanks { text-align: center; padding-block: 56px 24px; }
.thanks .sticker-inline { width: 88px; height: 88px; border-radius: 22px; background: var(--green); display: grid; place-items: center; margin: 0 auto 20px; }
.thanks .sticker-inline img { width: 50px; }
.thanks .oid { font-family: var(--font-en); font-size: 28px; font-weight: 700; letter-spacing: .04em; }
.order-box { max-width: 640px; margin: 0 auto 72px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 28px; }
.order-box .line { display: flex; justify-content: space-between; gap: 16px; padding-block: 7px; border-bottom: 1px dashed var(--line); font-size: 15px; }
.order-box .line:last-child { border-bottom: 0; font-weight: 700; }
.empty { text-align: center; padding: 56px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty img { width: 64px; margin: 0 auto 14px; opacity: .8; }

/* ── 頁尾 ── */
.footer { background: var(--leaf); color: var(--paper); margin-top: 40px; }
.footer .container { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; padding-block: 52px 32px; }
.footer img { height: 54px; width: auto; margin-bottom: 14px; }
.footer p, .footer li { font-size: 14px; color: rgba(252, 252, 250, .82); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer h4 { margin: 0 0 12px; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-en); color: var(--green); }
.footer .company b { color: var(--paper); font-size: 16px; display: block; margin-bottom: 4px; }
.footer .company a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.footer .bottom { border-top: 1px solid rgba(252, 252, 250, .18); }
.footer .bottom .container { display: flex; justify-content: space-between; gap: 12px; padding-block: 16px; font-size: 12.5px; color: rgba(252, 252, 250, .7); flex-wrap: wrap; }

/* ── toast ── */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px;
  font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── RWD ── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-photo .card-photo { aspect-ratio: 4 / 3; }
  .sticker { left: 12px; bottom: -18px; width: 88px; height: 88px; }
  .sticker img { width: 50px; height: 50px; }
  .trust, .steps { grid-template-columns: 1fr 1fr; }
  .brand-cards { grid-template-columns: 1fr; }
  .pdp { grid-template-columns: 1fr; gap: 28px; }
  .two-col { grid-template-columns: 1fr; }
  .summary { position: static; }
  .footer .container { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .header .container { flex-wrap: wrap; row-gap: 0; min-height: 64px; padding-block: 10px; }
  .brand img { height: 38px; }
  .nav { order: 3; width: 100%; margin: 6px 0 0; overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .nav a { white-space: nowrap; padding: 6px 11px; font-size: 14px; }
  .cart-btn { margin-left: auto; padding: 8px 14px 8px 12px; }
  .cart-btn .label { display: none; }
  .section { padding-block: 44px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .trust, .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 20px 18px; }
  .row { grid-template-columns: 72px 1fr; }
  .row .card-photo { width: 72px; height: 72px; }
  .row .right { grid-column: 2; flex-direction: row; justify-content: space-between; width: 100%; align-items: center; }
  .thumbs button { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
