:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: #101010;
  --muted: #6e6a64;
  --border: #e6e0d9;
  --border-strong: #d8d0c8;
  --accent: #9a3329;
  --accent-soft: #f5ebe8;
  --shadow: 0 10px 24px rgba(21, 17, 12, 0.08);
  --radius: 8px;
  --gutter: 40px;
  --header-height: 64px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 370px minmax(240px, 680px) 1fr;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 2.6vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 16px;
  color: #161616;
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 44px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
}

.search input::placeholder {
  color: #8a8580;
}

.search input:focus {
  border-color: #cfc6bc;
  box-shadow: 0 0 0 3px rgba(154, 51, 41, 0.08);
}

.nav-links {
  display: flex;
  justify-content: flex-end;
  gap: 32px;
  font-size: 15px;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--header-height);
  color: #171513;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  height: 1px;
  content: "";
  background: transparent;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  background: var(--accent);
}

.page-shell {
  padding: 20px var(--gutter) 0;
}

.library {
  max-width: 1488px;
  margin: 0 auto;
}

.section-heading h1 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
}

.category-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr)) 44px;
  gap: 6px;
  align-items: stretch;
  margin-bottom: 20px;
}

.category-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 108px;
  overflow: hidden;
  padding: 14px 16px;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  background: #211d18;
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
  isolation: isolate;
}

.category-card::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.52)), var(--image);
  background-position: center;
  background-size: cover;
  transition: transform 220ms ease;
}

.category-card::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: rgba(0, 0, 0, 0);
  transition: background 180ms ease;
}

.category-card:hover::before,
.category-card:focus-visible::before {
  transform: scale(1.04);
}

.category-card.active::after {
  background: rgba(255, 255, 255, 0.08);
}

.category-card span:last-child {
  position: relative;
  z-index: 1;
  font-size: 17px;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.icon-chip {
  position: absolute;
  top: 36px;
  left: 18px;
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #26221f;
  background: rgba(247, 240, 230, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.rail-next {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  align-self: center;
  color: #1f1b17;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 222px);
  margin-bottom: 14px;
}

.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 108px;
  height: 38px;
  padding: 0 14px;
  color: #28231f;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.filter-button span {
  display: block;
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.filter-button svg {
  width: 18px;
  height: 18px;
}

.filter-button.active,
.filter-button:hover {
  background: var(--surface-soft);
  border-color: var(--border-strong);
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 130px;
  height: 38px;
  margin-left: auto;
  color: var(--muted);
}

.sort-control select {
  color: #211d18;
  cursor: pointer;
  background: transparent;
  border: 0;
  outline: none;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 206px;
  gap: 16px;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  grid-auto-rows: 94px;
  gap: 6px;
  align-items: stretch;
}

.mood-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  cursor: pointer;
  background: #ece8e3;
  border-radius: var(--radius);
  outline: 0 solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, outline-color 180ms ease;
}

.mood-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.16));
  opacity: 0;
  transition: opacity 180ms ease;
}

.mood-card:hover,
.mood-card:focus-within,
.mood-card.selected {
  z-index: 1;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.mood-card:hover::after,
.mood-card:focus-within::after,
.mood-card.selected::after {
  opacity: 1;
}

.mood-card.selected {
  outline: 2px solid rgba(154, 51, 41, 0.38);
}

.mood-card button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  height: 28px;
  padding: 0 12px;
  color: #15110d;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.mood-card:hover button,
.mood-card:focus-within button {
  opacity: 1;
  transform: translateY(0);
}

.span-2 {
  grid-column: span 2;
}

.wide {
  grid-column: span 3;
}

.tall {
  grid-row: span 2;
}

.short {
  grid-row: span 1;
}

.shop-module {
  display: grid;
  min-width: 0;
  grid-column: span 3;
  grid-row: span 1;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px 14px 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.shop-module > div {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  min-height: 18px;
}

.shop-module h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.shop-module button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.shop-module a {
  display: block;
  height: 58px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid #eee8e1;
  border-radius: 7px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.shop-module a:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.related-panel {
  margin-top: -52px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.related-panel h2 {
  margin: 8px 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.related-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 24px;
  gap: 8px;
  align-items: center;
  margin-bottom: 15px;
}

.related-item img {
  grid-column: 1 / -1;
  height: 84px;
  overflow: hidden;
  border-radius: 7px;
}

.related-item span {
  font-size: 13px;
  line-height: 1.2;
}

.related-item svg {
  justify-self: end;
  width: 16px;
  height: 16px;
}

.related-item:hover span,
.explore-all:hover {
  color: var(--accent);
}

.explore-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--accent);
  font-size: 13px;
}

.site-footer {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 36px var(--gutter) 28px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.detail-shell,
.collection-shell {
  max-width: 1488px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
}

.pin-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(320px, 0.32fr);
  gap: 22px;
  align-items: start;
}

.pin-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(760px, calc(100vh - var(--header-height) - 96px));
  min-height: min(560px, calc(100vh - var(--header-height) - 96px));
  margin: 0;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: var(--radius);
}

.pin-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pin-info {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  padding: 2px 0 0;
}

.pin-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.pin-info h1,
.collection-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.pin-info p:not(.pin-kicker) {
  margin: 18px 0 0;
  color: #3f3a35;
  font-size: 16px;
  line-height: 1.55;
}

.pin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 18px;
}

