:root {
  --black: #050505;
  --brown: #5b3a1e;
  --tan: #d2cfb5;
  --cream: #f7f3e7;
  --green: #31543a;
  --gold: #b8873a;
  --text: #2c261f;
  --muted: #6f665d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  background: var(--black);
  color: white;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  text-decoration: none;
  text-transform: uppercase;
}

.brand-kicker {
  display: block;
  color: var(--tan);
  font-size: 14px;
  letter-spacing: 0;
}

.brand-name {
  display: block;
  color: white;
  font-family: Georgia, serif;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1;
}

.phone {
  color: var(--tan);
  font-weight: 700;
  text-decoration: none;
  font-size: 22px;
}

.nav {
  background: var(--tan);
  color: var(--brown);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.nav a {
  padding: 13px 18px;
  text-decoration: none;
  font-weight: 700;
}

.nav a:hover {
  background: rgba(255,255,255,.35);
}

.hero {
  min-height: 430px;
  display: flex;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(0,0,0,.68), rgba(0,0,0,.15)),
    url('/uploads/listings/194/StClairBigWater(1).jpg') center/cover;
  color: white;
}

.hero-copy {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 70px 20px;
}

h1, h2, h3 {
  font-family: Georgia, serif;
  line-height: 1.12;
}

h1 {
  font-size: clamp(36px, 6vw, 72px);
  max-width: 840px;
  margin: 0 0 16px;
}

.hero p {
  max-width: 680px;
  font-size: 20px;
}

.section,
.listing-detail,
.contact-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
}

.section-heading p {
  color: var(--muted);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.listing-card {
  background: white;
  border: 1px solid rgba(91,58,30,.18);
  border-radius: 8px;
  overflow: hidden;
}

.listing-card a {
  display: block;
  height: 100%;
  text-decoration: none;
}

.listing-image {
  aspect-ratio: 4 / 3;
  background: #e7dfcc;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.listing-image img,
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-card-body {
  padding: 16px;
}

.listing-card h3 {
  margin: 6px 0 10px;
  font-size: 20px;
}

.status {
  display: inline-block;
  margin: 0;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.price {
  color: var(--brown);
  font-weight: 800;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  background: var(--green);
  color: white;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-130%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: shimmer 3.5s infinite;
}

@keyframes shimmer {
  55%, 100% { transform: translateX(130%); }
}

.listing-title-block {
  max-width: 940px;
}

.listing-title-block h1 {
  max-width: none;
  margin: 6px 0 12px;
  font-size: clamp(30px, 3.2vw, 44px);
}

.listing-title-block .price {
  margin: 0 0 16px;
  font-size: 20px;
}

.main-listing-photo {
  margin: 26px 0 0;
}

.main-listing-photo img {
  width: 100%;
  max-height: 760px;
  object-fit: contain;
  display: block;
  background: #e7dfcc;
  border-radius: 8px;
}

.description {
  margin-top: 32px;
  background: white;
  padding: 24px;
  border-radius: 8px;
}

.description img {
  display: none !important;
}

.description table,
.description div,
.description p {
  max-width: 100%;
}

.listing-gallery-section {
  margin-top: 32px;
}

.gallery-heading {
  margin-bottom: 14px;
}

.gallery {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery a {
  aspect-ratio: 4 / 3;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #e7dfcc;
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: rgba(0, 0, 0, .88);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-image {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, .55);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  color: white;
  background: rgba(49, 84, 58, .92);
  cursor: pointer;
}

.lightbox-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  width: 48px;
  height: 72px;
  transform: translateY(-50%);
  border-radius: 6px;
  font-size: 54px;
  line-height: 1;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 42px;
}

.form {
  background: white;
  border-radius: 8px;
  padding: 24px;
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  border: 1px solid rgba(91,58,30,.25);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: white;
}

.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.wysiwyg-field {
  display: grid;
  gap: 8px;
}

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(91,58,30,.25);
  border-radius: 6px;
  background: #f7f3e7;
}

.wysiwyg-toolbar button,
.toolbar-select,
.toolbar-color {
  border: 1px solid rgba(91,58,30,.25);
  border-radius: 5px;
  background: white;
  color: var(--brown);
  min-height: 34px;
  padding: 6px 10px;
  font: inherit;
  font-weight: 800;
}

.wysiwyg-toolbar button {
  cursor: pointer;
}

.form .wysiwyg-toolbar .toolbar-select,
.form .wysiwyg-toolbar .toolbar-color {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: auto;
  white-space: nowrap;
}

.form .wysiwyg-toolbar .toolbar-select select,
.form .wysiwyg-toolbar .toolbar-color input {
  width: auto;
  min-height: 26px;
  border: 1px solid rgba(91,58,30,.22);
  border-radius: 4px;
  padding: 2px 4px;
}

.form .wysiwyg-toolbar .toolbar-color input {
  width: 38px;
  padding: 1px;
}

.wysiwyg-editor {
  min-height: 260px;
  border: 1px solid rgba(91,58,30,.25);
  border-radius: 6px;
  padding: 14px;
  background: white;
  outline: none;
}

.wysiwyg-editor:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(49,84,58,.12);
}

.admin-section {
  max-width: 1320px;
}

.table-wrap {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eadfca;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--brown);
  background: #f3ecdc;
}

.admin-form {
  max-width: none;
}

.admin-meta-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.checks,
fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  border: 1px solid rgba(91,58,30,.2);
  border-radius: 6px;
  padding: 12px;
}

.compact-checks {
  min-height: 48px;
  align-items: center;
  align-self: end;
  white-space: nowrap;
}

.checks label,
fieldset label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
}

.checks input,
fieldset input {
  width: auto;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-subheading h2 {
  margin: 0;
  font-size: 24px;
}

.admin-subheading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-photo-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(91,58,30,.2);
  border-radius: 8px;
  background: #fbf8ef;
}

.dropzone {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(49,84,58,.45);
  border-radius: 8px;
  background: white;
  color: var(--green);
  font-weight: 800;
  cursor: pointer;
}

.dropzone.is-dragging {
  background: #eef5e9;
  border-color: var(--green);
}

.dropzone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-photo-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(91,58,30,.18);
  border-radius: 8px;
  background: white;
}

.photo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.photo-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.photo-controls input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}

.admin-photo-card img,
.missing-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #e7dfcc;
}

.missing-photo {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
}

.success {
  background: #dceedd;
}

.error {
  background: #f4d6d0;
}

.footer {
  background: var(--black);
  color: var(--tan);
  text-align: center;
  padding: 28px 20px;
  font-size: 14px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 21px;
  line-height: 1.25;
}

.footer-contact strong {
  color: white;
  font-size: 32px;
  line-height: 1.1;
}

.footer a {
  color: white;
}

.ada {
  font-size: 12px;
  color: #c6c0aa;
}

@media (max-width: 760px) {
  .header-inner,
  .section-heading,
  .contact-layout {
    display: block;
  }

  .listing-title-block h1 {
    font-size: 32px;
  }

  .phone {
    display: inline-block;
    margin-top: 14px;
  }

  .gallery,
  .admin-photo-grid {
    grid-template-columns: 1fr;
  }

  .admin-meta-row {
    grid-template-columns: 1fr;
  }

  .compact-checks {
    white-space: normal;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox-nav {
    width: 40px;
    height: 58px;
    font-size: 42px;
  }
}
