/* Mudmaniac — minimal black & white, plain CSS, no build step */

:root {
  /* Minimal B&W palette */
  --ink: #111111;
  --muted: #666666;
  --line: #e5e5e5;
  --bg: #ffffff;
  --paper: #fafafa;

  /* Spacing */
  --gap: 1.5rem;
  --gap-sm: 0.75rem;
  --gap-lg: 3rem;
  --radius: 6px;

  /* Typography — all sans-serif */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--ink);
  text-decoration: underline;
}
a:hover { text-decoration: none; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem var(--gap);
  display: flex;
  align-items: baseline;
  gap: var(--gap);
}
.site-title {
  font-size: 1.25rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--gap);
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a:hover { text-decoration: underline; }

.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--gap-lg) var(--gap);
}

/* ---------- Footer (minimal, hairline) ---------- */
.site-footer {
  width: 100%;
  background: var(--bg);
  color: var(--muted);
  padding: var(--gap) var(--gap);
  text-align: center;
  border-top: 1px solid var(--line);
}
.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--gap-sm);
  margin-bottom: 0.5rem;
}
.footer-nav a {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.footer-nav a:hover { text-decoration: underline; }
.footer-instagram {
  display: inline-flex;
  align-items: center;
}
.footer-copy {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Front page hero ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: block;
  overflow: hidden;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  text-align: center;
  background: rgba(0, 0, 0, 0.40);
  color: #ffffff;
}
.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.hero-tagline {
  font-size: 1.15rem;
  margin: 0;
  color: #ffffff;
  font-weight: 400;
  opacity: 0.9;
}
.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 1.75rem;
  text-decoration: none;
  animation: scroll-bounce 2s ease-in-out infinite;
}
.scroll-cue:hover { color: #ffffff; text-decoration: none; }
@keyframes scroll-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 0.5rem); }
}

/* ---------- Featured section ---------- */
.featured-section {
  text-align: center;
  padding: var(--gap-lg) var(--gap);
}
.featured-heading {
  margin-top: 0;
  margin-bottom: var(--gap);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.featured-section .gallery-grid {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: none;
  margin: 0 0 var(--gap-lg);
}
.featured-section .item-card {
  border: none;
  border-radius: 0;
  background: transparent;
}
.featured-section .item-card:hover {
  box-shadow: none;
}
.featured-section .item-card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--paper);
}
.featured-section .item-card-body {
  padding: 0.75rem var(--gap);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--gap-sm);
}
.featured-section .item-card-title {
  order: 1;
  text-align: left;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
.featured-section .item-card-price {
  order: 2;
  text-align: right;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.browse-cta {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--ink);
  color: #ffffff;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  margin-top: var(--gap);
}
.browse-cta:hover {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
}

/* ---------- Gallery ---------- */
.gallery-heading { margin-top: 0; font-size: 1.75rem; }
.gallery-intro { color: var(--muted); margin-bottom: var(--gap-lg); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}
.item-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}
.item-card:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.item-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.item-card-link:hover { text-decoration: none; }
.item-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--paper);
}
.item-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--muted);
}
.item-card-body {
  padding: var(--gap-sm);
}

/* Gallery page: right-aligned price/status */
.gallery .item-card {
  container-type: inline-size;
}
.gallery .item-card-body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--gap-sm);
}
.gallery .item-card-title {
  order: 1;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #000000;
}
.gallery .item-card-price {
  order: 2;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  text-align: right;
}

/* Stack vertically when the card is too narrow for one line */
@container (max-width: 240px) {
  .gallery .item-card-body {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  .gallery .item-card-title { text-align: left; }
  .gallery .item-card-price { text-align: right; }
}

/* ---------- Merged price/status colors (after scoped rules so they win) ---------- */
.item-card-price.status-reserved { color: #c97f1b; }
.item-card-price.status-sold      { color: #d9534f; }
.item-price.status-reserved       { color: #c97f1b; }
.item-price.status-sold           { color: #d9534f; }

/* ---------- Item page ---------- */
.back-link {
  display: inline-block;
  margin-bottom: var(--gap);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.back-link:hover { color: var(--ink); text-decoration: underline; }
.item-header {
  display: flex;
  align-items: baseline;
  gap: var(--gap);
  flex-wrap: wrap;
  margin-bottom: var(--gap-sm);
}
.item-title { margin: 0; font-size: 2rem; font-weight: 600; letter-spacing: -0.01em; }
.item-price { margin: 0; color: var(--ink); font-weight: 500; font-size: 1.2rem; }

.gallery {
  position: relative;
  margin: var(--gap-lg) 0;
}
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:active { cursor: grabbing; }
.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin: 0;
}
.gallery-slide img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--paper);
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.gallery-arrow:hover { background: var(--ink); color: #ffffff; }
.gallery-prev { left: var(--gap-sm); }
.gallery-next { right: var(--gap-sm); }
.gallery-thumbs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--gap-sm);
}
.gallery-thumb {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  background: var(--paper);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb.is-active {
  border: 2px solid var(--ink);
}

.item-body {
  max-width: 700px;
  margin: var(--gap-sm) 0;
  color: var(--ink);
}
.item-body ul { padding-left: 1.25rem; }
.item-body li { margin-bottom: 0.25rem; }

/* ---------- Purchase ---------- */
.purchase-request {
  margin: var(--gap-lg) 0;
  padding: var(--gap);
  background: var(--paper);
  border-radius: var(--radius);
  text-align: center;
}
.purchase-button {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--ink);
  color: #ffffff;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.purchase-button:hover {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
}
.purchase-note { color: var(--muted); font-size: 0.9rem; margin-top: var(--gap-sm); }
.purchase-unavailable {
  font-style: italic;
  color: var(--muted);
  padding: var(--gap);
  text-align: center;
  background: var(--paper);
  border-radius: var(--radius);
}

/* ---------- Generic page (about) ---------- */
.page-title { margin-top: 0; font-size: 1.75rem; font-weight: 600; }
.page-body { max-width: 700px; }
.page-body h2 { font-size: 1.25rem; margin-top: var(--gap); }

/* ---------- 404 ---------- */
.not-found {
  text-align: center;
  padding: var(--gap-lg);
}
.not-found h1 { font-size: 4rem; margin: 0; color: var(--ink); font-weight: 600; }
.back-home { display: inline-block; margin-top: var(--gap); }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .site-nav { flex-direction: column; gap: var(--gap-sm); }
  .nav-links { width: 100%; justify-content: space-between; }
  .gallery-grid { grid-template-columns: 1fr; }
  .item-header { flex-direction: column; gap: var(--gap-sm); }
}
