:root {
  --green:       #2D6A4F;
  --green-dark:  #1B4332;
  --green-light: #52B788;
  --accent:      #95D5B2;
  --bg:          #FAFAF8;
  --border:      #E8EDE8;
  --text:        #1a1a1a;
  --text-muted:  #888;
}

* { box-sizing: border-box; }
body { background: var(--bg); font-family: 'Noto Sans KR', sans-serif; color: var(--text); margin: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── 헤더 ── */
.site-header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 20px; height: 64px; gap: 32px;
}
.site-logo {
  font-size: 22px; font-weight: 700; color: var(--green);
  letter-spacing: -0.5px; flex-shrink: 0;
}
.site-logo span { color: var(--green-light); }
.header-search {
  flex: 1; max-width: 480px;
  display: flex; gap: 0;
}
.header-search input {
  flex: 1; border: 1px solid var(--border); border-right: none;
  border-radius: 8px 0 0 8px; padding: 8px 16px; font-size: 14px;
  outline: none; font-family: inherit;
  transition: border-color .15s;
}
.header-search input:focus { border-color: var(--green-light); }
.header-search button {
  background: var(--green); color: #fff; border: none;
  border-radius: 0 8px 8px 0; padding: 0 16px; cursor: pointer;
  font-size: 16px; transition: background .15s;
}
.header-search button:hover { background: var(--green-dark); }
.header-actions {
  display: flex; align-items: center; gap: 20px;
  font-size: 13px; color: var(--text-muted); flex-shrink: 0; margin-left: auto;
}
.header-actions a { color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.header-actions a:hover { color: var(--green); }
.header-actions .icon-label { font-size: 11px; }
.cart-badge {
  position: relative;
}
.cart-badge .count {
  position: absolute; top: -6px; right: -8px;
  background: #E63946; color: #fff; font-size: 10px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── GNB ── */
.gnb { background: var(--green); }
.gnb-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; padding: 0 20px;
}
.gnb a {
  color: rgba(255,255,255,.85); font-size: 14px; font-weight: 500;
  padding: 10px 16px; display: block; transition: color .15s;
}
.gnb a:hover, .gnb a.active { color: #fff; background: rgba(255,255,255,.1); }

/* ── 컨테이너 ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section-title {
  font-size: 20px; font-weight: 700; color: var(--green-dark);
  margin-bottom: 24px;
}

/* ── 배너 ── */
.hero-banner {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, var(--green-light) 100%);
  color: #fff; padding: 80px 20px; text-align: center;
}
.hero-banner h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.hero-banner p { font-size: 16px; color: rgba(255,255,255,.8); margin-bottom: 28px; }
.hero-banner .btn-hero {
  background: #fff; color: var(--green); font-weight: 700;
  padding: 12px 32px; border-radius: 50px; font-size: 15px;
  display: inline-block; transition: transform .15s;
}
.hero-banner .btn-hero:hover { transform: translateY(-2px); }

/* ── 배너 텍스트 오버레이 ── */
.banner-text1 {
  font-size: 38px; font-weight: 800; line-height: 1.2;
  margin-bottom: 12px; letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.banner-text2 {
  font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.88);
  margin-bottom: 24px; font-weight: 400;
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.banner-btn {
  display: inline-block; background: #fff; color: var(--green-dark);
  padding: 12px 28px; border-radius: 50px; font-size: 14px; font-weight: 700;
  letter-spacing: -0.2px; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.banner-slide a:hover .banner-btn {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
@media (max-width: 768px) {
  .banner-text1 { font-size: 22px; }
  .banner-text2 { font-size: 13px; margin-bottom: 16px; }
  .banner-btn   { padding: 9px 20px; font-size: 13px; }
  .banner-text-overlay { padding: 0 28px !important; }
  .banner-slide img { height: 280px !important; }
}

/* ── 카테고리 칩 ── */
.category-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.cat-chip {
  padding: 8px 18px; border-radius: 50px;
  border: 1px solid var(--border); background: #fff;
  font-size: 13px; color: #555; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.cat-chip:hover, .cat-chip.active {
  background: var(--green); border-color: var(--green); color: #fff;
}

/* ── 상품 카드 ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }

.product-card {
  background: #fff; border-radius: 12px;
  border: 1px solid var(--border); overflow: hidden;
  transition: box-shadow .2s, transform .2s; cursor: pointer;
}
.product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.product-card-img {
  aspect-ratio: 1; background: #F4F6F4;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img .no-img { color: #ccc; font-size: 40px; }
.product-card-body { padding: 14px 16px; }
.product-card-partner { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.product-card-name { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card-price { font-size: 16px; font-weight: 700; color: var(--green-dark); }

/* ── 상품 상세 ── */
.product-detail { padding: 40px 0; }
.product-image-wrap {
  background: #F4F6F4; border-radius: 16px;
  aspect-ratio: 1; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.product-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.product-detail-partner { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.product-detail-price { font-size: 28px; font-weight: 700; color: var(--green-dark); margin-bottom: 24px; }
.product-detail-desc {
  font-size: 14px; line-height: 1.8; color: #555;
  border-top: 1px solid var(--border); padding-top: 20px; margin-bottom: 24px;
  white-space: pre-wrap;
}
.qty-control {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 40px; height: 40px; border: none; background: #F4F6F4;
  font-size: 18px; cursor: pointer; transition: background .15s;
}
.qty-btn:hover { background: var(--accent); }
.qty-input {
  width: 56px; text-align: center; border: none; border-left: 1px solid var(--border);
  border-right: 1px solid var(--border); height: 40px; font-size: 15px; font-weight: 600;
  outline: none;
}

/* ── 버튼 ── */
.btn-green {
  background: var(--green); color: #fff; border: none;
  padding: 14px 28px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .15s; font-family: inherit;
}
.btn-green:hover { background: var(--green-dark); }
.btn-outline-green {
  background: #fff; color: var(--green); border: 2px solid var(--green);
  padding: 12px 28px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.btn-outline-green:hover { background: var(--green); color: #fff; }

/* ── 장바구니 ── */
.cart-item {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; display: flex; align-items: center; gap: 16px; margin-bottom: 12px;
}
.cart-item-img {
  width: 80px; height: 80px; border-radius: 8px;
  background: #F4F6F4; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.cart-item-option { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cart-item-price { font-weight: 700; color: var(--green-dark); font-size: 16px; }
.cart-summary {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; position: sticky; top: 80px;
}
.cart-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border);
}
.cart-summary-row:last-of-type { border-bottom: none; }
.cart-total { font-size: 18px; font-weight: 700; color: var(--green-dark); }

/* ── 주문/체크아웃 ── */
.checkout-section {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 28px; margin-bottom: 20px;
}
.checkout-section h5 { font-size: 16px; font-weight: 700; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-label { font-size: 13px; font-weight: 500; color: #444; }
.form-control:focus { border-color: var(--green-light); box-shadow: 0 0 0 .2rem rgba(82,183,136,.2); }

/* ── 마이페이지 ── */
.mypage-nav {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 0;
}
.mypage-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; font-size: 14px; color: #555;
  border-bottom: 1px solid var(--border); transition: all .15s;
}
.mypage-nav a:last-child { border-bottom: none; }
.mypage-nav a:hover, .mypage-nav a.active { color: var(--green); background: #F4FAF6; font-weight: 600; }
.mypage-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.mypage-card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 700; color: var(--green-dark);
}
.order-row {
  padding: 20px; border-bottom: 1px solid var(--border);
}
.order-row:last-child { border-bottom: none; }

/* ── 배지 ── */
.badge-order {
  display: inline-block; padding: 3px 10px; border-radius: 50px;
  font-size: 11px; font-weight: 600;
}
.badge-pending   { background:#FFF3CD; color:#856404; }
.badge-paid      { background:#D1E7DD; color:#0A4D2F; }
.badge-preparing { background:#CFE2FF; color:#084298; }
.badge-shipped   { background:#D1ECF1; color:#0C5460; }
.badge-delivered { background:#D1E7DD; color:#0A4D2F; }
.badge-cancelled { background:#F8D7DA; color:#842029; }
.badge-refunded  { background:#E2E3E5; color:#41464B; }

/* ── 푸터 ── */
.site-footer {
  background: var(--green-dark); color: rgba(255,255,255,.6);
  padding: 40px 20px; margin-top: 80px; font-size: 13px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-links { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.6); }
.footer-links a:hover { color: #fff; }

/* ── 로그인/회원가입 ── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 40px 20px; background: var(--bg);
}
.auth-box {
  background: #fff; border-radius: 16px; padding: 48px 40px;
  width: 420px; border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .brand { font-size: 26px; font-weight: 700; color: var(--green); }
.auth-logo .sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── 페이지네이션 ── */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 32px; }
.page-link-item {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: #fff; font-size: 14px;
  color: #555; transition: all .15s;
}
.page-link-item:hover { border-color: var(--green); color: var(--green); }
.page-link-item.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ── 빈 상태 ── */
.empty-state {
  text-align: center; padding: 80px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 48px; display: block; margin-bottom: 16px; color: var(--accent); }
.empty-state p { font-size: 15px; margin-bottom: 20px; }
