/* 真的好菜 OMGreens — 前台樣式
   風格:乾淨留白、大地綠、襯線大標題、圓角卡片、細緻動效 */
:root {
  --g950: #0e2a19; --g900: #14361f; --g800: #1a4a2b; --g700: #1f6b3a; --g600: #2b8049; --g500: #3a9d5d; --g300: #9fd2b0; --g200: #cde8d6; --g100: #e6f2e8; --g50: #f3f8f2;
  --cream: #faf7ef; --sand: #f1ecde;
  --ink: #1b2a21; --muted: #556a5e; --line: #e1e8dd; --bg: #fffefa;
  --berry: #8e2a3a; --berry-bg: #f9e7e6; --plum: #5d3a7a; --plum-bg: #efe7f5;
  --warn: #b45309; --ice: #e8f3fb; --ice-ink: #1b5a87;
  --radius: 20px; --radius-sm: 12px;
  --shadow: 0 14px 40px rgba(20, 54, 31, .12); --shadow-sm: 0 4px 14px rgba(20, 54, 31, .08);
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "MingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22, .8, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.75; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--g700); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
h1, h2, h3 { line-height: 1.28; margin: 0 0 .5em; letter-spacing: .01em; }
h1, h2 { font-family: var(--serif); font-weight: 700; color: var(--g900); }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); }
.eyebrow { color: var(--g600); font-weight: 700; letter-spacing: .18em; font-size: .8rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; }

