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

:root {
  --bg: #f4efe7;
  --surface: #fffdf9;
  --surface-strong: #fff7ec;
  --line: #ded5c8;
  --ink: #181411;
  --ink-soft: #5c5145;
  --accent: #ca3d28;
  --accent-deep: #a63422;
  --accent-soft: #ffe7df;
  --ok: #1b8a5a;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(202, 61, 40, 0.14), transparent 34%),
    radial-gradient(circle at 15% 22%, rgba(56, 98, 179, 0.1), transparent 36%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(244, 239, 231, 0.88);
  border-bottom: 1px solid rgba(160, 142, 120, 0.28);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-menu {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  transition: all 150ms ease;
}

.nav-link:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.65);
}

.nav-link.active {
  color: var(--ink);
  border-color: var(--ink);
  background: #fff;
}

.page-content {
  width: min(1180px, 100%);
  margin: 32px auto 42px;
  padding: 0 24px;
  flex: 1;
}

.page-stack {
  display: grid;
  gap: 22px;
}

.hero-block {
  background: linear-gradient(135deg, #fefcf8, #fff4e7 70%);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  display: grid;
  gap: 20px;
  grid-template-columns: 1.45fr 1fr;
  box-shadow: 0 14px 34px rgba(40, 24, 12, 0.08);
}

.hero-copy h1 {
  margin: 8px 0 14px;
  font-size: clamp(31px, 5vw, 54px);
  line-height: 1.04;
}

.hero-copy p {
  margin: 0;
  max-width: 42ch;
  color: var(--ink-soft);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-panel {
  border-radius: 18px;
  padding: 22px;
  background:
    linear-gradient(160deg, rgba(20, 16, 12, 0.9), rgba(20, 16, 12, 0.72)),
    radial-gradient(circle at 10% 15%, rgba(255, 255, 255, 0.3), transparent 40%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 260px;
}

.hero-panel p {
  margin: 0;
  opacity: 0.8;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panel h3 {
  margin: 14px 0 6px;
  font-size: 30px;
  line-height: 1.06;
}

.hero-panel span {
  color: #f7ccb8;
  margin-bottom: 14px;
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, border-color 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-line {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-deep);
}

.btn.wide {
  width: 100%;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title-wrap h2 {
  margin: 0;
  font-size: clamp(23px, 4vw, 32px);
}

.section-title-spaced {
  margin-bottom: 12px;
}

.inline-link {
  color: var(--ink-soft);
  font-size: 14px;
}

.inline-link:hover {
  color: var(--ink);
}

.category-grid {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: var(--surface);
}

.category-grid-inner {
  margin-top: 15px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card {
  border-radius: 14px;
  border: 1px solid #e7dbcb;
  background: linear-gradient(170deg, #fff, #fff4e7);
  padding: 16px;
  min-height: 146px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(33, 19, 7, 0.08);
}

.category-card h3 {
  margin: 6px 0 10px;
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.category-card .category-label {
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 12px;
}

.section-header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 24px 22px;
}

.section-header h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.section-header p {
  margin: 0;
  color: var(--ink-soft);
}

.catalog-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 20px;
}

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

.product-card {
  display: grid;
  grid-template-rows: auto auto auto;
  border: 1px solid #ebdfd0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.product-media-link {
  display: block;
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-bottom: 1px solid #eee3d6;
}

.media-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.03em;
}

.tone-ink {
  background: linear-gradient(140deg, #1d2a34, #11191f);
}

.tone-stone {
  background: linear-gradient(140deg, #bfc3c7, #878f95);
}

.tone-indigo {
  background: linear-gradient(140deg, #32547a, #142842);
}

.tone-sand {
  background: linear-gradient(140deg, #d8b79c, #c39671);
}

.tone-blush {
  background: linear-gradient(140deg, #f6d9d7, #e9b8b5);
}

.tone-sky {
  background: linear-gradient(140deg, #bfd8ec, #8da8c0);
}

.tone-charcoal {
  background: linear-gradient(140deg, #4e505a, #2a2d35);
}

.tone-khaki {
  background: linear-gradient(140deg, #9da186, #64684f);
}

.tone-cacao {
  background: linear-gradient(140deg, #8e6c51, #4e3b2d);
}

.tone-olive {
  background: linear-gradient(140deg, #708058, #424f33);
}

.tone-rose {
  background: linear-gradient(140deg, #d89aa4, #a6656f);
}

.tone-graphite {
  background: linear-gradient(140deg, #60656a, #2b3136);
}

.product-info {
  padding: 15px 14px 11px;
}

.product-category {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.product-name {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  font-weight: 700;
}

.product-summary {
  margin: 8px 0 8px;
  min-height: 34px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.product-price {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.product-actions {
  border-top: 1px solid #eee3d6;
  padding: 12px 14px 14px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.detail-layout {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 18px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.05fr 1fr;
}

.detail-media-wrap {
  border-radius: 16px;
  overflow: hidden;
}

.detail-media {
  position: relative;
  min-height: 460px;
}

.detail-panel {
  padding: 8px 4px 6px;
}

.detail-panel h1 {
  margin: 7px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.detail-price {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
}

.detail-copy {
  margin: 12px 0 18px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.label {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.size-group {
  margin-bottom: 13px;
}

.size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-chip {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.qty-line {
  margin-bottom: 12px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.qty-control button {
  width: 34px;
  height: 34px;
  border: 0;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
}

.qty-control span {
  width: 34px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.cart-hint {
  margin: 10px 0 0;
  color: var(--ok);
  font-size: 13px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  align-items: start;
}

.cart-list,
.cart-summary,
.empty-cart,
.not-found {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.cart-list {
  padding: 20px;
}

.cart-list h1 {
  margin: 0 0 14px;
  font-size: 34px;
}

.cart-item {
  padding: 13px 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  border-top: 1px solid #ece0d2;
}

.cart-item:first-of-type {
  border-top: 1px solid #ece0d2;
}

.cart-thumb {
  min-height: 96px;
  border-radius: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 8px;
}

.cart-thumb span {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #fff;
  padding: 3px 7px;
  border-radius: 999px;
}

.cart-item-category {
  margin: 0;
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
}

.cart-item-name {
  display: inline-block;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
}

.cart-item-price {
  margin: 7px 0 0;
  color: var(--ink-soft);
}

.cart-item-actions {
  display: grid;
  justify-items: end;
  gap: 9px;
}

.cart-subtotal {
  margin: 0;
  font-weight: 700;
}

.delete-link {
  border: 0;
  background: none;
  color: #7c6f63;
  font-size: 13px;
  cursor: pointer;
}

.delete-link:hover {
  color: var(--accent);
}

.cart-summary {
  padding: 20px;
}

.cart-summary h2 {
  margin: 0 0 16px;
  font-size: 25px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--ink-soft);
}

.summary-row strong {
  color: var(--ink);
}

.summary-row.total {
  margin: 14px 0 16px;
  padding-top: 12px;
  border-top: 1px dashed #d8cab8;
}

.summary-row.total span,
.summary-row.total strong {
  color: var(--ink);
  font-size: 18px;
}

.summary-note {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.empty-cart,
.not-found {
  padding: 46px 22px;
  text-align: center;
}

.empty-cart h1,
.not-found h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.06;
}

.empty-cart p,
.not-found p {
  margin: 0;
  color: var(--ink-soft);
}

.empty-cart .btn,
.not-found .btn {
  margin-top: 18px;
}

.site-footer {
  padding: 20px 24px 34px;
  border-top: 1px solid rgba(166, 147, 126, 0.25);
  text-align: center;
  color: #7a6c5d;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.site-footer span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}

@media (max-width: 1040px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-block,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-media {
    min-height: 320px;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }

  .nav-menu {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .page-content {
    margin: 20px auto 30px;
    padding: 0 14px;
  }

  .hero-block,
  .category-grid,
  .catalog-section,
  .section-header,
  .cart-list,
  .cart-summary,
  .empty-cart,
  .not-found {
    border-radius: 16px;
    padding: 14px;
  }

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

  .cart-item {
    grid-template-columns: 68px 1fr;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    justify-items: start;
    grid-auto-flow: column;
    justify-content: space-between;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-grid-inner {
    grid-template-columns: 1fr;
  }

  .product-actions {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    width: 100%;
  }
}
