/* ============================================================================
   site.css — full site styling. ALL colours are CSS custom properties driven
   by config.THEME.colors (see base.html). Edit app/config.py to update colours
   globally; nothing in this file should ever contain a hardcoded brand colour.
============================================================================ */

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

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--ac-font-body);
  color: var(--ac-text-body);
  background: var(--ac-bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ac-font-heading);
  color: var(--ac-text-heading);
  margin: 0 0 0.5em;
  line-height: 1.2;
}
a { color: var(--ac-primary); text-decoration: none; }
a:hover { color: var(--ac-primary-hover); }

/* ----- Header (sticky, becomes solid navy on scroll) --------------------- */
.ac-header {
  position: sticky;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--ac-navy-mid);
  transition: background 200ms ease, box-shadow 200ms ease;
}
.ac-header.is-scrolled {
  background: var(--ac-navy-deep);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.ac-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.ac-header__logo img {
  height: 84px;
  width: auto;
  display: block;
}
.ac-header__toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--ac-radius-sm);
  color: #fff;
  padding: 8px 12px;
  font-size: 14px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.ac-nav { flex: 1; }
.ac-nav__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ac-nav__link {
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border-radius: var(--ac-radius-sm);
  background: none; border: 0;
  cursor: pointer;
  transition: background 150ms ease;
  font-family: var(--ac-font-body);
}
.ac-nav__link:hover, .ac-nav__link:focus-visible {
  background: rgba(255,255,255,0.1);
  color: #fff;
  outline: none;
}
.ac-nav__caret { font-size: 11px; opacity: .8; }

.ac-nav__item--has-submenu { position: relative; }
.ac-nav__submenu {
  list-style: none; margin: 0; padding: 6px 0;
  position: absolute; top: 100%; left: 0;
  background: #fff;
  border-radius: var(--ac-radius-md);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  min-width: 220px;
  display: none;
  z-index: 20;
}
.ac-nav__submenu a {
  display: block; padding: 10px 18px;
  color: var(--ac-primary-hover);
  font-weight: 500;
}
.ac-nav__submenu a:hover {
  background: rgba(29, 117, 189, 0.08);
  color: var(--ac-primary-deep);
}
.ac-nav__item--has-submenu:hover > .ac-nav__submenu,
.ac-nav__item--has-submenu .ac-nav__submenu.is-open {
  display: block;
}

.ac-header__cta { display: flex; }
.ac-btn {
  background: #fff;
  color: var(--ac-primary);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--ac-radius-md);
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
}
.ac-btn:hover {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  color: var(--ac-primary-hover);
}

.ac-nav-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 900;
}
body.ac-nav-open .ac-nav-backdrop { display: block; }

