:root {
  --ink: #2f3030;
  --muted: #6d6965;
  --paper: #fbf9f5;
  --paper-deep: #f0ebe4;
  --line: #cec5bb;
  --line-dark: #9f978e;
  --accent: #4b4844;
  --danger: #8b2f2f;
  --shadow: 0 18px 52px rgba(53, 47, 41, .13);
  --soft-shadow: 0 8px 22px rgba(53, 47, 41, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.92), transparent 34%),
    linear-gradient(135deg, #e8e1d8 0%, #f5f1eb 45%, #e5ddd3 100%);
  color: var(--ink);
  font-family: "Lora", Georgia, serif;
  line-height: 1.7;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.site-shell { width: min(1180px, calc(100% - 32px)); margin: 34px auto; }
.site-header {
  padding: 32px 24px 24px;
  text-align: center;
  background: rgba(251,249,245,.94);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow);
}
.logo-button { padding: 0; background: none; border: 0; cursor: pointer; }
.site-logo { display: block; width: min(470px, 86vw); max-height: 250px; object-fit: contain; }
.location-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .88rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.tab-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  gap: 5px;
  padding: 0 18px;
  overflow-x: auto;
  background: rgba(251,249,245,.94);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.tab-button {
  min-width: max-content;
  padding: 13px 22px 12px;
  color: var(--muted);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.tab-button:hover { color: var(--ink); transform: translateY(-2px); }
.tab-button.active {
  position: relative;
  z-index: 3;
  padding-top: 16px;
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line-dark);
  box-shadow: 0 -4px 12px rgba(53,47,41,.06);
}
.content-panel {
  min-height: 590px;
  padding: clamp(34px, 6vw, 76px);
  background: var(--paper);
  border: 1px solid var(--line-dark);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
.tab-panel { animation: reveal .25s ease; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; line-height: 1.08; }
h1 { margin-bottom: 20px; font-size: clamp(2.5rem, 6vw, 4.8rem); font-weight: 600; letter-spacing: -.025em; }
h2 { margin-bottom: 10px; font-size: 2rem; }
h3 { margin-bottom: 8px; font-size: 1.55rem; }
.hero { max-width: 830px; margin: 0 auto 58px; text-align: center; }
.eyebrow {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-copy, .lead, .section-heading > p:last-child, .narrow-content p { color: var(--muted); font-size: 1.04rem; }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.button-row.left-aligned { justify-content: flex-start; }
.primary-button, .secondary-button, .danger-button {
  display: inline-flex;
  min-height: 48px;
  padding: 12px 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.primary-button { color: #fff; background: var(--accent); border: 1px solid var(--accent); box-shadow: var(--soft-shadow); }
.secondary-button { color: var(--ink); background: transparent; border: 1px solid var(--line-dark); }
.danger-button { color: #fff; background: var(--danger); border: 1px solid var(--danger); }
.primary-button:hover, .secondary-button:hover, .danger-button:hover { transform: translateY(-2px); box-shadow: var(--soft-shadow); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.full-width { width: 100%; margin-top: 10px; }

.feature-grid, .gallery-grid, .contact-grid { display: grid; gap: 18px; }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.feature-card {
  padding: 27px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.feature-card p { margin-bottom: 0; color: var(--muted); }
.feature-number { display: block; margin-bottom: 18px; color: var(--line-dark); font-size: .8rem; letter-spacing: .13em; }
.section-heading { max-width: 770px; margin-bottom: 34px; }
.gallery-toolbar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 28px; }
.filter-button {
  padding: 9px 15px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.filter-button.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.status-message { padding: 22px; color: var(--muted); background: var(--paper-deep); border: 1px solid var(--line); border-radius: 12px; }
.status-message:empty { display: none; }
.status-message.error, .form-message.error { color: var(--danger); }
.gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 4px 14px rgba(53,47,41,.05);
}
.product-image-button { display: block; width: 100%; padding: 0; background: #e9e3db; border: 0; cursor: zoom-in; }
.product-image-button img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .3s ease; }
.product-image-button:hover img { transform: scale(1.025); }
.product-card-copy { padding: 22px; }
.product-card-copy h2 { margin: 6px 0 10px; font-size: 1.8rem; }
.product-card-copy p { color: var(--muted); font-size: .92rem; }
.product-category { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.text-link { text-underline-offset: 4px; }

.split-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(290px,.65fr); gap: 48px; align-items: start; }
.process-list { display: grid; gap: 15px; margin-top: 32px; }
.process-list > div { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: center; }
.process-list span { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; }
.process-list p { margin: 0; }
.contact-card { padding: 30px; background: var(--paper-deep); border: 1px solid var(--line); border-radius: 16px; }
.contact-card p { color: var(--muted); }
.narrow-content { max-width: 760px; }
.contact-grid { grid-template-columns: repeat(2, 1fr); }
.contact-option {
  display: flex;
  min-height: 200px;
  padding: 30px;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.contact-option:hover { transform: translateY(-3px); box-shadow: var(--soft-shadow); }
.contact-option strong { overflow-wrap: anywhere; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(1.7rem,4vw,2.3rem); line-height: 1.15; }
.contact-kicker, .contact-option > span:last-child { color: var(--muted); font-size: .84rem; letter-spacing: .08em; text-transform: uppercase; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 8px 0; color: var(--muted); font-size: .83rem; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-underline-offset: 4px; }

.lightbox {
  width: min(900px, calc(100% - 30px));
  max-height: 90vh;
  padding: 0;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.lightbox::backdrop { background: rgba(25,23,21,.78); }
.lightbox img { display: block; width: 100%; max-height: 66vh; object-fit: contain; background: #ddd5ca; }
.lightbox-copy { padding: 25px; }
.lightbox-close {
  position: fixed;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 12px;
  color: #fff;
  background: rgba(30,29,28,.78);
  border: 0;
  border-radius: 50%;
  font-size: 1.7rem;
  cursor: pointer;
}

/* Admin */
.admin-shell { width: min(980px, calc(100% - 28px)); margin: 28px auto 60px; }
.admin-header { padding: 26px; text-align: center; }
.admin-logo { display: block; width: min(360px, 80vw); margin: 10px auto; }
.back-link { display: block; text-align: left; }
.admin-card {
  margin-bottom: 24px;
  padding: clamp(24px, 5vw, 42px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}
.login-card { max-width: 540px; margin-inline: auto; }
.warning-card { border-color: #b88735; background: #fff8e9; }
.admin-toolbar, .admin-list-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 22px; }
.admin-toolbar h1 { margin-bottom: 6px; }
.admin-toolbar p { margin-bottom: 0; color: var(--muted); }
form label { display: grid; gap: 7px; margin-bottom: 20px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
}
textarea { resize: vertical; }
small { color: var(--muted); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.compact-grid { grid-template-columns: minmax(140px,.7fr) 1fr 1fr; align-items: end; }
.checkbox-label { display: flex; flex-direction: row; align-items: center; gap: 10px; padding-bottom: 12px; }
.checkbox-label input { width: auto; }
.form-message { min-height: 1.5em; margin: 16px 0 0; }
progress { width: 100%; margin-top: 18px; }
.current-image-wrap { display: flex; gap: 12px; align-items: center; margin: -5px 0 20px; color: var(--muted); }
.current-image-wrap img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.admin-product-list { display: grid; gap: 14px; }
.admin-product-card {
  display: grid;
  grid-template-columns: 110px minmax(0,1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin-product-card > img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; }
.admin-product-copy h3, .admin-product-copy p { margin-bottom: 5px; }
.admin-product-copy p, .admin-product-copy small { color: var(--muted); }
.admin-actions { display: flex; flex-direction: column; gap: 8px; }
.compact-button { min-height: 38px; padding: 8px 14px; }

@media (max-width: 820px) {
  .feature-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid article:last-child { grid-column: 1 / -1; }
  .split-layout { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .site-shell { width: min(100% - 18px, 1180px); margin: 9px auto 24px; }
  .site-header { padding: 24px 14px 19px; }
  .tab-nav { padding: 0 8px; }
  .tab-button { padding-inline: 15px; font-size: .9rem; }
  .content-panel { padding: 36px 21px 44px; }
  .feature-grid, .gallery-grid, .contact-grid, .form-grid, .compact-grid { grid-template-columns: 1fr; }
  .feature-grid article:last-child { grid-column: auto; }
  .button-row:not(.left-aligned) { flex-direction: column; }
  .button-row:not(.left-aligned) > * { width: 100%; }
  .site-footer, .admin-toolbar, .admin-list-heading { flex-direction: column; align-items: flex-start; }
  .admin-product-card { grid-template-columns: 80px minmax(0,1fr); }
  .admin-product-card > img { width: 80px; height: 80px; }
  .admin-actions { grid-column: 1 / -1; flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* Version 3 admin safeguards */
.image-preview-wrap {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-weight: 400;
}
.image-preview-wrap img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.publish-toggle {
  max-width: 460px;
  padding: 14px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.field-limits {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .82rem;
}
.archived-card {
  opacity: .68;
  background: var(--paper-deep);
}
