/* ============================================================
   Moving sale — styles
   Plain CSS, no frameworks, no external fonts or requests.
   Colours and spacing live in the variables below; change
   them in one place to re-theme the whole page.
   ============================================================ */

:root {
  --bg:        #faf7f2;   /* warm cream page background */
  --surface:   #ffffff;   /* cards */
  --ink:       #2b2622;   /* main text */
  --muted:     #8a8078;   /* secondary text, struck prices */
  --line:      #ece5db;   /* hairline borders */
  --accent:    #b5613e;   /* clay accent: prices, primary button */
  --accent-ink:#ffffff;

  --reserved:  #b07d1e;   /* amber */
  --sold:      #9a948c;   /* grey */
  --available: #5e7d57;   /* sage */

  --radius: 12px;
  --maxw: 1080px;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */

.page-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem 2rem;
}

.kicker {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-header h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.intro {
  max-width: 56ch;
  color: var(--ink);
  margin: 0 0 1.75rem;
}

/* ---------- Contact buttons ---------- */

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn:hover { transform: translateY(-1px); }
.btn-outline:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- Item grid ---------- */

.room {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.room-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 2.75rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  padding-bottom: 1rem;
}

.item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  /* gentle fade-in on load */
  animation: rise 0.5s ease both;
}

.item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(43, 38, 34, 0.10);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* small stagger so cards arrive one after another */
.item:nth-child(2) { animation-delay: 0.06s; }
.item:nth-child(3) { animation-delay: 0.12s; }
.item:nth-child(4) { animation-delay: 0.18s; }
.item:nth-child(5) { animation-delay: 0.24s; }
.item:nth-child(6) { animation-delay: 0.30s; }

/* ---------- Status badge (driven entirely by the article's class) ---------- */

.item::after {
  content: "Available";
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--available);
  color: #fff;
}

.item.reserved::after { content: "Reserved"; background: var(--reserved); }
.item.sold::after     { content: "Sold";     background: var(--sold); }

.item.sold {
  opacity: 0.6;
  filter: grayscale(0.7);
}
.item.sold:hover { transform: none; box-shadow: none; }

/* ---------- Photos ---------- */

.main-photo {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--line);
}

.main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.item:hover .main-photo img { transform: scale(1.03); }

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem 0;
}

.thumb {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}

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

/* ---------- Item text ---------- */

.body {
  padding: 0.85rem 1.1rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0;
}

.product {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.dims.placeholder {
  font-style: italic;
  opacity: 0.7;
}

.prices {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.price-paid {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.95rem;
}

.price-yours {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.25rem;
}

.desc {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
}

.meta {
  margin: 0.15rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.source a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.source a:hover { border-bottom-color: currentColor; }

/* ---------- Footer ---------- */

.page-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Lightbox overlay ---------- */

.main-photo, .thumb { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(30, 26, 22, 0.9);
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: min(1000px, 92vw);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 1.1rem;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ---------- Respect reduced-motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .item { animation: none; }
  .btn, .main-photo img, .item { transition: none; }
}