@media (max-width: 992px) {
  .ac-header__toggle { display: inline-flex; margin-left: auto; }
  .ac-nav {
    display: none;
    position: fixed;
    top: 128px; left: 0; right: 0;
    background: var(--ac-navy-mid);
    padding: 16px;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    z-index: 1001;
  }
  .ac-nav.is-open { display: block; }
  .ac-nav__list { flex-direction: column; align-items: stretch; gap: 6px; }
  .ac-nav__link { width: 100%; justify-content: space-between; }
  .ac-nav__submenu {
    position: static; box-shadow: none; background: rgba(255,255,255,0.06);
    margin-top: 4px;
  }
  .ac-nav__submenu a { color: #fff; }
  .ac-header__cta { display: none; }
}

/* ----- Main + flashes ---------------------------------------------------- */
.ac-main {
  min-height: 60vh;
  padding: 24px 0 48px;
}
.ac-flash-wrap {
  max-width: 1100px;
  margin: 0 auto 16px;
  padding: 0 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.ac-flash {
  padding: 12px 18px;
  border-radius: var(--ac-radius-md);
  font-weight: 500;
}
.ac-flash--success { background: #ecfdf5; color: #065f46; border-left: 4px solid var(--ac-success); }
.ac-flash--danger  { background: #fef2f2; color: #991b1b; border-left: 4px solid var(--ac-danger); }
.ac-flash--info    { background: #eff6ff; color: #1e40af; border-left: 4px solid var(--ac-primary); }
.ac-flash--warning { background: #fffbeb; color: #92400e; border-left: 4px solid var(--ac-warning); }

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--ac-radius-md);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  font-family: var(--ac-font-body);
  line-height: 1.2;
}
.btn-primary { background: var(--ac-primary); color: #fff; }
.btn-primary:hover { background: var(--ac-primary-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,0.18); }
.btn-secondary { background: var(--ac-navy-mid); color: #fff; }
.btn-secondary:hover { background: var(--ac-navy-deep); color: #fff; transform: translateY(-2px); }
.btn-gold { background: var(--ac-gold); color: #fff; }
.btn-gold:hover { background: #b8985a; color: #fff; }
.btn-outline { background: #fff; color: var(--ac-primary); border: 1px solid var(--ac-primary); }
.btn-outline:hover { background: var(--ac-primary); color: #fff; }
.btn-danger { background: var(--ac-danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-success { background: var(--ac-success); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 16px 32px; font-size: 17px; }

/* ----- Generic page container ------------------------------------------- */
.ac-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}
.ac-narrow { max-width: 720px; }

.ac-card {
  background: #fff;
  border-radius: var(--ac-radius-lg);
  box-shadow: var(--ac-shadow-deep);
  padding: 40px;
}
@media (max-width: 600px) {
  .ac-card { padding: 24px 18px; border-radius: var(--ac-radius-md); }
}

/* ----- Hero (homepage) -------------------------------------------------- */
.ac-hero {
  background: linear-gradient(135deg, var(--ac-navy-deep) 0%, var(--ac-navy-mid) 100%);
  color: #fff;
  padding: 96px 24px 80px;
  text-align: center;
}
.ac-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); }
.ac-hero p  { color: var(--ac-text-on-dark); font-size: 1.15rem; max-width: 720px; margin: 16px auto 32px; }
.ac-hero .btn-row {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}

/* ----- Listings filter bar ---------------------------------------------- */
.ac-listings-page .ac-page { max-width: 1280px; }

.ac-filters {
  background: #fff;
  border-radius: var(--ac-radius-lg);
  box-shadow: var(--ac-shadow-card);
  padding: 24px;
  margin-bottom: 32px;
}
.ac-filters__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}
.ac-filters label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--ac-text-heading);
  margin-bottom: 6px;
}
.ac-filters select,
.ac-filters input[type="text"],
.ac-filters input[type="number"],
.ac-filters .ac-amenity-trigger {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--ac-border-light);
  border-radius: var(--ac-radius-sm);
  font-size: 15px;
  background: #fff;
  font-family: var(--ac-font-body);
}
.ac-filters select:focus,
.ac-filters input:focus {
  border-color: var(--ac-primary);
  box-shadow: 0 0 0 3px rgba(29, 117, 189, 0.18);
  outline: none;
}
.ac-amenity {
  position: relative;
}
.ac-amenity-trigger {
  text-align: left;
  cursor: pointer;
  background: #fff;
}
.ac-amenity-dropdown {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--ac-border-light);
  border-radius: var(--ac-radius-sm);
  max-height: 260px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 0 12px 28px rgba(0,0,0,0.14);
  padding: 8px 0;
  display: none;
}
.ac-amenity-dropdown.is-open { display: block; }
.ac-amenity-dropdown label {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  font-size: 14px;
}
.ac-amenity-dropdown label:hover { background: var(--ac-bg-soft); }

/* ----- Property card grid ----------------------------------------------- */
.ac-property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.ac-property-card {
  background: #fff;
  border-radius: var(--ac-radius-lg);
  box-shadow: var(--ac-shadow-card);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.ac-property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ac-shadow-hover);
}
.ac-property-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--ac-bg-soft);
}
.ac-property-card__body {
  padding: 18px 20px;
  flex: 1; display: flex; flex-direction: column;
}
.ac-property-card__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ac-text-heading);
}
.ac-property-card__loc {
  color: var(--ac-text-muted);
  font-size: 0.9rem;
  margin: 0 0 14px;
}
.ac-property-card__loc .ac-distance {
  color: var(--ac-primary);
  font-weight: 500;
}
.ac-property-card__summary {
  font-size: 0.95rem; color: var(--ac-text-body);
  flex: 1;
  margin-bottom: 12px;
}
.ac-property-card__summary ul { padding-left: 18px; margin: 0; }
.ac-property-card__amenities {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--ac-text-muted);
}
.ac-property-card__amenities li::before {
  content: "•"; color: var(--ac-primary); font-weight: bold; margin-right: 4px;
}
.ac-property-card__price {
  padding: 0 20px 16px;
}
.ac-property-card__price-main {
  font-weight: 700; color: var(--ac-text-heading); font-size: 1rem;
}
.ac-property-card__price-sub {
  font-size: 12px; color: var(--ac-text-muted);
}
.ac-property-card__cta {
  display: block;
  text-align: center;
  padding: 14px;
  background: var(--ac-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.ac-property-card__cta:hover { background: var(--ac-primary-hover); color: #fff; }

/* ----- Property detail -------------------------------------------------- */
.ac-detail-hero img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
  /* Sharper rendering on retina + force GPU compositing to avoid soft scaling */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}
@media (max-width: 700px) { .ac-detail-hero img { height: 280px; } }

.ac-detail {
  max-width: 1080px;
  margin: -64px auto 0;
  position: relative;
  background: #fff;
  border-radius: var(--ac-radius-lg);
  box-shadow: var(--ac-shadow-deep);
  padding: 24px 36px 36px;
}
@media (max-width: 700px) {
  .ac-detail { margin: -32px 16px 0; padding: 18px 18px 22px; }
}
.ac-detail__header h1 {
  color: var(--ac-primary);
  font-size: 2.1rem;
  margin: 0 0 4px;
}
.ac-detail__loc { color: var(--ac-text-muted); margin: 0 0 24px; font-size: 1.05rem; }

.ac-detail__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.ac-detail__stat {
  background: var(--ac-bg-soft);
  border-radius: var(--ac-radius-md);
  padding: 16px;
  text-align: center;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ac-text-heading);
}
.ac-detail__stat small {
  display: block; font-weight: 400; font-size: 12px; color: var(--ac-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.ac-detail h2 { color: var(--ac-text-heading); font-size: 1.4rem; margin: 32px 0 14px; }

.ac-amenities {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.ac-amenities li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ac-border-soft);
  color: var(--ac-text-body);
}
.ac-amenities li i {
  color: var(--ac-primary);
  font-size: 1.1rem;
  width: 22px; text-align: center;
}

.ac-description { margin: 16px 0 24px; color: var(--ac-text-body); line-height: 1.7; font-size: 1.02rem; }

.ac-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.ac-gallery img {
  width: 100%; height: 160px; object-fit: cover;
  border-radius: var(--ac-radius-md);
  cursor: pointer;
  transition: transform 200ms ease;
}
.ac-gallery img:hover { transform: translateY(-2px); }

.ac-price {
  font-size: 2rem;
  color: var(--ac-primary);
  font-weight: 700;
  margin: 24px 0 4px;
}
.ac-price-sub {
  color: var(--ac-text-muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.ac-detail__map {
  width: 100%; height: 360px;
  border-radius: var(--ac-radius-md);
  margin: 16px 0 24px;
  background: var(--ac-bg-soft);
}

/* lightbox */
.ac-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  z-index: 5000;
}
.ac-lightbox.is-open { display: flex; }
.ac-lightbox img { max-width: 92%; max-height: 92%; border-radius: var(--ac-radius-md); }
.ac-lightbox__close {
  position: absolute; top: 24px; right: 28px;
  color: #fff; font-size: 2rem; cursor: pointer; opacity: 0.85;
  background: none; border: none;
}

/* ----- Forms (host submission, manage edit) ------------------------------ */
.ac-form { display: grid; gap: 18px; }
.ac-form__row { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) {
  .ac-form__row.cols-2 { grid-template-columns: 1fr 1fr; }
}
.ac-form label, .ac-form .form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ac-text-heading);
  font-size: 14px;
}
.ac-form .form-help {
  font-size: 12px;
  color: var(--ac-text-muted);
  margin-top: 4px;
}
.ac-form input[type="text"],
.ac-form input[type="email"],
.ac-form input[type="tel"],
.ac-form input[type="url"],
.ac-form input[type="password"],
.ac-form input[type="number"],
.ac-form input[type="date"],
.ac-form input[type="file"],
.ac-form select,
.ac-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--ac-border-light);
  border-radius: var(--ac-radius-sm);
  font-size: 15px;
  font-family: var(--ac-font-body);
  background: #fff;
  color: var(--ac-text-body);
}
.ac-form textarea { min-height: 110px; resize: vertical; }
.ac-form input:focus, .ac-form select:focus, .ac-form textarea:focus {
  border-color: var(--ac-primary);
  box-shadow: 0 0 0 3px rgba(29, 117, 189, 0.18);
  outline: none;
}

