@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;900&display=swap');

/* ── 리셋 & 기본 ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --green:      #2e7d32;
  --green-light:#4caf50;
  --green-pale: #f1f8e9;
  --orange:     #ff6f00;
  --red:        #d32f2f;
  --gray-1:     #f5f5f5;
  --gray-2:     #e0e0e0;
  --gray-3:     #9e9e9e;
  --text:       #212121;
  --text-sub:   #616161;
  --white:      #ffffff;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(0,0,0,0.10);
}

body {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── 헤더 ─────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-2);
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 84px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.logo span { color: var(--orange); }

.logo-img {
  height: 72px !important;
  width: auto !important;
  display: block;
  object-fit: contain;
  max-width: 200px;
}

.header-nav {
  display: flex;
  gap: 4px;
}

.header-nav a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
}
.header-nav a:hover,
.header-nav a.active { background: var(--green-pale); color: var(--green); }

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--gray-1);
  border-radius: 24px;
  padding: 0 16px;
  gap: 8px;
  max-width: 400px;
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}
.search-bar .icon { font-size: 1.1rem; color: var(--gray-3); }

.header-actions { display: flex; gap: 8px; margin-left: auto; }

.btn-icon {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  background: transparent;
  transition: background 0.15s;
}
.btn-icon:hover { background: var(--gray-1); }

.cart-badge {
  display: none;
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

/* ── 공통 컨테이너 ───────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── 섹션 제목 ───────────────────────────────────────────────── */
.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .more {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green);
}

