.catalogue-page-heading {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    align-items: center;
    min-height: clamp(180px, 24vw, 350px);
    padding-block: clamp(26px, 5vw, 68px);
    background: linear-gradient(105deg, #fffaf170, #f7f4ede0), url("./catalogue-paper.webp") center / cover;
    border-bottom: 1px solid var(--line);
}
.catalogue-heading-decor {
    position: absolute;
    z-index: -1;
    inset: 0 0 0 30%;
    pointer-events: none;
    mask-image: linear-gradient(90deg, transparent, #000 52%, #000);
}
.catalogue-heading-decor img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-position: center 55%;
    opacity: .38;
}
.catalogue-heading-decor .catalogue-heading-sketch { opacity: 0; }
.catalogue-heading-decor span {
    position: absolute;
    inset: 12% 6%;
    opacity: .34;
    background:
        linear-gradient(#966b53, #966b53) 12% 12% / 76% 1px,
        linear-gradient(#966b53, #966b53) 12% 88% / 76% 1px,
        linear-gradient(#966b53, #966b53) 12% 12% / 1px 76%,
        repeating-linear-gradient(90deg, #966b53 0 1px, transparent 1px 18px) 50% 88% / 76% 7px;
    background-repeat: no-repeat;
    mask-image: linear-gradient(90deg, transparent, #000 34%, #000);
}
.catalogue-page-heading h1::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin-block-start: clamp(12px, 2vw, 24px);
    background: var(--wine);
}
.catalogue-page main {
    background: linear-gradient(180deg, #f7f4edc9, var(--cream) 620px), url("./catalogue-paper.webp") center top / 100% auto no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
    .catalogue-heading-decor span { animation: catalogue-draw 1.4s linear both; }
    .catalogue-heading-decor img { animation: catalogue-photo-in 2.5s ease-out .45s both; }
    .catalogue-heading-decor .catalogue-heading-sketch { animation: catalogue-sketch-in 2.7s ease-out both; }
    .listing-card .listing-photo { transition: transform .35s ease; }
    a.listing-card:is(:hover, :focus-visible) .listing-photo { transform: scale(1.035); }
}
@keyframes catalogue-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes catalogue-photo-in { from { opacity: 0; } to { opacity: .38; } }
@keyframes catalogue-sketch-in {
    0% { opacity: 0; clip-path: inset(0 85% 0 0); }
    40% { opacity: .52; clip-path: inset(0); }
    100% { opacity: 0; clip-path: inset(0); }
}
@media (max-width: 540px) {
    .catalogue-heading-decor { inset-inline-start: 24%; opacity: .7; }
}
.page-trail { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: .85rem; }
.page-trail > * + *::before { content: "/"; margin-inline-end: 10px; color: var(--muted); }
.page-trail a:hover { color: var(--wine); }
.catalogue-page-heading h1 { margin-top: 16px; max-width: 16ch; font-size: clamp(2.35rem, 6vw, 5.6rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.catalogue-page-content { padding-block: clamp(24px, 4vw, 58px); }
.catalogue-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(12px, 2vw, 24px); list-style: none; padding: 0; margin: 0; }
.catalogue-page-grid li { min-width: 0; }
.listing-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none; border: 1px solid var(--line); background: #fffaf1; }
.listing-photo-frame { display: block; position: relative; overflow: hidden; }
.listing-photo-frame::after { content: ""; position: absolute; inset: 8px; border: 1px solid #fffaf180; pointer-events: none; }
.listing-photo { aspect-ratio: 4 / 3; background: #eee6d9; }
.listing-card h2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: clamp(12px, 2vw, 20px); font-size: clamp(1.25rem, 2vw, 1.72rem); line-height: 1.18; overflow-wrap: anywhere; }
.listing-card h2 span, .listing-card:hover { color: var(--wine); }
.catalogue-article { overflow-wrap: anywhere; }
.catalogue-article > * + * { margin-block-start: 1rem; }
.catalogue-article img, .catalogue-article video { max-width: 100%; width: auto; height: auto; }
.catalogue-article iframe { max-width: 100%; }
.catalogue-article table { display: block; max-width: 100%; overflow: auto; }
.catalogue-article .catalogue-cover { display: block; width: min(100%, 960px); }
.catalogue-subheading, .catalogue-related { margin-block: 28px 16px; }
.catalogue-related ul { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-left: 20px; }
.catalogue-contact { margin-top: clamp(28px, 5vw, 64px); padding: clamp(18px, 3vw, 34px); background: linear-gradient(90deg, #f4ece1 24%, #f4ece1a6), url("./workbench-background.webp") center 48% / cover; border-inline-start: 2px solid var(--wine); display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.catalogue-contact .button { margin-top: 0; }
.catalogue-contact a:last-child { color: var(--wine); }

.catalogue-page-content { position: relative; }
.catalogue-page-grid { row-gap: clamp(18px, 3vw, 36px); }
.listing-card {
    position: relative;
    background: linear-gradient(165deg, #fffaf1 50%, #f1e7d9);
    box-shadow: 0 12px 26px -22px #4b2a1b80;
}
.listing-card h2 { border-top: 1px solid var(--line); }
.listing-photo-frame::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 8px;
    pointer-events: none;
    background:
        linear-gradient(#fff8e7, #fff8e7) left top / 18px 2px,
        linear-gradient(#fff8e7, #fff8e7) left top / 2px 18px,
        linear-gradient(#fff8e7, #fff8e7) right bottom / 18px 2px,
        linear-gradient(#fff8e7, #fff8e7) right bottom / 2px 18px;
    background-repeat: no-repeat;
    opacity: .8;
}
a.listing-card:is(:hover, :focus-visible) { border-color: var(--wine); }
a.listing-card:focus-visible { outline-offset: 3px; }
.catalogue-article .catalogue-cover {
    margin-inline: auto;
    padding: clamp(5px, 1vw, 12px);
    background: #fffaf1;
    border: 1px solid var(--line);
    box-shadow: 0 16px 34px -24px #4b2a1b85;
}
.catalogue-related {
    padding: clamp(16px, 3vw, 32px);
    background: linear-gradient(110deg, #fffaf1e8, #fffaf1b5), url("./catalogue-paper.webp") center / cover;
    border-block: 1px solid var(--line);
}
.catalogue-contact {
    flex-direction: column;
    align-items: flex-start;
    min-height: clamp(210px, 25vw, 320px);
    justify-content: center;
    color: #fff7e9;
    background:
        linear-gradient(95deg, #241c17 9%, #241c17ed 42%, #241c1770),
        url("./custom-workshop.webp") center 62% / cover no-repeat,
        #241c17;
}
.catalogue-contact h2 { font-size: clamp(1.8rem, 4vw, 3.4rem); }
.catalogue-contact a:last-child { color: #fff0d9; text-underline-offset: .22em; }
.catalogue-contact a:last-child:hover { color: #fff; }
@media (max-width: 540px) {
    .catalogue-contact {
        background-image: linear-gradient(105deg, #241c17f5, #241c17bf), url("./custom-workshop.webp");
        background-position: center, 62% center;
    }
}

.listing-photo-placeholder {
    aspect-ratio: 4 / 3;
    background:
        linear-gradient(135deg, #fffaf1cf, #e8d9c7be),
        url("./catalogue-paper.webp") center / cover;
}
.listing-photo-placeholder::after {
    inset: 14%;
    border-color: #9f73533b;
    background: linear-gradient(135deg, transparent calc(50% - 1px), #9f735329 50%, transparent calc(50% + 1px));
}
.catalogue-page--offers .catalogue-page-heading {
    background:
        linear-gradient(100deg, #f7f4ed 20%, #f1dfe0b8),
        url("./catalogue-paper.webp") center / cover;
}
.catalogue-page--offers .listing-card { border-top: 2px solid var(--wine); }

.catalogue-cover-stage {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3.5vw, 48px);
    margin-bottom: clamp(20px, 4vw, 48px);
    background:
        linear-gradient(110deg, #e9dece7a, #f7f4ed15),
        url("./catalogue-paper.webp") center / cover;
    border: 1px solid var(--line);
}
.catalogue-cover-stage::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: clamp(5px, 1.5vw, 18px);
    border: 1px solid #8f654444;
    pointer-events: none;
    background: repeating-linear-gradient(90deg, #8f654455 0 1px, transparent 1px 15px) left bottom / 100% 5px no-repeat;
}
.catalogue-cover-stage .catalogue-cover { width: min(100%, 1080px); }
.catalogue-article-copy {
    width: min(100%, 86ch);
    margin-inline: auto;
    padding: clamp(14px, 3vw, 32px);
    background: #fffaf19e;
    border-inline-start: 2px solid var(--line);
}
.catalogue-article-copy > :is(p, ul, ol) + * { margin-top: .8em; }
.catalogue-article-copy img { margin-inline: auto; }
.catalogue-subheading {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 30px);
}
.catalogue-subheading::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.catalogue-related a { text-underline-offset: .22em; }
.catalogue-related a:hover { color: var(--wine); }

.catalogue-page[data-catalogue-scene="kitchen-modern"] { --room-sketch: url("./catalogue-kitchen-modern-plan.webp"); }
.catalogue-page[data-catalogue-scene="living"] { --room-sketch: url("./catalogue-living-plan.webp"); }
.catalogue-page[data-catalogue-scene="bedroom"] { --room-sketch: url("./catalogue-bedroom-plan.webp"); }
.catalogue-page[data-catalogue-scene="special"] { --room-sketch: url("./catalogue-special-plan.webp"); }
.listing-photo-placeholder {
    background:
        linear-gradient(110deg, #faf4e9d9, #eadbc778),
        var(--room-sketch, url("./catalogue-paper.webp")) center / cover;
}
.catalogue-related {
    background:
        linear-gradient(90deg, #fffaf1fa 15%, #fffaf1c5 66%, #fffaf197),
        var(--room-sketch, url("./catalogue-paper.webp")) right center / cover;
}

.catalogue-related .catalogue-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr));
    gap: 12px;
    padding: 0;
    list-style: none;
}
.catalogue-related-card {
    display: block;
    height: 100%;
    border: 1px solid var(--line);
    background: #fffaf1e8;
    text-decoration: none;
}
.catalogue-related-card:hover { border-color: var(--wine); }
.catalogue-related-card img { aspect-ratio: 4 / 3; height: auto; }
.catalogue-related-card > span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px;
    overflow-wrap: anywhere;
    line-height: 1.4;
}
.catalogue-related-card > span span { color: var(--wine); }

.catalogue-page--offers .catalogue-page-heading {
    background:
        radial-gradient(ellipse at 78% 45%, #e8cbd47d, transparent 62%),
        linear-gradient(105deg, #f7f4ed 13%, #f8f0e6ad 68%, #f2ddd88c),
        url("./catalogue-paper.webp") center / cover;
}
.catalogue-page--offers .catalogue-heading-decor {
    mask-image: linear-gradient(90deg, transparent 12%, #000 70%);
}
.catalogue-page--offers .listing-card {
    background: linear-gradient(175deg, #fffaf1 60%, #efe0da);
}
.catalogue-page--offers .listing-photo-frame::after { border-color: #fff5e094; }
.catalogue-page--offers .listing-card h2 { padding-block: clamp(13px, 2vw, 23px); }
.catalogue-page--offers .catalogue-related {
    border-block-color: #c9a8a3;
    background: linear-gradient(115deg, #fffaf1eb, #f2e2dcbe), url("./catalogue-paper.webp") center / cover;
}
