:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --ink: #2b2a25;
  --ink-soft: #6b675c;
  --line: #e7e1d3;
  --green: #3f6b35;
  --green-dark: #2f5228;
  --green-soft: #e8f0e1;
  --earth: #a86b32;
  --earth-soft: #f5e9da;
  --danger: #b8432f;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(60, 50, 30, 0.08);
  --serif: "Gowun Batang", serif;
  --sans: "Noto Sans KR", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
body.no-scroll { overflow: hidden; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; text-decoration: none; transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--earth-soft); }
.btn--block { width: 100%; }
.btn:disabled { background: #cfcabd; color: #fff; cursor: not-allowed; }

/* ---------- 헤더 ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 248, 241, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 22px; text-decoration: none; color: var(--green-dark); }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: 15px; }
.nav a:hover { color: var(--green); }
.cart-btn {
  position: relative; background: none; border: 0; padding: 8px; color: var(--ink);
}
.cart-btn__count {
  position: absolute; top: 0; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--earth); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.cart-btn__count[data-zero="true"] { display: none; }

/* ---------- 히어로 ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(246, 231, 168, .7), transparent 40%),
    linear-gradient(180deg, var(--green-soft), var(--bg));
  padding: 88px 0 72px;
}
.hero__eyebrow { color: var(--green); font-weight: 700; margin: 0 0 12px; font-size: 14px; }
.hero__title { font-family: var(--serif); font-size: clamp(30px, 5vw, 48px); line-height: 1.3; margin: 0 0 16px; }
.hero__desc { color: var(--ink-soft); font-size: 17px; margin: 0 0 28px; }

/* ---------- 섹션 공통 ---------- */
.section-title { font-family: var(--serif); font-size: 26px; margin: 0 0 6px; }
.section-sub { color: var(--ink-soft); margin: 0 0 20px; font-size: 14px; }

/* ---------- 제철 달력 ---------- */
.season { padding: 56px 16px 8px; }
.season__table {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; overflow-x: auto;
}
.season__row { display: grid; grid-template-columns: 120px repeat(12, minmax(28px, 1fr)); align-items: center; gap: 4px; min-width: 560px; }
.season__row + .season__row { margin-top: 8px; }
.season__row--head span { font-size: 12px; color: var(--ink-soft); text-align: center; }
.season__name { font-size: 14px; font-weight: 500; white-space: nowrap; }
.season__cell { height: 22px; border-radius: 6px; background: #f3efe6; }
.season__cell.is-on { background: var(--green); opacity: .85; }
.season__cell.is-now { outline: 2px solid var(--earth); outline-offset: 1px; }

/* ---------- 상품 ---------- */
.products { padding: 56px 16px; }
.products__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  padding: 7px 14px; border-radius: 999px; font-size: 14px;
}
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: box-shadow .2s, transform .2s; text-align: left; padding: 0; color: inherit;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__thumb { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 72px; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card.is-soldout .card__thumb > * { filter: grayscale(.8); opacity: .55; }
.status {
  position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; background: #fff; color: var(--green);
}
.status--preorder { background: var(--earth); color: #fff; }
.status--soldout { background: #6d6a62; color: #fff; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__name { font-weight: 700; font-size: 17px; margin: 0; }
.card__summary { color: var(--ink-soft); font-size: 14px; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { font-size: 12px; color: var(--green); }
.card__price { font-size: 18px; font-weight: 700; margin-top: 4px; }
.card__price small { font-size: 13px; font-weight: 400; color: var(--ink-soft); }

.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 12px; background: var(--green-soft); color: var(--green-dark); padding: 2px 8px; border-radius: 6px; }

/* ---------- 농장 이야기 ---------- */
.story { background: var(--earth-soft); padding: 64px 0; }
.story__inner { display: grid; grid-template-columns: 180px 1fr; gap: 40px; align-items: center; }
.story__art {
  width: 180px; height: 180px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 90px; box-shadow: var(--shadow);
}
.story p { margin: 0 0 12px; font-size: 16px; }
.story__sign { font-family: var(--serif); color: var(--ink-soft); margin-top: 20px !important; }

/* ---------- 안내 ---------- */
.guide { padding: 64px 16px; }
.guide__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 28px; }
.guide__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.guide__card h3 { margin: 0 0 8px; font-size: 16px; color: var(--green-dark); }
.guide__card p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.guide__bank { margin-top: 10px !important; color: var(--ink) !important; font-weight: 700; }
.faq { border-top: 1px solid var(--line); padding: 14px 4px; }
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { color: var(--ink-soft); font-size: 14px; margin: 10px 0 0; }

/* ---------- 푸터 ---------- */
.footer { background: #2f2d27; color: #bdb7a8; padding: 40px 0; font-size: 13px; }
.footer strong { color: #fff; font-family: var(--serif); font-size: 18px; display: block; margin-bottom: 10px; }
.footer p { margin: 2px 0; }
.footer a { color: #e7e1d3; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 12px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }
.footer__links b { color: #fff; }

/* ---------- 404 페이지 ---------- */
.notfound { text-align: center; padding: 96px 16px 120px; }
.notfound__icon { font-size: 56px; }
.notfound h1 { font-family: var(--serif); font-size: 26px; margin: 12px 0 8px; }
.notfound p { color: var(--ink-soft); margin: 0 0 24px; }

/* ---------- 정책 페이지 ---------- */
.header__back { margin-left: auto; font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.header__back:hover { color: var(--green); }
.policy { max-width: 800px; padding-top: 24px; padding-bottom: 64px; font-size: 15px; }
.policy__tabs {
  position: sticky; top: 64px; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--line);
}
.policy__tabs a {
  text-decoration: none; padding: 6px 14px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.policy__tabs a:hover { border-color: var(--green); color: var(--green); }
.policy section { padding-top: 40px; scroll-margin-top: 120px; }
.policy section + section { border-top: 1px solid var(--line); margin-top: 40px; }
.policy h1 { font-family: var(--serif); font-size: 26px; margin: 0 0 16px; }
.policy h3 { font-size: 16px; margin: 28px 0 8px; color: var(--green-dark); }
.policy p, .policy li { color: #3d3b34; }
.policy p { margin: 0 0 8px; }
.policy ol, .policy ul { margin: 0 0 8px; padding-left: 22px; }
.policy li { margin: 4px 0; }
.policy li ul { margin-top: 4px; }
.policy__date { margin-top: 28px !important; font-size: 14px; color: var(--ink-soft) !important; }
.table-scroll { overflow-x: auto; margin: 8px 0 12px; }
.policy table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.policy th, .policy td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.policy th { background: var(--green-soft); font-weight: 500; white-space: nowrap; }
.policy small { color: var(--ink-soft); }

/* ---------- 모달 ---------- */
.modal, .drawer { position: fixed; inset: 0; z-index: 50; }
.modal[hidden], .drawer[hidden] { display: none; }
.modal__backdrop, .drawer__backdrop { position: absolute; inset: 0; background: rgba(30, 28, 22, .45); }
.modal__panel {
  position: relative; max-width: 760px; margin: 5vh auto; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow);
  animation: pop .18s ease-out;
}
.modal__panel--wide { max-width: 640px; padding: 28px; }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } }
.modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px;
  border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 22px; line-height: 1;
}
.drawer__head .modal__close { position: static; }

.detail { display: grid; grid-template-columns: 1fr 1fr; }
.detail__thumb { display: grid; place-items: center; font-size: 120px; min-height: 320px; }
.detail__thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail__info { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.detail__info h2 { font-family: var(--serif); margin: 0; font-size: 24px; }
.detail__desc { font-size: 14px; color: var(--ink-soft); }
.detail__desc p { margin: 0 0 8px; }
.detail__facts { font-size: 13px; background: var(--bg); border-radius: 10px; padding: 10px 14px; margin: 0; }
.detail__facts div { display: flex; gap: 10px; }
.detail__facts dt { color: var(--ink-soft); width: 64px; flex-shrink: 0; }
.detail__facts dd { margin: 0; }

.options { display: flex; flex-direction: column; gap: 8px; }
.option {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: #fff; text-align: left;
}
.option.is-selected { border-color: var(--green); background: var(--green-soft); }
.option span:last-child { font-weight: 700; white-space: nowrap; }
.option:disabled { background: #f3efe6; color: var(--ink-soft); cursor: not-allowed; }
.option:disabled span:last-child { font-weight: 400; font-size: 13px; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 32px; height: 32px; border: 0; background: none; font-size: 16px; }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }
.detail__buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail__total { font-size: 20px; font-weight: 700; }

.detail__notice { margin: -4px 0 0; font-size: 12px; color: var(--ink-soft); }
.detail__notice a, .notice a, .faq a, .restock a { color: var(--green); }
.info { border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.info summary { cursor: pointer; padding: 10px 14px; font-weight: 500; }
.info table { width: 100%; border-collapse: collapse; }
.info th, .info td { border-top: 1px solid var(--line); padding: 7px 14px; text-align: left; vertical-align: top; }
.info th { width: 38%; font-weight: 400; color: var(--ink-soft); background: var(--bg); }

.restock { background: var(--earth-soft); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.restock__title { margin: 0; font-weight: 700; font-size: 15px; }
.restock__desc { margin: 0; font-size: 13px; color: var(--ink-soft); }
.restock input:not([type="checkbox"]) {
  font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0;
}
.restock .two { gap: 8px; }
.restock .check { font-size: 12px; margin: 0; color: var(--ink-soft); }
.restock .btn { background: #fff; padding: 11px; }

/* ---------- 장바구니 ---------- */
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: var(--surface); display: flex; flex-direction: column;
  animation: slide .2s ease-out;
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font-size: 18px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer__foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.empty { text-align: center; color: var(--ink-soft); padding: 60px 0; }
.empty div { font-size: 48px; }

.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line__thumb { width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center; font-size: 28px; overflow: hidden; }
.line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-weight: 500; font-size: 14px; }
.line__opt { font-size: 12px; color: var(--ink-soft); }
.line__right { display: flex; flex-direction: column; align-items: end; gap: 6px; }
.line__price { font-weight: 700; font-size: 14px; }
.line__remove { border: 0; background: none; color: var(--ink-soft); font-size: 12px; text-decoration: underline; padding: 0; }

.sum { font-size: 14px; margin: 0 0 14px; }
.sum div { display: flex; justify-content: space-between; padding: 2px 0; }
.sum .sum__total { font-size: 18px; font-weight: 700; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; }
.sum__hint { font-size: 12px; color: var(--earth); margin: -6px 0 12px; }

/* ---------- 주문서 ---------- */
.checkout h2 { font-family: var(--serif); margin: 0 0 16px; }
.checkout h3 { font-size: 15px; margin: 24px 0 10px; color: var(--green-dark); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { font-size: 13px; color: var(--ink-soft); }
.field input, .field textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--green-soft); border-color: var(--green); }
.field--row { flex-direction: row; gap: 8px; }
.field--row input { flex: 1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; }
.order-lines { font-size: 14px; background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.order-lines div { display: flex; justify-content: space-between; gap: 8px; }
.notice { font-size: 12px; color: var(--ink-soft); background: var(--bg); padding: 10px 12px; border-radius: 10px; }
.notice--stack p { margin: 0; }
.notice--stack p + p { margin-top: 6px; }
.notice--stack b { color: var(--ink); margin-right: 4px; }

.done { text-align: center; }
.done__icon { font-size: 56px; }
.done__bank { background: var(--green-soft); border-radius: 12px; padding: 16px; margin: 16px 0; font-size: 15px; }
.done__bank strong { font-size: 20px; display: block; margin: 4px 0; }
.done__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.done pre { text-align: left; white-space: pre-wrap; font-family: var(--sans); font-size: 13px; background: var(--bg); padding: 12px; border-radius: 10px; margin: 0; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 60;
  transition: opacity .2s, transform .2s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 모바일 ---------- */
@media (max-width: 720px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .hero { padding: 56px 0 48px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card__thumb { font-size: 52px; }
  .card__body { padding: 12px; }
  .card__name { font-size: 15px; }
  .card__summary { display: none; }
  .story__inner { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .story__art { margin: 0 auto; width: 120px; height: 120px; font-size: 60px; }
  .guide__grid { grid-template-columns: 1fr; }
  .modal__panel { margin: 0; max-height: 100vh; height: 100%; border-radius: 0; }
  .modal__panel--wide { padding: 20px 16px; }
  .detail { grid-template-columns: 1fr; }
  .detail__thumb { min-height: 220px; font-size: 90px; }
  .detail__info { padding: 20px 16px 28px; }
  .two { grid-template-columns: 1fr; }
}