.ac-form-section {
  border-bottom: 2px solid var(--ac-border-soft);
  padding-bottom: 8px;
  margin: 28px 0 14px;
  color: var(--ac-text-heading);
  font-size: 1.2rem;
  font-weight: 600;
}

/* Modern chip grid for amenities — replaces vanilla checkboxes.
   Hides the native checkbox, styles the label as a tappable pill that
   highlights when selected via :has(). Fallback for browsers without
   :has() shows a plain border. */
.ac-checkbox-grid ul {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.ac-checkbox-grid li {
  margin: 0;
}
.ac-checkbox-grid li label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  margin: 0;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--ac-border-soft);
  border-radius: 999px;
  color: var(--ac-text-body);
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
  user-select: none;
}
.ac-checkbox-grid li label:hover {
  border-color: var(--ac-primary);
  color: var(--ac-primary);
  transform: translateY(-1px);
}
.ac-checkbox-grid input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}
/* Selected state — uses :has() to style the label sibling-of-a-checked-input.
   Supported in all modern browsers (Chrome 105+, Safari 15.4+, Firefox 121+). */
.ac-checkbox-grid li:has(input:checked) label {
  background: var(--ac-primary);
  border-color: var(--ac-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(29, 117, 189, 0.25);
}
.ac-checkbox-grid li:has(input:checked) label::before {
  content: "\f00c"; /* font-awesome check */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  margin-right: 2px;
}
/* Focus ring for keyboard nav */
.ac-checkbox-grid li:has(input:focus-visible) label {
  outline: 2px solid var(--ac-primary);
  outline-offset: 2px;
}
.ac-form-errors {
  color: var(--ac-danger);
  font-size: 13px;
  margin-top: 4px;
}

/* ----- Manage list table ------------------------------------------------- */
.ac-manage {
  background: #fff;
  border-radius: var(--ac-radius-lg);
  box-shadow: var(--ac-shadow-card);
  padding: 24px;
}
.ac-manage__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.ac-manage__search { flex: 1; min-width: 220px; }
.ac-manage__search input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--ac-border-light);
  border-radius: var(--ac-radius-sm);
  font-size: 14px;
}

