:root {
    --ink: #17221d;
    --muted: #66736d;
    --line: #dfe6e2;
    --panel: #ffffff;
    --soft: #f4f7f3;
    --brand: #2f6f4e;
    --brand-dark: #214d38;
    --gold: #d9a441;
    --danger: #a83d32;
    --pending: #88641f;
    --sold: #4f6173;
    --shadow: 0 18px 45px rgba(23, 34, 29, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--soft);
    line-height: 1.5;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 54px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 240px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 52px;
    padding: 4px;
    background: #f7f8f7;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.top-nav a {
    padding: 9px 10px;
    color: var(--muted);
    font-size: 0.94rem;
    text-decoration: none;
}

.top-nav a:hover,
.top-nav .admin-link {
    color: var(--brand-dark);
}

.hero {
    min-height: 590px;
    display: flex;
    align-items: center;
    padding: clamp(48px, 8vw, 96px) clamp(18px, 4vw, 54px);
    background:
        linear-gradient(90deg, rgba(13, 23, 18, 0.84), rgba(13, 23, 18, 0.46) 45%, rgba(13, 23, 18, 0.08)),
        url("../riverglade-hero.png") center / cover no-repeat;
}

.hero-content {
    width: min(720px, 100%);
    color: #fff;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    max-width: 680px;
    font-size: clamp(2.45rem, 5vw, 5.25rem);
    line-height: 0.98;
}

.hero-copy {
    max-width: 630px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions,
.card-actions,
.social-row,
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-actions {
    margin-top: 28px;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    color: #fff;
    background: var(--brand);
}

.button.primary:hover {
    background: var(--brand-dark);
}

.button.secondary {
    color: var(--brand-dark);
    background: #fff;
    border-color: var(--line);
}

.button.danger {
    color: #fff;
    background: var(--danger);
}

.section {
    padding: clamp(36px, 6vw, 72px) clamp(18px, 4vw, 54px);
}

.intro-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    padding-top: 0;
    padding-bottom: 0;
    background: var(--line);
}

.intro-item {
    display: block;
    padding: 24px;
    color: var(--ink);
    background: #fff;
    text-decoration: none;
}

.intro-item:hover,
.intro-item:focus-visible {
    background: var(--soft);
    outline: none;
}

.intro-item strong,
.intro-item span {
    display: block;
}

.intro-item span {
    color: var(--muted);
}

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

.section-heading h2,
.contact-copy h2,
.empty-state h3 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.08;
}

.section-heading > p,
.contact-copy p,
.empty-state p {
    color: var(--muted);
}

.inventory-filters {
    display: grid;
    gap: 14px;
    margin: 0 0 28px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.search-field {
    margin: 0;
}

.filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-group > span {
    margin-right: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-button {
    min-height: 36px;
    padding: 7px 12px;
    color: var(--brand-dark);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.filter-empty {
    margin-bottom: 24px;
}

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

.status-group {
    margin-top: 28px;
}

.status-group:first-of-type {
    margin-top: 0;
}

.status-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.status-heading h3 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.status-heading span {
    color: var(--muted);
    font-weight: 700;
}

.listing-card,
.empty-state,
.contact-form,
.admin-panel,
.login-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(23, 34, 29, 0.06);
}

.listing-card {
    overflow: hidden;
}

.gallery-main,
.gallery-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 0;
    padding: 0;
    background: #dfe6e2;
}

.gallery-main {
    cursor: zoom-in;
}

.gallery-main img,
.thumb-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 700;
}

.thumb-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 4px;
    background: #fff;
}

.thumb-row button {
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.thumb-row button:hover {
    border-color: var(--brand);
}

.card-body {
    padding: 18px;
}

.card-title-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.card-title-row h3 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.18;
}

.card-badges {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
}

.status {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
}

