:root {
  --bg: #faf5ec;            /* warm ivory, picked from inside the logo circle */
  --bg-soft: #f3ecdc;       /* slightly deeper cream for surfaces / placeholders */
  --card-bg: #ffffff;
  --ink: #1a2a5e;          /* navy from logo */
  --ink-soft: #5b6788;
  --gold: #c9a961;          /* gold from logo border */
  --gold-soft: #e3d4ab;     /* paler gold for subtle borders */
  --line: #e8dfca;          /* warm tan divider */
  --sold: #b00020;
  --whatsapp: #25d366;
  --radius: 14px;
  --max: 520px;             /* mobile-only width cap */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ---------- Hero (non-sticky, scrolls away) ---------- */
.hero {
  text-align: center;
  padding: 30px 20px 24px;
  background:
    radial-gradient(ellipse at top, #fff8e7 0%, var(--bg) 70%);
}
.hero-logo {
  display: block;
  width: clamp(150px, 48vw, 210px);
  height: clamp(150px, 48vw, 210px);
  object-fit: contain;
  margin: 0 auto;
  mix-blend-mode: multiply;   /* drops the PNG's white background into the cream page */
}
.hero-divider {
  display: block;
  margin: 18px auto 0;
  opacity: 0.9;
}

/* ---------- Sticky top bar (icons + small logo home anchor) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 8px 14px;
  background: rgba(250, 245, 236, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; justify-content: center; align-items: center; text-decoration: none; }
.brand img {
  height: 38px; width: 38px;
  object-fit: contain;
  border-radius: 50%;
  mix-blend-mode: multiply;   /* same fix for the tiny sticky-bar logo */
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--ink);
  text-decoration: none;
  transition: background .15s ease;
}
.icon-btn:active { background: var(--bg-soft); }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(26, 42, 94, 0.04);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(26, 42, 94, 0.08);
}

.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;          /* portrait — fits clothing photos better than square */
  background: var(--bg-soft);
  overflow: hidden;
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.thumb .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #aaa; font-size: 12px; letter-spacing: .04em;
}
.thumb .multi {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.55); color: #fff;
  border-radius: 999px;
  font-size: 11px;
  padding: 3px 8px;
  display: inline-flex; align-items: center; gap: 4px;
}

.card .info {
  padding: 8px 10px 10px;
}
.card .name {
  font-size: 13px;
  color: var(--ink);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .price {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.card .size {
  font-size: 11px;
  color: var(--ink-soft);
  margin: 2px 0 0;
}

/* SOLD overlay */
.card.sold .thumb img { filter: grayscale(1) brightness(.85); }
.card.sold .thumb::after {
  content: "SOLD";
  position: absolute;
  top: 14px; left: -34px;
  transform: rotate(-30deg);
  background: var(--sold);
  color: #fff;
  font-weight: 700;
  letter-spacing: .12em;
  font-size: 12px;
  padding: 4px 40px;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 20px;
  font-size: 14px;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  padding: 24px 14px 26px;
  text-align: center;
  margin-top: 8px;
}
.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}
.footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.footer-links a:active { color: var(--gold); }
.dot { color: var(--gold); margin: 0 8px; }
.copy { color: var(--ink-soft); font-size: 11px; margin: 8px 0 0; letter-spacing: .04em; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 100;
  overflow-y: auto;
  max-width: var(--max);
  margin: 0 auto;
}
.modal[hidden] { display: none; }

/* Mini-header inside the modal: logo + Instagram + close */
.modal-topbar {
  position: sticky; top: 0; z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(250, 245, 236, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.modal-brand { display: flex; align-items: center; text-decoration: none; }
.modal-brand img {
  height: 36px; width: 36px;
  object-fit: contain;
  border-radius: 50%;
  mix-blend-mode: multiply;
}
.modal-close {
  width: 40px; height: 40px;
  border: none; background: transparent;
  border-radius: 50%;
  font-size: 28px; line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.modal-close:active { background: var(--bg-soft); }
.modal-inner { padding-bottom: 28px; }

.carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: var(--bg-soft);
  aspect-ratio: 3 / 4;          /* taller frame so portrait photos breathe */
}
.carousel::-webkit-scrollbar { display: none; }
.carousel img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  width: 100%;
  height: 100%;
  object-fit: contain;          /* shows the FULL photo — no cropping in detail view */
}

.dots {
  display: flex; justify-content: center; gap: 6px;
  padding: 10px 0 0;
}
.dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-soft);
  transition: background .15s, transform .15s;
}
.dots span.active { background: var(--gold); transform: scale(1.3); }

.modal-body { padding: 14px 18px 20px; }
.modal-body h2 {
  font-size: 18px;
  margin: 0 0 6px;
  font-weight: 600;
}
.modal-body .price {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
}
.modal-body .size {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 18px;
  white-space: pre-wrap;
}

.enquire-btn {
  display: block;
  background: var(--whatsapp);
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(37,211,102,.3);
}
.enquire-btn:active { transform: scale(.98); }

/* Sold state in modal */
.modal.sold .enquire-btn {
  background: #999;
  pointer-events: none;
  box-shadow: none;
}
.modal.sold .enquire-btn::after { content: " — Sold"; }
