:root {
  color-scheme: light;
  --ink: #222426;
  --muted: #68717a;
  --line: #d8e0dc;
  --surface: #f1f5f3;
  --accent: #a94c38;
  --accent-dark: #843627;
  --green: #2f7a58;
  --blue: #315f8c;
  --gray: #747474;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f8faf9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 249, 0.94);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.nav form {
  margin: 0;
}

.nav-cta,
.link-button,
.primary-action,
.filter-bar button,
.form-panel button,
.card-actions a {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
}

.link-button {
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.page-title {
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 36px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.page-title p,
.artwork-body p,
.summary-panel p,
.complete-panel p {
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

label span {
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

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

.artwork-card {
  display: grid;
  grid-template-rows: 170px 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.artwork-thumb,
.detail-artwork {
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  min-height: 170px;
  background:
    linear-gradient(135deg, rgba(169, 76, 56, 0.2), transparent 42%),
    linear-gradient(45deg, rgba(49, 95, 140, 0.28), transparent 48%),
    #e8eee9;
  color: rgba(34, 36, 38, 0.62);
  font-weight: 800;
}

.artwork-thumb img,
.detail-artwork img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.artwork-thumb {
  height: 170px;
}

.image-label {
  position: relative;
  z-index: 1;
  align-self: start;
  justify-self: start;
  margin: 12px;
  border-radius: 999px;
  background: rgba(34, 36, 38, 0.72);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 7px 9px;
}

.artwork-body,
.card-actions,
.detail-panel,
.summary-panel,
.form-panel,
.complete-panel,
.auth-panel {
  padding: 20px;
}

.artwork-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.artwork-body h2 {
  font-size: 21px;
  line-height: 1.3;
  margin: 8px 0;
}

.price {
  color: var(--ink) !important;
  font-weight: 800;
}

.status {
  display: inline-block;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.status-available {
  background: var(--green);
}

.status-rented {
  background: var(--blue);
}

.status-unavailable {
  background: var(--gray);
}

.card-actions {
  border-top: 1px solid var(--line);
}

.disabled-notice {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  padding: 12px 14px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}

.pagination a,
.back-link {
  color: var(--accent-dark);
  font-weight: 800;
}

.detail-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: start;
  margin-top: 18px;
}

.detail-artwork {
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 32px;
}

.detail-panel,
.summary-panel,
.form-panel,
.complete-panel,
.auth-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
}

.primary-action {
  display: inline-block;
}

.form-panel {
  display: grid;
  gap: 16px;
}

.form-panel h2 {
  margin: 0;
}

.error {
  color: #b00020;
  font-weight: 700;
}

.complete-panel,
.auth-panel {
  max-width: 680px;
  margin: 0 auto;
}

.empty {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 32px;
  text-align: center;
}

@media (max-width: 820px) {
  .site-header,
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding: 18px 20px;
  }

  .filter-bar,
  .artwork-grid,
  .detail-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 30px;
  }
}