.ac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ac-table th, .ac-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--ac-border-soft);
  vertical-align: middle;
}
.ac-table th {
  background: var(--ac-bg-soft);
  font-weight: 600;
  color: var(--ac-text-heading);
}
.ac-table tbody tr:hover { background: rgba(29, 117, 189, 0.04); }
.ac-table .ac-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.ac-status--active { background: #d1fae5; color: #065f46; }
.ac-status--review { background: #fef3c7; color: #92400e; }
.ac-status--paused { background: #e0e7ff; color: #3730a3; }
.ac-table form { display: inline; }
.ac-table .btn { padding: 6px 12px; font-size: 12px; margin-right: 4px; }

/* ----- Footer ----------------------------------------------------------- */
.ac-footer {
  background: var(--ac-navy-deep);
  color: var(--ac-text-on-dark);
  margin-top: 64px;
}
/* Pages with a dark full-bleed hero butt directly against the dark footer —
   killing the 64px white gap that otherwise sits between them. */
body.ac-home .ac-footer,
body.ac-page-hero .ac-footer { margin-top: 0; }
.ac-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 800px) { .ac-footer__inner { grid-template-columns: 1fr; gap: 24px; } }
.ac-footer__logo img { height: 64px; width: auto; }
.ac-footer__tagline { color: var(--ac-text-on-dark); margin-top: 12px; font-size: 14px; }
.ac-footer__links { display: flex; flex-direction: column; gap: 8px; }
.ac-footer__links a, .ac-footer__contact a { color: var(--ac-text-on-dark); }
.ac-footer__links a:hover, .ac-footer__contact a:hover { color: #fff; }
.ac-footer__contact strong { display: block; margin-bottom: 4px; color: #fff; }
.ac-footer__base {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 24px;
  font-size: 13px;
  text-align: center;
}

/* ----- Sections / shared --------------------------------------------------*/
.ac-section-heading {
  text-align: center;
  margin-bottom: 32px;
}
.ac-section-heading h2 { font-size: 2rem; }
.ac-section-heading p { color: var(--ac-text-muted); max-width: 600px; margin: 0 auto; }

.ac-back-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--ac-primary);
  font-weight: 500;
}

/* ----- Login ------------------------------------------------------------ */
.ac-login {
  max-width: 420px; margin: 64px auto;
  padding: 32px;
}

/* ----- Home hero (full-page) -------------------------------------------- */
.ac-home-hero {
  min-height: calc(100vh - 128px);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(201, 169, 97, 0.12), transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(29, 117, 189, 0.18), transparent 50%),
    linear-gradient(135deg, #0a1628 0%, var(--ac-navy-deep) 45%, var(--ac-navy-mid) 100%);
  color: #fff;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}
.ac-home-hero__inner {
  max-width: 780px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.ac-home-hero__badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ac-gold);
  padding: 8px 18px;
  border: 1px solid rgba(201, 169, 97, 0.4);
  border-radius: 999px;
  margin-bottom: 28px;
  background: rgba(201, 169, 97, 0.06);
}
.ac-home-hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  color: #fff;
  margin: 0 0 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, var(--ac-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ac-home-hero__lead {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--ac-text-on-dark);
  margin: 0 auto 44px;
  max-width: 560px;
  line-height: 1.6;
}
.ac-home-hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.ac-home-hero__cta .btn-primary { background: var(--ac-primary); border-color: var(--ac-primary); }
.ac-home-hero__cta .btn-secondary {
  background: transparent;
  border: 2px solid #ffffff;
  color: #fff;
}
.ac-home-hero__cta .btn-secondary:hover {
  background: #fff;
  color: var(--ac-navy-deep);
}
.ac-home-hero__alt {
  display: inline-block;
  margin-top: 36px;
  color: var(--ac-gold);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 169, 97, 0.4);
  padding-bottom: 4px;
  transition: color 150ms ease, border-color 150ms ease;
}
.ac-home-hero__alt:hover {
  color: #fff;
  border-color: #fff;
}

/* ----- Host page section reveal ----------------------------------------- */
.ac-host-section {
  display: none;
  background: var(--ac-bg-form);
  border: 1px solid var(--ac-border-soft);
  border-radius: var(--ac-radius-md);
  padding: 28px;
  margin-bottom: 16px;
  animation: ac-fade-in 200ms ease;
}
.ac-host-section.is-active { display: block; }
.ac-host-list {
  list-style: none; padding: 0; margin: 0 0 24px;
  columns: 2; gap: 16px;
}
@media (max-width: 600px) { .ac-host-list { columns: 1; } }
.ac-host-list li { padding: 4px 0; }

/* Active state on the host-page toggle pills */
[data-section-toggle].is-active {
  background: var(--ac-primary);
  color: #fff;
  border-color: var(--ac-primary);
}

@keyframes ac-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Pages with a hero image: remove the top padding of .ac-main so the hero
   butts directly under the header. Bottom padding is preserved so the
   content doesn't ram into the footer. Other pages keep their 24px gap. */
body.ac-home .ac-main { padding: 0; }
body.ac-page-hero .ac-main { padding-top: 0; }

/* Property detail map (Leaflet) */
.ac-detail__map {
  height: 360px;
  width: 100%;
  border-radius: var(--ac-radius-md);
  margin-bottom: 24px;
  z-index: 0; /* keep below header */
}
.ac-detail__map .leaflet-control-attribution {
  font-size: 11px;
}

/* ----- WYSIWYG with Visual/HTML tabs ----------------------------------- */
.ac-editor {
  background: #fff;
  border: 1px solid var(--ac-border-soft);
  border-radius: var(--ac-radius-sm);
  overflow: hidden;
}
.ac-editor__tabs {
  display: flex;
  border-bottom: 1px solid var(--ac-border-soft);
  background: var(--ac-bg-soft);
}
.ac-editor__tab {
  background: transparent;
  border: 0;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ac-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
  font-family: var(--ac-font-body);
}
.ac-editor__tab:hover { color: var(--ac-primary); }
.ac-editor__tab.is-active {
  color: var(--ac-primary);
  border-bottom-color: var(--ac-primary);
  background: #fff;
}
.ac-editor__pane { display: none; }
.ac-editor__pane.is-active { display: block; }

/* HTML pane — textarea styled as a code editor */
.ac-editor__pane--html textarea {
  width: 100%;
  min-height: 280px;
  border: 0;
  padding: 14px 16px;
  font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  color: var(--ac-text-heading);
  background: var(--ac-bg-soft);
}
.ac-editor__pane--html textarea:focus { outline: none; background: #fff; }

/* Quill overrides — remove its own borders since wrapper has them */
.ac-editor .ql-toolbar.ql-snow,
.ac-editor .ql-container.ql-snow {
  border: 0;
  font-family: var(--ac-font-body);
}
.ac-editor .ql-toolbar.ql-snow {
  border-bottom: 1px solid var(--ac-border-soft);
  background: #fcfcfc;
}
.ac-editor .ql-container.ql-snow {
  font-size: 15px;
  min-height: 240px;
}
.ac-editor .ql-editor {
  min-height: 240px;
  line-height: 1.7;
  color: var(--ac-text-body);
}
.ac-editor .ql-editor.ql-blank::before {
  color: var(--ac-text-muted);
  font-style: normal;
}

/* ----- Admin image grid with hover-action overlay ----------------------- */
.ac-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.ac-image-tile {
  position: relative;
  border-radius: var(--ac-radius-sm);
  overflow: hidden;
  background: var(--ac-bg-soft);
  aspect-ratio: 4 / 3;
}
.ac-image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 200ms ease;
}
.ac-image-tile:hover img {
  transform: scale(1.04);
}
.ac-image-tile__badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--ac-primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  z-index: 2;
}
.ac-image-tile__actions {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,30,53,0) 50%, rgba(15,30,53,0.75) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px;
  opacity: 0;
  transition: opacity 150ms ease;
  z-index: 1;
}
.ac-image-tile:hover .ac-image-tile__actions,
.ac-image-tile:focus-within .ac-image-tile__actions {
  opacity: 1;
}
.ac-image-tile__form { margin: 0; padding: 0; line-height: 0; }
.ac-image-tile__btn {
  background: rgba(255,255,255,0.95);
  border: 0;
  color: var(--ac-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.ac-image-tile__btn:hover {
  background: #fff;
  transform: translateY(-1px);
}
.ac-image-tile__btn--danger {
  color: var(--ac-danger);
}
.ac-image-tile__btn--danger:hover {
  background: var(--ac-danger);
  color: #fff;
}

/* Mobile / touch: actions always visible (no hover) */
@media (hover: none) {
  .ac-image-tile__actions { opacity: 1; }
}

/* ============================================================================
   Homepage locations grid + host CTA band
   ----------------------------------------------------------------------------
   Added when Carmel asked for big-area location cards on the home page
   (Carlisle, Keswick, Kendal, etc.) and a host CTA strip below them.
============================================================================ */
.ac-locations-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 28px 40px;
}
.ac-locations-section__head {
  text-align: center;
  margin-bottom: 36px;
}
.ac-locations-section__head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 8px;
}
.ac-locations-section__head p {
  color: var(--ac-text-muted);
  max-width: 640px;
  margin: 0 auto;
}
.ac-locations-section__map-link {
  text-align: center;
  margin-top: 32px;
}
.ac-locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* Shared card frame — both photo and text variants use this layout */
.ac-location-card {
  position: relative;
  border-radius: var(--ac-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 180px;
  padding: 18px 20px;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.ac-location-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ac-shadow-hover);
}

