:root {
  --paper: #f4f0e8;
  --paper-light: #fbf9f4;
  --ink: #172019;
  --muted: #687067;
  --green: #244d35;
  --green-dark: #173523;
  --orange: #d76537;
  --line: #d8d1c5;
  --white: #fff;
  --shadow: 0 18px 50px rgba(32, 42, 34, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper-light);
  font-family: "Segoe UI", Arial, sans-serif;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  height: 92px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 32, 25, .12);
  background: var(--paper-light);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand strong { display: block; font-family: Georgia, serif; font-size: 22px; }
.brand small { display: block; margin-top: 3px; color: var(--muted); letter-spacing: .03em; }
.brand-mark { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); }
.brand-mark::before { width: 30px; height: 30px; }
.brand-mark::after { width: 18px; height: 18px; }
.brand-mark span { width: 6px; height: 6px; background: var(--orange); border: 0; }
.discogs-profile { text-decoration: none; font-weight: 650; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }

.hero {
  min-height: 610px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 5vw;
  padding: 70px clamp(24px, 7vw, 112px);
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.2)),
    repeating-linear-gradient(90deg, transparent 0 29px, rgba(36,77,53,.025) 30px);
}
.hero-copy { min-width: 0; }
.eyebrow { margin: 0 0 15px; color: var(--orange); font-size: 13px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.hero h1 { margin: 0; font: 700 clamp(54px, 6vw, 90px)/.94 Georgia, serif; letter-spacing: -.045em; }
.hero h1 em { color: var(--green); font-weight: 400; }
.hero-text { max-width: 620px; margin: 28px 0 32px; color: #515950; font-size: 18px; line-height: 1.7; }
.hero-search { display: flex; max-width: 650px; padding: 7px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-search input { min-width: 0; flex: 1; padding: 16px; border: 0; outline: 0; background: transparent; }
.hero-search button, .apply-button {
  border: 0; padding: 15px 22px; color: var(--white); background: var(--green); font-weight: 700; cursor: pointer;
}
.hero-search button:hover, .apply-button:hover { background: var(--green-dark); }
.hero-record { position: relative; min-height: 430px; }
.record {
  position: absolute; z-index: 2; width: min(34vw, 410px); aspect-ratio: 1; right: 3%; top: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #171717 0 4px, #202020 5px 8px);
  box-shadow: 22px 28px 45px rgba(0,0,0,.3);
  display: grid; place-items: center;
}
.record::after { content: ""; width: 18px; height: 18px; background: var(--paper); border-radius: 50%; }
.record-label {
  position: absolute; width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--orange); display: grid; place-items: center;
  text-align: center; color: #fff4e8; font-size: clamp(10px, 1vw, 14px); font-weight: 800; letter-spacing: .12em;
}
.sleeve {
  position: absolute; width: min(32vw, 390px); aspect-ratio: 1; right: 19%; top: 80px; transform: rotate(-7deg);
  background: var(--green); box-shadow: var(--shadow); display: flex; align-items: flex-end; padding: 34px;
}
.sleeve::before { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(255,255,255,.3); }
.sleeve span { color: #e8d8bc; font: 700 clamp(26px,3vw,44px)/.95 Georgia, serif; letter-spacing: -.02em; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--green); color: var(--white);
  padding: 32px clamp(24px, 7vw, 112px);
}
.stats div { padding: 4px 28px; border-right: 1px solid rgba(255,255,255,.2); }
.stats div:first-child { padding-left: 0; }
.stats div:last-child { border: 0; }
.stats strong { display: block; font: 600 30px Georgia, serif; }
.stats span { color: #cbd9cf; font-size: 13px; letter-spacing: .04em; }

.catalogue { padding: 80px clamp(24px, 6vw, 92px) 100px; }
.catalogue-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.catalogue h2 { margin: 0; font: 700 clamp(38px,5vw,64px)/1 Georgia, serif; }
#result-summary { color: var(--muted); }
.catalogue-layout { display: grid; grid-template-columns: 245px minmax(0,1fr); gap: 38px; }
.filters { align-self: start; position: sticky; top: 20px; padding: 24px; background: var(--paper); border: 1px solid var(--line); }
.filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.filter-header h3 { margin: 0; font: 700 23px Georgia, serif; }
.filter-header button { border: 0; color: var(--orange); background: none; cursor: pointer; }
.filters > label, .filters legend { display: block; margin: 20px 0 8px; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.filters select, .filters input, .results-toolbar select {
  width: 100%; padding: 12px; color: var(--ink); background: var(--white); border: 1px solid var(--line); outline: 0;
}
.filters fieldset { padding: 0; border: 0; }
.price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-inputs label span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.apply-button { width: 100%; margin-top: 22px; }
.results-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: 20px; }
.results-toolbar label { color: var(--muted); font-size: 13px; }
.results-toolbar select { width: auto; min-width: 205px; }
.mobile-filter-button { display: none; }
.view-switcher { display: flex; margin-right: 8px; border: 1px solid var(--line); background: var(--white); }
.view-switcher button {
  display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 11px; border: 0; border-right: 1px solid var(--line);
  color: var(--muted); background: transparent; cursor: pointer;
}
.view-switcher button:last-child { border-right: 0; }
.view-switcher button:hover { color: var(--green); background: var(--paper); }
.view-switcher button.active { color: var(--white); background: var(--green); }
.view-name { font-size: 12px; font-weight: 700; }
.view-icon { display: inline-block; width: 16px; height: 16px; }
.view-icon-covers {
  background:
    linear-gradient(currentColor 0 0) 0 0 / 7px 7px,
    linear-gradient(currentColor 0 0) 9px 0 / 7px 7px,
    linear-gradient(currentColor 0 0) 0 9px / 7px 7px,
    linear-gradient(currentColor 0 0) 9px 9px / 7px 7px;
  background-repeat: no-repeat;
}
.view-icon-compact {
  background:
    linear-gradient(currentColor 0 0) 0 0 / 4px 4px,
    linear-gradient(currentColor 0 0) 6px 0 / 4px 4px,
    linear-gradient(currentColor 0 0) 12px 0 / 4px 4px,
    linear-gradient(currentColor 0 0) 0 6px / 4px 4px,
    linear-gradient(currentColor 0 0) 6px 6px / 4px 4px,
    linear-gradient(currentColor 0 0) 12px 6px / 4px 4px,
    linear-gradient(currentColor 0 0) 0 12px / 4px 4px,
    linear-gradient(currentColor 0 0) 6px 12px / 4px 4px,
    linear-gradient(currentColor 0 0) 12px 12px / 4px 4px;
  background-repeat: no-repeat;
}
.view-icon-list {
  background:
    linear-gradient(currentColor 0 0) 0 1px / 16px 3px,
    linear-gradient(currentColor 0 0) 0 7px / 16px 3px,
    linear-gradient(currentColor 0 0) 0 13px / 16px 3px;
  background-repeat: no-repeat;
}
.record-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px 20px; }
.record-grid.view-compact { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px 14px; }
.view-compact .record-card h3 { font-size: 17px; }
.view-compact .record-card h4 { font-size: 13px; }
.view-compact .condition { font-size: 11px; }
.view-compact .price { font-size: 17px; }
.record-grid.view-list { display: block; border-top: 1px solid var(--line); }
.view-list .record-card {
  display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line);
}
.view-list .cover-button { width: 108px; }
.view-list .card-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .6fr); align-content: center; column-gap: 25px; padding: 0; }
.view-list .card-kicker, .view-list h3, .view-list h4 { grid-column: 1; }
.view-list .record-card h3 { font-size: 22px; white-space: normal; }
.view-list .record-card h4 { margin-bottom: 0; }
.view-list .card-meta { grid-column: 2; grid-row: 1 / 4; align-self: center; padding: 0 0 0 25px; border-top: 0; border-left: 1px solid var(--line); }
.view-list .cover .offer-badge { display: none; }
.record-card { min-width: 0; }
.cover-button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.cover {
  position: relative; aspect-ratio: 1; overflow: hidden; background: #e5dfd4; border: 1px solid var(--line);
  box-shadow: 0 8px 25px rgba(30,35,31,.08);
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cover-button:hover img { transform: scale(1.035); }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; color: #eee7d9; background: var(--green); text-align: center; font: 700 25px/1.1 Georgia, serif; }
.offer-badge { position: absolute; top: 12px; left: 12px; padding: 7px 9px; color: var(--green-dark); background: #f3dc79; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.card-body { padding: 15px 3px 0; }
.card-kicker { margin: 0 0 5px; color: var(--orange); font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-card h3 { margin: 0; font: 700 20px/1.18 Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-card h4 { margin: 4px 0 12px; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; align-items: end; padding-top: 10px; border-top: 1px solid var(--line); }
.condition { color: var(--muted); font-size: 12px; line-height: 1.4; }
.price { font: 700 20px Georgia, serif; white-space: nowrap; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin-top: 50px; }
.pagination button { min-width: 42px; height: 42px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.pagination button.active { color: var(--white); background: var(--green); border-color: var(--green); }
.pagination button:disabled { opacity: .45; cursor: default; }
.empty { grid-column: 1 / -1; padding: 70px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 42px clamp(24px,7vw,112px); color: #d9e3dc; background: var(--green-dark); }
footer strong { color: white; font: 700 21px Georgia, serif; }
footer p { margin: 8px 0 0; }

dialog { width: min(850px, calc(100vw - 32px)); padding: 0; border: 0; box-shadow: 0 25px 90px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(17,26,20,.76); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; z-index: 3; right: 12px; top: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--white); font-size: 26px; cursor: pointer; }
.dialog-layout { display: grid; grid-template-columns: 1fr 1.05fr; }
.dialog-cover { min-height: 440px; background: #e5dfd4; }
.dialog-cover img { width: 100%; height: 100%; object-fit: cover; }
.dialog-details { padding: 50px 42px; }
.dialog-details h2 { margin: 4px 0; font: 700 36px/1.05 Georgia, serif; }
.dialog-details h3 { margin: 8px 0 25px; color: var(--muted); font-weight: 500; }
.dialog-price { font: 700 32px Georgia, serif; }
.detail-list { margin: 25px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.detail-list li { display: grid; grid-template-columns: 120px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-list span { color: var(--muted); }
.dialog-comment { color: #4c544c; line-height: 1.55; }
.buy-button { display: inline-block; margin-top: 18px; padding: 15px 21px; color: white; background: var(--green); text-decoration: none; font-weight: 750; }

@media (max-width: 1050px) {
  .record-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .record-grid.view-compact { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-record { display: none; }
}
@media (max-width: 760px) {
  .site-header { height: 78px; padding: 0 20px; }
  .brand small, .discogs-profile { display: none; }
  .hero { min-height: auto; padding: 60px 20px; }
  .hero h1 { font-size: 52px; }
  .hero-copy, .hero-text, .hero-search { width: 100%; max-width: 100%; }
  .hero-search { display: block; }
  .hero-search input { width: 100%; }
  .hero-search button { width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 26px 20px; }
  .stats div { min-width: 0; padding: 10px 8px; border: 0; }
  .stats strong { font-size: clamp(21px, 7vw, 30px); overflow-wrap: anywhere; }
  .catalogue { padding: 60px 18px 80px; }
  .catalogue-heading { display: block; }
  .catalogue-layout { display: block; }
  .filters { display: none; position: static; margin-bottom: 20px; }
  .filters.open { display: block; }
  .mobile-filter-button { display: inline-block; margin-right: auto; padding: 11px 16px; border: 1px solid var(--line); background: var(--paper); }
  .results-toolbar { flex-wrap: wrap; justify-content: flex-start; }
  .results-toolbar label { margin-left: auto; }
  .view-switcher { order: 3; width: 100%; margin: 2px 0 0; }
  .view-switcher button { flex: 1; justify-content: center; }
  .record-grid { gap: 24px 12px; }
  .record-grid.view-compact { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .view-list .record-card { grid-template-columns: 82px minmax(0, 1fr); gap: 13px; }
  .view-list .cover-button { width: 82px; }
  .view-list .card-body { display: block; }
  .view-list .record-card h3 { font-size: 17px; }
  .view-list .card-meta { display: flex; margin-top: 9px; padding: 9px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .view-list .condition { font-size: 11px; }
  .view-list .price { margin-top: 0; font-size: 17px; }
  .record-card h3 { font-size: 17px; }
  .card-meta { display: block; }
  .price { display: block; margin-top: 7px; }
  footer { display: block; }
  footer a { display: inline-block; margin-top: 20px; }
  .dialog-layout { display: block; }
  .dialog-cover { min-height: 300px; max-height: 55vh; }
  .dialog-details { padding: 32px 24px; }
}
@media (max-width: 470px) {
  .record-grid.view-covers { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .view-covers .record-card h3 { font-size: 16px; }
  .view-covers .card-meta { display: block; }
  .view-covers .price { display: block; margin-top: 7px; }
  .record-grid.view-compact { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .view-name { display: none; }
}
