html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    background: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

/* HERO */

.hero {
    min-height: 520px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, .38)),
        url('/images/hero.jpg') center / cover no-repeat;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 80px 30px;
    color: white;
}

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.05;
    margin: 0 0 25px;
    font-weight: 500;
}

.hero-text {
    max-width: 500px;
    font-size: 19px;
    line-height: 1.6;
}

/* LISTINGS */

.listings-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 90px 30px;
}

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

.section-heading h2 {
    font-size: 42px;
    font-weight: 500;
    margin: 0;
}

.view-all {
    font-size: 14px;
    font-weight: 700;
}

/* PROPERTY GRID */

.property-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.property-card {
    display: block;
    transition: transform .2s ease;
}

.property-card:hover {
    transform: translateY(-4px);
}

.property-image {
    height: 320px;
    overflow: hidden;
    background: #f3f1ed;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.03);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd;
    color: #888;
    letter-spacing: 2px;
    font-size: 12px;
}

.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.property-info {
    padding: 20px 0;
}

.property-price {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 8px;
}

.property-info h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 5px;
}

.property-location {
    margin: 0 0 18px;
    color: #777;
}

.property-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #777;
}

.property-stats strong {
    color: #222;
}

/* MOBILE */

@media (max-width: 800px) {

    .property-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }

    .view-all {
        display: inline-block;
        margin-top: 15px;
    }

    .hero {
        min-height: 500px;
    }

    .hero-content {
        padding: 60px 25px;
    }

    .listings-section {
        padding: 60px 20px;
    }
}

/* HEADER */

.site-header {
    background: white;
    border-bottom: 1px solid #eee;
}

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

.logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    font-size: 14px;
}

nav a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {

    .header-inner {
        padding: 18px 20px;
    }

    nav {
        gap: 15px;
    }

    nav a {
        font-size: 13px;
    }
}
/* LISTING DETAIL */

.listing-hero {
    width: 100%;
    background: #eee;
}

.listing-photo-placeholder {
    aspect-ratio: 21 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    letter-spacing: 2px;
    font-size: 13px;
}

.listing-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 30px 100px;
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 40px;
    padding-bottom: 35px;
    border-bottom: 1px solid #ddd;
}

.listing-header h1 {
    margin: 0 0 8px;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 500;
}

.listing-location {
    margin: 0;
    color: #777;
    font-size: 17px;
}

.listing-price {
    font-size: 32px;
    font-weight: 600;
    white-space: nowrap;
}

.listing-stats {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #ddd;
    padding: 30px 0;
}

.listing-stats div {
    padding: 0 35px;
    border-right: 1px solid #ddd;
}

.listing-stats div:first-child {
    padding-left: 0;
}

.listing-stats div:last-child {
    border-right: none;
}

.listing-stats strong {
    display: block;
    font-size: 22px;
    font-weight: 600;
}

.listing-stats span {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 13px;
}

.listing-description {
    max-width: 750px;
    padding: 55px 0;
}

.listing-description h2 {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 20px;
}

.listing-description p {
    font-size: 17px;
    line-height: 1.8;
    color: #555;
}

.back-link {
    font-weight: 600;
}

.listing-not-found {
    max-width: 1100px;
    margin: 100px auto;
    padding: 0 30px;
}

@media (max-width: 700px) {

    .listing-header {
        display: block;
    }

    .listing-price {
        margin-top: 25px;
    }

    .listing-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .listing-stats div,
    .listing-stats div:first-child {
        padding: 0;
        border: none;
    }

    .listing-content {
        padding: 50px 20px 70px;
    }
}

/* PHOTO GALLERY */

.photo-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px 60px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;

    background: #fff;
}

.gallery-photo {
    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    padding: 12px;

    border: 1px solid #e8e5e0;
    border-radius: 2px;

    overflow: hidden;

    transition:
        box-shadow .2s ease,
        transform .2s ease;
}

.gallery-photo img {
    display: block;

    width: 100%;
    height: auto;

    max-height: 600px;

    object-fit: contain;

    transition: transform .3s ease;
}

.gallery-photo:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.gallery-photo:hover img {
    transform: scale(1.015);
}

@media (max-width: 700px) {

    .photo-gallery {
        grid-template-columns: 1fr;
        padding: 25px 15px 45px;
        gap: 20px;
    }

    .gallery-photo {
        padding: 8px;
    }

    .gallery-photo img {
        max-height: none;
    }
}

