/* Glenda's Art — palette lifted from the logo: purple script, pink and cyan
   paint pour, warm off-white ground. */

:root {
  --purple: #6d2b90;
  --purple-deep: #4a1c63;
  --pink: #e75ba8;
  --pink-soft: #fbe4f1;
  --cyan: #45cddb;
  --cream: #fdf9fa;
  --paper: #ffffff;
  --ink: #2b1b31;
  --ink-soft: #6a5b70;
  --line: #ece2ef;

  --shadow-sm: 0 1px 2px rgba(43, 27, 49, 0.06), 0 2px 8px rgba(43, 27, 49, 0.04);
  --shadow-md: 0 4px 12px rgba(43, 27, 49, 0.08), 0 12px 32px rgba(43, 27, 49, 0.07);
  --shadow-lg: 0 12px 28px rgba(43, 27, 49, 0.12), 0 32px 64px rgba(43, 27, 49, 0.10);

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

  --wrap: 1180px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--pink); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--pink);
  margin: 0 0 .8rem;
}

.lede { font-size: 1.15rem; color: var(--ink-soft); }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(253, 249, 250, .88);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
/* The logo ships on a cream ground; multiply drops it into the page. */
.brand img { height: 46px; width: auto; mix-blend-mode: multiply; }
.hero-logo, .login-card > img, .toolbar img { mix-blend-mode: multiply; }

.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--pink-soft); color: var(--purple); }
.nav a.active { background: var(--purple); color: #fff; }

/* ------------------------------------------------------------------- hero */

.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  text-align: center;
  background:
    radial-gradient(1100px 460px at 50% -12%, rgba(69, 205, 219, .18), transparent 62%),
    radial-gradient(760px 380px at 84% 8%, rgba(231, 91, 168, .16), transparent 60%);
}

.hero-logo { max-width: min(560px, 84vw); margin: 0 auto 8px; }
.hero .lede { max-width: 640px; margin: 0 auto 28px; }

/* ----------------------------------------------------------------- button */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--purple);
  color: #fff;
  font: inherit;
  font-size: .97rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: var(--purple-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-ghost { background: transparent; color: var(--purple); border-color: var(--line); }
.btn-ghost:hover { background: var(--pink-soft); color: var(--purple-deep); }

.btn-danger { background: #fff; color: #b0223f; border-color: #f0cdd5; }
.btn-danger:hover { background: #b0223f; color: #fff; }

.btn-sm { padding: 7px 15px; font-size: .87rem; }

/* --------------------------------------------------------------- sections */

.section { padding: clamp(44px, 6vw, 80px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 32px; }

.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.split { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- gallery */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.chip {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--pink); color: var(--purple); }
.chip[aria-pressed='true'] { background: var(--purple); border-color: var(--purple); color: #fff; }

.search {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 280px;
  margin-left: auto;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font: inherit;
  font-size: .9rem;
  color: var(--ink);
}
.search:focus { outline: 2px solid var(--pink); outline-offset: 1px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: clamp(20px, 3vw, 34px);
  /* Cards keep their painting's own proportions, so rows align at the top. */
  align-items: start;
}

.card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }

.card-frame {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover .card-frame { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Never crop a painting — each tile takes the picture's own shape. */
.card-frame img { width: 100%; height: auto; background: var(--paper); }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(43, 27, 49, .82);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.badge-hidden { background: rgba(176, 34, 63, .88); }

.card-body { padding: 14px 2px 0; }
.card-title { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 2px; }
.card-meta { font-size: .87rem; color: var(--ink-soft); margin: 0; }
.card-price { font-size: .87rem; font-weight: 600; color: var(--purple); margin: 4px 0 0; }

.empty { padding: 64px 0; text-align: center; color: var(--ink-soft); }

/* ------------------------------------------------------------ detail page */

.detail { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; padding: clamp(32px, 5vw, 56px) 0; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }

.detail-image {
  background: var(--paper);
  padding: clamp(12px, 2vw, 22px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.detail-image img { width: 100%; height: auto; border-radius: 3px; }

.detail-info { position: sticky; top: 100px; }
@media (max-width: 900px) { .detail-info { position: static; } }

.spec { display: grid; grid-template-columns: 116px 1fr; gap: 6px 16px; margin: 24px 0; font-size: .95rem; }
.spec dt { color: var(--ink-soft); }
.spec dd { margin: 0; }

.price-tag { font-family: var(--serif); font-size: 1.5rem; color: var(--purple); margin: 0 0 20px; }
.price-tag.sold { color: var(--ink-soft); }

.pager { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0 64px; border-top: 1px solid var(--line); font-size: .92rem; }

/* ----------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  background: var(--paper);
  font-size: .9rem;
  color: var(--ink-soft);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }

/* ------------------------------------------------------------------ admin */

.admin-shell { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }

.field input[type='text'],
.field input[type='number'],
.field input[type='password'],
.field input[type='email'],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--pink); outline-offset: 1px; background: var(--paper); }
.field .hint { font-size: .8rem; color: var(--ink-soft); margin-top: 5px; text-transform: none; letter-spacing: 0; font-weight: 400; }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }

.admin-list { display: flex; flex-direction: column; gap: 2px; }

.admin-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background .12s ease;
}
.admin-row:hover { background: var(--cream); }
.admin-row + .admin-row { border-top: 1px solid var(--line); }
.admin-row img { width: 58px; height: 58px; object-fit: cover; border-radius: 6px; background: var(--pink-soft); }
.admin-row .no-photo { width: 58px; height: 58px; border-radius: 6px; background: var(--pink-soft); display: grid; place-items: center; font-size: .62rem; color: var(--purple); text-align: center; }
.admin-row strong { display: block; font-weight: 600; }
.admin-row small { color: var(--ink-soft); }
.admin-row.is-hidden { opacity: .55; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }

.dialog { border: none; border-radius: var(--radius); padding: 0; max-width: 720px; width: calc(100vw - 32px); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(43, 27, 49, .45); backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 1.3rem; }
.dialog-body { padding: 24px 26px; max-height: min(66vh, 620px); overflow-y: auto; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--line); background: var(--cream); }

.preview { display: flex; gap: 16px; align-items: center; margin-top: 10px; }
.preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow-sm); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  z-index: 100;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .92rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #b0223f; }

.login-card { max-width: 380px; margin: clamp(48px, 12vh, 130px) auto; }

.tabs { display: flex; gap: 6px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 18px; border: none; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: .95rem; color: var(--ink-soft); cursor: pointer; }
.tab:hover { color: var(--purple); }
.tab[aria-selected='true'] { color: var(--purple); border-bottom-color: var(--purple); font-weight: 600; }

.skeleton { border-radius: var(--radius); background: linear-gradient(100deg, var(--line) 30%, var(--pink-soft) 50%, var(--line) 70%); background-size: 220% 100%; animation: shimmer 1.4s infinite linear; aspect-ratio: 4 / 5; }
@keyframes shimmer { to { background-position: -220% 0; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
