.catalog-header { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.catalog-header nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 23px; font-size: .84rem; font-weight: 700; }
.catalog-header nav a:hover { color: var(--gold-dark); }
.catalog-header nav form { margin: 0; }
.catalog-banner { background: var(--navy); color: var(--white); padding: 53px 0 65px; }
.catalog-banner .eyebrow { color: var(--gold); margin-bottom: 10px; }
.catalog-banner h1, .detail-title h1 { font-size: clamp(2.6rem, 6vw, 5rem); text-wrap: initial; }
.catalog-banner .container > p:last-child { margin-top: 12px; color: #d3dae3; max-width: 620px; }
.catalog-content { padding: 28px 0 63px; }
.catalog-footer { border-top: 1px solid var(--line); }

.filter-panel, .admin-panel { padding: clamp(17px, 2.5vw, 30px); border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.filter-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px 15px; }
.catalog-content label { display: block; font-weight: 680; font-size: .82rem; }
.catalog-content input:not([type=checkbox], [type=radio]), .catalog-content select, .catalog-content textarea {
  width: 100%; min-height: 43px; margin-top: 5px; border: 1px solid #cbc4b6; padding: 8px 10px; border-radius: 5px;
  background: var(--cream); color: var(--ink); font-weight: 500;
}
.catalog-content textarea { resize: vertical; }
.catalog-content input::placeholder { color: var(--slate); }
.catalog-content input[type=checkbox], .catalog-content input[type=radio] { accent-color: var(--navy); }
.filter-actions, .admin-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.filter-actions { margin-top: 18px; }
.filter-panel .filter-available { display: flex; align-items: center; gap: 7px; margin-top: 13px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 13px; font-size: .92rem; }
.result-heading span { color: var(--slate); font-size: .81rem; }
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.property-card { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.property-image { position: relative; display: block; aspect-ratio: 1.62; background: #ebe5d8; }
.property-image > img, .detail-gallery img, .admin-photos img { width: 100%; height: 100%; object-fit: cover; }
.property-tag { position: absolute; inset: 12px auto auto 12px; padding: 4px 9px; color: var(--white); background: var(--navy); border-radius: 4px; font-weight: 750; font-size: .72rem; }
.property-tag.reserved { inset: 12px 12px auto auto; background: var(--gold); color: var(--navy); }
.missing-photo { display: grid; place-content: center; justify-items: center; gap: 5px; width: 100%; height: 100%; min-height: 135px; color: var(--gold-dark); background: #eee9dc; font-size: .76rem; }
.missing-photo svg { width: 77px; height: 59px; }
.property-card-body { padding: 16px 17px 18px; }
.property-location { margin-bottom: 7px; color: var(--gold-dark); font-weight: 720; font-size: .78rem; }
.property-card h2 { font-size: clamp(1.38rem, 2.2vw, 1.85rem); text-wrap: initial; }
.property-card h2 a:hover { text-decoration: underline; }
.property-price { margin: 10px 0 8px; font-size: 1.27rem; font-weight: 760; font-variant-numeric: tabular-nums; line-height: 1.3; }
.property-price small { font-size: .74rem; font-weight: 600; }
.property-facts { display: flex; flex-wrap: wrap; gap: 4px 7px; margin: 0; padding: 0; list-style: none; }
.property-facts li { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--slate); font-size: .71rem; }
.empty-state { background: var(--white); border: 1px dashed #c8bda7; border-radius: 8px; padding: 28px; }
.empty-state h2, .admin-panel h2, .detail-description h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); text-wrap: initial; }
.empty-state p, .admin-panel p { margin: 7px 0 12px; color: var(--slate); }
.pagination { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 19px; }

.detail-title { margin: 16px 0 23px; }
.detail-title h1 { font-size: clamp(2.35rem, 5vw, 4.3rem); }
.detail-title > p:last-child { margin-top: 9px; color: var(--slate); }
.detail-title .eyebrow { margin-bottom: 9px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(235px, 1fr); gap: 20px; align-items: start; }
.detail-cover { overflow: hidden; border-radius: 8px; background: #eee9dc; }
.detail-cover img { width: 100%; max-height: 570px; object-fit: contain; }
.detail-cover .missing-photo { aspect-ratio: 1.7; }
.detail-gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 7px; }
.detail-gallery a { display: block; overflow: hidden; aspect-ratio: 1.35; border-radius: 4px; }
.detail-aside, .detail-description { padding: clamp(17px, 2.5vw, 25px); border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.detail-aside .eyebrow { margin-bottom: 4px; }
.detail-aside .property-price { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.detail-aside p:not(.property-price), .detail-description dt { color: var(--slate); font-size: .84rem; }
.detail-aside hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.detail-aside .button { margin-top: 14px; }
.viewing-panel { scroll-margin-top: 18px; }
.viewing-panel h2 { font: 400 1.5rem/1.2 var(--serif); margin-bottom: 5px; }
.viewing-panel label { margin-top: 10px; }
.viewing-panel input { min-width: 0; }
.detail-description { margin-top: 16px; }
.detail-description h2:not(:first-child) { margin-top: 19px; }
.detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 12px 0 0; }
.detail-facts div { border-top: 1px solid var(--line); padding: 6px 0 0; }
.detail-facts dd { margin: 0; font-weight: 670; overflow-wrap: anywhere; }
.preserve-lines { white-space: pre-line; margin-top: 7px; overflow-wrap: anywhere; }

.auth-panel { max-width: 510px; margin-inline: auto; }
.auth-panel label + label { margin-top: 12px; }
.auth-panel > .button { margin-top: 15px; }
.notice { margin: 0 0 15px; border: 1px solid #b9cbb9; border-radius: 5px; padding: 12px 15px; background: #edf5ed; color: #224d34; font-size: .88rem; }
.notice-error { border-color: #dfb4ad; background: #fff0ed; color: #802b20; }
.notice ul { margin: 5px 0 0; padding-left: 18px; }
.notice a { margin-left: 8px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 17px; }
.dashboard-stats > div { border: 1px solid var(--line); border-radius: 7px; padding: 13px 16px; background: var(--white); }
.dashboard-stats span { color: var(--slate); font-size: .81rem; }
.dashboard-stats strong { display: block; font: 400 2.15rem/1.15 var(--serif); }
.admin-toolbar { margin-bottom: 16px; }
.inline-form { margin: 0; }
.admin-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .52fr) auto; align-items: end; gap: 12px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.table-wrap table { min-width: 550px; width: 100%; border-collapse: collapse; text-align: left; background: var(--white); font-size: .85rem; }
.table-wrap thead { background: var(--warm); }
.table-wrap th, .table-wrap td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }
.table-wrap tbody th { font-weight: 720; }
.table-wrap tbody th a:hover { text-decoration: underline; }
.table-wrap small { display: block; color: var(--slate); font-size: .72rem; font-weight: 500; }
.status-badge { display: inline-block; padding: 2px 7px; border-radius: 4px; background: var(--warm); font-size: .72rem; font-weight: 720; }
.status-active { background: #e1eee3; color: #285337; }
.status-reserved { background: #f8ecd5; color: #765324; }
.editor { display: grid; gap: 13px; }
.editor-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; margin-top: 12px; }
.field-wide { grid-column: 1 / -1; }
.catalog-content .check-field { display: flex; align-items: center; min-height: 28px; gap: 6px; }
.required-star, .danger-link { color: #8e342c; }
.editor-actions { margin-top: 0; }
.admin-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.admin-photos > div { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; }
.admin-photos img { height: auto; aspect-ratio: 1.5; }
.admin-photos label { margin-inline: 6px; font-size: .74rem; }
.button-danger { color: white; background: #922f26; }
.button-danger:hover { background: #6d2019; }

@media (max-width: 900px) {
  .filter-fields, .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .catalog-header { min-height: 64px; gap: 8px; }
  .catalog-header nav { gap: 5px 9px; font-size: .74rem; }
  .catalog-header nav .button { padding-inline: 8px; font-size: .74rem; min-height: 34px; }
  .catalog-banner { padding-block: 35px 39px; }
  .catalog-content { padding-block: 16px 42px; }
  .property-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-facts, .dashboard-stats, .admin-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-search { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 365px) {
  .editor-fields { grid-template-columns: minmax(0, 1fr); }
}

.catalog-header:not(.public-catalog-header) nav [aria-current="page"] { color: var(--gold-dark); text-decoration: underline; text-underline-offset: .25em; }
.article-table table { min-width: 0; }
.article-table th[scope="row"] { overflow-wrap: anywhere; }

.photo-feedback { min-height: 1.5em; }
.admin-photos img { background: var(--warm); object-fit: contain; }
.photo-card-caption { margin: 0; padding: 7px 8px 3px; font-size: .77rem; font-weight: 650; }
.photo-card-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 7px 8px; }
.photo-action { min-height: 32px; border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; background: var(--white); color: var(--ink); font: inherit; font-size: .74rem; cursor: pointer; }
.photo-action:hover:not(:disabled) { border-color: var(--gold-dark); }
.photo-action:disabled { opacity: .48; cursor: default; }
.photo-action[data-action="remove"] { color: #9f2929; }

.photo-cover-link { display: block; position: relative; }
.photo-zoom-label { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border-radius: 5px; background: var(--navy); color: var(--white); font-size: .8rem; font-weight: 650; }
.photo-gallery a:focus-visible { outline-offset: -4px; }
.photo-lightbox { width: min(95vw, 1100px); max-width: none; max-height: 95dvh; padding: 14px; border: 1px solid #ffffff35; border-radius: 10px; background: var(--navy); color: var(--white); }
.photo-lightbox::backdrop { background: #07111be8; }
.photo-lightbox-header, .photo-lightbox-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.photo-lightbox-header { margin-bottom: 10px; }
.photo-lightbox-controls { margin-top: 10px; }
.photo-lightbox-image { display: block; width: 100%; height: auto; max-height: min(72dvh, 780px); object-fit: contain; background: var(--navy-deep); }
.photo-lightbox-button { padding: 6px 10px; min-height: 42px; border: 1px solid #ffffff50; border-radius: 5px; color: var(--white); background: var(--navy); cursor: pointer; }
.photo-lightbox-button:hover { color: var(--gold); border-color: var(--gold); }
body:has(.photo-lightbox[open]) { overflow: hidden; }