/* ADMIN */

.admin-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 30px 100px;
}
.admin-login {
    max-width: 500px;
}

.admin-login form {
    max-width: 500px;
}

.admin-login .form-field {
    margin-bottom: 20px;
}

.admin-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 40px;
}

.admin-header h1 {
    margin: 0;
    font-size: 48px;
    font-weight: 500;
}

.admin-button {
    display: inline-block;
    padding: 13px 20px;
    background: #222;
    color: white;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.admin-button:hover {
    background: #444;
}

.admin-button.secondary {
    background: white;
    color: #222;
    border: 1px solid #ccc;
}

.admin-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.summary-card {
    border: 1px solid #ddd;
    padding: 25px;
}

.summary-number {
    display: block;
    font-size: 36px;
    font-weight: 600;
}

.summary-label {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 14px;
}

.admin-properties {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-property {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 25px;
    border: 1px solid #ddd;
    padding: 15px;
}

.admin-property-image {
    width: 180px;
    height: 130px;
    background: #eee;
    overflow: hidden;
}

.admin-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 11px;
    letter-spacing: 1px;
}

.admin-property-title {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}

.admin-property-title h2 {
    margin: 0 0 5px;
    font-size: 20px;
    font-weight: 500;
}

.admin-property-title p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.status-available {
    background: #e6f4ea;
    color: #236b3b;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-sold {
    background: #eee;
    color: #666;
}

.admin-property-details {
    display: flex;
    gap: 18px;
    margin-top: 20px;
    color: #777;
    font-size: 14px;
}

.admin-property-details strong {
    color: #222;
    font-size: 17px;
}

.admin-property-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-empty {
    text-align: center;
    border: 1px dashed #ccc;
    padding: 80px 20px;
}

.admin-empty h2 {
    font-weight: 500;
}

.admin-empty p {
    color: #777;
    margin-bottom: 25px;
}

@media (max-width: 800px) {

    .admin-page {
        padding: 50px 20px 70px;
    }

    .admin-header {
        align-items: start;
        gap: 20px;
    }

    .admin-header h1 {
        font-size: 36px;
    }

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

    .admin-property {
        grid-template-columns: 100px 1fr;
    }

    .admin-property-image {
        width: 100px;
        height: 90px;
    }

    .admin-property-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }

    .admin-property-details {
        flex-wrap: wrap;
    }

}
/* ADMIN FORMS */

.property-form {
    max-width: 1000px;
}

.form-section {
    border-top: 1px solid #ddd;
    padding: 40px 0;
}

.form-section h2 {
    margin: 0 0 30px;
    font-size: 25px;
    font-weight: 500;
}

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

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-field label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #ccc;
    background: white;
    font-family: inherit;
    font-size: 15px;
}

.form-field textarea {
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #222;
}

.form-field span[data-valmsg-for] {
    margin-top: 5px;
    color: #b42318;
    font-size: 12px;
}

.input-prefix {
    display: flex;
}

.input-prefix span {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f3f3f3;
    border: 1px solid #ccc;
    border-right: none;
    color: #555;
}

.input-prefix input {
    flex: 1;
}

.checkbox-field {
    justify-content: center;
}

.checkbox-field label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

@media (max-width: 700px) {

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field.full {
        grid-column: auto;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .admin-button {
        text-align: center;
    }
}
/* PHOTO ADMIN */

.photo-admin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 35px;
}

.photo-admin-card {
    border: 1px solid #ddd;
    background: #fff;
}

.photo-admin-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #eee;
    overflow: hidden;
}

.photo-admin-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.primary-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 9px;
    background: #222;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

.photo-admin-info {
    padding: 10px 12px 0;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-admin-actions {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
}

.photo-action {
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.photo-action:hover {
    opacity: .65;
}

.photo-action.delete {
    color: #a33;
}

.photo-upload {
    border: 2px dashed #ccc;
    padding: 35px;
    text-align: center;
}

.photo-upload label {
    display: block;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.photo-upload input[type="file"] {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 15px;
}

.photo-upload p {
    margin: 0 0 20px;
    color: #777;
    font-size: 13px;
}

.photo-empty {
    border: 1px solid #ddd;
    padding: 35px;
    margin-bottom: 30px;
    text-align: center;
    color: #777;
}

@media (max-width: 900px) {
    .photo-admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .photo-admin-grid {
        grid-template-columns: 1fr;
    }
}