.save-primary,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  cursor: pointer;
  border-radius: var(--radius);
}

.save-primary {
  color: #ffffff;
  background: #15120f;
  border: 1px solid #15120f;
}

.secondary-link {
  color: #1e1a16;
  background: #ffffff;
  border: 1px solid var(--border);
}

.tag-list,
.collection-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list a,
.collection-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  color: #28231f;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
}

.detail-shop {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.detail-shop h2,
.more-moods h2,
.collection-results h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.detail-shop span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.detail-product {
  display: grid;
  gap: 6px;
}

.detail-product img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.detail-product span {
  margin: 0;
  color: #36312d;
  font-size: 11px;
  line-height: 1.2;
}

.more-moods {
  margin-top: 32px;
}

.more-grid,
.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.more-card,
.collection-card {
  position: relative;
  display: block;
  min-height: 180px;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: var(--radius);
}

.more-card::after,
.collection-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.42));
}

.more-card span,
.collection-card strong,
.collection-card span {
  position: absolute;
  z-index: 1;
  color: #ffffff;
}

.more-card span,
.collection-card strong {
  right: 12px;
  bottom: 12px;
  left: 12px;
  font-size: 16px;
}

.collection-card span {
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  color: #201b17;
  font-size: 11px;
}

.collection-hero {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.collection-hero p {
  margin: 0 0 6px;
  color: var(--muted);
}

.collection-chips {
  margin-top: 18px;
}

.collection-results {
  margin-top: 18px;
}

.split-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.split-heading span {
  color: var(--muted);
  font-size: 13px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1220px) {
  :root {
    --gutter: 24px;
  }

  .site-header {
    grid-template-columns: 210px minmax(220px, 1fr) auto;
  }

  .category-rail {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .category-rail::-webkit-scrollbar {
    display: none;
  }

  .category-card {
    min-width: 190px;
  }

  .rail-next {
    flex: 0 0 44px;
  }

  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-row {
    max-width: none;
  }

  .related-panel {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .related-panel h2,
  .explore-all {
    grid-column: 1 / -1;
  }

  .related-item {
    margin: 0;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px var(--gutter) 14px;
  }

  .brand {
    font-size: 36px;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 22px;
    order: 3;
    overflow-x: auto;
  }

  .nav-links a {
    min-height: 28px;
  }

  .nav-links a::after {
    bottom: 0;
  }

  .page-shell {
    padding-top: 16px;
  }

  .filter-row {
    max-width: none;
    align-items: stretch;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .sort-control {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .mood-grid {
    grid-template-columns: repeat(2, calc((100vw - (var(--gutter) * 2) - 5px) / 2));
    grid-auto-rows: 112px;
    width: calc(100vw - (var(--gutter) * 2));
  }

  .span-2,
  .wide {
    grid-column: span 2;
  }

  .shop-module {
    grid-column: span 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-row: span 2;
  }

  .shop-module a {
    height: 72px;
  }

  .related-panel {
    margin-top: 0;
    grid-template-columns: 1fr;
  }

  .related-item {
    grid-template-columns: 132px 1fr 22px;
  }

  .related-item img {
    grid-column: auto;
    height: 72px;
  }

  .site-footer {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }

  .pin-detail {
    grid-template-columns: 1fr;
  }

  .pin-hero {
    height: auto;
    min-height: 0;
    max-height: 78vh;
    aspect-ratio: 4 / 5;
  }

  .pin-info {
    position: static;
  }

  .detail-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 520px) {
  :root {
    --gutter: 14px;
  }

  .brand {
    font-size: 33px;
  }

  .search input {
    height: 40px;
    font-size: 13px;
  }

  .category-card {
    min-width: 178px;
    min-height: 102px;
  }

  .mood-grid {
    grid-auto-rows: 96px;
    gap: 5px;
  }
}
