:root {
  --green: #1d9b47;
  --green-dark: #157a37;
  --green-soft: #e9f7ee;
  --mint: #effaf3;
  --lime: #f4fbe3;
  --red: #ff4b3e;
  --text: #17201b;
  --sub: #58635c;
  --muted: #9ba49e;
  --line: #e9ede9;
  --bg: #ffffff;
  --tile: #f3f6f4;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(18, 40, 26, .04), 0 8px 24px rgba(18, 40, 26, .06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  letter-spacing: -0.015em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* ───── 버튼 ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border-radius: 999px; border: 0;
  background: var(--green); color: #fff; font-weight: 700; font-size: 16px;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(29, 155, 71, .24);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(29, 155, 71, .30); }
.btn span { transition: transform .15s; }
.btn:hover span { transform: translateX(3px); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; box-shadow: none; }
.btn--sm:hover { box-shadow: none; }
.btn--lg { height: 56px; font-size: 17px; border-radius: 16px; }
.btn--line { background: #fff; color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.btn--line:hover { background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.btn--white { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(18, 40, 26, .08); }
.btn--white:hover { background: #fff; box-shadow: 0 6px 16px rgba(18, 40, 26, .12); }
.btn--block { display: flex; width: 100%; }

/* ───── 헤더 ───── */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(233, 237, 233, .8);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.header__logo img { height: 34px; width: auto; }

/* ───── 상단 배너 ───── */
.hero { padding-top: 24px; }
.hero__box {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  padding: 56px 56px;
  border-radius: 28px;
  background: linear-gradient(120deg, #e6f7ec 0%, #f1f9e4 55%, #fbfcef 100%);
}
.hero__box::before, .hero__box::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(10px);
}
.hero__box::before { width: 380px; height: 380px; right: -80px; top: -140px; background: radial-gradient(circle, rgba(140, 214, 120, .45), transparent 70%); }
.hero__box::after { width: 300px; height: 300px; left: -120px; bottom: -160px; background: radial-gradient(circle, rgba(61, 186, 110, .25), transparent 70%); }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 16px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .75); color: var(--green-dark);
  font-weight: 800; font-size: 12px; letter-spacing: .12em;
}
.hero__eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(29, 155, 71, .18); }
.hero__title { margin: 0; font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.22; }
.hero__text { margin: 16px 0 0; color: var(--sub); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.65; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.hero__features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hero__features li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 20px; border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 4px 16px rgba(30, 90, 50, .06);
  backdrop-filter: blur(6px);
  transition: transform .2s;
}
.hero__features li:hover { transform: translateY(-2px); }
.feature__icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 10px;
  border-radius: 12px; background: var(--green-soft); color: var(--green);
}
.feature__icon svg { width: 22px; height: 22px; }
.hero__features strong { font-size: 16px; font-weight: 700; }
.hero__features small { color: var(--sub); font-size: 13px; }

@media (max-width: 900px) {
  .hero__box { grid-template-columns: 1fr; gap: 28px; padding: 40px 28px; }
}
@media (max-width: 480px) {
  .hero { padding-top: 12px; }
  .hero__box { padding: 32px 20px 20px; border-radius: 22px; }
  .hero__actions .btn { flex: 1; }
  .hero__box { gap: 24px; }
  .hero__actions { margin-top: 22px; }
  .hero__features { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .hero__features li { align-items: center; text-align: center; padding: 12px 4px; border-radius: 14px; }
  .feature__icon { width: 36px; height: 36px; margin-bottom: 6px; border-radius: 10px; }
  .feature__icon svg { width: 19px; height: 19px; }
  .hero__features strong { font-size: 12px; line-height: 1.3; }
  .hero__features small { display: none; }
}

/* ───── 상품 목록 ───── */
.products { padding-top: 56px; padding-bottom: 88px; }
.products__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.products__head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.products__count {
  display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px;
  border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 13px; font-weight: 800;
}
.products__hint { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 600px) { .products { padding-top: 40px; } .products__hint { display: none; } .products__head h2 { font-size: 20px; } }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 20px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; } }