/* --- Photo variant (locations we have stock in) --- */
.ac-location-card--photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  min-height: 220px;
  box-shadow: var(--ac-shadow-card);
}
.ac-location-card--photo .ac-location-card__name {
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 6px;
}
.ac-location-card--photo .ac-location-card__cta {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.ac-location-card--photo .ac-location-card__cta span[aria-hidden] {
  transition: transform 150ms ease;
}
.ac-location-card--photo:hover .ac-location-card__cta span[aria-hidden] {
  transform: translateX(4px);
}

/* --- Text variant (Lake District nearest-search lookups) --- */
.ac-location-card--nearest {
  background: #fff;
  border: 1px solid var(--ac-border-soft);
  color: var(--ac-text-heading);
  justify-content: center;
  align-items: flex-start;
  min-height: 180px;
}
.ac-location-card--nearest:hover {
  border-color: var(--ac-primary);
  box-shadow: var(--ac-shadow-card);
  color: var(--ac-text-heading);
}
.ac-location-card--nearest .ac-location-card__name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ac-text-heading);
}
.ac-location-card--nearest .ac-location-card__sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ac-gold);
  font-weight: 600;
  margin-bottom: 8px;
}
.ac-location-card--nearest .ac-location-card__cta {
  margin-top: 10px;
  color: var(--ac-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ac-host-band {
  background: linear-gradient(135deg, var(--ac-navy-deep) 0%, var(--ac-navy-mid) 100%);
  color: var(--ac-text-on-dark);
  padding: 64px 28px;
  margin-top: 40px;
}
.ac-host-band__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.ac-host-band__inner h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 12px;
}
.ac-host-band__inner p {
  color: var(--ac-text-on-dark);
  font-size: 1.05rem;
  margin-bottom: 28px;
}
.ac-host-band__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================================
   Host compare-options page
============================================================================ */
.ac-host-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
@media (max-width: 720px) {
  .ac-host-compare { grid-template-columns: 1fr; gap: 16px; }
}
.ac-host-compare__card {
  border: 2px solid var(--ac-border-soft);
  border-radius: var(--ac-radius-md);
  padding: 28px;
  background: var(--ac-bg-soft);
  transition: border-color 150ms ease;
}
.ac-host-compare__card:hover {
  border-color: var(--ac-primary);
}
.ac-host-compare__card h2 {
  color: var(--ac-primary);
  margin-bottom: 4px;
}
.ac-host-compare__rate {
  font-weight: 700;
  color: var(--ac-gold);
  margin: 0 0 12px;
  font-size: 1rem;
}
.ac-host-compare__list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.ac-host-compare__list li {
  padding: 4px 0 4px 22px;
  position: relative;
  font-size: 0.95rem;
}
.ac-host-compare__list li::before {
  content: "✓";
  color: var(--ac-success);
  font-weight: 700;
  position: absolute;
  left: 0;
}
.ac-host-compare__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}

