/* Shared header layouts. Keep these rules after rose.css. */
html {
    --rose-header-height: 86px;
    --rose-phonebar-height: 0px;
    scroll-padding-top: calc(var(--rose-header-height) + 16px);
}

.mobile-branding { display: none; }
.header .menu-toggle[hidden] { display: none; }
.header .menu-toggle-label { font: inherit; }
.header { position: sticky; top: 0; }
.header .header-inner {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 155px auto;
    grid-template-areas: "brand navigation phones cta";
    align-items: center;
    gap: 16px;
    min-height: 0;
    padding-block: 0;
    transition: grid-template-columns .18s ease, padding .18s ease;
}
.header .header-brand {
    grid-area: brand;
    width: auto;
    margin: 0;
    padding: 10px;
    transition: padding .18s ease;
}
.header .header-brand .brand-logo { width: 280px; margin: 0; transition: width .18s ease; }
.header .header-navigation { grid-area: navigation; min-width: 0; }
.header .desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 18px;
    font-size: 14px;
    white-space: nowrap;
}
.header .desktop-nav > a,
.header .nav-dropdown > summary { padding-block: 10px; }
.header .header-contact-number {
    grid-area: phones;
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
}
.header .header-contact-number small { font-size: 11px; }
.header .header-cta {
    grid-area: cta;
    width: auto;
    min-height: 48px;
    margin: 0;
    padding: 12px 16px;
    gap: 12px;
    font-size: 13px;
    line-height: 1.4;
    justify-content: center;
}
.header .menu-toggle { display: none; }
.header .header-cta > span { flex-shrink: 0; font-size: 18px; line-height: 1; }
.header .header-cta > .header-cta-text { font: inherit; line-height: inherit; flex-shrink: 1; }
.header .header-cta > .header-cta-short { display: none; }
.header .mobile-nav {
    position: absolute;
    inset: 100% 0 auto;
    width: 100%;
    max-height: calc(100dvh - var(--rose-menu-top, var(--rose-header-height)) - var(--rose-phonebar-height) - 12px);
    margin: 0;
    padding: 18px max(28px, calc((100% - 1320px) / 2));
    background: var(--paper);
    border-block: 1px solid var(--line);
    box-shadow: 0 16px 24px rgb(36 38 38 / 10%);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.header .mobile-nav a { min-height: 44px; padding-block: 10px; }
main [id], footer[id] { scroll-margin-top: 16px; }

@media (min-width: 1280px) and (max-width: 1439px) {
    .header .header-inner { grid-template-columns: 280px minmax(0, 1fr) 150px auto; gap: 14px; }
    .header .header-brand .brand-logo { width: 260px; }
    .header .desktop-nav { gap: 12px; font-size: 13px; }
    .header .header-cta { padding-inline: 12px; font-size: 12px; gap: 10px; }
}

@media (min-width: 701px) and (max-width: 1279px) {
    .header .header-inner {
        grid-template-columns: 280px minmax(140px, 1fr) auto auto;
        grid-template-areas: "brand phones cta menu";
        gap: 14px;
        padding-block: 0;
    }
    .header .header-brand .brand-logo { width: 260px; }
    .header .header-navigation { display: none; }
    .header .header-contact-number { justify-self: end; }
    .header .header-contact-number small { display: none; }
    .header .desktop-nav { display: none; }
    .header .header-cta {
        justify-self: start;
        max-width: 100%;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 12px;
        gap: 8px;
        white-space: normal;
    }
    .header .menu-toggle { justify-self: end; }
}

@media (min-width: 701px) and (max-width: 899px) {
    .header .header-inner { gap: 10px; }
    .header .header-cta > .header-cta-full { display: none; }
    .header .header-cta > .header-cta-short { display: inline; }
}

@media (max-width: 1279px) {
    .header .menu-toggle {
        grid-area: menu;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        margin: 0;
        padding: 10px 12px;
        color: var(--ink);
        font-size: 13px;
        line-height: 1.4;
        cursor: pointer;
    }
    .header .menu-toggle span { margin: 0; font-size: 17px; line-height: 1; }
    .header .menu-toggle[aria-expanded="true"] { background: var(--dark); border-color: var(--dark); color: var(--paper); }
}

@media (max-width: 700px) {
    html { --rose-header-height: 90px; --rose-phonebar-height: 0px; }
    .topbar, .mobile-branding { display: none; }
    .header .header-inner {
        width: calc(100% - 32px);
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-areas: "brand menu";
        gap: 12px;
        padding-block: 8px;
    }
    .header .header-brand {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        min-width: 0;
        width: fit-content;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    .header .header-brand .brand-logo { width: 250px; max-width: 100%; height: auto; }
    .header .header-navigation,
    .header .header-contact-number,
    .header .header-cta,
    .header .menu-toggle-label { display: none; }
    .header .menu-toggle { width: 44px; min-height: 44px; padding: 10px; border: 1px solid var(--line); }
    .header .menu-toggle-icon { display: block; flex-shrink: 0; }
    .header .mobile-nav { padding: 12px 20px 20px; }
    .rose-footer { padding-bottom: 0; }
    .rose-footer .phone-mobile,
    .rose-footer .phone-desktop,
    .rose-footer .rose-footer-location-phone { display: none; }
}

@media (min-width: 701px) {
    .header.is-compact .header-inner { grid-template-columns: 232px minmax(0, 1fr) 155px auto; }
    .header.is-compact .header-brand { padding: 6px; }
    .header.is-compact .header-brand .brand-logo { width: 220px; }
    .header.is-compact .header-contact-number small { display: none; }
    .header.is-compact .header-cta { min-height: 44px; padding-block: 10px; }
}

@media (min-width: 701px) and (max-width: 1279px) {
    .header.is-compact .header-inner { grid-template-columns: 232px minmax(140px, 1fr) auto auto; }
}

@media (max-width: 700px) {
    .header.is-compact .header-inner { padding-block: 8px; }
}

@media (min-width: 1280px) {
    .header .mobile-nav { display: none; }
}

/* The catalogue spans the header, with categories on the left and selections on the right. */
.header .nav-catalog { position: static; }
.header .catalog-mega-panel {
    inset: 100% 24px auto;
    width: min(1260px, calc(100% - 48px));
    max-height: calc(100dvh - var(--rose-menu-top, var(--rose-header-height)) - 16px);
    margin-inline: auto;
    padding: 28px;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 40px;
    background: #fff;
    border-radius: 12px;
    overflow: auto;
    overscroll-behavior: contain;
    white-space: normal;
    box-shadow: 0 18px 42px rgb(36 38 38 / 13%);
}
.catalog-mega-sidebar { display: flex; flex-direction: column; align-items: stretch; }
.catalog-category-tabs { display: flex; flex-direction: column; gap: 4px; }
.header .catalog-category-tab { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 6px; font-size: 15px; font-weight: 500; line-height: 1.4; }
.header .catalog-category-tab[aria-selected="true"] { background: #f0e5e5; color: var(--rose); }
.catalog-category-tab > span { font-size: 22px; }
.header .catalog-all-link { display: flex; justify-content: space-between; margin-top: auto; padding: 24px 16px 12px; color: var(--rose); }
.header .catalog-special-link { padding: 14px 16px 0; margin-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.catalog-mega-content { min-width: 0; }
.catalog-category-pane { min-height: 340px; }
.catalog-category-pane[hidden] { display: none; }
.header .catalog-pane-title { display: flex; gap: 16px; align-items: baseline; width: fit-content; padding: 8px 0; font-size: 25px; line-height: 1.3; font-weight: 600; }
.header .catalog-pane-title:hover { color: var(--rose); background: none; }
.catalog-pane-intro { max-width: 690px; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.7; margin: 0 0 22px; }
.catalog-collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.header .catalog-collection-link { display: flex; align-items: flex-start; gap: 14px; justify-content: space-between; min-width: 0; min-height: 95px; padding: 16px 0; border-top: 1px solid var(--line); }
.header .catalog-collection-link:hover { color: var(--rose); background: none; }
.catalog-collection-link strong { display: block; font-size: 16px; line-height: 1.4; font-weight: 500; }
.catalog-collection-link small { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.5; font-weight: 400; }
.catalog-collection-arrow { color: var(--rose); }
.header .catalog-view-category { display: inline-flex; gap: 20px; padding: 12px 0 0; margin-top: 14px; color: var(--rose); font-size: 13px; }
.header .catalog-view-category:hover { background: none; text-decoration: underline; text-underline-offset: 4px; }
.catalog-category-tab:focus-visible, .catalog-mega-panel a:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.mobile-catalog-category { border: 0; border-bottom: 1px solid var(--line); }
.mobile-catalog-category > summary { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-size: 16px; font-weight: 600; }
.mobile-catalog-category > summary::marker { content: ''; }
.mobile-catalog-category > summary::-webkit-details-marker { display: none; }
.mobile-catalog-category[open] > summary > span { transform: rotate(45deg); }
.mobile-catalog-category > div { padding: 0 0 12px 16px; }
.header .mobile-catalog-category a { font-size: 14px; font-weight: 400; padding: 10px 0; }
.header .mobile-catalog-category .mobile-catalog-all { color: var(--rose); font-weight: 600; }
.category-collection-nav, .funeral-package-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.category-collection-nav a, .funeral-package-nav a { border: 1px solid var(--line); padding: 10px 15px; font-size: 13px; line-height: 1.5; }
.category-collection-nav a[aria-current], .category-collection-nav a:hover, .funeral-package-nav a:hover { background: var(--rose); border-color: var(--rose); color: #fff; }
.funeral-package-group { margin-top: 38px; }
.funeral-package-group + .funeral-package-group { margin-top: 60px; }
.funeral-package-group > h3 { font-size: 30px; line-height: 1.25; }
.funeral-group-description { margin: 12px 0 24px; font-size: 15px; color: var(--muted); }
.funeral-package-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
.funeral-package-heading h4 { margin: 0 0 15px; font-size: 30px; font-weight: 600; line-height: 1.3; color: var(--ink); letter-spacing: -.5px; text-transform: none; }
.funeral-package-important { margin: 18px 27px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.funeral-package-details { border: 0; margin: 0 27px; }
.funeral-package-details > summary { display: flex; justify-content: space-between; gap: 12px; padding: 18px 0; font-size: 14px; font-weight: 500; }
.funeral-package-details > summary::-webkit-details-marker { display: none; }
.funeral-package-details[open] > summary > span { transform: rotate(45deg); }
.funeral-package-details h5 { margin: 12px 0; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--rose); }
.funeral-package-details ul { padding: 0; margin: 0 0 25px; list-style: none; }
.funeral-package-details li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.funeral-package-details li small { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--rose); }
.funeral-package-enquiry { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 54px); padding: 14px 0; margin: 0 27px; border-top: 1px solid var(--line); font-size: 13px; }
@media (max-width: 900px) {
    .funeral-package-grid-two { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .category-collection-nav, .funeral-package-nav { gap: 8px; }
    .category-collection-nav a, .funeral-package-nav a { font-size: 12px; padding: 9px 12px; }
    .funeral-package-group > h3 { font-size: 25px; }
    .funeral-package-heading h4 { font-size: 28px; }
}

.header .nav-wide { position: static; }
.header .nav-wide-panel {
    inset: 100% 24px auto;
    width: min(1260px, calc(100% - 48px));
    max-height: calc(100dvh - var(--rose-menu-top, var(--rose-header-height)) - 16px);
    margin-inline: auto;
    padding: 28px;
    background: #fff;
    border-radius: 12px;
    overflow: auto;
    overscroll-behavior: contain;
    white-space: normal;
    box-shadow: 0 18px 42px rgb(36 38 38 / 13%);
}
.header .nav-cost-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.nav-cost-group { min-width: 0; }
.nav-cost-group h3 { font-size: 17px; line-height: 1.4; margin: 0 0 15px; }
.header .nav-cost-group h3 a { padding: 0 0 12px; font-size: inherit; font-weight: 600; }
.header .nav-cost-link { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; font-weight: 400; }
.nav-cost-link small { color: var(--rose); font-size: 13px; font-weight: 600; white-space: nowrap; }
.nav-cost-group p { margin-top: 15px; font-size: 11px; color: var(--muted); line-height: 1.6; font-weight: 400; }
.nav-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 30px; }
.header .nav-topic-link { display: block; padding: 18px 0; border-top: 1px solid var(--line); font-weight: 400; }
.nav-topic-link strong { display: block; font-size: 16px; line-height: 1.5; font-weight: 500; }
.nav-topic-link small { display: block; font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 7px; }
.header .nav-topic-all { display: block; width: fit-content; padding: 18px 0 0; color: var(--rose); font-size: 13px; }
.selection-examples, .selection-goods { padding-top: 0; }
.selection-goods-list { padding: 0; margin: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.selection-goods-list li { padding: 16px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.7; }
@media (min-width: 1280px) {
    .header .header-inner, .header.is-compact .header-inner {
        grid-template-columns: minmax(0, 1fr) 170px auto;
        grid-template-areas: "brand phones cta" "navigation navigation navigation";
        column-gap: 28px;
        row-gap: 0;
    }
    .header .header-brand { width: fit-content; }
    .header .header-navigation { border-top: 1px solid var(--line); width: 100%; }
    .header .desktop-nav { min-height: 48px; gap: 32px; justify-content: flex-start; font-size: 14px; }
    .header.is-compact .desktop-nav { min-height: 44px; }
    .header .header-contact-number { justify-self: end; }
}
@media (max-width: 1279px) {
    .header .mobile-nav .nav-cost-group { margin: 10px 0 22px; }
    .header .mobile-nav .nav-cost-group h3 { font-size: 14px; margin: 0 0 5px; }
    .header .mobile-nav .nav-cost-group h3 a { padding: 7px 0; color: var(--rose); font-size: inherit; font-weight: 600; }
    .header .mobile-nav .nav-cost-link { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; padding: 10px 0; font-size: 13px; }
    .header .mobile-nav .nav-cost-link small { font-size: 12px; }
}
@media (max-width: 700px) {
    .selection-goods-list { grid-template-columns: 1fr; }
}

/* Visual navigation follows the same catalogue and service data as the home page. */
.header .catalog-category-tab { gap: 10px; padding: 7px 10px; min-height: 48px; }
.catalog-category-tab img { flex: 0 0 36px; width: 36px; height: 36px; object-fit: contain; background: white; border-radius: 4px; }
.catalog-category-tab b { flex: 1; font-size: 13px; font-weight: 500; }
.catalog-collection-thumb { flex: 0 0 64px; width: 64px; height: 64px; object-fit: contain; border-radius: 5px; }
.header .catalog-collection-link { justify-content: flex-start; }
.catalog-collection-arrow { margin-left: auto; }
.header .nav-visual-link { display: flex; align-items: center; gap: 14px; }
.nav-visual-link img { width: 72px; height: 72px; flex: 0 0 72px; object-fit: contain; background: #fff; border-radius: 6px; }
.nav-cost-group h3 { display: flex; align-items: center; gap: 12px; }
.nav-cost-group h3 img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 5px; }
.header .mobile-visual-link { display: flex; align-items: center; gap: 12px; }
.mobile-visual-link img { width: 44px; height: 44px; object-fit: contain; background: white; }
.selection-start-price { margin: 18px 0; color: var(--rose); font-size: 30px; font-weight: 600; }
.selection-illustration { max-width: 280px; margin: 24px 0; }
.selection-illustration img { width: 100%; height: auto; }
.selection-illustration figcaption { color: var(--muted); font-size: 12px; line-height: 1.6; }
.selection-groups > section { scroll-margin-top: 160px; margin-bottom: 42px; }
.selection-groups h2 { font-size: 28px; margin-bottom: 24px; }
.monument-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.monument-type-grid > a { background: #fff; padding: 20px; border: 1px solid var(--line); }
.monument-type-grid img { display: block; width: 100%; height: 150px; object-fit: contain; }
.monument-type-grid h3 { font-size: 20px; line-height: 1.35; margin-top: 18px; }
.monument-type-grid p { color: var(--muted); font-size: 14px; margin-top: 10px; }
@media(max-width:760px) { .monument-type-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; } .monument-type-grid > a { padding: 12px; } .monument-type-grid h3 { font-size: 16px; } .monument-type-grid img { height: 110px; } }

.catalog-category-tabs { gap: 0; }
.header .catalog-category-tab { min-height: 38px; padding: 4px 8px; gap: 8px; }
.catalog-category-tab img { flex-basis: 28px; width: 28px; height: 28px; }
.catalog-category-tab b { font-size: 12px; }
.header .catalog-all-link { margin-top: 0; padding: 12px 8px 8px; }
.header .catalog-special-link { padding: 10px 8px 0; margin-top: 0; }

.mobile-catalog-category:not([open]) > summary > span { transform: none; }
.mobile-catalog-category > summary > .mobile-category-thumb { width: 32px; height: 32px; flex: 0 0 32px; object-fit: contain; background: white; }
.mobile-catalog-category > summary > b { flex: 1; font-size: inherit; font-weight: inherit; }
