:root {
  color: #1c1915;
  background: #f4f0e8;
  font-family: "Palatino Linotype", Palatino, "Iowan Old Style", Georgia, serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
}

a { color: inherit; }

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0 18px;
  border-bottom: 1px solid #d9d1c5;
}

.mark {
  font-size: 28px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  font-family: "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.links a { text-decoration: none; }

.links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

.sub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
}

button, select, input, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
}

.chip, .go, .add {
  border: 1px solid #1c1915;
  padding: 8px 12px;
  cursor: pointer;
}

.chip[aria-pressed="true"], .go { background: #1c1915; color: #f4f0e8; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-bottom: 40px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.photo {
  aspect-ratio: 3 / 4;
  background: #e7e1d7;
  width: 100%;
  object-fit: cover;
}

.photo.empty { display: block; }

.name { font-size: 18px; }

.meta, .note, .foot, label, .error {
  font-family: "Segoe UI", sans-serif;
  font-size: 13px;
}

.meta { letter-spacing: 0.04em; text-transform: uppercase; color: #5e584f; }

.detail, .cart, .page {
  padding: 10px 0 48px;
}

.detail[hidden], .cart[hidden] { display: none; }

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

.price { font-size: 20px; }

.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.lines { list-style: none; padding: 0; }

.lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #d9d1c5;
  padding: 10px 0;
}

.error { color: #8a2e2e; min-height: 1.2em; }

.foot {
  border-top: 1px solid #d9d1c5;
  padding: 22px 0 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page h1 { font-weight: 500; font-size: 32px; }

.page p { max-width: 62ch; }

.form {
  display: grid;
  gap: 14px;
  max-width: 640px;
}

label { display: grid; gap: 6px; }

input, textarea, select {
  border: 1px solid #cfc6ba;
  background: #fffdf8;
  padding: 10px;
}

textarea { min-height: 120px; resize: vertical; }

table { width: 100%; border-collapse: collapse; font-family: "Segoe UI", sans-serif; font-size: 14px; }

th, td { border-bottom: 1px solid #d9d1c5; text-align: left; padding: 8px 6px; vertical-align: top; }

@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .top { flex-direction: column; }
}

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