.category-label {
    padding: 4px 8px;
    color: var(--brand-dark);
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.status-available {
    background: var(--brand);
}

.status-pending {
    background: var(--pending);
}

.status-sold {
    background: var(--sold);
}

.status-archived {
    background: var(--muted);
}

.description {
    color: var(--muted);
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.spec-grid div {
    padding: 10px;
    background: var(--soft);
    border-radius: 6px;
}

.spec-grid dt {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.spec-grid dd {
    margin: 2px 0 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.empty-state {
    padding: 34px;
    text-align: center;
}

.contact-section {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
    gap: 28px;
    align-items: start;
    background: #fff;
}

.contact-form,
.login-panel,
.admin-panel {
    padding: 22px;
}

label {
    display: grid;
    gap: 7px;
    margin-bottom: 15px;
    color: var(--ink);
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #cbd6d0;
    border-radius: 7px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.notice {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 7px;
    font-weight: 700;
}

.notice.success {
    color: #174629;
    background: #e6f4eb;
}

.notice.error {
    color: #7e2118;
    background: #f8e7e4;
}

.social-row a {
    color: var(--brand-dark);
    font-weight: 800;
}

.contact-details {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.contact-details a {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    color: var(--ink);
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
}

.contact-details a:hover {
    border-color: var(--brand);
}

.contact-details span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.contact-details strong {
    overflow-wrap: anywhere;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 24px clamp(18px, 4vw, 54px);
    color: var(--muted);
    background: var(--ink);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.86);
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-height: 88vh;
    width: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 2rem;
    cursor: pointer;
}

.admin-body {
    background: #eef3f0;
}

.admin-layout {
    width: min(1180px, calc(100% - 36px));
    margin: 28px auto 60px;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
}

.admin-top h1 {
    margin: 0;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(310px, 0.85fr) minmax(0, 1.15fr);
    gap: 18px;
    align-items: start;
}

.listing-list {
    display: grid;
    gap: 10px;
}

.admin-listing {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.admin-listing.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(47, 111, 78, 0.16);
}

.admin-listing strong {
    display: block;
}

.admin-listing small {
    color: var(--muted);
}

.field-check-row {
    display: grid;
    grid-template-columns: minmax(90px, 120px) minmax(0, 1fr) 92px;
    gap: 8px;
    align-items: center;
    margin-bottom: 9px;
}

.field-check-row label {
    margin: 0;
    font-weight: 700;
}

.field-check-row input[type="checkbox"] {
    min-height: auto;
    width: auto;
}

.image-admin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.image-admin-grid figure {
    position: relative;
    margin: 0;
    padding: 8px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.image-admin-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}

.image-admin-grid figcaption {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
}

.image-admin-grid figcaption .button {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.86rem;
}

.main-image-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    padding: 5px 8px;
    color: #fff;
    background: var(--brand);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.inline-form {
    display: inline;
}

.login-wrap {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(440px, 100%);
}

.login-panel h1 {
    margin-top: 0;
}

@media (max-width: 980px) {
    .listing-grid,
    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-header {
        position: static;
        gap: 10px;
        padding: 10px 16px;
    }

    .site-header,
    .admin-top,
    .section-heading,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand {
        min-width: 0;
        width: 100%;
    }

    .brand-logo {
        width: 64px;
        height: 40px;
        flex: 0 0 auto;
    }

    .brand strong {
        font-size: 0.98rem;
        line-height: 1.15;
    }

    .brand small {
        font-size: 0.72rem;
    }

    .top-nav {
        justify-content: flex-start;
        gap: 2px 8px;
    }

    .top-nav a {
        padding: 5px 0;
        font-size: 0.84rem;
    }

    .hero {
        min-height: 540px;
        background:
            linear-gradient(180deg, rgba(13, 23, 18, 0.84), rgba(13, 23, 18, 0.48)),
            url("../riverglade-hero.png") center / cover no-repeat;
    }

    .intro-band,
    .listing-grid,
    .admin-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-check-row {
        grid-template-columns: 1fr;
    }

    .image-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
