/**
 * Category / PLP — BulkDevices Hyvä (deferred below-fold styles)
 * Critical: plp-critical.css
 */
:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .products-list .bb-plp-grid,
.bb-plp-grid--list {
    grid-template-columns: 1fr;
    gap: 0.875rem;
}

:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list {
    flex-direction: row;
    align-items: stretch;
}

:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__media,
:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__media {
    flex: 0 0 auto;
    position: relative;
    width: 6.5rem;
    min-width: 6.5rem;
    height: 6.5rem;
    min-height: 6.5rem;
    padding: 0;
    overflow: hidden;
    border-right: 1px solid var(--bb-plp-border, #e5e7eb);
    aspect-ratio: auto;
}

:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__img,
:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: calc(100% - 1.5rem) !important;
    max-height: calc(100% - 1.5rem) !important;
    margin: 0 !important;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__body,
:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__body {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 0.875rem 1rem;
    gap: 0.375rem;
}

:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__desc,
:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__desc {
    -webkit-line-clamp: 3;
}

:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__atc-form {
    margin-top: 0;
}

:is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__actions {
    align-items: stretch;
}

@media (min-width: 768px) {
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__media,
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__media {
        width: 9rem;
        min-width: 9rem;
        height: 9rem;
        min-height: 9rem;
    }

    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__img,
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__img {
        max-width: calc(100% - 1.5rem) !important;
        max-height: calc(100% - 1.5rem) !important;
    }

    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__body,
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(9.5rem, 12rem);
        grid-template-areas:
            "name price"
            "desc actions";
        column-gap: 1.5rem;
        row-gap: 0.5rem;
        align-items: start;
        padding: 1rem 1.25rem;
    }

    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__name,
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__name {
        grid-area: name;
        align-self: start;
    }

    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__desc,
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__desc {
        grid-area: desc;
        align-self: start;
    }

    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__price,
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__price {
        grid-area: price;
        margin: 0;
        font-size: 1.25rem;
        text-align: center;
        white-space: normal;
        align-self: start;
    }

    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__price-excl {
        font-size: 1.25rem;
    }

    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__atc-form,
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__body > .bb-product-card__cta,
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__body > .home-product-tabs__cta {
        grid-area: actions;
        justify-self: stretch;
        align-self: end;
        width: 100%;
        margin-top: 0;
    }

    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__cta.bb-pdp-quotation-trigger,
    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .home-product-tabs__cta.bb-pdp-quotation-trigger {
        grid-area: actions;
        justify-self: stretch;
        align-self: end;
        width: 100%;
        margin-top: 0;
    }

    :is(.catalog-category-view, .catalogsearch-result-index, .brand-view-index) .bb-product-card--list .bb-product-card__actions .bb-product-card__qty-selector {
        align-self: center;
    }
}
/* Category bottom text — full width below PLP columns (page.bottom.container) */
.page-bottom .plp-category-bottom {
    --bb-plp-bottom-accent: #eb7d1e;
    width: 100%;
    margin-top: 0;
    padding-bottom: 2rem;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.plp-category-bottom {
    --bb-plp-bottom-accent: #eb7d1e;
}

.plp-category-bottom__read-more {
    padding: clamp(2rem, 4vw, 3rem) 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.plp-category-bottom__container {
    width: 100%;
    max-width: 96rem;
    margin-inline: auto;
    padding-inline: 1.5rem;
    box-sizing: border-box;
}

.plp-category-bottom__inner {
    max-width: 56rem;
    margin-inline: auto;
}

.plp-category-bottom__title {
    margin: 0 0 1rem;
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: 700;
    line-height: 1.3;
    color: #1f2937;
}

.plp-category-bottom__title b,
.plp-category-bottom__title strong {
    font-weight: inherit;
}

.plp-category-bottom__lead,
.plp-category-bottom__more {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #4b5563;
}

.plp-category-bottom__lead {
    margin: 0 0 1rem;
}

.plp-category-bottom__lead a,
.plp-category-bottom__more a {
    color: var(--bb-plp-bottom-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.plp-category-bottom__more {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #e5e7eb;
}

.plp-category-bottom__more .category-heading-2,
.plp-category-bottom__more h2,
.plp-category-bottom__more h3 {
    margin: 1.25rem 0 0.75rem;
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
}

.plp-category-bottom__more .category-heading-2:first-child,
.plp-category-bottom__more h2:first-child,
.plp-category-bottom__more h3:first-child {
    margin-top: 0;
}

.plp-category-bottom__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bb-plp-bottom-accent);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.plp-category-bottom__toggle:hover {
    color: #c96a18;
}

.plp-category-bottom__toggle::after {
    content: "";
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -0.15rem;
}

.plp-category-bottom__toggle[aria-expanded="true"]::after {
    transform: rotate(-135deg);
    margin-top: 0.15rem;
}

.plp-category-bottom__toggle:focus-visible {
    outline: 2px solid var(--bb-plp-bottom-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.page-bottom .plp-category-faq {
    --bb-plp-bottom-accent: #eb7d1e;
    width: 100%;
    padding-bottom: 2.5rem;
    background: #ffffff;
}

.plp-category-faq__container {
    width: 70%;
    max-width: 96rem;
    margin-inline: auto;
    padding-inline: 1.5rem;
    box-sizing: border-box;
}

.plp-category-faq__heading {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    margin: 0 0 1rem;
    max-width: 56rem;
    margin-inline: auto;
}

.plp-category-faq__heading > span {
    flex-shrink: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #111827;
    padding-bottom: 0.4rem;
    border-bottom: 3px solid var(--bb-plp-bottom-accent);
}

.plp-category-faq__accordion {
    max-width: 56rem;
    margin-inline: auto;
}

.plp-category-faq__item {
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.plp-category-faq__item-title {
    margin: 0;
}

.plp-category-faq__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
    text-align: start;
    background: #f9fafb;
    border: none;
    cursor: pointer;
}

.plp-category-faq__trigger:hover {
    background: #f3f4f6;
}

.plp-category-faq__icon {
    flex-shrink: 0;
    padding: 0.125rem 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
}

.plp-category-faq__content {
    padding: 1rem 1.25rem 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #4b5563;
}

.plp-category-faq__content p {
    margin: 0 0 0.75rem;
}

.plp-category-faq__content p:last-child {
    margin-bottom: 0;
}

.plp-category-faq__static {
    max-width: 56rem;
    margin-inline: auto;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #4b5563;
}

/* Below-fold PLP sections — skip rendering until near viewport */
.page-bottom .plp-category-bottom,
.page-bottom .plp-category-faq {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}
