.page {
    width: min(1040px, calc(100% - 24px));
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--brand);
    font-weight: 600;
    font-size: 14px;
}

.notice {
    margin-top: 14px;
    background: #e8f7ee;
    color: #146c36;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
}

.detail-layout {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.panel {
    background: #fff;
    border-radius: 22px;
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(67, 18, 90, 0.05);
}

.panel h2,
.enquiry h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.pid {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.price {
    margin: 0;
    text-align: right;
    color: var(--brand-deep);
    font-weight: 600;
}

.price span,
.fact dt,
.field label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.address {
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 1.55;
}

.facts {
    display: grid;
    gap: 12px;
    margin: 16px 0 0;
}

.fact dt {
    margin-bottom: 3px;
}

.fact dd {
    margin: 0;
    font-weight: 500;
}

.publication {
    margin: 14px 0 0;
    line-height: 1.55;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.gallery button {
    border: 0;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #f6f2f8;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery img,
.lightbox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.docs {
    display: grid;
    gap: 8px;
}

.docs a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    background: #f7f1fa;
    color: var(--brand);
    font-weight: 600;
}

.extra {
    display: grid;
    gap: 12px;
}

.enquiry .field {
    margin-bottom: 12px;
}

.enquiry textarea {
    width: 100%;
    border: 1px solid #e4d7ea;
    background: #fcfafd;
    border-radius: 14px;
    min-height: 120px;
    padding: 12px 14px;
    font: inherit;
    color: var(--ink);
    resize: vertical;
}

.enquiry textarea:focus {
    outline: 3px solid rgba(67, 18, 90, 0.15);
    border-color: var(--brand);
    background: #fff;
}

.send {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    min-height: 48px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(28, 20, 36, 0.92);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 16px;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    background: #111;
}

.lightbox button {
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: var(--brand);
    min-height: 44px;
    padding: 0 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

@media (min-width: 860px) {
    .detail-layout {
        grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
        align-items: start;
    }

    .enquiry {
        position: sticky;
        top: 12px;
    }

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