/* header */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 254, 250, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid rgba(225, 232, 221, .8); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 900; font-size: 1.3rem; color: var(--g900); text-decoration: none; }
.logo::before { content: ""; width: 30px; height: 30px; border-radius: 50% 8% 50% 8%; background: linear-gradient(135deg, var(--g500), var(--g800)); transform: rotate(-8deg); flex: none; }
.logo small { font-family: var(--sans); font-weight: 600; color: var(--muted); font-size: .72rem; letter-spacing: .14em; }
.head-r { display: flex; align-items: center; gap: 6px; }
nav a { white-space: nowrap; margin-left: 4px; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .94rem; font-weight: 500; transition: background .2s, color .2s; }
nav a:hover { background: var(--g100); color: var(--g800); }
.cart-btn { white-space: nowrap; position: relative; border: 0; background: var(--g800); color: #fff; border-radius: 999px; padding: 9px 18px; font: inherit; font-size: .94rem; font-weight: 600; cursor: pointer; margin-left: 10px; display: inline-flex; align-items: center; gap: 8px; transition: background .2s, transform .2s var(--ease); }
.cart-btn:hover { background: var(--g950); }
.cart-btn:active { transform: scale(.96); }
.cart-btn b { background: #fff; color: var(--g800); border-radius: 999px; min-width: 22px; height: 22px; line-height: 22px; text-align: center; font-size: .78rem; }
.cart-btn.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; background: var(--g800); color: #fff; padding: 14px 28px; border-radius: 999px; font: inherit; font-size: 1rem; font-weight: 700; text-decoration: none; transition: background .2s, transform .2s var(--ease), box-shadow .2s; }
.btn:hover { background: var(--g950); box-shadow: 0 8px 20px rgba(20, 54, 31, .22); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost { background: transparent; color: var(--g800); box-shadow: inset 0 0 0 2px var(--g800); margin-left: 10px; }
.btn.ghost:hover { background: var(--g800); color: #fff; }
.btn.sm { padding: 10px 18px; font-size: .92rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* hero */
.hero { background: radial-gradient(900px 520px at 88% 0, #dcefd9 0, transparent 62%), radial-gradient(600px 400px at 0 100%, #f3ecd6 0, transparent 70%), var(--cream); padding: 80px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; gap: 48px; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); line-height: 1.18; letter-spacing: .02em; margin-bottom: .45em; }
.hero h1 em { font-style: normal; color: var(--g600); position: relative; white-space: nowrap; isolation: isolate; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .08em; height: .22em; background: rgba(159, 210, 176, .55); z-index: -1; border-radius: 6px; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 32em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 30px; padding: 0; list-style: none; }
.chip { background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 999px; padding: 6px 15px; font-size: .9rem; font-weight: 600; color: var(--g800); }
.chip.ice { background: var(--ice); color: var(--ice-ink); border-color: #c9e3f3; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cta .btn.ghost { margin-left: 0; }
.hero-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero-art > svg { width: 100%; height: 100%; filter: drop-shadow(0 24px 40px rgba(20, 54, 31, .18)); }
.hero-art .float { position: absolute; background: #fff; border-radius: 16px; padding: 10px 16px; box-shadow: var(--shadow); line-height: 1.25; animation: floaty 6s ease-in-out infinite; }
.hero-art .float b { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--g700); }
.hero-art .float span { font-size: .78rem; color: var(--muted); }
.hero-art .f1 { left: -2%; top: 14%; }
.hero-art .f2 { right: -2%; bottom: 12%; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-9px); } }
/* 商品頁沿用 hero-art 放 emoji */
.hero-art:not(:has(svg)) { aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d7efdd, #7cc795 62%, #3a9d5d); font-size: 8rem; box-shadow: var(--shadow); }

/* trust bar */
.trust { background: var(--g900); color: #dcebe0; padding: 0; }
.trust ul { list-style: none; margin: 0; padding: 20px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.trust li { display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.trust li span.i { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.trust b { color: #fff; display: block; line-height: 1.3; }

/* sections */
section { padding: 88px 0; }
section.tint { background: var(--g50); }
section.sand { background: var(--cream); }
.sec-head { max-width: 40em; margin-bottom: 40px; }
.sec-head p { margin: 0; }
.grid3 { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.grid4 { display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.card:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.card .ico { width: 52px; height: 52px; border-radius: 16px; background: var(--g100); display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 14px; }
.card h3 { font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* big numbers */
.why-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.big { border-radius: var(--radius); padding: 30px 28px; background: #fff; border: 1px solid var(--line); position: relative; overflow: hidden; }
.big.dark { background: var(--g800); color: #dcebe0; border-color: transparent; }
.big.dark h3, .big.dark .num { color: #fff; }
.big .num { font-family: var(--serif); font-weight: 900; font-size: clamp(3rem, 6vw, 4.4rem); line-height: 1; color: var(--g700); display: block; margin-bottom: 10px; }
.big .num small { font-size: .4em; margin-left: 4px; font-weight: 700; }
.big h3 { font-size: 1.12rem; }
.big p { margin: 0; font-size: .95rem; color: var(--muted); }
.big.dark p { color: #bfd8c8; }
.big::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--g100); opacity: .7; z-index: 0; }
.big.dark::after { background: rgba(255, 255, 255, .06); }
.big > * { position: relative; z-index: 1; }
.stat { text-align: center; padding: 8px; }
.stat b { display: block; font-size: 2.6rem; color: var(--g700); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .92rem; }

/* cold chain steps */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); counter-reset: s; position: relative; margin: 0; padding: 0; list-style: none; }
.steps::before { content: ""; position: absolute; left: 6%; right: 6%; top: 26px; border-top: 2px dashed #b9d8ea; z-index: 0; }
.step { padding: 0 6px; position: relative; z-index: 1; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 2px solid var(--ice-ink); color: var(--ice-ink); font-family: var(--serif); font-weight: 900; font-size: 1.25rem; margin-bottom: 16px; box-shadow: 0 0 0 6px var(--g50); }
.step h3 { font-size: 1.08rem; }
.step p { margin: 0; color: var(--muted); font-size: .93rem; }

/* shop */
.shop-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.shop-head h2 { margin: 0; }
.ship-pill { background: var(--ice); color: var(--ice-ink); border-radius: 999px; padding: 6px 16px; font-size: .88rem; font-weight: 600; margin: 0; }
.ship-pill:empty { display: none; }
.products { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); }
.prod { --tint: var(--g100); --tint2: #cfe6d5; --leaf: #3a9d5d; --leaf2: #1f6b3a; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.prod.red { --tint: var(--berry-bg); --tint2: #f0cdca; --leaf: #c0392b; --leaf2: #7a1f2c; }
.prod.purple { --tint: var(--plum-bg); --tint2: #dccdea; --leaf: #8a5fb0; --leaf2: #4a2b66; }
.prod.mix { --tint: var(--sand); --tint2: #e6dcc2; }
.prod:hover { box-shadow: var(--shadow); transform: translateY(-5px); }
.prod .pic { position: relative; background: radial-gradient(circle at 50% 40%, var(--tint) 0, var(--tint2) 100%); display: grid; place-items: center; padding: 22px 0 14px; font-size: 4.5rem; min-height: 168px; overflow: hidden; }
.prod .pic svg { width: 128px; height: 128px; transition: transform .5s var(--ease); }
.prod:hover .pic svg { transform: scale(1.08) rotate(6deg); }
.prod .tag { position: absolute; left: 14px; top: 14px; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 2px 11px; font-size: .74rem; font-weight: 700; color: var(--g800); }
.prod.red .tag { color: var(--berry); }
.prod.purple .tag { color: var(--plum); }
.prod .body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod h3 { margin: 0; font-size: 1.12rem; }
.prod h3 a { color: inherit; text-decoration: none; }
.prod h3 a::after { content: ""; position: absolute; inset: 0; }
.prod { position: relative; }
.prod .desc { color: var(--muted); font-size: .9rem; flex: 1; }
.price { font-family: var(--serif); font-size: 1.5rem; font-weight: 900; color: var(--g900); }
.price small { font-family: var(--sans); font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.low { color: var(--warn); font-size: .82rem; font-weight: 700; }
.prod .btn { position: relative; z-index: 2; width: 100%; padding: 11px 20px; margin-top: 4px; }

/* faq */
.faq { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }

/* drawer + modal */
.overlay { position: fixed; inset: 0; background: rgba(10, 25, 15, .5); backdrop-filter: blur(3px); z-index: 40; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.overlay.show { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100%); background: #fff; z-index: 50; transform: translateX(104%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s; display: flex; flex-direction: column; box-shadow: -14px 0 40px rgba(0, 0, 0, .16); }
.drawer.show { transform: none; visibility: visible; }
.drawer header { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-family: var(--serif); font-weight: 900; font-size: 1.2rem; }
.drawer .items { flex: 1; overflow: auto; padding: 6px 22px; }
.drawer footer { padding: 18px 22px 22px; border-top: 1px solid var(--line); background: var(--cream); }
.x { background: none; border: 0; font-size: 1.6rem; line-height: 1; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: var(--muted); transition: background .2s; }
.x:hover { background: var(--g100); color: var(--ink); }
.x.txt { width: auto; height: auto; font-size: .85rem; padding: 2px 6px; border-radius: 6px; text-decoration: underline; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line .nm { line-height: 1.4; }
.qty { justify-self: start; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { border: 0; background: none; width: 34px; height: 34px; font-size: 1.15rem; cursor: pointer; border-radius: 50%; }
.qty button:hover { background: var(--g100); }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.empty .big-e { font-size: 3rem; display: block; }
.sum { display: flex; justify-content: space-between; margin: 4px 0; font-size: .95rem; }
.sum.total { font-size: 1.25rem; font-weight: 800; margin-top: 10px; font-family: var(--serif); }
.ship-bar { height: 6px; background: var(--g100); border-radius: 6px; overflow: hidden; margin: 10px 0 0; }
.ship-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--g500), var(--g700)); border-radius: 6px; transition: width .4s var(--ease); }
.note { background: var(--ice); color: var(--ice-ink); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .88rem; margin: 10px 0; }
.drawer footer .btn { width: 100%; }

.modal { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 16px; overflow: auto; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s, visibility .25s; }
.modal.show { opacity: 1; visibility: visible; pointer-events: auto; }
.modal .box { background: #fff; border-radius: 24px; width: min(520px, 100%); padding: 28px; max-height: 95vh; overflow: auto; transform: translateY(18px) scale(.98); transition: transform .35s var(--ease); box-shadow: var(--shadow); }
.modal.show .box { transform: none; }
.modal .box h2 { font-size: 1.5rem; margin: 0; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 5px; }
input, textarea, select { width: 100%; padding: 12px 14px; border: 1px solid #c5d3c9; border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--g600); box-shadow: 0 0 0 4px rgba(58, 157, 93, .22); }
.err { color: #b91c1c; font-size: .9rem; min-height: 1.3em; margin-top: 8px; }

footer.site { background: var(--g950); color: #b9d0c0; padding: 56px 0 40px; font-size: .92rem; }
footer.site a { color: #fff; }
footer.site .f-grid { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
footer.site .f-brand { font-family: var(--serif); font-size: 1.4rem; font-weight: 900; color: #fff; display: block; margin-bottom: 6px; }
footer.site h2 { font-family: var(--sans); font-size: .85rem; letter-spacing: .14em; color: #8fb59c; margin: 0 0 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 4px 0; }
footer.site .copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); opacity: .75; font-size: .85rem; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(100px); background: var(--g900); color: #fff; padding: 12px 22px; border-radius: 999px; z-index: 80; transition: transform .35s var(--ease); box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); }

/* scroll reveal */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* content pages / order / product */
.page { max-width: 680px; margin: 48px auto 72px; padding: 0 22px; }
.page h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.page h2 { font-size: 1.5rem; margin-top: 2em; }
.page ol { padding-left: 1.2em; }
.page ol li { margin: 10px 0; }
.page-hero { background: radial-gradient(700px 300px at 90% 0, #dcefd9 0, transparent 65%), var(--cream); padding: 56px 0 40px; }
.page-hero .page { margin: 0 auto; }
.page.article { max-width: 760px; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.paid { background: var(--g100); color: var(--g700); }
.badge.shipped { background: var(--ice); color: var(--ice-ink); }
.badge.cancelled { background: #fee2e2; color: #991b1b; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
.stat-row .big { padding: 22px; }
.admin-wrap { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; cursor: pointer; font: inherit; }
.tabs button.on { background: var(--g700); color: #fff; border-color: var(--g700); }
.small-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: .85rem; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { max-width: 340px; margin: 0 auto; width: 100%; }
  .hero-art .f1 { left: 0; } .hero-art .f2 { right: 0; }
  .grid3, .grid4, .why-grid, .faq { grid-template-columns: 1fr 1fr; }
  .trust ul { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .steps::before { display: none; }
  footer.site .f-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) { nav a:not(.keep) { display: none; } }
@media (max-width: 560px) {
  section { padding: 56px 0; }
  .hero { padding: 44px 0 48px; }
  .grid3, .grid4, .why-grid, .faq, .steps, .stat-row, footer.site .f-grid { grid-template-columns: 1fr; }
  .trust ul { grid-template-columns: 1fr; padding: 16px 0; gap: 10px; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .prod .pic { min-height: 130px; padding: 16px 0 10px; }
  .prod .pic svg { width: 92px; height: 92px; }
  .prod .body { padding: 14px 12px 14px; }
  .prod h3 { font-size: 1rem; }
  .prod .desc { font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .price { font-size: 1.25rem; }
  .prod .btn { padding: 10px 8px; font-size: .88rem; }
  .logo small { display: none; }
  .logo { font-size: 1.15rem; gap: 7px; } .logo::before { width: 24px; height: 24px; }
  nav a { padding: 8px 7px; font-size: .88rem; margin: 0; }
  .cart-btn { padding: 8px 12px; margin-left: 4px; font-size: .88rem; gap: 6px; }
  header.top .wrap { padding: 0 14px; }
  .btn.ghost { margin-left: 0; }
  .modal .box { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .rv { opacity: 1; transform: none; }
}
