/* shop.gessoni.com: public pages. Palette and Fraunces come from gessoni.com. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 500 600;
  src: url("/static/fonts/fraunces-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 500 600;
  src: url("/static/fonts/fraunces-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #f8f5ec;
  --surface: #fffdf8;
  --frame: #eee9dc;
  --text: #29140f;
  --muted: #655a54;
  --line: #dcd6c9;
  --accent: #274847;
  --on-accent: #ffffff;
  --reserved: #8a5a00;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- Header / footer ---- */
.site-header {
  padding: 28px var(--gutter) 8px;
  text-align: center;
}
.brand {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-footer {
  margin-top: auto;
  padding: 48px var(--gutter) 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 16px 0 0; }

/* ---- Catalog ---- */
.catalog { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.tagline { margin: 0 auto 32px; max-width: 34rem; text-align: center; color: var(--muted); }
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 14px;
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card a { display: block; text-decoration: none; }
.frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 6px;
  background: var(--frame);
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
@media (hover: hover) { .card a:hover .frame img { transform: scale(1.03); } }
.card.is-reserved .frame img { opacity: 0.72; }
.card h2 {
  margin: 12px 0 2px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.card .price { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--muted); padding: 64px 0; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--reserved);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge.inline { position: static; display: inline-block; border: 1px solid var(--line); }
.nophoto {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---- Item page ---- */
.item { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.back {
  display: inline-block;
  margin: 8px 0 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.back:hover { color: var(--text); }
.item-layout { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .item-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .info { position: sticky; top: 32px; }
}

.gallery { position: relative; min-width: 0; }
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  background: var(--frame);
  /* full-bleed on phones */
  margin: 0 calc(var(--gutter) * -1);
}
.slides::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .slides { margin: 0; border-radius: 6px; } }
@media (prefers-reduced-motion: reduce) { .slides { scroll-behavior: auto; } .frame img { transition: none; } }
.slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.slide img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
/* Desktop: keep the photo within the screen height. */
@media (min-width: 900px) { .slide { aspect-ratio: auto; height: min(76vh, 820px); } }
.counter {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(41, 20, 15, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.thumbs { display: flex; gap: 8px; margin-top: 12px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.thumbs a {
  flex: 0 0 64px;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.55;
  border: 2px solid transparent;
  transition: opacity 0.2s;
}
.thumbs a[aria-current="true"], .thumbs a:hover { opacity: 1; border-color: var(--text); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.info h1 {
  margin: 10px 0 4px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.info .price { margin: 0 0 20px; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.note { margin: 0 0 20px; color: var(--muted); font-size: 0.95rem; }
.description { color: var(--text); max-width: 36rem; }
.description p { margin: 0 0 1em; }
.cta { margin-top: 28px; }

/* On phones the WhatsApp button stays in reach at the bottom of the screen. */
@media (max-width: 899px) {
  .cta {
    position: sticky;
    bottom: 0;
    margin: 28px calc(var(--gutter) * -1) 0;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg) 70%, rgba(248, 245, 236, 0));
  }
  .cta .wa { width: 100%; }
  .cta .wa.ghost { background: var(--surface); }
  .cta .wa.ghost:hover { background: var(--accent); }
}

/* ---- Buttons ---- */
.wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.wa:hover { background: #1c3534; }
.wa.ghost { background: transparent; color: var(--accent); }
.wa.ghost:hover { background: var(--accent); color: var(--on-accent); }
.wa.off { opacity: 0.5; cursor: not-allowed; background: transparent; color: var(--muted); border-color: var(--line); }
.icon { flex: none; }

/* ---- Sold / 404 ---- */
.message { max-width: 32rem; margin: 48px auto 0; padding: 0 var(--gutter); text-align: center; }
.message h1 { font-family: var(--serif); font-weight: 500; font-size: 1.8rem; line-height: 1.2; }
.message p { color: var(--muted); }
