:root {
  --background: #faf8f3;
  --foreground: #1c1c1a;
  --brand-dark: #0f3d2e;
  --brand-dark-2: #0a2b21;
  --brand-gold: #c19a4b;
  --brand-gold-dark: #a37f38;
  --brand-cream: #faf8f3;
  --brand-line: #e4e0d6;
  --muted: #6b6b64;
  /* Header/footer background and the "selected" accent don't share an
     existing variable with anything else, so they get dedicated ones. */
  --color-header-bg: #ffffff;
  --color-footer-bg: #0a2b21;
  --color-selected: #c19a4b;
  /* Overridden at runtime by the Theme panel (see common.js applyFonts() /
     applyColors()) — public pages only, the dashboard keeps its own look. */
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.serif { font-family: var(--font-heading); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
main { flex: 1; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.gold { color: var(--brand-gold-dark); }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand-gold-dark);
}

/* Buttons */
.btn {
  display: inline-block; border: none; cursor: pointer;
  border-radius: 3px; padding: 10px 20px; font-size: 14px; font-weight: 500;
  transition: transform .15s, background .2s; font-family: inherit;
}
.btn-gold { background: var(--brand-gold); color: #fff; }
.btn-gold:hover { background: var(--brand-gold-dark); transform: scale(1.03); }
.btn-dark { background: var(--brand-dark); color: #fff; }
.btn-dark:hover { background: var(--brand-dark-2); }
.btn-outline { background: transparent; border: 1px solid var(--brand-line); color: var(--brand-dark); }
.btn-outline:hover { background: var(--brand-cream); }
.btn-green { background: #16a34a; color: #fff; }
.btn-green:hover { background: #15803d; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--color-header-bg); border-bottom: 1px solid var(--brand-line);
}
.site-header .bar {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 14px 24px; max-width: 1180px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo .mark {
  width: 36px; height: 36px; border-radius: 3px; background: var(--brand-dark);
  color: var(--brand-gold); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.logo .mark img { width: 100%; height: 100%; object-fit: contain; }
.logo .name { font-size: 16px; font-weight: 600; color: var(--brand-dark); letter-spacing: .02em; }
.logo .sub { display: block; font-size: 10px; letter-spacing: .3em; color: var(--brand-gold-dark); }
.logo img.logo-image { max-height: 40px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 14px; font-weight: 500; color: rgba(28,28,26,.8); }
.nav a:hover { color: var(--brand-dark); }
.nav .nav-cta { display: none; }

/* Mobile hamburger */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 6px;
  width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--brand-dark);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--brand-line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0;
    box-shadow: 0 12px 24px rgba(0,0,0,.1);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 24px; border-bottom: 1px solid var(--brand-line); }
  .nav .nav-cta { display: block; padding: 13px 24px; color: var(--brand-gold-dark); font-weight: 600; }
}

/* Footer */
.site-footer { margin-top: 80px; background: var(--color-footer-bg); color: #fff; }
.footer-cta {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  max-width: 1180px; margin: 0 auto; padding: 40px 24px;
}
.footer-cta h3 { font-size: 20px; margin: 0; }
.footer-cta p { margin: 4px 0 0; color: rgba(255,255,255,.6); font-size: 14px; }
.footer-reasons {
  border-top: 1px solid rgba(255,255,255,.1);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  max-width: 1180px; margin: 0 auto; padding: 32px 24px;
}
.footer-reasons .t { font-size: 14px; font-weight: 500; color: var(--brand-gold); }
.footer-reasons .d { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); text-align: center;
  padding: 20px; font-size: 12px; color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.7); text-decoration: underline; }
.footer-bottom a:hover { color: var(--brand-gold); }
@media (max-width: 700px) { .footer-reasons { grid-template-columns: repeat(2, 1fr); } }

/* Hero */
.hero {
  position: relative; min-height: 560px; display: flex; align-items: flex-end;
  overflow: hidden; background: var(--brand-dark);
}
/* Photos live in their own stacking layer so the per-slide z-index the JS
   manages can never paint above .scrim / .content (which have no z-index of
   their own and would otherwise lose to any positioned positive z-index). */
.hero-bg-wrap { position: absolute; inset: 0; z-index: 0; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--hero-anim-speed, 1.2s) ease; will-change: transform, opacity; }
.hero img.bg.active { opacity: .7; }

/* Slide effect: images sit fully opaque, off-screen until their turn, then
   slide in and stay — z-index is managed inline in JS (scoped to
   .hero-bg-wrap's own stacking context) so the current slide always paints
   above earlier ones regardless of DOM order. */
.hero.effect-slide img.bg { opacity: .7; transform: translateX(100%); transition: transform var(--hero-anim-speed, 1.2s) cubic-bezier(.4,0,.2,1); }
.hero.effect-slide.direction-right img.bg { transform: translateX(-100%); }
.hero.effect-slide img.bg.active { transform: translateX(0); }
.hero .scrim { position: absolute; inset: 0; background: linear-gradient(to top, var(--brand-dark), color-mix(in srgb, var(--brand-dark) 40%, transparent), transparent); }
.hero .content { position: relative; width: 100%; max-width: 1180px; margin: 0 auto; padding: 96px 24px 56px; color: #fff; }
.hero h1 { font-size: 48px; font-weight: 600; line-height: 1.1; margin: 4px 0 0; max-width: 640px; }
.hero .lede { margin-top: 12px; max-width: 520px; color: rgba(255,255,255,.8); }
@media (max-width: 600px) { .hero h1 { font-size: 34px; } }

/* Search / filter form */
.search-form {
  margin-top: 32px; background: rgba(255,255,255,.95); border-radius: 6px; padding: 16px;
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  box-shadow: 0 10px 30px rgba(0,0,0,.15); color: var(--foreground);
}
.field { font-size: 12px; color: var(--muted); }
.field label { display: block; margin-bottom: 4px; }
.field input, .field select,
.filters input:not([type=checkbox]):not([type=radio]), .filters select {
  width: 100%; border: 1px solid var(--brand-line); border-radius: 3px;
  padding: 8px 10px; font-size: 14px; font-family: inherit; background: #fff; color: var(--foreground);
}
.field.end { align-self: end; }

/* Checkbox/radio filter rows (View, Zoning, Status) — kept out of the
   text-input styling above, which would otherwise stretch each checkbox
   into a full-width bordered box. */
.filters .check input[type=checkbox], .filters .check input[type=radio] {
  width: auto; height: auto; margin: 0; accent-color: var(--color-selected); cursor: pointer;
}

/* Explore-by-area grid */
.section { padding: 56px 0; }
.area-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 20px; }
@media (max-width: 900px) { .area-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .area-grid { grid-template-columns: repeat(2, 1fr); } }
.area-card {
  position: relative; aspect-ratio: 3/4; border-radius: 6px; overflow: hidden; display: block;
}
.area-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.area-card:hover img { transform: scale(1.08); }
.area-card .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.05), transparent); }
.area-card .label { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; color: #fff; }
.area-card .label .n { font-family: var(--font-heading); font-size: 14px; font-weight: 500; }
.area-card .label .d { font-size: 11px; color: rgba(255,255,255,.7); margin-top: 2px; }
.area-card .label .c { font-size: 11px; color: var(--brand-gold); margin-top: 4px; }

/* Trust badges */
.badges {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 32px;
  background: #fff; border: 1px solid var(--brand-line); border-radius: 6px; padding: 24px;
}
@media (max-width: 900px) { .badges { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .badges { grid-template-columns: repeat(2, 1fr); } }
.badges .t { font-size: 14px; font-weight: 500; color: var(--brand-dark); }
.badges .d { font-size: 12px; color: var(--muted); }

/* Listing cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* Configurable columns — set via CSS variables from the Theme panel
   (see common.js applyGridColumns()). Falls back to the defaults above when
   the variables are unset. */
.cards.listing-grid { grid-template-columns: repeat(var(--listing-cols, 3), 1fr); }
.cards.blog-grid { grid-template-columns: repeat(var(--blog-cols, 3), 1fr); }
@media (max-width: 700px) {
  .cards.listing-grid { grid-template-columns: repeat(var(--listing-cols-mobile, 1), 1fr); }
  .cards.blog-grid { grid-template-columns: repeat(var(--blog-cols-mobile, 1), 1fr); }
}
.card {
  display: block; background: #fff; border: 1px solid var(--brand-line);
  border-radius: 6px; overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,.1); }
.card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.05); }
.card .thumb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 26px; height: 26px; border-radius: 50%; border: none; padding: 0;
  background: rgba(255,255,255,.85); color: var(--brand-dark); font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transition: opacity .15s, background .15s;
}
.card .thumb:hover .thumb-nav { opacity: 1; }
.card .thumb-nav:hover { background: #fff; }
.card .thumb-nav.prev { left: 8px; }
.card .thumb-nav.next { right: 8px; }
@media (hover: none) { .card .thumb-nav { opacity: .85; } }
.card .thumb-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; gap: 4px;
}
.card .thumb-dots span { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.55); }
.card .thumb-dots span.on { background: #fff; }
.card .badge-feat {
  position: absolute; top: 12px; left: 12px; background: var(--brand-gold); color: #fff;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 8px; border-radius: 3px;
}
.card .body { padding: 16px; }
.card .body h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 500; color: var(--brand-dark); margin: 0; }
.card .row { display: flex; align-items: center; justify-content: space-between; }
.card .meta { font-size: 14px; color: var(--muted); margin-top: 4px; }
.card .price { font-size: 14px; font-weight: 600; color: var(--brand-dark); margin-top: 12px; }
.pill { border: 1px solid var(--brand-line); border-radius: 3px; padding: 4px 8px; font-size: 11px; color: var(--muted); }

