/* Graves Gallery — hand-written stylesheet. No frameworks.
   Palette keyed to the GG cheetah-flame logo: warm orange + ink black
   on cream paper, with rainbow glass accents. */

:root {
  --orange: #f7951d;        /* logo orange (sampled from the GG mark) */
  --orange-dark: #d97a06;
  --ink: #231f20;           /* logo black */
  --paper: #fdf8f0;         /* warm cream */
  --card: #ffffff;
  --line: #eadfce;
  --teal: #2e7f8f;          /* secondary — links & prices */
  --teal-dark: #1f5a66;
  --muted: #7a7168;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(35, 31, 32, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Rainbow bar — nod to glass colors */
.rainbow-bar {
  height: 6px;
  background: linear-gradient(90deg,
    #e0393f 0%, #f7951d 18%, #f2c230 36%, #4ca154 54%,
    #3a7fc1 72%, #7454a5 88%, #e0393f 100%);
}

/* ---------- Header ---------- */
.site-header { background: var(--paper); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-logo { width: 76px; height: 62px; object-fit: contain; }
.brand-name {
  color: var(--ink); font-size: 1.55rem; font-weight: 900;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.brand-name em { font-style: normal; font-weight: 300; color: var(--orange-dark); }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem;
  padding: 8px 14px; border-radius: 999px; border: 2px solid transparent;
}
.site-nav a:hover { border-color: var(--orange); color: var(--orange-dark); }
.site-nav a.on { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 96px; text-align: center;
  background:
    radial-gradient(420px 320px at 12% 18%, rgba(247, 149, 29, 0.22), transparent 70%),
    radial-gradient(360px 300px at 88% 12%, rgba(58, 127, 193, 0.18), transparent 70%),
    radial-gradient(400px 340px at 78% 88%, rgba(76, 161, 84, 0.16), transparent 70%),
    radial-gradient(300px 260px at 22% 85%, rgba(224, 57, 63, 0.14), transparent 70%),
    var(--paper);
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.05; font-weight: 900; letter-spacing: -0.01em;
}
.hero h1 .fancy {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic; font-weight: 400; color: var(--orange-dark);
  display: block;
}
.hero p { margin: 0 auto 32px; max-width: 540px; font-size: 1.18rem; color: var(--muted); }
.hero .btn { margin: 6px; }

/* ---------- Buttons — pop-art pills ---------- */
.btn {
  display: inline-block; background: var(--orange); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; padding: 12px 28px;
  font-size: 1rem; font-weight: 800; letter-spacing: 0.03em;
  text-decoration: none; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { background: #ff9c40; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: rgba(35, 31, 32, 0.05); }
.btn[disabled] { background: var(--muted); color: var(--paper); box-shadow: none; border-color: var(--muted); cursor: not-allowed; transform: none; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section h2 {
  font-size: 1.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  margin: 0 0 32px; text-align: center; font-weight: 900;
}
.section h2::after {
  content: ""; display: block; width: 88px; height: 9px; margin: 12px auto 0;
  background: linear-gradient(90deg, #e0393f, #f7951d, #f2c230, #4ca154, #3a7fc1, #7454a5);
  border-radius: 3px; transform: skew(-14deg);
}

/* ---------- Product cards — a little tilt, a lot of charm ---------- */
.grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: 4px 4px 0 rgba(35, 31, 32, 0.9); position: relative;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.grid .card:nth-child(odd) { transform: rotate(-0.7deg); }
.grid .card:nth-child(even) { transform: rotate(0.7deg); }
.grid .card:hover { transform: rotate(0deg) translateY(-5px); box-shadow: 6px 8px 0 rgba(35, 31, 32, 0.9); }
.card .photo { aspect-ratio: 1; object-fit: cover; width: 100%; border-bottom: 2px solid var(--ink); }
.card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.02rem; line-height: 1.35; font-weight: 800; }
.card .price { margin-top: auto; font-weight: 900; font-size: 1.15rem; color: var(--teal-dark); }
.price .was { color: var(--muted); text-decoration: line-through; font-weight: 400; margin-right: 8px; }

.badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 5px 13px; border-radius: 999px; font-size: 0.75rem;
  font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; border: 2px solid var(--ink); transform: rotate(-4deg);
}
.badge.sale { background: var(--orange); color: var(--ink); }
.badge.sold { background: var(--ink); }
.card.is-sold .photo { filter: grayscale(0.7) opacity(0.75); }

/* ---------- Product page ---------- */
.product-page { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 800px) { .product-page { grid-template-columns: 1.1fr 1fr; } }
.product-page .photo-main { border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: 5px 5px 0 rgba(35,31,32,0.9); width: 100%; }
.photo-strip { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.photo-strip img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 10px;
  cursor: pointer; border: 2px solid var(--ink); opacity: 0.75;
}
.photo-strip img:hover { opacity: 1; }
.photo-strip img.on { opacity: 1; box-shadow: 2px 2px 0 var(--ink); }
.product-page h1 { margin: 0 0 8px; font-size: 1.9rem; line-height: 1.25; font-weight: 900; }
.product-page .price { font-size: 1.5rem; font-weight: 900; color: var(--teal-dark); margin: 8px 0 4px; }
.stock-note { color: var(--muted); font-size: 0.95rem; margin: 0 0 18px; }
.desc { white-space: pre-line; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery-grid figure { margin: 0; cursor: zoom-in; }
.gallery-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(35,31,32,0.85);
  transition: transform 0.15s ease;
}
.gallery-grid figure:hover img { transform: scale(1.02) rotate(-0.5deg); }
.gallery-grid figcaption { font-size: 0.85rem; color: var(--muted); padding-top: 8px; text-align: center; }

.lightbox {
  position: fixed; inset: 0; background: rgba(25, 21, 22, 0.93); z-index: 50;
  display: none; align-items: center; justify-content: center; padding: 4vh 4vw; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; }

/* ---------- About ---------- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h1 { font-size: 2.1rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 900; }
.about-photo { float: right; width: 220px; margin: 0 0 16px 24px; border-radius: var(--radius); border: 2px solid var(--ink); }
@media (max-width: 600px) { .about-photo { float: none; margin: 0 auto 20px; } }

.quote {
  text-align: center; font-size: 1.35rem;
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  color: var(--orange-dark); max-width: 640px; margin: 0 auto;
}
.quote cite { display: block; font-size: 0.8rem; font-family: inherit; font-style: normal; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.tint { background: #fbeeda; }

/* ---------- Mondrian Studio ---------- */
.studio { max-width: 860px; margin: 0 auto; }
.studio-controls {
  display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: center;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 4px 4px 0 rgba(35,31,32,0.9); padding: 18px 22px; margin-bottom: 24px;
}
.ctl label { display: block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.ctl input[type=number] { width: 84px; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 8px; font: inherit; }
.ctl select { padding: 8px 10px; border: 2px solid var(--ink); border-radius: 8px; font: inherit; background: #fff; }
.ctl input[type=range] { width: 130px; accent-color: var(--orange); margin-top: 10px; }
.ctl-check { align-self: end; }
.ctl-check label { text-transform: none; font-size: 0.95rem; font-weight: 700; letter-spacing: 0; }
.studio-canvas-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
#m-canvas {
  max-width: 100%; height: auto; cursor: pointer;
  box-shadow: 8px 8px 0 rgba(35,31,32,0.9); border-radius: 4px;
}
.studio-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.studio-tip { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 14px; }

@media print {
  body * { display: none !important; }
  #m-print-img { display: block !important; margin: 0; }
}

/* ---------- Notices ---------- */
.notice { max-width: 680px; margin: 0 auto; text-align: center; }
.notice.success h1 { color: var(--teal-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfc6bc; margin-top: 64px; }
.footer-inner { padding: 30px 20px; text-align: center; font-size: 0.9rem; }
.footer-inner p { margin: 4px 0; }
.footer-inner a { color: #f9b26b; }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 880px; margin: 40px auto; padding: 0 20px; }
.admin-wrap h1 { letter-spacing: 0.06em; }
table.admin { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
table.admin th, table.admin td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.95rem; vertical-align: middle; }
table.admin th { background: var(--ink); color: #fff; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
table.admin img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.form-grid { display: grid; gap: 16px; max-width: 560px; }
.form-grid label { font-weight: 700; font-size: 0.9rem; display: block; margin-bottom: 4px; }
.form-grid input[type=text], .form-grid input[type=number], .form-grid input[type=password],
.form-grid textarea, .form-grid select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff;
}
.form-grid textarea { min-height: 160px; }
.flash { background: #e7f4ee; border: 1px solid #bfe3d0; color: #1e6b43; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.flash.error { background: #fdecea; border-color: #f5c6c0; color: #a13327; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-bar nav a { margin-right: 14px; font-weight: 600; }
