body {
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    font-family: sans-serif;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.25rem;
    color: #1f2937;
}

header p {
    color: #4b5563;
}

.grid {
    width: 100%;
    max-width: 72rem;
    column-gap: 1rem;
    column-count: 3;
}

.grid-item {
    break-inside: avoid;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1rem;
}

.image-container {
    position: relative;
    width: 100%;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.content {
    padding: 1rem;
}

.content h2 {
    font-size: 1.25rem;
    color: #1f2937;
}

.content p {
    color: #4b5563;
    margin-top: 0.5rem;
}

.inquire {
    display: block;
    text-align: center;
    background-color: #ffffff;
    border: 1px solid #000000;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    margin-top: 1rem;
}

.inquire:hover {
    background-color: #e5e7eb;
}

.sold {
    display: block;
    text-align: center;
    background-color: #921d35;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-image {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 60;
}

.modal-close:hover {
    color: #ccc;
}

footer {
    margin-top: auto;
    padding: 1rem;
    color: #4b5563;
}

@media (max-width: 768px) {
    .grid {
        column-count: 1;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid {
        column-count: 2;
    }
}