/* ----------------------------------------------------------
   FONTS
---------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Playfair+Display:wght@600;700&display=swap");

/* ---------- Base ---------- */
* { box-sizing: border-box; }
:root {
  --side: 220px;
  --gap: 24px;
  --text: #111;
  --muted: #888;
  --rule: #eee;
  --bg: #fff;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.4;
  opacity: 0;                 /* fade-in on load */
  transition: opacity .2s ease;
}

body.is-loaded { opacity: 1; }
body.is-fading { opacity: 0; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side);
  padding: 24px;
  border-right: 1px solid var(--rule);
  background: #fff;
}

/* Sidebar name: elegant serif */
.brand {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 28px;          /* was 22 */
  letter-spacing: 0.2px;
  line-height: 1.05;
  margin-bottom: 22px;
}
.brand a {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
.brand a:hover { text-decoration: underline; }

/* Nav: all lowercase, airy spacing */
.nav a {
  display: block;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  text-transform: lowercase;
  letter-spacing: 0.06em;   /* airy */
  font-size: 15px;
  margin: 8px 0;            /* a bit more space between items */
  color: var(--text);
  text-decoration: none;
}

.nav a.active { color: #7a7a7a; }   /* muted like Cat’s “street” */
.nav a:hover { text-decoration: underline; }


/* removed duplicate brand/nav styles and consolidated above */

/* rule + spacing between sections */
.nav-spacer {
  height: 14px;
  border-bottom: 1px solid var(--rule);
  margin: 10px 0 12px;
}

/* Social icons */
.social {
  margin-top: 12px;
  display: flex;
  gap: 14px;
}
.social .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text);
  opacity: 0.92;
  transition: transform .15s ease, opacity .15s ease;
}
.social .icon:hover {
  opacity: 1;
  transform: translateY(-1px);
}
.social .icon svg { stroke-width: 1.6; }

/* ---------- Main / Gallery ---------- */
.main { margin-left: var(--side); padding: 24px; }

/* ---------- Contact ---------- */
.main--contact { padding-top: 36px; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(320px, 640px) minmax(280px, 1fr);
  gap: 40px;
  align-items: start;
}

