/* ONE breadcrumb height for all inner pages (desktop / tablet / mobile) */

:root {
    --kuhni-crumb-top-desktop: 28px;
    --kuhni-crumb-top-tablet: 20px;
    --kuhni-crumb-top-mobile: 16px;
    --kuhni-crumb-title-gap: 12px;
    --kuhni-title-line-gap: 28px;
    --kuhni-line-content-gap: 32px;
}

/* ----- Page head block (.page__top) ----- */
body:not(.home) .page__top,
body:not(.home) .kuhni-page-top {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: var(--kuhni-crumb-title-gap) !important;
    justify-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 0 var(--kuhni-title-line-gap) !important;
    margin: 0 0 var(--kuhni-line-content-gap) !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

body:not(.home) .page__top .breadcrumbs,
body:not(.home) .kuhni-page-top .breadcrumbs,
body:not(.home) .catalog__top .breadcrumbs,
body:not(.home) .card__top-header .breadcrumbs {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

body:not(.home) .page__top h1,
body:not(.home) .kuhni-page-top h1,
body:not(.home) section.page .page__top h1 {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Stolzl', sans-serif !important;
    font-weight: 500 !important;
    font-size: 36px !important;
    line-height: 1.25 !important;
    color: #1a1a1a !important;
    letter-spacing: -0.02em;
}

body:not(.home) .page__top .breadcrumbs__list,
body:not(.home) .kuhni-page-top .breadcrumbs__list,
body:not(.home) .catalog__top .breadcrumbs__list,
body:not(.home) .card__top-header .breadcrumbs__list {
    justify-content: flex-start !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body:not(.home) .page__description {
    margin-top: 0 !important;
}

.news-listing-page .news-grid,
.blog-listing-page .news-grid,
.favourite-listing-page .favourite-listing,
.category-listing-page .blog__grid {
    margin-top: 0 !important;
}

body:not(.home) .page__description[style*="margin-top"] {
    margin-top: 0 !important;
}

/* Same gap breadcrumbs → title on product/salon headers */
body:not(.home) .card__top-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: var(--kuhni-crumb-title-gap) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Product card title block — same as .page__top (line + gaps) */
body:not(.home) .product-page .card__top-header {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 0 var(--kuhni-title-line-gap) !important;
    margin: 0 0 var(--kuhni-line-content-gap) !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

body:not(.home) .product-page .card__top-header h1 {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Stolzl', sans-serif !important;
    font-weight: 500 !important;
    font-size: 36px !important;
    line-height: 1.25 !important;
    color: #1a1a1a !important;
    letter-spacing: -0.02em;
}

body:not(.home) .catalog__top {
    gap: var(--kuhni-crumb-title-gap) !important;
}

/* Installment: pull content up under title strip (theme default gap is 140px) */
body:not(.home) .page-installment__top {
    gap: var(--kuhni-line-content-gap, 32px) !important;
}

body:not(.home) .page-installment .page {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body:not(.home) .page-installment .benefits {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ========== DESKTOP: identical top offset everywhere ========== */
@media (min-width: 992px) {
    body:not(.home) main > section.page,
    body:not(.home) main > section.catalog,
    body:not(.home) main.product-page > section.card,
    body:not(.home) .page-installment section.page {
        padding-top: var(--kuhni-crumb-top-desktop) !important;
        margin-top: 0 !important;
    }

    /* Salon top padding is owned by salon-page.css */
    body:not(.home) main.salon-page > section.card {
        margin-top: 0 !important;
    }

    body:not(.home) .catalog__top {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* ========== TABLET ========== */
@media (min-width: 768px) and (max-width: 991px) {
    body:not(.home) main > section.page,
    body:not(.home) main > section.catalog,
    body:not(.home) main.product-page > section.card,
    body:not(.home) .page-installment section.page {
        padding-top: var(--kuhni-crumb-top-tablet) !important;
        margin-top: 0 !important;
    }

    body:not(.home) main.salon-page > section.card {
        margin-top: 0 !important;
    }

    body:not(.home) .page__top,
    body:not(.home) .kuhni-page-top {
        padding: 0 0 24px !important;
        margin: 0 0 28px !important;
    }

    body:not(.home) .product-page .card__top-header {
        padding: 0 0 24px !important;
        margin: 0 0 28px !important;
    }

    body:not(.home) .page__top h1,
    body:not(.home) .kuhni-page-top h1,
    body:not(.home) .product-page .card__top-header h1 {
        font-size: 28px !important;
    }
}

/* ========== MOBILE ========== */
@media (max-width: 767px) {
    body:not(.home) main > section.page,
    body:not(.home) main > section.catalog,
    body:not(.home) main.product-page > section.card,
    body:not(.home) .page.news-listing-page,
    body:not(.home) .page.blog-listing-page,
    body:not(.home) .page.favourite-listing-page,
    body:not(.home) .page.category-listing-page,
    body:not(.home) .page-installment section.page {
        padding-top: var(--kuhni-crumb-top-mobile) !important;
        margin-top: 0 !important;
    }

    body:not(.home) main.salon-page > section.card {
        margin-top: 0 !important;
    }

    body:not(.home) main > section.page,
    body:not(.home) main > section.catalog,
    body:not(.home) .page.news-listing-page,
    body:not(.home) .page.blog-listing-page,
    body:not(.home) .page.favourite-listing-page,
    body:not(.home) .page.category-listing-page {
        padding-bottom: 40px !important;
    }

    body:not(.home) .page__top,
    body:not(.home) .kuhni-page-top {
        padding: 0 0 20px !important;
        margin: 0 0 24px !important;
    }

    body:not(.home) .product-page .card__top-header {
        padding: 0 0 20px !important;
        margin: 0 0 24px !important;
    }

    body:not(.home) .page__top h1,
    body:not(.home) .kuhni-page-top h1,
    body:not(.home) section.page .page__top h1,
    body:not(.home) .product-page .card__top-header h1 {
        font-size: 26px !important;
        line-height: 1.25 !important;
    }

    body:not(.home) .catalog__wrapper,
    body:not(.home) .catalog__top {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body:not(.home) .catalog__top {
        display: grid !important;
        grid-template-columns: 1fr !important;
        margin-bottom: 0 !important;
    }

    body:not(.home) .page__top .breadcrumbs,
    body:not(.home) .kuhni-page-top .breadcrumbs,
    body:not(.home) .catalog__top .breadcrumbs,
    body:not(.home) .card__top-header .breadcrumbs,
    body:not(.home) .page__top .breadcrumbs__list,
    body:not(.home) .kuhni-page-top .breadcrumbs__list,
    body:not(.home) .catalog__top .breadcrumbs__list,
    body:not(.home) .card__top-header .breadcrumbs__list,
    body:not(.home) .page__top .breadcrumbs__item,
    body:not(.home) .kuhni-page-top .breadcrumbs__item,
    body:not(.home) .catalog__top .breadcrumbs__item,
    body:not(.home) .card__top-header .breadcrumbs__item,
    body:not(.home) .page__top .breadcrumbs__item a,
    body:not(.home) .kuhni-page-top .breadcrumbs__item a,
    body:not(.home) .catalog__top .breadcrumbs__item a,
    body:not(.home) .card__top-header .breadcrumbs__item a,
    body:not(.home) .page__top .breadcrumbs__item span,
    body:not(.home) .kuhni-page-top .breadcrumbs__item span,
    body:not(.home) .catalog__top .breadcrumbs__item span,
    body:not(.home) .card__top-header .breadcrumbs__item span {
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    body:not(.home) .page__top .breadcrumbs__list,
    body:not(.home) .kuhni-page-top .breadcrumbs__list,
    body:not(.home) .catalog__top .breadcrumbs__list,
    body:not(.home) .card__top-header .breadcrumbs__list {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }
}
