.catalog-detail {
    margin: 0;
    background: white;
    color: #172a3b;
    font: 16px/1.55 system-ui, sans-serif;
}
.design-preview {
    display: grid;
    grid-template-rows: auto minmax(260px, 1fr);
    height: 100vh;
    height: 100dvh;
}
.design-info {
    padding: 12px max(20px, calc((100% - 1120px) / 2));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 24px;
    border-bottom: 1px solid #cbd3d9;
}
.back-link, .design-options summary, .share-links a {
    color: #36566e;
    min-height: 44px;
    align-content: center;
    font-size: 14px;
}
.back-link, .share-links a { display: inline-flex; align-items: center; gap: 6px; }
.design-info h1 { margin: 0; font-size: clamp(22px, 3vw, 32px); line-height: 1.25; overflow-wrap: anywhere; }
.design-summary p { margin: 6px 0 0; color: #526575; }
.design-action input {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 10px 22px;
    border: 0;
    border-radius: 6px;
    background: #172a3b;
    color: white;
    font: 650 16px/1.4 system-ui, sans-serif;
    cursor: pointer;
}
.design-action input:hover { background: #2c4960; }
.design-options { grid-column: 1 / -1; min-width: 0; }
.design-options summary { width: fit-content; cursor: pointer; line-height: 44px; }
.design-options dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; }
.design-options dt { color: #526575; }
.design-options dd { margin: 0; }
.design-options h2 { font-size: 16px; margin: 16px 0 8px; }
.related-designs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.related-designs a {
    display: flex; align-items: center; gap: 10px; height: 100%;
    box-sizing: border-box; padding: 6px; color: inherit; text-decoration: none;
    border: 1px solid #dce1e5; border-radius: 6px; overflow-wrap: anywhere; font-size: 14px;
}
.related-designs img { width: 64px; aspect-ratio: 1.44; object-fit: cover; object-position: top; }
.related-designs a:hover { background: #f5f6f7; }
.share-links { display: flex; flex-wrap: wrap; gap: 20px; }
.design-info :focus-visible { outline: 3px solid #295ad6; outline-offset: 2px; }
.site-preview { display: block; width: 100%; height: 100%; min-height: 0; border: 0; }
@media (max-width: 700px) {
    .design-info { padding: 2px 16px; grid-template-columns: minmax(0, 1fr); }
    .design-summary p { font-size: 14px; }
    .design-action { margin-top: 12px; }
    .related-designs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .related-designs img { width: 42px; }
}

.preview-width { display: none; }
@media (min-width: 701px) {
    .design-preview { background: #e9edef; }
    .design-info, .site-preview { background: #fff; }
    .preview-width {
        display: flex; grid-column: 2; grid-row: 2; justify-self: end;
        padding: 0; margin: 4px 0; min-width: 0; border: 1px solid #cbd3d9; border-radius: 6px;
    }
    .preview-width legend, .preview-width input { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; }
    .preview-width label { position: relative; display: grid; place-content: center; min-width: 66px; min-height: 40px; cursor: pointer; font-size: 14px; }
    .preview-width label:has(:checked) { background: #e3ebef; color: #172a3b; border-radius: 5px; font-weight: 700; }
    .preview-width label:has(:focus-visible) { outline: 3px solid #295ad6; outline-offset: 2px; }
    .design-options { grid-column: 1 / -1; grid-row: 2; }
    .preview-width { align-self: start; z-index: 1; }
    .design-preview:has(input[value="mobile"]:checked) .site-preview { max-width: 390px; justify-self: center; box-shadow: 0 0 0 1px #cbd3d9; }
}
