:root {
  --bg: #f4f1e9;
  --bg-2: #fefcf7;
  --text: #1d1d1f;
  --point: #0f5a4a;
  --point-2: #f0b429;
  --card: #ffffff;
  --line: #e7dfd1;
  --danger: #b64040;
  --shadow: 0 16px 40px rgba(19, 19, 19, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(240, 180, 41, 0.3), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(15, 90, 74, 0.18), transparent 28%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
  line-height: 1.5;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(#000000 0.45px, transparent 0.45px);
  background-size: 3px 3px;
}

.site-header {
  width: min(1120px, 92vw);
  margin: 24px auto 8px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 14px;
  z-index: 20;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}

.main-nav {
  display: flex;
  gap: 20px;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.cart-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--point);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

main {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding-bottom: 56px;
}

.hero {
  margin-top: 52px;
  padding: 46px;
  border-radius: 34px;
  border: 1px solid var(--line);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at 90% 10%, rgba(15, 90, 74, 0.35), transparent 35%);
  box-shadow: var(--shadow);
}

.hero-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 10px;
  background: rgba(240, 180, 41, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.hero h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.05;
}

.hero h1 span {
  color: var(--point);
}

.hero-copy {
  max-width: 620px;
  margin: 18px 0 28px;
  color: #2a2a2d;
}

.hero-cta {
  text-decoration: none;
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.category-strip {
  margin: 28px 0 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.category-strip article {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
}

.category-strip h2 {
  margin: 0;
  font-size: 1.1rem;
}

.category-strip p {
  margin: 8px 0 0;
  color: #4e4e52;
  font-size: 0.92rem;
}

.section-head {
  margin: 40px 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.section-head h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.section-head p {
  margin: 0;
  color: #555558;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  display: grid;
  grid-template-rows: 170px auto;
  box-shadow: 0 8px 24px rgba(8, 8, 8, 0.07);
  transform: translateY(0);
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-6px);
}

.product-image {
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-family: "Fraunces", serif;
  color: #fff;
}

.product-body {
  padding: 16px;
}

.product-title {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-weight: 700;
}

.add-button {
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--point);
  color: #fff;
  cursor: pointer;
}

.story {
  margin-top: 52px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.9), rgba(240, 180, 41, 0.2));
  padding: 32px;
}

.story .eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #5c5c60;
}

.story h2 {
  margin: 8px 0 10px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100dvh;
  background: #fffdf9;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 28px rgba(24, 24, 24, 0.2);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-header,
.cart-footer {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-footer {
  border-bottom: 0;
  border-top: 1px solid var(--line);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h2 {
  margin: 0;
}

.cart-header button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 6px 10px;
  cursor: pointer;
}

.cart-items {
  padding: 14px 18px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  align-content: start;
}

.cart-empty {
  margin: 0;
  color: #666;
}

.cart-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.cart-item strong {
  display: block;
}

.cart-item-controls {
  display: flex;
  gap: 8px;
}

.qty-button,
.remove-button,
.checkout-button {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  font-weight: 700;
}

.qty-button,
.remove-button {
  padding: 6px 8px;
  color: #fff;
}

.qty-button {
  background: #3f3f44;
}

.remove-button {
  background: var(--danger);
}

.checkout-button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: var(--point);
  color: #fff;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.34);
  z-index: 45;
}

.site-footer {
  width: min(1120px, 92vw);
  margin: 0 auto 40px;
  text-align: center;
  color: #555;
  font-size: 0.92rem;
}

.section-reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.66s ease forwards;
}

.hero.section-reveal {
  animation-delay: 0.05s;
}

.category-strip.section-reveal {
  animation-delay: 0.16s;
}

.products.section-reveal {
  animation-delay: 0.26s;
}

.story.section-reveal {
  animation-delay: 0.34s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .category-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    margin-top: 14px;
    padding: 12px;
  }

  .hero {
    margin-top: 24px;
    padding: 28px 22px;
  }

  .hero-copy {
    font-size: 0.95rem;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .category-strip,
  .product-grid {
    grid-template-columns: 1fr;
  }
}