.card {
  display: flex; flex-direction: column; width: 100%;
  padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
}
.card:focus-visible { outline: none; }
.card:focus-visible .card__img { outline: 3px solid var(--green); outline-offset: 3px; }
.card__img {
  display: block; position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: var(--radius); background: var(--tile);
}
.card__img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04); pointer-events: none; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card__img img { transform: scale(1.05); }
.card__noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.card__badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--green-dark);
  font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.card__more {
  position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px);
  padding: 8px 16px; border-radius: 999px;
  background: rgba(23, 32, 27, .82); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap;
  opacity: 0; transition: opacity .2s, transform .2s;
}
.card:hover .card__more { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .card__more { display: none; } }

.card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 4px 0; }
.card__name {
  font-size: 15px; font-weight: 500; line-height: 1.45; color: #2a332e;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__ship { font-size: 12px; color: var(--muted); }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.price__sale { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.price__list { color: var(--muted); font-size: 13px; }
.rate { font-style: normal; color: var(--red); font-size: 18px; font-weight: 800; }
.price--lg .price__sale, .price--lg .rate { font-size: 26px; }
.price--lg .price__list { font-size: 15px; }

/* 관리자 화면에서도 쓰는 배송 표시 */
.ship { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--sub); background: var(--tile); padding: 4px 9px; border-radius: 999px; }
.ship--free { color: var(--green-dark); background: var(--green-soft); }

@media (max-width: 480px) {
  .card__img { border-radius: 16px; }
  .card__body { padding-top: 10px; gap: 4px; }
  .card__name { font-size: 14px; }
  .price__sale, .rate { font-size: 16px; }
  .price__list { font-size: 12px; }
  .card__badge { top: 8px; left: 8px; padding: 4px 8px; font-size: 11px; }
}

.empty { padding: 80px 16px; text-align: center; color: var(--sub); background: var(--tile); border-radius: var(--radius); }
.empty p { margin: 0; }
.empty__title { color: var(--text); font-size: 18px; font-weight: 700; margin-bottom: 8px !important; }

/* ───── 하단 ───── */
.footer { background: #f6f8f6; padding: 44px 0 52px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.footer__logo { height: 28px; width: auto; filter: grayscale(1); opacity: .5; margin-bottom: 16px; }
.footer__info { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 0 0 14px; color: #7d8680; }
.footer__info b { font-weight: 600; color: #5f6862; margin-right: 2px; }
.footer__copy { margin: 0; }

/* ───── 상품 팝업 ───── */
.modal {
  width: min(460px, calc(100% - 32px)); max-height: calc(100% - 48px);
  padding: 0; border: 0; border-radius: 26px; background: #fff; color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25); overflow-y: auto; overscroll-behavior: contain;
}
.modal::backdrop { background: rgba(16, 26, 20, .5); backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
.modal__close {
  position: sticky; top: 14px; float: right; margin: 14px 14px -54px 0; z-index: 1;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .9); color: var(--text); box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  backdrop-filter: blur(6px);
}
.modal__close:focus:not(:focus-visible) { outline: none; }
.modal__img { position: relative; aspect-ratio: 1 / 1; background: var(--tile); }
.modal__img img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { display: flex; flex-direction: column; padding: 22px 24px 24px; }
.modal__name { margin: 0 0 8px; font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -0.025em; }
.modal__body .ship { margin-top: 10px; }
.modal__body > .btn { position: sticky; bottom: 16px; }   /* 내용이 길어도 바로가기 버튼은 늘 보이게 */
.modal__notice {
  margin: 20px 0; padding: 18px; border-radius: 16px;
  background: linear-gradient(120deg, #eef9f1, #f6fbe9); color: #2f4a38; font-size: 14px; line-height: 1.75;
}
@media (max-width: 480px) {
  .modal { width: 100%; max-width: none; max-height: 92%; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .modal[open] { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
  .modal__body { padding: 20px 20px 24px; }
  .price--lg .price__sale, .price--lg .rate { font-size: 22px; }
}
