body {
    margin: 0;
    font-family: "Raleway", sans-serif;
    font-weight: 200;
    letter-spacing: 0.05em;
    color: rgb(82, 62, 73);
    background-color: rgb(249, 249, 249);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

a {
    display: inline-block;
    position: relative;
    text-decoration: none;
    color: rgb(82, 62, 73);
}

a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: rgba(243, 241, 240, 0.65);
    transition: transform 0.25s ease-out;
    transform-origin: bottom right;
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

footer {
    padding: 2rem 4rem;
    background-color: rgb(82, 62, 73);
    color: rgba(243, 241, 240, 0.85);
    text-align: center;
    font-size: 0.9rem;
}

footer a {
    color: rgba(243, 241, 240, 0.85);
}

.footer-divider {
    margin: 0 0.5rem;
}

h1, h2 {
    font-weight: 300;
}

.page-header {
    padding: 1rem 1rem 0;
}

.subtitle {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.centered {
    text-align: center;
    margin: 2rem 0 1rem;
}

.category-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 4rem auto;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.category-card {
    position: relative;
    width: 270px;
    height: 360px;
    overflow: hidden;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.category-card .bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: filter 0.3s ease;
    z-index: 0;
}

.category-card:hover .bg {
    filter: blur(4px);
}

.category-card span,
.category-card small {
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

.category-card span {
    font-size: 2rem;
}

.category-card small {
    margin-top: 0.4rem;
}

.filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: end;
    flex-wrap: wrap;
    padding: 1rem;
}

.filters label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.filters select,
.filters button,
.button-link {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: white;
    font-family: "Raleway", sans-serif;
    font-size: 0.95rem;
    color: rgb(82, 62, 73);
}

.filters select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23523e49' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right 1rem center;
    background-size: 12px 8px;
    background-repeat: no-repeat;
}

.filters button,
.button-link {
    cursor: pointer;
    text-decoration: none;
}

.button-link.outline {
    border-color: rgb(82, 62, 73);
}

.product-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1rem 1rem 3rem;
}

.product-card {
    width: 270px;
    min-height: 430px;
    overflow: hidden;
    border-radius: 4px;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.status-muted {
    opacity: 0.88;
}

.card-image {
    position: relative;
    width: 100%;
    height: 360px;
    overflow: hidden;
    background: #ece7ea;
}

.product-card img,
.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-photo {
    position: absolute;
    inset: 0;
    transition: opacity 0.25s ease;
}

.card-photo-primary {
    opacity: 1;
}

.card-photo-secondary {
    opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
    .product-card:hover .card-photo-primary.has-hover-image {
        opacity: 0;
    }

    .product-card:hover .card-photo-secondary {
        opacity: 1;
    }
}

.status-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(82, 62, 73, 0.9);
    color: white;
}

.status-available {
    background: rgba(57, 109, 82, 0.92);
}

.status-reserved {
    background: rgba(183, 126, 42, 0.92);
}

.status-sold {
    background: rgba(122, 72, 72, 0.92);
}

.info {
    padding: 0.75rem;
    background: white;
    flex-grow: 1;
}

.muted {
    color: #777;
    font-size: 0.92rem;
}

.product-details {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.gallery {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.thumbs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
}

.thumbs img:hover {
    border-color: #aaa;
}

.main-image {
    width: 500px;
    max-width: 78vw;
    min-height: 500px;
    border-radius: 4px;
    overflow: hidden;
    background: #ece7ea;
}

.product-info {
    max-width: 400px;
    line-height: 1.6;
}

.product-info .status-badge {
    position: static;
    margin-bottom: 1rem;
}

.image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #6f5f67;
    background: #ece7ea;
}

.image-placeholder.large {
    min-height: 500px;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.error-page main {
    display: grid;
    align-content: center;
}

.error-panel {
    width: min(560px, calc(100% - 2rem));
    margin: 4rem auto 5rem;
    padding: 2.5rem 2rem;
    text-align: center;
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(82, 62, 73, 0.08);
}

.error-code {
    margin: 0 0 0.5rem;
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 0.14em;
    color: rgba(82, 62, 73, 0.75);
}

.error-message {
    max-width: 36rem;
    margin: 1rem auto 0;
    line-height: 1.7;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

@media (max-width: 800px) {
    .gallery {
        flex-direction: column-reverse;
    }

    .thumbs {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .main-image {
        min-height: 320px;
    }
}