/* ---------- Shop ---------- */
.main--shop { padding-top: 36px; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(380px, 1fr));
  gap: 80px;                    /* generous breathing room */
  max-width: 1120px;            /* center like Cat’s */
  margin: 24px auto 100px;
}
.shop-card { text-align: center; }
.shop-card__img { display: block; border: 6px solid #000; background: #fff; }
.shop-card__img img { width: 100%; height: auto; display: block; }
.shop-card__title { margin: 16px 0 6px; font-size: 18px; letter-spacing: .04em; font-weight: 500; }
.shop-card__title a { color: var(--text); text-decoration: none; }
.shop-card__title a:visited { color: var(--text); }
.shop-card__title a:hover { text-decoration: underline; }
.shop-card__price { color: #444; font-size: 14px; }

.main--product { padding-top: 36px; }
.product-layout {
  display: grid;
  grid-template-columns: minmax(420px, 680px) 1fr;
  gap: 56px;
  max-width: 1120px;
  margin: 0 auto 80px;
  align-items: start;        /* prevent grid auto-stretching causing bottom strip */
}
.product-figure { margin: 0; border: 6px solid #000; background: #000; line-height: 0; display: block; overflow: hidden; }
.product-figure img { width: 100%; height: auto; display: block; vertical-align: top; }
.product-info h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: .10em; text-transform: none; font-weight: 600; }
.product-price { margin-bottom: 16px; font-size: 18px; }
.product-desc { color: #222; margin-bottom: 14px; line-height: 1.9; letter-spacing: .03em; max-width: 50ch; }
.qty { display: block; font-size: 12px; color: #666; margin-bottom: 10px; }
.qty input { display: block; margin-top: 6px; width: 80px; padding: 6px 8px; background: #f5f5f5; }
.btn-primary { background: rgba(243, 194, 0, 0.08); border: 2px solid #f3c200; padding: 12px 22px; cursor: pointer; letter-spacing: .2em; text-transform: lowercase; }
.btn-primary:hover { background: rgba(243, 194, 0, 0.18); }
.thumbs { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { border: 1px solid #ddd; padding: 0; background: #fff; cursor: pointer; }
.thumb img { display: block; width: 64px; height: 64px; object-fit: cover; }
.thumb.is-active { outline: 2px solid #222; }

@media (max-width: 980px) {
  .shop-grid { grid-template-columns: 1fr; gap: 36px; max-width: 720px; }
  .product-layout { grid-template-columns: 1fr; }
}

/* ---------- Checkout ---------- */
.main--checkout { padding-top: 36px; }
.checkout-list { margin-bottom: 16px; }
.co-item { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.co-title { }
.co-qty { color: #666; }
.co-price { }
.contact-figure {
  margin: 0;
  padding: 0;
  border: 6px solid #000;            /* bold frame similar to reference */
  outline: 10px solid transparent;   /* subtle outer inset space */
}
.contact-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.contact-copy { font-size: 15px; line-height: 1.9; letter-spacing: 0.04em; }
.contact-line { margin: 0 0 10px 0; }
.contact-rule { border: none; border-top: 1px solid var(--rule); margin: 24px 0; }
.contact-blurb { color: #222; }

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-figure { border-width: 4px; }
}

/* CSS Grid Masonry */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);   /* desktop: 4 columns */
  gap: 18px;                               /* clean white gutters */
}

/* Make breakpoints match her feel */
@media (max-width: 1200px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* Images fill grid cells; we’ll span rows with JS */
.gallery-grid a { display: block; }
.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  background: #f5f5f5;
  border-radius: 0;                         /* very minimal */
}

/* Masonry magic: tiny implicit row, items span multiple rows */
.gallery-grid {
  grid-auto-rows: 6px;                      /* base row height */
}


/* --- Home page "book" layout --- */
.main--home {
  position: relative;
  height: 100vh;
  overflow: hidden;              /* hides scrollbars on main; we scroll the .stack */
}

.stack {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory; /* each image is a snap page */
  scroll-behavior: smooth;
  padding-right: 12px;           /* slight room for macOS overlay scrollbar */
}

.stack::-webkit-scrollbar { width: 0; }

.slide {
  min-height: 100vh;             /* full viewport height page */
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 40px;            /* breathing room around image */
  box-sizing: border-box;
}

.slide img {
  width: auto;
  height: auto;
  max-width: min(1100px, calc(100% - 160px));  /* keeps nice margins */
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 6px;
}

/* Sidebar intro (optional) */
.home-intro {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #444;
  margin-top: 24px;
}

/* Pager controls */
.pager {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  transition: background .2s ease;
  user-select: none;
}
.pager:hover { background: rgba(0,0,0,0.65); }
.pager--prev { right: 84px; }   /* sits just left of the next button */
.pager--next { right: 28px; }

.page-indicator {
  position: absolute;
  right: 28px;
  bottom: 24px;
  font-size: 12px;
  color: #666;
  background: rgba(255,255,255,0.85);
  border: 1px solid #e7e7e7;
  padding: 4px 8px;
  border-radius: 999px;
}

/* Small screens: tighten paddings */
@media (max-width: 900px) {
  .slide { padding: 24px; }
  .slide img { max-width: calc(100% - 40px); max-height: calc(100vh - 120px); }
  .pager--prev { right: 72px; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transition: transform .2s ease;
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.lightbox__close { top: 24px; right: 24px; }
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }
.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #ddd;
}

/* ---------- Focus (enlarged) view on Gallery ---------- */
.focus-view {
  position: relative;
  min-height: calc(100vh - 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.focus-view img {
  max-width: calc(100vw - var(--side) - 80px);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.focus__btn {
  position: absolute;
  border: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 22px;
  opacity: 0;                 /* reveal on hover to mimic subtle UI */
  transition: opacity .15s ease, background .15s ease;
}
.focus__btn:hover { background: rgba(0,0,0,0.65); }
.focus-view:hover .focus__btn { opacity: 1; }
.focus__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.focus__next { right: 24px; top: 50%; transform: translateY(-50%); }
.focus__up   { bottom: 24px; left: 24px; opacity: .9; }
.focus__counter {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 12px;
  color: #666;
  background: rgba(255,255,255,0.85);
  border: 1px solid #e7e7e7;
  padding: 4px 8px;
  border-radius: 999px;
}

/* Hover zones (left/center/right) to mimic Cat’s UI */
.focus-zones {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr minmax(120px, 220px) 1fr; /* bigger left/right, narrow center */
  pointer-events: none; /* enable only on children */
}
.focus-zones .zone {
  pointer-events: auto;
  background: transparent;
  border: 0;
  position: relative;
  cursor: pointer;
}
.focus-zones .zone::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity .15s ease, background .15s ease;
}
.focus-zones .zone:hover::after { opacity: 1; background: rgba(0,0,0,0.65); }
.focus-zones .zone--left::after   { content: '‹'; }
.focus-zones .zone--right::after  { content: '›'; }
.focus-zones .zone--center::after { content: '↑'; }

/* On desktop, prefer zones; keep buttons for accessibility and touch */
@media (min-width: 801px) {
  .focus__btn { display: none; }
}

.focus__caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  color: #333;
  font-size: 13px;
  background: rgba(255,255,255,0.85);
  border: 1px solid #e7e7e7;
  padding: 6px 8px;
  border-radius: 6px;
  max-width: min(520px, 60ch);
}
