:root {
  --green: #1f4d33;
  --green-soft: #e3f0e2;
  --orange: #2e8b4f;
  --orange-dark: #226e3d;
  --cream: #f7f9f3;
  --ink: #222;
  --muted: #777;
  --line: #dfe6da;
  --red: #d33c2f;
  --radius: 14px;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink); background: var(--cream); line-height: 1.6; font-size: 15px;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* 상단 */
.notice-bar { background: var(--green); color: #fff; text-align: center; font-size: 13px; padding: 7px 16px; }
.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { font-size: 22px; font-weight: 800; color: var(--green); letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; }
.logo-dot { width: 14px; height: 14px; border-radius: 50%; background: #8cc152; box-shadow: 4px -4px 0 -1px #2e8b4f; }
.nav { display: flex; gap: 22px; flex: 1; font-weight: 600; }
.nav a:hover, .nav a.on { color: var(--orange); }
.header-tools { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.search { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--cream); }
.search input { border: 0; background: transparent; padding: 7px 12px; width: 150px; font: inherit; outline: none; }
.search button { border: 0; background: transparent; padding: 0 12px; cursor: pointer; }
.cart-link { position: relative; font-weight: 600; }
.cart-badge { position: absolute; top: -8px; right: -14px; background: var(--orange); color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }
.menu-btn { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }

/* 알림 */
.flashes { margin: 16px auto 0; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; background: var(--green-soft); color: var(--green); }
.flash.error { background: #fdecea; color: var(--red); }
.flash.cart { background: var(--green-soft); color: var(--orange-dark); display: flex; justify-content: space-between; align-items: center; }
.flash.cart a { font-weight: 700; text-decoration: underline; }

/* 첫 화면 */
.hero { position: relative; background: var(--green); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; min-height: 440px; gap: 40px; }
.hero h1 { font-size: 46px; line-height: 1.25; margin: 0 0 18px; letter-spacing: -1px; white-space: pre-line; }
.hero p { font-size: 17px; opacity: .85; margin: 0 0 28px; }
.hero-art { height: 100%; min-height: 360px; position: relative; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0 0 0 120px; }
.hero-fruit { position: absolute; border-radius: 50%; }
.hero-fruit.a { width: 260px; height: 260px; background: radial-gradient(circle at 35% 30%, #b9e08a, #5fae4f 60%, #2e7a3c); right: 70px; top: 60px; }
.hero-fruit.b { width: 150px; height: 150px; background: radial-gradient(circle at 35% 30%, #ffd08a, #f59b3a 60%, #d0661a); right: 290px; top: 210px; }
.hero-fruit.leaf { width: 90px; height: 46px; border-radius: 0 90px; background: #6c9a5b; right: 150px; top: 40px; transform: rotate(-20deg); }

.section { padding: 56px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.5px; }
.section-head a { color: var(--muted); font-size: 14px; }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: .15s; }
.cat-tile:hover { border-color: var(--orange); transform: translateY(-2px); }
.cat-tile strong { font-size: 18px; display: block; }

.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 56px; }
.promise div { background: var(--green-soft); border-radius: var(--radius); padding: 22px; }
.promise strong { display: block; color: var(--green); font-size: 17px; margin-bottom: 4px; }

/* 상품 목록 */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.card { display: block; }
.thumb { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #fff; position: relative; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.04); }
.no-image { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--green); font-weight: 700; background: linear-gradient(135deg, #fff3e2, #eaf2e6); }
.badge { position: absolute; top: 10px; left: 10px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge.out { background: #555; }
.card-body { padding: 12px 2px 0; }
.card-name { font-weight: 600; font-size: 16px; }
.card-summary { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.price { font-weight: 800; font-size: 17px; }
.price .off { color: var(--orange); margin-right: 6px; }
.price del { color: #aaa; font-weight: 400; font-size: 13px; margin-left: 6px; }

.page-title { padding: 40px 0 20px; }
.page-title h1 { margin: 0; font-size: 30px; letter-spacing: -0.5px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tabs a { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.tabs a.on { background: var(--green); color: #fff; border-color: var(--green); }
.empty { text-align: center; padding: 80px 0; color: var(--muted); }

/* 상품 상세 */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 0; }
.detail .thumb { border-radius: 20px; }
.detail h1 { font-size: 28px; margin: 6px 0 6px; letter-spacing: -0.5px; }
.crumb { font-size: 13px; color: var(--muted); }
.detail .price { font-size: 26px; margin: 16px 0; }
.info-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.info-table th { text-align: left; color: var(--muted); font-weight: 400; width: 90px; padding: 8px 0; vertical-align: top; }
.info-table td { padding: 8px 0; }
.buy-box { border-top: 1px solid var(--line); padding-top: 18px; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { border: 0; background: #fff; width: 36px; font-size: 18px; cursor: pointer; }
.qty input { width: 48px; border: 0; text-align: center; font: inherit; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0; }
.sum-row strong { font-size: 24px; color: var(--orange-dark); }
.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.desc { border-top: 1px solid var(--line); padding: 40px 0; white-space: pre-line; max-width: 820px; margin: 0 auto; font-size: 16px; }
.desc h2 { white-space: normal; }

/* 폼과 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 22px; border-radius: 12px; border: 1px solid var(--green); background: #fff; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-dark); }
.btn.dark { background: var(--green); color: #fff; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.ghost { border-color: var(--line); color: var(--ink); font-weight: 500; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #d9d3c7; border-radius: 10px; font: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #a9d6b3; border-color: var(--orange); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.addr-row { display: grid; grid-template-columns: 140px auto; gap: 8px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 18px; margin: 0 0 6px; }
.narrow { max-width: 440px; margin: 40px auto 80px; }

/* 장바구니, 주문서 */
.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; padding-bottom: 80px; }
.sticky { position: sticky; top: 90px; }
.line-item { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: 0; }
.line-item .thumb { width: 84px; border-radius: 10px; }
.line-item .no-image { font-size: 11px; padding: 6px; }
.line-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.totals { width: 100%; font-size: 15px; }
.totals td { padding: 6px 0; }
.totals td:last-child { text-align: right; }
.totals .grand td { border-top: 1px solid var(--line); padding-top: 14px; font-size: 20px; font-weight: 800; }
.totals .grand td:last-child { color: var(--orange-dark); }
.free-hint { background: var(--green-soft); color: var(--orange-dark); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 12px 0; }
.ship-due { background: #f4f7f1; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 12px 0 0; }
.ship-due.late { background: #fff3e6; color: #8a4a12; }

.bank-box { background: var(--green); color: #fff; border-radius: var(--radius); padding: 24px; margin: 20px 0; }
.bank-box .acct { font-size: 22px; font-weight: 800; margin: 6px 0; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eee; }
.status.입금대기 { background: #fff3e6; color: var(--orange-dark); }
.status.결제완료, .status.배송준비 { background: #e8f0fb; color: #2f62b0; }
.status.배송중 { background: var(--green-soft); color: var(--green); }
.status.배송완료 { background: #eee; color: #555; }
.status.취소 { background: #fdecea; color: var(--red); }
.steps { display: flex; gap: 0; margin: 20px 0; }
.steps div { flex: 1; text-align: center; font-size: 13px; color: #aaa; position: relative; padding-top: 22px; }
.steps div::before { content: ""; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #ddd; z-index: 1; }
.steps div::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: #ddd; }
.steps div:first-child::after { display: none; }
.steps div.on { color: var(--green); font-weight: 700; }
.steps div.on::before, .steps div.on::after { background: var(--orange); }

.list-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.list-table th, .list-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.list-table th { background: #f6f2ea; font-weight: 600; }

/* 하단 */
.footer { background: #1d2a22; color: #b9c2bb; font-size: 13px; margin-top: 80px; padding: 40px 0 50px; }
.footer a { color: #fff; }
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer .logo { color: #fff; margin-bottom: 10px; }
.footer-links { display: flex; gap: 8px 16px; margin-top: 18px; flex-wrap: wrap; }
.footer-cs strong { display: block; color: #fff; font-size: 22px; }
.terms { white-space: pre-line; font-size: 14px; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .hero-inner, .detail, .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero-inner { min-height: 0; padding: 40px 20px; }
  .hero-art { min-height: 220px; }
  .hero-fruit.a { width: 170px; height: 170px; right: 20px; top: 10px; }
  .hero-fruit.b { width: 100px; height: 100px; right: 170px; top: 110px; }
  .hero-fruit.leaf { right: 70px; top: 0; }
  .promise { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 20px; gap: 14px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .search { display: none; }
  .header-row { gap: 12px; }
  .logo { flex: 1; }
  .sticky { position: static; }
  .detail { gap: 20px; padding-top: 16px; }
}

/* 구매 후기 · 재입고 알림 */
.stars { color: #e5a100; letter-spacing: 1px; }
.reviews { border-top: 1px solid var(--line); padding: 40px 0; max-width: 820px; margin: 0 auto; }
.review { border-bottom: 1px solid var(--line); padding: 16px 0; }
.review-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.review-body { white-space: pre-line; margin-top: 8px; }
.review img { max-width: 220px; border-radius: 10px; margin-top: 10px; }
.stars-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars-pick input { display: none; }
.stars-pick label { font-size: 32px; color: #ddd; cursor: pointer; margin: 0; }
.stars-pick input:checked ~ label, .stars-pick label:hover, .stars-pick label:hover ~ label { color: #e5a100; }
.restock { margin-top: 14px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.restock .addr-row { margin: 8px 0; grid-template-columns: 1fr auto; }

/* 입점 농가 */
.card-seller { font-size: 12px; color: var(--orange-dark); font-weight: 600; margin-bottom: 2px; }
.farm-head { display: flex; gap: 24px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 28px 0 8px; }
.farm-head img, .farm-head .farm-mark { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.farm-mark { background: var(--green-soft); display: grid; place-items: center; font-size: 40px; font-weight: 800; color: var(--green); }
.farm-head h1 { margin: 0 0 6px; font-size: 26px; }
.farm-head p { margin: 0; white-space: pre-line; }
.farm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.farm-tile { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.farm-tile:hover { border-color: var(--orange); }
.farm-tile img, .farm-tile .farm-mark { width: 64px; height: 64px; font-size: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.seller-info { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; font-size: 14px; }
.seller-info h2 { font-size: 17px; margin: 0 0 10px; }
.seller-info dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
.seller-info dt { color: var(--muted); }
.seller-info dd { margin: 0; }
@media (max-width: 640px) { .farm-head { flex-direction: column; text-align: center; } .seller-info dl { grid-template-columns: 110px 1fr; } }

/* 상품 화면: 사진 여러 장 */
.photo-picks { display: flex; gap: 10px; margin-top: 12px; }
.photo-picks button { width: 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; }
.photo-picks button.on { border-color: var(--orange); }
.photo-picks img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 친환경 인증 표시 */
.certs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cert { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #1f6b3a; background: var(--green-soft); border: 1px solid #b9dcc3; white-space: nowrap; }
.cert-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.cert-tabs a { padding: 5px 12px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); background: #fff; }
.cert-tabs a.on { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }

/* 장바구니·주문서: 농가별 묶음 */
.seller-group + .seller-group { margin-top: 16px; }
.seller-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--green-soft); }
.seller-group-head strong { color: var(--green); }
.seller-group-foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; font-size: 14px; }
.seller-group .line-item:last-of-type { border-bottom: 1px solid var(--line); }
.two-col > * { min-width: 0; }
.seller-group-head, .seller-group-foot { flex-wrap: wrap; }