/* Listings layout */
.listing-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; margin-top: 24px; }
@media (max-width: 900px) { .listing-layout { grid-template-columns: 1fr; } }
.filters { background: #fff; border: 1px solid var(--brand-line); border-radius: 6px; padding: 20px; height: fit-content; }
.filters h4 { margin: 0; font-size: 14px; color: var(--brand-dark); }
.filters fieldset { border: none; margin: 0; padding: 16px 0 0; }
.filters legend { font-size: 12px; font-weight: 500; color: var(--muted); padding: 0; }
.filters .check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 6px; }
.filters .two { display: flex; gap: 8px; margin-top: 4px; }

/* Pagination */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pager a, .pager span {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 3px; font-size: 14px; border: 1px solid var(--brand-line); color: rgba(28,28,26,.7);
}
.pager .active { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }

/* Detail page */
.crumb { font-size: 12px; color: var(--muted); }
.crumb a:hover { color: var(--brand-dark); }
.detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 12px; }
.status-tag { background: var(--brand-gold); color: #fff; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; border-radius: 3px; }
.detail-head h1 { font-family: var(--font-heading); font-size: 30px; font-weight: 600; color: var(--brand-dark); margin: 8px 0 0; }
.price-big { font-size: 26px; font-weight: 600; color: var(--brand-dark); }
@media (max-width: 560px) {
  .detail-head h1 { font-size: 22px; }
  .price-big { font-size: 20px; }
}
.spec-strip { display: flex; flex-wrap: wrap; gap: 16px; border-top: 1px solid var(--brand-line); border-bottom: 1px solid var(--brand-line); padding: 12px 0; margin-top: 16px; font-size: 14px; color: rgba(28,28,26,.7); }
.gallery { display: grid; grid-template-columns: 3fr 1fr; gap: 16px; margin-top: 24px; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }
.gallery .main { aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery .thumbs img { aspect-ratio: 1; border-radius: 3px; object-fit: cover; cursor: pointer; }
.detail-cols { display: grid; grid-template-columns: 1fr 320px; gap: 24px; margin-top: 32px; }
@media (max-width: 900px) { .detail-cols { grid-template-columns: 1fr; } }
/* Grid items default to min-width:auto, which lets a nowrap-scrolling child
   (the tabs strip) force this column wider than its track instead of
   scrolling within it. min-width:0 lets it actually shrink to fit. */
.detail-cols > div:first-child { min-width: 0; }
.panel { background: #fff; border: 1px solid var(--brand-line); border-radius: 6px; }
.tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--brand-line); }
.tabs button {
  white-space: nowrap; border: none; background: none; cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent; padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--muted);
}
.tabs button.active { border-color: var(--color-selected); color: var(--brand-dark); }
.tab-body { padding: 20px; }
@media (max-width: 480px) { .tab-body { padding: 14px; } }
.location-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; font-size: 14px; }
@media (max-width: 480px) { .location-stats { grid-template-columns: repeat(2, 1fr); } }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 24px; }
@media (max-width: 560px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
.spec-grid dt { font-size: 13px; color: var(--muted); }
.spec-grid dd { font-size: 14px; font-weight: 500; color: var(--brand-dark); margin: 0 0 8px; }
.map-frame { aspect-ratio: 16/9; border-radius: 3px; overflow: hidden; background: var(--brand-cream); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.video-frame { aspect-ratio: 16/9; border-radius: 3px; overflow: hidden; background: #000; margin-bottom: 16px; }
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid img { aspect-ratio: 4/3; border-radius: 3px; object-fit: cover; cursor: pointer; }

/* Lightbox — full-screen photo viewer with prev/next, used by listing.html */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; user-select: none; }
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255,255,255,.15); border: none; color: #fff;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-close { top: 16px; right: 20px; width: 40px; height: 40px; font-size: 22px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 26px; }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-count {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.85); font-size: 13px; background: rgba(255,255,255,.12);
  padding: 5px 14px; border-radius: 20px;
}
@media (max-width: 600px) {
  .lightbox-nav { width: 38px; height: 38px; font-size: 20px; }
  .lightbox-nav.prev { left: 6px; }
  .lightbox-nav.next { right: 6px; }
}
.aside { background: #fff; border: 1px solid var(--brand-line); border-radius: 6px; padding: 20px; height: fit-content; display: grid; gap: 12px; }

/* Simple content pages */
.page-narrow { max-width: 720px; }
.form-field { display: block; font-size: 14px; color: rgba(28,28,26,.7); margin-bottom: 16px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; border: 1px solid var(--brand-line); border-radius: 3px; padding: 10px 12px;
  font-size: 14px; font-family: inherit; margin-top: 4px; background: #fff; color: var(--foreground);
}
.notice { border-radius: 3px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.notice.ok { background: #ecfdf3; color: #15803d; }
.notice.err { background: #fef2f2; color: #b91c1c; }
.empty { border: 1px solid var(--brand-line); background: #fff; border-radius: 6px; padding: 32px; text-align: center; color: var(--muted); font-size: 14px; }

/* Admin */
.admin { display: flex; min-height: 100vh; background: var(--brand-cream); }
.sidebar { width: 240px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--brand-line); display: flex; flex-direction: column; }
.sidebar .brand { padding: 20px; border-bottom: 1px solid var(--brand-line); }
.sidebar .brand .n { font-family: var(--font-heading); font-size: 14px; font-weight: 600; color: var(--brand-dark); }
.sidebar .brand .s { font-size: 12px; color: var(--muted); }
.sidebar nav { flex: 1; padding: 16px 12px; display: grid; gap: 4px; align-content: start; }
.sidebar nav a { padding: 8px 12px; border-radius: 3px; font-size: 14px; color: rgba(28,28,26,.7); }
.sidebar nav a:hover, .sidebar nav a.active { background: var(--brand-cream); color: var(--brand-dark); }
.sidebar .foot { padding: 16px 20px; border-top: 1px solid var(--brand-line); font-size: 12px; }
.admin-main { flex: 1; padding: 32px; }
.admin-main h1 { font-family: var(--font-heading); font-size: 24px; font-weight: 600; color: var(--brand-dark); margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 24px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--brand-line); border-radius: 6px; padding: 20px; }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 26px; font-weight: 600; color: var(--brand-dark); margin-top: 4px; }
.table-wrap { margin-top: 24px; overflow-x: auto; background: #fff; border: 1px solid var(--brand-line); border-radius: 6px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
table.data th { font-size: 12px; color: var(--muted); font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--brand-line); }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--brand-line); }
table.data tr:last-child td { border-bottom: none; }
.chip { border-radius: 3px; padding: 2px 8px; font-size: 12px; }
.chip.green { background: #ecfdf3; color: #15803d; }
.chip.gray { background: rgba(0,0,0,.06); color: var(--muted); }
.chip.cream { background: var(--brand-cream); color: var(--brand-dark); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 780px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--brand-dark-2); padding: 24px; }
.login-card { width: 100%; max-width: 360px; background: #fff; border-radius: 6px; padding: 32px; }
.hidden { display: none !important; }
.spinner { padding: 60px; text-align: center; color: var(--muted); }


/* ============================================================
   Bali Property Collection — added sections
   ============================================================ */

/* Hero CTA row */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Testimonial slider */
.tslider { position: relative; max-width: 820px; margin: 0 auto; text-align: center; }
.tslider .slide { display: none; }
.tslider .slide.active { display: block; animation: tfade .5s ease; }
@keyframes tfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tslider .quote {
  font-family: var(--font-heading); font-size: 22px; line-height: 1.5;
  color: var(--brand-dark); margin: 0;
}
.tslider .who { margin-top: 14px; font-size: 13px; color: var(--muted); }
.tslider .who strong { color: var(--brand-dark); font-weight: 500; }
.tslider-nav { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; }
.tslider-nav button {
  width: 8px; height: 8px; padding: 0; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand-line); transition: background .2s, transform .2s;
}
.tslider-nav button.on { background: var(--color-selected); transform: scale(1.3); }
.tslider-arrow {
  background: none; border: 1px solid var(--brand-line); color: var(--brand-dark);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1;
}
.tslider-arrow:hover { background: var(--brand-cream); }

