/*
 * v2.4.6 pre-paint route/return gate.
 * The attribute is installed in <head> by bsPage.php for /page-N (N > 1).
 * visibility:hidden keeps the exact layout dimensions, so the corrected page
 * can be committed without a visible page-1 -> page-N jump.
 */
html[data-bs-page-route-gate="1"] #pdopage .bs-pages,
html[data-bs-page-route-gate="1"] #pdopage .bs-seo-pagination {
    visibility: hidden !important;
}

.bspage {
    position: relative;
}

.bs-pages {
    visibility: visible;
}

.bspage.bs-restoring .bs-pages {
    visibility: hidden !important;
}


.bs-sentinel {
    width: 100%;
    height: 1px;
    pointer-events: none;
}



/*
 * Layoutul produselor este controlat de CSS-ul existent al site-ului
 * prin selectorii originali #pdopage .rows / #pdopage .card.
 */
.bs-pages.rows > .card {
    vertical-align: top;
}




/* Linie reală de progres, fixată discret în partea de sus. */
.bs-load-progress-track {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2147483001;
    height: 2px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 150ms ease;
    background: transparent;
}

.bs-load-progress-track.is-visible {
    opacity: 1;
}

.bs-load-progress {
    display: block;
    width: 0;
    height: 100%;
    background: rgba(0, 63, 50, 0.82);
    box-shadow: 0 0 5px rgba(0, 63, 50, 0.24);
    transition: width 90ms linear;
    will-change: width;
}

/* Mesaj separat, elegant, fără efect de progres în fundal. */
.bs-load-status {
    position: fixed;
    left: 50%;
    bottom: 12px;
    z-index: 2147483000;
    max-width: calc(100vw - 28px);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition:
        opacity 180ms ease,
        transform 220ms ease;
}

.bs-load-status.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.bs-load-text {
    display: block;
    min-width: 190px;
    max-width: calc(100vw - 28px);
    padding: 6px 12px;
    border: 1px solid rgba(0, 63, 50, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    color: rgba(0, 53, 43, 0.94);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
    .bs-load-progress-track,
    .bs-load-progress,
    .bs-load-status {
        transition: none;
    }
}


/*
 * Restaurarea snapshotului este atomică:
 * lista rămâne complet invizibilă până la decodarea tuturor imaginilor.
 */
.bspage.bs-restoring .bs-pages {
    visibility: hidden !important;
}


html[data-bs-page-static-snapshot="1"] #pdopage .card,
html[data-bs-page-static-snapshot="1"] #pdopage .card * {
    animation: none !important;
    transition: none !important;
}


/* Crawlable numeric pagination for the category page. */
.bs-seo-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    margin: 10px 0 25px;
    font-size: 13px;
    line-height: 1;
}

.bs-seo-pagination[hidden] {
    display: none !important;
}

.bs-seo-page-link,
.bs-seo-page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid rgba(0, 63, 50, 0.12);
    border-radius: 8px;
    background: #fff;
    color: rgba(0, 53, 43, 0.94);
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.bs-seo-page-link:hover,
.bs-seo-page-link:focus-visible {
    border-color: rgba(0, 63, 50, 0.34);
    background: rgba(0, 63, 50, 0.035);
    text-decoration: none;
}

.bs-seo-page-current {
    border-color: rgba(0, 63, 50, 0.82);
    background: rgba(0, 63, 50, 0.94);
    color: #fff;
    font-weight: 700;
}

.bs-seo-page-arrow {
    min-width: 34px;
    padding: 0;
    font-size: 20px;
    line-height: 1;
}

.bs-seo-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 34px;
    color: rgba(0, 53, 43, 0.58);
    user-select: none;
}

@media (max-width: 520px) {
    .bs-seo-pagination {
        gap: 5px;
        margin-top: 10px;
        margin-bottom: 15px;
        font-size: 12px;
        position: unset;
        box-shadow: none;
        display: flex;
        height: auto;
        flex-direction: row;
        justify-content: center;
        background: transparent;
    }

    .bs-seo-page-link,
    .bs-seo-page-current {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
    }

    .bs-seo-page-arrow {
        min-width: 32px;
        padding: 0;
    }

    .bs-seo-page-ellipsis {
        min-width: 18px;
        height: 32px;
    }
}

/*
 * v2.4.6 manual numeric-page navigation stays inside the same document.
 * Chromium's View Transition API masks the unavoidable instant scroll from the
 * pager at the bottom back to the first row of the requested page. The real
 * href remains in the markup for SEO, no-JS use and open-in-new-tab.
 */
.bspage.bs-page-swapping {
    pointer-events: none;
}

.bspage.bs-page-swapping .bs-seo-pagination {
    opacity: 0.82;
}

@supports (view-transition-name: none) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 120ms;
        animation-timing-function: ease-out;
    }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.01ms;
    }
}