/* ============================================================================
   Listings page: "0 properties in X — here are the closest" notice
============================================================================ */
.ac-fallback-notice {
  background: #fff8e1;
  border: 1px solid var(--ac-gold);
  border-left: 4px solid var(--ac-gold);
  padding: 14px 18px;
  border-radius: var(--ac-radius-sm);
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--ac-text-heading);
}
.ac-fallback-notice strong { color: var(--ac-text-heading); }
.ac-fallback-notice a {
  margin-left: 12px;
  font-weight: 600;
}

/* ============================================================================
   Locations map page — zone-coloured Leaflet pins, legend, popups
============================================================================ */
.ac-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 14px 20px;
  background: var(--ac-bg-soft);
  border-radius: var(--ac-radius-md);
  margin-bottom: 18px;
  font-size: 0.92rem;
  color: var(--ac-text-body);
}
.ac-map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.ac-map-legend__item--icon-key {
  border-left: 1px solid var(--ac-border-soft);
  padding-left: 16px;
  margin-left: 4px;
  color: var(--ac-text-muted);
}
.ac-map-legend__item--icon-key i { color: var(--ac-text-heading); }
.ac-map-legend__swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* Custom Leaflet divIcon — coloured circular pin with a Font Awesome glyph */
.ac-map-pin-wrap { background: none; border: 0; }
.ac-map-pin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  border: 2px solid #fff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  transition: transform 150ms ease;
}
.ac-map-pin-wrap:hover .ac-map-pin { transform: scale(1.15); }

