.pp-fillings-page {
    padding-top: 1.5rem;
    padding-bottom: 2.75rem;
}

.pp-fillings-page__header {
    margin-bottom: 1.35rem;
}

.pp-fillings-page__header .pp-back-link {
    margin-bottom: 0.85rem;
}

.pp-fillings-page__header .pp-catalog__title {
    margin-bottom: 0.35rem;
}

.pp-fillings-page__lead {
    margin: 0;
    color: var(--pp-text-muted, #6a6a6a);
    font-size: 0.95rem;
    line-height: 1.4;
}

.pp-fillings-page__empty {
    margin: 0;
    color: var(--pp-text-muted, #6a6a6a);
    font-size: 1rem;
}

.pp-fil-nav {
    display: flex;
    gap: 1.15rem;
    margin: 0 0 0.15rem;
    overflow-x: auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    scrollbar-width: none;
}

.pp-fil-nav::-webkit-scrollbar {
    display: none;
}

.pp-fil-nav__link {
    flex: 0 0 auto;
    margin-bottom: -1px;
    padding: 0.45rem 0 0.7rem;
    border-bottom: 2px solid transparent;
    color: var(--pp-text-muted, #6a6a6a);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}

.pp-fil-nav__link.is-active {
    border-bottom-color: var(--pp-accent, #913d45);
    color: #1a1a1a;
}

.pp-fil-nav__link:hover {
    color: #1a1a1a;
}

.pp-fil-nav__link:focus-visible {
    outline: 2px solid var(--pp-accent, #913d45);
    outline-offset: 2px;
    border-radius: 2px;
}

.pp-fil {
    display: grid;
    grid-template-columns: minmax(220px, 260px) 32px minmax(0, 1fr);
    align-items: start;
    padding: 2rem 0 2.25rem;
    scroll-margin-top: 7rem;
}

.pp-fil + .pp-fil {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pp-fil__aside {
    position: sticky;
    top: 4.75rem;
    z-index: 1;
    align-self: start;
    min-width: 0;
}

.pp-fil__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #f3f3f5;
    color: inherit;
    font: inherit;
    text-align: left;
}

button.pp-fil__media {
    display: block;
    cursor: zoom-in;
}

button.pp-fil__media:focus-visible {
    outline: 2px solid var(--pp-accent, #913d45);
    outline-offset: 3px;
}

.pp-fil__zoom {
    position: absolute;
    right: 0.55rem;
    bottom: 0.55rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #1a1a1a;
    font-size: 0.78rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    pointer-events: none;
}

.pp-fil__media img,
.pp-fil__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pp-fil__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: color-mix(in srgb, var(--pp-accent, #913d45) 55%, #fff);
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.pp-fil__name {
    position: relative;
    margin: 0.9rem 0 0;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.pp-fil__name::before,
.pp-fil__name::after {
    content: "";
    position: absolute;
    top: 0.6em;
    pointer-events: none;
}

.pp-fil__name::before {
    left: calc(100% + 16px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pp-accent, #913d45);
    transform: translate(-50%, -50%);
}

.pp-fil__name::after {
    left: calc(100% + 20px);
    width: 12px;
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
    transform: translateY(-50%);
}

.pp-fil__desc {
    display: -webkit-box;
    margin: 0.45rem 0 0;
    overflow: hidden;
    color: var(--pp-text-muted, #6a6a6a);
    font-size: 0.9rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.pp-fil__count {
    margin: 0.6rem 0 0;
    color: var(--pp-text-light, #9b9b9b);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
}

.pp-fil__rail {
    position: relative;
    align-self: stretch;
}

.pp-fil__rail::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(0, 0, 0, 0.08);
    transform: translateX(-50%);
}

.pp-fil__products {
    min-width: 0;
}

.pp-fil__empty {
    margin: 0.35rem 0 0;
    color: var(--pp-text-muted, #6a6a6a);
    font-size: 0.95rem;
    line-height: 1.4;
}

.pp-fillings-page .pp-fil__products .pp-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 1.25rem 1rem;
}

.pp-fil-viewer {
    position: fixed;
    inset: 0;
    z-index: 80;
}

.pp-fil-viewer[hidden],
.pp-fil-viewer__nav[hidden],
.pp-fil-viewer__desc[hidden],
.pp-fil-viewer__counter[hidden] {
    display: none !important;
}

.pp-fil-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: #141210;
    cursor: zoom-out;
}

.pp-fil-viewer__close,
.pp-fil-viewer__nav {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #1a1a1a;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.pp-fil-viewer__close {
    top: max(0.85rem, env(safe-area-inset-top));
    right: max(0.85rem, env(safe-area-inset-right));
}

.pp-fil-viewer__nav--prev {
    top: 46%;
    left: max(0.75rem, env(safe-area-inset-left));
}

.pp-fil-viewer__nav--next {
    top: 46%;
    right: max(0.75rem, env(safe-area-inset-right));
}

.pp-fil-viewer__close:hover,
.pp-fil-viewer__nav:hover,
.pp-fil-viewer__close:focus-visible,
.pp-fil-viewer__nav:focus-visible {
    background: var(--pp-accent, #913d45);
    color: #fff;
}

.pp-fil-viewer__close:focus-visible,
.pp-fil-viewer__nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.pp-fil-viewer__stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    box-sizing: border-box;
    width: min(100%, 1180px);
    height: 100%;
    margin: 0 auto;
    padding: 4.25rem 4.75rem max(1.15rem, env(safe-area-inset-bottom));
    pointer-events: none;
}

.pp-fil-viewer__photo {
    position: relative;
    min-width: 0;
    min-height: 0;
}

.pp-fil-viewer__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: auto;
}

.pp-fil-viewer__caption {
    max-width: 40rem;
    margin: 0.9rem auto 0;
    color: #fff;
    text-align: center;
    pointer-events: auto;
}

.pp-fil-viewer__title {
    margin: 0;
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.pp-fil-viewer__desc {
    max-height: 4.8em;
    margin: 0.4rem 0 0;
    overflow: auto;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.pp-fil-viewer__counter {
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.pp-fil-viewer-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (max-width: 1000px) {
    .pp-fil__aside {
        top: 6.5rem;
    }
}

@media (max-width: 768px) {
    .pp-fillings-page__header .pp-catalog__title {
        font-size: 1.45rem;
    }

    .pp-fil {
        display: block;
        padding: 1.35rem 0 1.5rem;
        scroll-margin-top: 5.5rem;
    }

    .pp-fil__aside {
        position: static;
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 0.8rem;
        row-gap: 0.1rem;
        align-items: center;
    }

    .pp-fil__media {
        grid-row: 1 / span 2;
        width: 64px;
        height: 64px;
        aspect-ratio: auto;
        border-radius: 14px;
    }

    .pp-fil__zoom {
        right: 3px;
        bottom: 3px;
        width: 1.15rem;
        height: 1.15rem;
        font-size: 0.55rem;
    }

    .pp-fil-viewer__stage {
        padding: 3.6rem 0.75rem max(0.9rem, env(safe-area-inset-bottom));
    }

    .pp-fil-viewer__title {
        font-size: 1.1rem;
    }

    .pp-fil-viewer__nav {
        top: 42%;
        width: 2.35rem;
        height: 2.35rem;
    }

    .pp-fil__placeholder {
        font-size: 1.35rem;
    }

    .pp-fil__name {
        align-self: end;
        margin: 0;
        font-size: 1.05rem;
    }

    .pp-fil__name::before,
    .pp-fil__name::after {
        content: none;
    }

    .pp-fil__count {
        align-self: start;
        margin: 0.15rem 0 0;
    }

    .pp-fil__desc {
        grid-column: 1 / -1;
        margin-top: 0.55rem;
    }

    .pp-fil__rail {
        display: none;
    }

    .pp-fil__products {
        margin-top: 0.85rem;
        margin-left: 32px;
        padding: 0.15rem 0 0.35rem 0.85rem;
        overflow-x: auto;
        border-left: 1px solid rgba(0, 0, 0, 0.08);
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .pp-fillings-page .pp-fil__products .pp-product-grid {
        display: flex;
        gap: 0.85rem;
        width: max-content;
        padding-right: 0.25rem;
    }

    .pp-fillings-page .pp-fil__products .pp-product-card {
        flex: 0 0 156px;
        width: 156px;
        scroll-snap-align: start;
    }

    .pp-fillings-page .pp-fil__products .bulma-cake-card-button {
        width: 100%;
    }
}