/* ── 히어로 배너 ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 60%, #33691e 100%);
  color: #fff;
  padding: 72px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='40' cy='40' r='30'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; max-width: 640px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 14px;
}
.hero h1 em { font-style: normal; color: #a5d6a7; }
.hero p  { font-size: 1.05rem; opacity: 0.85; margin-bottom: 32px; line-height: 1.7; }

.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.btn-hero-primary {
  padding: 14px 36px; border-radius: 30px;
  background: #fff; color: var(--green);
  font-size: 1rem; font-weight: 800;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-hero-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.btn-hero-secondary {
  padding: 14px 36px; border-radius: 30px;
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,0.55);
  font-size: 1rem; font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.8); }

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  background: rgba(0,0,0,0.18);
  border-radius: 40px;
  padding: 12px 28px;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.1rem; font-weight: 900; }
.hero-stat span { font-size: 0.72rem; opacity: 0.75; }
.hero-stat-divider { width: 1px; height: 28px; background: rgba(255,255,255,0.25); }

.hero-deco {
  position: absolute;
  right: -20px; bottom: -10px;
  font-size: 4rem;
  opacity: 0.12;
  letter-spacing: 4px;
  transform: rotate(-12deg);
  pointer-events: none;
}

/* ── 히어로 2단 레이아웃 ─────────────────────────────────────── */
.hero-inner-split {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  text-align: left;
}
.hero-text {
  flex: 1;
}
.hero-text .hero-stats {
  justify-content: flex-start;
}
.hero-img-wrap {
  flex-shrink: 0;
  width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-banner-img {
  width: 100%;
  height: auto;
  animation: float 3.5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@media (max-width: 900px) {
  .hero-inner-split { flex-direction: column; text-align: center; }
  .hero-text .hero-stats { justify-content: center; }
  .hero-img-wrap { width: 280px; }
}

/* ── 쿠폰 바 ────────────────────────────────────────────────── */
.coupon-bar { background: #fff; border-bottom: 1px solid var(--gray-2); }
.coupon-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.coupon-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-right: 1px solid var(--gray-2);
}
.coupon-item:last-child { border-right: none; }
.coupon-icon { font-size: 1.8rem; flex-shrink: 0; }
.coupon-label { font-size: 0.75rem; color: var(--gray-3); margin-bottom: 2px; }
.coupon-value { font-size: 0.95rem; font-weight: 800; color: var(--text); }
.coupon-btn {
  margin-left: auto;
  padding: 6px 14px;
  background: var(--orange);
  color: #fff;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.15s;
}
.coupon-btn:hover { background: #e65100; }

/* ── 빠른 카테고리 ──────────────────────────────────────────── */
.quick-cat { padding: 32px 0 8px; }
.quick-cat-grid {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.quick-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s;
  text-decoration: none;
}
.quick-cat-item:hover { transform: translateY(-4px); }
.quick-cat-icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.quick-cat-item span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-sub);
}

/* ── 탭 상품 섹션 ────────────────────────────────────────────── */
.tab-products { padding: 40px 0 48px; background: var(--gray-1); }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header .section-title { margin-bottom: 0; }
.more-link { font-size: 0.85rem; color: var(--green); font-weight: 600; }
.more-link:hover { text-decoration: underline; }

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.tab-btns { display: flex; gap: 4px; }
.tab-btn {
  padding: 9px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-3);
  background: transparent;
  border: 1.5px solid var(--gray-2);
  transition: all 0.15s;
}
.tab-btn.active { background: var(--green); color: #fff; border-color: var(--green); }
.tab-btn:hover:not(.active) { border-color: var(--green); color: var(--green); }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── 이벤트 배너 카드 ────────────────────────────────────────── */
.event-banner { padding: 40px 0; }
.event-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.event-card {
  border-radius: 16px;
  padding: 28px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.event-card-green  { background: linear-gradient(135deg, #1b5e20, #2e7d32); }
.event-card-orange { background: linear-gradient(135deg, #e65100, #ff6f00); }
.event-card-red    { background: linear-gradient(135deg, #b71c1c, #d32f2f); }

.event-card-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.event-card h3 { font-size: 1.2rem; font-weight: 900; margin-bottom: 8px; }
.event-card p  { font-size: 0.85rem; opacity: 0.85; margin-bottom: 20px; line-height: 1.6; }
.event-card-btn {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  padding: 7px 18px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  transition: background 0.15s;
}
.event-card-btn:hover { background: rgba(255,255,255,0.35); }

/* ── 고객 후기 ──────────────────────────────────────────────── */
.reviews { padding: 48px 0; background: #fafafa; }
.review-avg { font-size: 0.9rem; color: var(--text-sub); }
.review-avg strong { font-size: 1.3rem; color: #f57c00; }
.review-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--gray-2);
  box-shadow: var(--shadow);
}
.review-stars { color: #f57c00; font-size: 0.9rem; margin-bottom: 10px; }
.review-text {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 16px;
}
.review-user { display: flex; align-items: center; gap: 10px; }
.review-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.review-name { font-size: 0.82rem; font-weight: 700; }
.review-date { font-size: 0.73rem; color: var(--gray-3); }

/* ── 상품 후기 폼 / 목록 (product.html) ──────────────────────── */
.review-login-notice {
  padding: 24px;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.9rem;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 20px;
}
.review-login-notice a { color: var(--primary); text-decoration: underline; }

.review-form-wrap {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.review-form-wrap h4 { margin: 0 0 14px; font-size: 1rem; color: var(--text-main); }

.star-rating { display: flex; gap: 6px; margin-bottom: 12px; cursor: pointer; }
.star-rating .star {
  font-size: 2rem;
  color: #ddd;
  transition: color 0.15s;
  user-select: none;
}
.star-rating .star.active { color: #f57c00; }
.star-rating .star:hover { color: #f57c00; }

.review-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 12px;
  font-family: inherit;
}
.review-textarea:focus { outline: none; border-color: var(--primary); }

.btn-review-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
}
.btn-review-submit:hover { background: var(--primary-dark, #2e7d32); }

.review-msg { color: #e53935; font-size: 0.83rem; margin-top: 8px; }

.review-empty {
  text-align: center;
  color: var(--text-sub);
  font-size: 0.9rem;
  padding: 32px 0;
}

.review-list { display: flex; flex-direction: column; gap: 16px; }

.review-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.btn-review-delete {
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: var(--gray-3);
  cursor: pointer;
}
.btn-review-delete:hover { border-color: #e53935; color: #e53935; }

/* ── 혜택 섹션 (업그레이드) ─────────────────────────────────── */
.benefit-icon { font-size: 2.6rem; margin-bottom: 12px; }

/* ── 푸터 SNS ───────────────────────────────────────────────── */
.footer-sns { display: flex; gap: 8px; margin-top: 14px; }
.sns-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #333;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background 0.15s;
}
.sns-btn:hover { background: #555; }

/* ── 최상단 공지 ──────────────────────────────────────────────── */
.top-notice {
  background: #1b5e20;
  color: rgba(255,255,255,0.92);
  text-align: center;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.top-notice strong { color: #ffeb3b; }

/* ── 배너 스트립 (관리자 페이지용) ──────────────────────────────── */
.banner-strip {
  background: var(--orange);
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ── 카테고리 카드 ───────────────────────────────────────────── */
.categories { padding: 40px 0; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.category-card {
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  display: block;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.category-card.veggie  { background: #e8f5e9; }
.category-card.greens  { background: #f3e5f5; }
.category-card.fruit   { background: #fff3e0; }
.category-card .cat-emoji { font-size: 3rem; margin-bottom: 10px; }
.category-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.category-card p  { font-size: 0.82rem; color: var(--text-sub); }

/* ── 상품 그리드 ──────────────────────────────────────────────── */
.products-section { padding: 20px 0 48px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.product-card {
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-2);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.product-img {
  background: var(--green-pale);
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.product-img-overlay {
  position: absolute;
  bottom: -60px;
  left: 0; right: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transition: bottom 0.22s ease;
}
.product-card:hover .product-img-overlay { bottom: 0; }

.btn-cart-overlay {
  background: #fff;
  color: var(--green);
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.btn-cart-overlay:hover { background: var(--green-pale); }

.product-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}
.badge-인기 { background: var(--green); }
.badge-특가 { background: var(--red); }
.badge-신선 { background: #0288d1; }

.product-img-link { display: block; }
.product-info { padding: 14px; }
.product-cat { font-size: 0.72rem; color: var(--green); font-weight: 700; margin-bottom: 3px; }
.product-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.product-unit { font-size: 0.78rem; color: var(--gray-3); margin-bottom: 6px; }
.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.stars { color: #f57c00; font-size: 0.78rem; }
.review-cnt { font-size: 0.72rem; color: var(--gray-3); }
.product-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--green);
  margin-bottom: 12px;
}
.product-price span { font-size: 0.75rem; font-weight: 500; }

.btn-add-cart {
  width: 100%;
  padding: 9px;
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-add-cart:hover { background: #1b5e20; }

/* ── 혜택 섹션 ───────────────────────────────────────────────── */
.benefits { background: var(--gray-1); padding: 48px 0; }
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.benefit-item .icon { font-size: 2.4rem; margin-bottom: 10px; }
.benefit-item h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.benefit-item p  { font-size: 0.80rem; color: var(--text-sub); }

/* ── 상품 목록 페이지 ────────────────────────────────────────── */
.page-title {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--gray-2);
  margin-bottom: 32px;
}
.page-title h2 { font-size: 1.6rem; font-weight: 800; }

.products-layout { display: flex; gap: 28px; padding-bottom: 60px; }

/* 필터 사이드바 */
.filter-sidebar {
  width: 220px;
  flex-shrink: 0;
}
.filter-group { margin-bottom: 28px; }
.filter-group h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.filter-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
  transition: background 0.12s;
}
.filter-btn:hover { background: var(--gray-1); }
.filter-btn.active { background: var(--green-pale); color: var(--green); font-weight: 700; }

.products-main { flex: 1; }

.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.products-count { font-size: 0.88rem; color: var(--text-sub); }
.sort-select {
  padding: 7px 12px;
  border: 1px solid var(--gray-2);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

/* ── 장바구니 페이지 ─────────────────────────────────────────── */
.cart-layout {
  display: flex;
  gap: 28px;
  padding-bottom: 60px;
  align-items: flex-start;
}

.cart-items { flex: 1; }
.cart-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-sub);
}
.cart-empty .icon { font-size: 4rem; margin-bottom: 16px; }
.cart-empty p { font-size: 1rem; margin-bottom: 20px; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-2);
}
.cart-item-emoji {
  width: 72px; height: 72px;
  background: var(--green-pale);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 700; margin-bottom: 2px; }
.cart-item-unit { font-size: 0.80rem; color: var(--gray-3); }
.cart-item-price { font-weight: 800; color: var(--green); font-size: 1rem; margin-top: 4px; }
.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.qty-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--gray-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  transition: background 0.12s;
}
.qty-btn:hover { background: var(--gray-1); }
.qty-num { font-weight: 700; min-width: 20px; text-align: center; }
.btn-remove {
  font-size: 1.1rem;
  color: var(--gray-3);
  padding: 4px;
  border-radius: 50%;
  transition: color 0.12s, background 0.12s;
  flex-shrink: 0;
}
.btn-remove:hover { color: var(--red); background: #ffebee; }

/* 주문 요약 */
.order-summary {
  width: 300px;
  flex-shrink: 0;
  background: var(--gray-1);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.order-summary h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 20px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--text-sub);
}
.summary-row.total {
  border-top: 1px solid var(--gray-2);
  padding-top: 14px;
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}
.summary-row.total span:last-child { color: var(--green); }
.btn-order {
  width: 100%;
  padding: 14px;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 20px;
  transition: background 0.15s;
}
.btn-order:hover { background: #1b5e20; }
.btn-continue {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--gray-2);
  color: var(--text-sub);
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-top: 10px;
  transition: background 0.12s;
}
.btn-continue:hover { background: var(--gray-2); }

/* ── 푸터 ─────────────────────────────────────────────────────── */
.footer {
  background: #1a1a1a;
  color: #aaa;
  padding: 40px 24px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #333;
}
.footer-brand .logo { color: var(--green-light); font-size: 1.2rem; margin-bottom: 10px; }
.footer-brand p { font-size: 0.82rem; line-height: 1.8; }
.footer-col h5 { color: #ddd; font-size: 0.88rem; font-weight: 700; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { font-size: 0.82rem; margin-bottom: 6px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  font-size: 0.78rem;
  text-align: center;
}

/* ── 토스트 ───────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #323232;
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 반응형 ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .coupon-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .coupon-item:nth-child(2) { border-right: none; }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-nav { display: none; }
  .hero h1 { font-size: 1.9rem; }
  .hero-stats { flex-direction: column; gap: 8px; padding: 16px 20px; }
  .hero-stat-divider { width: 40px; height: 1px; }
  .coupon-bar-inner { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .event-cards { grid-template-columns: 1fr; }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .products-layout { flex-direction: column; }
  .filter-sidebar { width: 100%; }
  .cart-layout { flex-direction: column; }
  .order-summary { width: 100%; position: static; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 12px 0; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-main { padding: 16px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.9rem; }
  .coupon-bar-inner { grid-template-columns: 1fr; }
  .coupon-item { border-right: none; border-bottom: 1px solid var(--gray-2); }
  .quick-cat-icon { width: 54px; height: 54px; font-size: 1.5rem; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
}

/* ── 로그인 페이지 ────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-1);
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  padding: 40px 36px;
}

.auth-logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--green);
  text-align: center;
  margin-bottom: 4px;
}
.auth-logo span { color: var(--orange); }

.auth-sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-3);
  margin-bottom: 28px;
}

/* 탭 */
.auth-tabs {
  display: flex;
  background: var(--gray-1);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-3);
  transition: background 0.15s, color 0.15s;
}
.auth-tab.active {
  background: var(--white);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* 폼 */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-sub); }
.form-group input {
  padding: 11px 14px;
  border: 1.5px solid var(--gray-2);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus { border-color: var(--green); }

.auth-error {
  font-size: 0.82rem;
  color: var(--red);
  min-height: 16px;
  margin: -8px 0;
}

.btn-auth {
  padding: 13px;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
  transition: background 0.15s;
}
.btn-auth:hover { background: #1b5e20; }

.auth-hint {
  text-align: center;
  font-size: 0.83rem;
  color: var(--gray-3);
}
.auth-hint a { color: var(--green); font-weight: 600; }
.auth-hint a:hover { text-decoration: underline; }

/* ── 헤더 로그인 버튼 ─────────────────────────────────────────── */
.btn-login {
  padding: 7px 18px;
  border: 1.5px solid var(--green);
  border-radius: 20px;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-login:hover { background: var(--green); color: #fff; }

/* ── 유저 메뉴 ────────────────────────────────────────────────── */
.user-menu { position: relative; }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.user-avatar:hover { background: #1b5e20; }

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  padding: 12px 0;
  z-index: 200;
}
.user-dropdown.open { display: block; }

.user-dropdown-name {
  padding: 0 16px 2px;
  font-size: 0.9rem;
  font-weight: 700;
}
.user-dropdown-email {
  padding: 0 16px 8px;
  font-size: 0.78rem;
  color: var(--gray-3);
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 16px;
  font-size: 0.88rem;
  color: var(--text);
  transition: background 0.12s;
}
.dropdown-item:hover { background: var(--gray-1); }

.dropdown-admin { color: var(--orange); font-weight: 700; }
.dropdown-admin:hover { background: #fff3e0; }

.user-avatar-admin { background: var(--orange); }
.user-avatar-admin:hover { background: #e65100; }

.badge-admin-tag {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  vertical-align: middle;
}

/* ── 상품 상세 페이지 ─────────────────────────────────────────── */
.breadcrumb {
  padding: 16px 0 24px;
  font-size: 0.82rem;
  color: var(--gray-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a { color: var(--gray-3); }
.breadcrumb a:hover { color: var(--green); }

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
}

.pd-img-wrap { position: relative; }
.pd-img {
  background: var(--green-pale);
  border-radius: 16px;
  height: 420px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10rem;
}
.pd-badge-wrap { margin-top: 12px; }

.pd-category {
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 6px;
}
.pd-name {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 6px;
  line-height: 1.3;
}
.pd-unit { font-size: 0.85rem; color: var(--gray-3); margin-bottom: 10px; }

.pd-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; }
.pd-rating .stars { color: #f57c00; }
.pd-rating .review-cnt { font-size: 0.82rem; color: var(--gray-3); }

.pd-price-box { margin-bottom: 20px; }
.pd-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--green);
  margin-bottom: 4px;
}
.pd-delivery { font-size: 0.82rem; color: var(--gray-3); }

.pd-divider { border: none; border-top: 1px solid var(--gray-2); margin: 20px 0; }

.pd-qty-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}
.pd-qty-label { font-size: 0.88rem; font-weight: 600; color: var(--text-sub); width: 40px; }
.pd-qty-ctrl { display: flex; align-items: center; gap: 12px; }

.pd-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--gray-2);
  border-bottom: 1px solid var(--gray-2);
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-sub);
}
.pd-total-price {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--green);
}

.pd-btn-group { display: flex; gap: 10px; margin-bottom: 24px; }
.btn-pd-cart {
  flex: 1;
  padding: 15px;
  border: 2px solid var(--green);
  background: #fff;
  color: var(--green);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.15s;
  font-family: inherit;
}
.btn-pd-cart:hover { background: var(--green-pale); }
.btn-pd-buy {
  flex: 1;
  padding: 15px;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.15s;
}
.btn-pd-buy:hover { background: #1b5e20; }

.pd-benefits {
  background: var(--gray-1);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-benefit-item { font-size: 0.83rem; color: var(--text-sub); }
.pd-benefit-item span { margin-left: 4px; }

/* 탭 */
.pd-tab-section { padding: 40px 0 60px; }
.pd-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-2);
  margin-bottom: 32px;
}
.pd-tab {
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s;
}
.pd-tab.active { color: var(--green); border-bottom-color: var(--green); }
.pd-tab:hover { color: var(--text); }
.pd-tab-content { display: none; }
.pd-tab-content.active { display: block; }

.pd-desc { max-width: 600px; }
.pd-desc .desc-emoji { font-size: 5rem; margin-bottom: 16px; }
.pd-desc h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.pd-desc p { color: var(--text-sub); margin-bottom: 16px; line-height: 1.8; }
.pd-desc ul { padding-left: 20px; }
.pd-desc li { font-size: 0.88rem; color: var(--text-sub); margin-bottom: 6px; }

.info-table { border-collapse: collapse; width: 100%; max-width: 600px; }
.info-table th, .info-table td {
  padding: 12px 16px;
  border: 1px solid var(--gray-2);
  font-size: 0.88rem;
  text-align: left;
  vertical-align: top;
}
.info-table th {
  background: var(--gray-1);
  font-weight: 700;
  width: 120px;
  color: var(--text-sub);
}

@media (max-width: 768px) {
  .product-detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .pd-img { height: 260px; font-size: 7rem; }
}

/* ── 관리자 대시보드 ──────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 100px);
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #1a1a1a;
  padding: 24px 0;
}

.admin-sidebar-title {
  padding: 0 20px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #333;
  margin-bottom: 8px;
}

.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }

.admin-nav-btn {
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #aaa;
  transition: background 0.15s, color 0.15s;
}
.admin-nav-btn:hover { background: #2a2a2a; color: #fff; }
.admin-nav-btn.active { background: var(--orange); color: #fff; font-weight: 700; }

.admin-main {
  flex: 1;
  padding: 32px;
  background: #f7f7f7;
  overflow-x: auto;
}

.admin-tab { display: none; }
.admin-tab.active { display: block; }

.admin-page-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
}

.admin-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.admin-tab-header .admin-page-title { margin-bottom: 0; }

/* 통계 카드 */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}
.stat-icon { font-size: 2rem; }
.stat-label { font-size: 0.8rem; color: var(--gray-3); margin-bottom: 4px; }
.stat-value { font-size: 1.3rem; font-weight: 800; color: var(--text); }

/* 관리자 테이블 */
.admin-section { margin-top: 24px; }
.admin-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
}
.admin-table th {
  background: #f0f0f0;
  padding: 11px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-sub);
  border-bottom: 1px solid var(--gray-2);
}
.admin-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--gray-2);
  color: var(--text);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }
.admin-table-clickable tbody tr { cursor: pointer; }
.admin-table-clickable tbody tr.selected td { background: #fff8e1; }
.admin-table-clickable tbody tr:hover td { background: #fff3cd; }

/* 관리 버튼 */
.btn-admin-add {
  padding: 9px 18px;
  background: var(--orange);
  color: #fff;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.15s;
}
.btn-admin-add:hover { background: #e65100; }

.btn-admin-manage {
  padding: 5px 14px;
  background: #e8f5e9;
  color: var(--primary);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 4px;
  transition: background 0.12s;
}
.btn-admin-manage:hover { background: #c8e6c9; }

.td-actions { white-space: nowrap; }

.row-editing td { background: #fff8e1 !important; }

.btn-admin-edit {
  padding: 5px 12px;
  background: #e3f2fd;
  color: #1565c0;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 4px;
  transition: background 0.12s;
}
.btn-admin-edit:hover { background: #bbdefb; }

.btn-admin-delete {
  padding: 5px 12px;
  background: #ffebee;
  color: var(--red);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.12s;
}
.btn-admin-delete:hover { background: #ffcdd2; }

.btn-admin-save {
  padding: 9px 20px;
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.15s;
}
.btn-admin-save:hover { background: #1b5e20; }

.btn-admin-cancel {
  padding: 9px 20px;
  background: transparent;
  border: 1px solid var(--gray-2);
  color: var(--text-sub);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background 0.12s;
}
.btn-admin-cancel:hover { background: var(--gray-2); }

/* 상품 추가/수정 폼 */
.admin-form-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--orange);
}
.admin-form-box h4 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.admin-form-grid .form-group label { font-size: 0.82rem; }
.admin-form-grid select {
  padding: 11px 14px;
  border: 1.5px solid var(--gray-2);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.admin-form-grid select:focus { border-color: var(--orange); }
.admin-form-grid input:focus { border-color: var(--orange); }

.admin-form-actions { display: flex; gap: 8px; }

/* 역할 배지 */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}
.role-admin { background: #fff3e0; color: var(--orange); }
.role-user  { background: var(--green-pale); color: var(--green); }

/* ── 상품 편집 패널 ──────────────────────────────────────────── */
.admin-hint {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.pd-editor {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  margin-top: 24px;
  border: 2px solid var(--orange);
  overflow: hidden;
}

.pd-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #fff8f0;
  border-bottom: 1px solid #ffe0b2;
}
.pd-editor-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.btn-pd-editor-close {
  font-size: 0.82rem;
  color: var(--text-sub);
  border: 1px solid var(--gray-2);
  border-radius: 6px;
  padding: 5px 12px;
  transition: background 0.12s;
}
.btn-pd-editor-close:hover { background: #f5f5f5; }

.pd-edit-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-2);
  background: #fafafa;
}
.pd-edit-tab {
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-sub);
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.pd-edit-tab:hover { color: var(--orange); }
.pd-edit-tab.active { color: var(--orange); border-bottom-color: var(--orange); }

.pd-edit-content { display: none; padding: 24px; }
.pd-edit-content.active { display: block; }

.pd-edit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.pd-edit-guide { font-size: 0.82rem; color: var(--text-sub); }
.pd-quick-btns button {
  font-size: 0.8rem;
  padding: 5px 12px;
  border: 1px solid var(--orange);
  color: var(--orange);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: background 0.12s;
}
.pd-quick-btns button:hover { background: #fff8f0; }

.pd-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--gray-2);
  border-radius: 8px;
  padding: 14px;
  font-size: 0.88rem;
  font-family: 'Courier New', monospace;
  resize: vertical;
  line-height: 1.6;
  transition: border-color 0.15s;
}
.pd-edit-textarea:focus { outline: none; border-color: var(--orange); }

.pd-edit-preview-wrap {
  margin-top: 16px;
  border: 1.5px dashed var(--gray-2);
  border-radius: 8px;
  overflow: hidden;
}
.pd-edit-preview-label {
  background: #f5f5f5;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-sub);
  border-bottom: 1px solid var(--gray-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pd-edit-preview {
  padding: 16px;
  min-height: 40px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.pd-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ── Quill 에디터 커스텀 스타일 (admin) ──────────────────────── */
.quill-custom-toolbar {
  border: 1.5px solid #ddd;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #fafafa;
  padding: 6px 8px;
}
.quill-desc-editor {
  border: 1.5px solid #ddd;
  border-radius: 0 0 8px 8px;
  min-height: 420px;
  font-size: 0.95rem;
  background: #fff;
}
.quill-desc-editor .ql-editor {
  min-height: 400px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.8;
  padding: 20px 24px;
}
.quill-desc-editor .ql-editor img {
  max-width: 100%;
  border-radius: 6px;
  margin: 12px 0;
  cursor: pointer;
}
.quill-desc-editor .ql-editor h1 { font-size: 1.6rem; font-weight: 800; margin: 16px 0 8px; }
.quill-desc-editor .ql-editor h2 { font-size: 1.3rem; font-weight: 700; margin: 14px 0 6px; }
.quill-desc-editor .ql-editor h3 { font-size: 1.1rem; font-weight: 700; margin: 12px 0 4px; }
.quill-desc-editor .ql-editor blockquote {
  border-left: 4px solid var(--primary);
  background: #f1f8f1;
  margin: 12px 0;
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  color: var(--text-sub);
}

/* Quill 뷰어 공통 (product.html) */
.pd-desc, .shipping-info {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}
.pd-desc .ql-align-center, .shipping-info .ql-align-center { text-align: center; }
.pd-desc .ql-align-right,  .shipping-info .ql-align-right  { text-align: right; }
.pd-desc img, .shipping-info img { max-width: 100%; border-radius: 6px; margin: 12px 0; }
.pd-desc h1, .shipping-info h1  { font-size: 1.5rem; font-weight: 800; margin: 20px 0 8px; }
.pd-desc h2, .shipping-info h2  { font-size: 1.25rem; font-weight: 700; margin: 16px 0 6px; }
.pd-desc h3, .shipping-info h3  { font-size: 1.05rem; font-weight: 700; margin: 14px 0 4px; }
.pd-desc p,  .shipping-info p   { margin: 6px 0; }
.pd-desc ul, .pd-desc ol,
.shipping-info ul, .shipping-info ol { padding-left: 1.5em; margin: 8px 0; }
.pd-desc li, .shipping-info li  { margin: 4px 0; }
.pd-desc blockquote, .shipping-info blockquote {
  border-left: 4px solid var(--primary);
  background: #f1f8f1;
  margin: 12px 0;
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  color: var(--text-sub);
}

/* ── 상품정보 표 (product.html) ──────────────────────────────── */
.product-info-section {
  margin-bottom: 36px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
}
.product-info-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  padding: 16px 20px 14px;
  border-bottom: 2px solid #111;
  background: #fff;
}
.product-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.product-info-table tr { border-bottom: 1px solid #efefef; }
.product-info-table tr:last-child { border-bottom: none; }
.product-info-table th {
  width: 130px;
  min-width: 100px;
  padding: 12px 18px;
  text-align: left;
  font-weight: 400;
  color: #888;
  background: #fafafa;
  white-space: nowrap;
  border-right: 1px solid #efefef;
}
.product-info-table td {
  padding: 12px 18px;
  color: #222;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  color: #888;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2px 7px;
  cursor: pointer;
  margin-left: 8px;
  background: #fff;
  transition: background 0.12s;
}
.copy-btn:hover { background: #f5f5f5; color: #333; }

/* ── 관리자 상품정보 편집 폼 ─────────────────────────────────── */
.pinfo-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.custom-fields-wrap {
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 8px;
  padding: 14px 18px;
}
.custom-fields-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.custom-fields-header span { font-size: 0.85rem; font-weight: 700; color: var(--text-sub); }
.btn-add-field {
  font-size: 0.8rem;
  padding: 4px 12px;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.custom-field-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.custom-field-row input {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-2);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
}
.custom-field-row input:focus { outline: none; border-color: var(--orange); }
.btn-cf-remove {
  font-size: 0.75rem;
  color: #999;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.btn-cf-remove:hover { color: #e53935; border-color: #e53935; }

/* ── 상세페이지 펼쳐보기 (product.html) ──────────────────────── */
.pd-desc-wrap { position: relative; }
.desc-collapsed {
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}
.btn-expand {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  background: #f1f8f1;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.btn-expand:hover { background: #e8f5e9; }

/* ── FAQ 목록 ────────────────────────────────────────────────── */
.faq-list { margin: 0; padding: 0; }
.faq-list dt {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  padding: 12px 0 4px;
  border-top: 1px solid var(--gray-2);
  margin-top: 8px;
}
.faq-list dt:first-of-type { border-top: none; margin-top: 0; }
.faq-list dd {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 12px 0; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-form-grid { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 16px; }
  .pd-edit-tabs { flex-wrap: wrap; }
  .pd-edit-tab { padding: 10px 14px; font-size: 0.82rem; }
  .pinfo-form-grid { grid-template-columns: 1fr 1fr; }
  .product-info-table th { width: 90px; min-width: 70px; padding: 10px 12px; }
  .product-info-table td { padding: 10px 12px; }
}