.ac-locations-map {
  height: 70vh;
  min-height: 520px;
  border-radius: var(--ac-radius-md);
  overflow: hidden;
  box-shadow: var(--ac-shadow-card);
}
.ac-map-popup {
  min-width: 200px;
  font-family: var(--ac-font-body);
}
.ac-map-popup img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
  display: block;
}
.ac-map-popup strong {
  display: block;
  font-size: 1rem;
  color: var(--ac-text-heading);
  margin-bottom: 4px;
}
.ac-map-popup__loc {
  font-size: 0.85rem;
  color: var(--ac-text-muted);
  margin-bottom: 4px;
}
.ac-map-popup__bedrooms {
  font-size: 0.85rem;
  color: var(--ac-text-body);
  margin-bottom: 4px;
}
.ac-map-popup__price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ac-primary);
  margin-bottom: 8px;
}
/* Boosted specificity to defeat both the global `a:hover` rule and
   Leaflet's own .leaflet-popup-content a:hover styles (which would
   otherwise turn the white "View listing" text blue-on-blue on hover). */
.leaflet-popup-content .ac-map-popup__link,
.ac-map-popup__link {
  display: inline-block;
  background: var(--ac-primary);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--ac-radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none !important;
  transition: background 150ms ease;
}
.leaflet-popup-content .ac-map-popup__link:hover,
.leaflet-popup-content .ac-map-popup__link:focus,
.ac-map-popup__link:hover,
.ac-map-popup__link:focus {
  background: var(--ac-primary-hover);
  color: #fff !important;
  text-decoration: none !important;
}

/* ============================================================================
   Lightbox prev/next controls (property gallery)
============================================================================ */
.ac-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.92);
  border: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ac-navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 150ms ease, transform 150ms ease;
}
.ac-lightbox__nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}
.ac-lightbox__nav--prev { left: 28px; }
.ac-lightbox__nav--next { right: 28px; }
.ac-lightbox__counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0,0,0,0.5);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}
@media (max-width: 600px) {
  .ac-lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  .ac-lightbox__nav--prev { left: 12px; }
  .ac-lightbox__nav--next { right: 12px; }
}