/* Section header helper */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.section-head h2 { font-family: var(--font-heading); font-size: 30px; font-weight: 600; color: var(--brand-dark); margin: 8px 0 0; }
.section-head p { color: var(--muted); font-size: 15px; margin: 12px 0 0; }

/* Category chips grid */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff; border: 1px solid var(--brand-line); border-radius: 6px;
  padding: 16px 18px; font-size: 14px; font-weight: 500; color: var(--brand-dark);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-chip:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.08); border-color: var(--brand-gold); }
.cat-chip .arw { color: var(--brand-gold); }

/* Why choose us list */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; }
@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .why-grid { grid-template-columns: 1fr; } }
.why-item { background: #fff; border: 1px solid var(--brand-line); border-radius: 6px; padding: 20px; }
.why-item .t { font-size: 15px; font-weight: 500; color: var(--brand-dark); }
.why-item .d { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

/* Numbered process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--brand-line); border-radius: 6px; padding: 24px; position: relative; }
.step .num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand-dark); color: var(--brand-gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 16px; font-weight: 600;
}
.step h3 { font-family: var(--font-heading); font-size: 18px; font-weight: 600; color: var(--brand-dark); margin: 14px 0 0; }
.step p { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 8px 0 0; }

/* Dark feature band */
.band { background: var(--brand-dark); color: #fff; }
.band .wrap { padding-top: 56px; padding-bottom: 56px; }
.band h2 { font-family: var(--font-heading); font-size: 28px; font-weight: 600; margin: 8px 0 0; }
.band p { color: rgba(255,255,255,.75); font-size: 15px; line-height: 1.7; margin: 14px 0 0; max-width: 760px; }
.band .eyebrow { color: var(--brand-gold); }

/* Blog */
.post-card { display: block; background: #fff; border: 1px solid var(--brand-line); border-radius: 6px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,.1); }
.post-card .thumb { aspect-ratio: 16/9; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .body { padding: 18px; }
.post-card .date { font-size: 12px; color: var(--brand-gold-dark); letter-spacing: .04em; }
.post-card h3 { font-family: var(--font-heading); font-size: 18px; font-weight: 500; color: var(--brand-dark); margin: 8px 0 0; line-height: 1.35; }
.post-card .ex { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 10px 0 0; }

.article { max-width: 760px; margin: 0 auto; }
.article .hero-img { aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; margin-top: 20px; }
.article .hero-img img { width: 100%; height: 100%; object-fit: cover; }
.article h1 { font-family: var(--font-heading); font-size: 34px; font-weight: 600; color: var(--brand-dark); line-height: 1.2; margin: 12px 0 0; }
@media (max-width: 560px) { .article h1 { font-size: 26px; } }
.article .meta { font-size: 13px; color: var(--brand-gold-dark); margin-top: 10px; }
.article-body { margin-top: 28px; font-size: 16px; line-height: 1.8; color: #33332f; }
.article-body h2, .article-body h3 { font-family: var(--font-heading); font-weight: 600; color: var(--brand-dark); margin: 32px 0 0; }
.article-body h2 { font-size: 22px; }
.article-body h3 { font-size: 18px; }
.article-body p { margin: 16px 0 0; }
.article-body ol, .article-body ul { margin: 16px 0 0; padding-left: 22px; }
.article-body li { margin-top: 6px; }
.article-body blockquote {
  margin: 20px 0 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand-gold);
  font-style: italic; color: var(--muted);
}
.article-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 20px 0 0; display: block; }
.article-body a { color: var(--brand-gold-dark); text-decoration: underline; }

/* ============================================================
   CMS dashboard shell
   ============================================================ */

.admin { display: flex; min-height: 100vh; background: var(--brand-cream); }
.admin-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Sidebar */
.sidebar { width: 232px; flex-shrink: 0; background: var(--brand-dark); color: #fff; display: flex; flex-direction: column; }
.sidebar .brand { padding: 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .brand .n { font-size: 15px; font-weight: 600; color: #fff; }
.sidebar .brand .s { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-gold); margin-top: 2px; }
.sidebar nav { flex: 1; padding: 12px 10px; display: block; overflow-y: auto; }
.sidebar .nav-group {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.4); padding: 16px 10px 6px;
}
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 5px; font-size: 14px;
  color: rgba(255,255,255,.75); transition: background .15s, color .15s;
}
.sidebar nav a svg { flex-shrink: 0; opacity: .8; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { background: var(--brand-gold); color: #fff; font-weight: 500; }
.sidebar nav a.active svg { opacity: 1; }
.sidebar .foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar .view-site { font-size: 12px; color: rgba(255,255,255,.6); }
.sidebar .view-site:hover { color: var(--brand-gold); }

/* Sidebar toggle (mobile) + backdrop */
.sidebar-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 6px;
  width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--brand-dark);
}
.sidebar-toggle svg { width: 22px; height: 22px; }
.sidebar-backdrop { display: none; }

@media (max-width: 860px) {
  .sidebar-toggle { display: flex; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40;
  }
}

/* Topbar */
.topbar {
  background: #fff; border-bottom: 1px solid var(--brand-line);
  padding: 0 28px; height: 62px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 20;
}
@media (max-width: 860px) { .topbar { padding: 0 16px; } }
@media (max-width: 640px) { .admin-main { padding: 20px 16px; } }
.topbar-title { font-family: var(--font-heading); font-size: 19px; font-weight: 600; color: var(--brand-dark); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar .who { display: flex; align-items: center; gap: 10px; }
.topbar .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-dark);
  color: var(--brand-gold); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.topbar .who-text { display: flex; flex-direction: column; line-height: 1.25; }
.topbar .who-name { font-size: 13px; font-weight: 500; color: var(--brand-dark); }
.topbar .who-role { font-size: 11px; color: var(--muted); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
@media (max-width: 640px) { .topbar .who-text { display: none; } }

/* Main area */
.admin-main { flex: 1; padding: 28px; }
.admin-main h1 { font-family: var(--font-heading); font-size: 24px; font-weight: 600; color: var(--brand-dark); margin: 0; }
.page-actions { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

/* Panels */
.card-panel { background: #fff; border: 1px solid var(--brand-line); border-radius: 8px; padding: 22px; }
.card-panel + .card-panel { margin-top: 20px; }
.card-panel h2 { font-family: var(--font-heading); font-size: 17px; font-weight: 600; color: var(--brand-dark); margin: 0 0 4px; }
.card-panel .hint { font-size: 13px; color: var(--muted); margin: 0 0 18px; }

/* Permission matrix */
.matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.matrix th, .matrix td { padding: 12px 14px; border-bottom: 1px solid var(--brand-line); text-align: left; }
.matrix thead th { font-size: 12px; color: var(--muted); font-weight: 500; }
.matrix tbody th { font-weight: 500; color: var(--brand-dark); }
.matrix td { text-align: center; }
.matrix input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; accent-color: var(--brand-gold); }
.matrix tr.locked { background: #fbfaf6; }
.matrix tr.locked input { cursor: not-allowed; }
.role-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--brand-cream); color: var(--brand-dark); border: 1px solid var(--brand-line); }

/* Template picker */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
@media (max-width: 800px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-option { cursor: pointer; display: block; }
.tpl-option input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-card {
  border: 2px solid var(--brand-line); border-radius: 8px; padding: 14px;
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.tpl-option:hover .tpl-card { border-color: var(--brand-gold-dark); }
.tpl-option input:checked + .tpl-card { border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(193,154,75,.15); }
.tpl-card .t { font-size: 14px; font-weight: 500; color: var(--brand-dark); margin-top: 10px; }
.tpl-card .d { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
/* Miniature previews drawn with plain divs */
.tpl-prev { background: var(--brand-cream); border-radius: 4px; padding: 8px; display: grid; gap: 5px; height: 78px; }
.tpl-prev i { background: #d9d4c6; border-radius: 2px; display: block; }
.tpl-prev.grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.tpl-prev.list { grid-template-columns: 30px 1fr; grid-auto-rows: 1fr; }
.tpl-prev.magazine { grid-template-columns: repeat(2, 1fr); grid-template-rows: 1fr 1fr; }
.tpl-prev.magazine i:first-child { grid-column: 1 / -1; }

/* Blog layout variants (public site) */
.posts-list { display: grid; gap: 20px; }
.posts-list .post-card { display: grid; grid-template-columns: 260px 1fr; }
.posts-list .post-card .thumb { aspect-ratio: auto; height: 100%; min-height: 170px; }
@media (max-width: 640px) { .posts-list .post-card { grid-template-columns: 1fr; }
  .posts-list .post-card .thumb { aspect-ratio: 16/9; min-height: 0; } }

.posts-magazine { display: grid; gap: 24px; }
.posts-magazine .lead .post-card .thumb { aspect-ratio: 21/9; }
.posts-magazine .lead .post-card h3 { font-size: 26px; }
.posts-magazine .rest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .posts-magazine .rest { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .posts-magazine .rest { grid-template-columns: 1fr; } }

/* ============================================================
   Listing form: photo manager + map pin picker
   ============================================================ */

/* Drop zone */
.dropzone {
  border: 2px dashed var(--brand-line); border-radius: 8px; background: #fff;
  padding: 26px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand-gold); background: #fdfbf6; }
.dropzone .dz-title { font-size: 14px; font-weight: 500; color: var(--brand-dark); }
.dropzone .dz-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dropzone input[type=file] { display: none; }

/* Photo count meter */
.photo-meter { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; font-size: 13px; }
.photo-meter .bar { flex: 1; height: 6px; border-radius: 6px; background: var(--brand-line); overflow: hidden; }
.photo-meter .bar span { display: block; height: 100%; background: var(--brand-gold); transition: width .25s; }
.photo-meter.ok .bar span { background: #16a34a; }
.photo-meter .txt { color: var(--muted); white-space: nowrap; }
.photo-meter.ok .txt { color: #15803d; }

/* Thumbnail grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-item {
  position: relative; border: 1px solid var(--brand-line); border-radius: 6px;
  overflow: hidden; background: #fff; aspect-ratio: 4/3;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .cover-tag {
  position: absolute; top: 6px; left: 6px; background: var(--brand-gold); color: #fff;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 7px; border-radius: 3px;
}
.photo-item .ph-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.photo-item .ph-btn {
  width: 24px; height: 24px; border: none; border-radius: 4px; cursor: pointer;
  background: rgba(0,0,0,.6); color: #fff; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.photo-item .ph-btn:hover { background: rgba(0,0,0,.85); }
.photo-item .ph-btn.del:hover { background: #b91c1c; }
.photo-item.uploading { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }

/* Map pin picker */
.map-picker { border: 1px solid var(--brand-line); border-radius: 8px; overflow: hidden; background: #fff; }
.map-picker .map-search { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--brand-line); }
.map-picker .map-search input { flex: 1; border: 1px solid var(--brand-line); border-radius: 3px; padding: 8px 10px; font-size: 14px; font-family: inherit; }
.map-canvas { height: 340px; width: 100%; }
.map-picker .map-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-top: 1px solid var(--brand-line); font-size: 13px; flex-wrap: wrap;
}
.map-picker .coords { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.map-picker .coords strong { color: var(--brand-dark); font-weight: 500; }
.map-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }