/* =========================================================
   Binoise linked products — V38
   Desktop: untouched original .sp-related-grid.bpc-linked-grid
   Mobile <= 820px: dedicated Swiper host, exactly 2 cards/view
   ========================================================= */

/* Never alter the original desktop grid here. */
.single-product .sp-linked-wrapper .bpc-linked-mobile-host {
    display: none;
}

@media (max-width: 820px) {
    .single-product .sp-linked-wrapper {
        overflow: hidden !important;
        padding-bottom: 18px !important;
    }

    .single-product .sp-linked-wrapper .sp-container {
        width: calc(100% - 16px) !important;
        max-width: none !important;
    }

    .single-product .sp-linked-wrapper .sp-related-head {
        min-height: auto !important;
        padding: 12px 12px 10px !important;
    }

    .single-product .sp-linked-wrapper .sp-related-head h2 {
        font-size: 17px !important;
        line-height: 1.55 !important;
    }

    .single-product .sp-linked-wrapper .sp-related-kicker {
        font-size: 9px !important;
    }

    .single-product .sp-linked-wrapper .sp-related-count {
        font-size: 10px !important;
        white-space: nowrap !important;
    }

    /* Original grid is only the storage/source on mobile. */
    .single-product .sp-linked-wrapper .sp-related-grid.bpc-linked-grid[data-bpc-linked-source] {
        display: none !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-host {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-swiper {
        width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        padding: 10px 8px 8px !important;
        box-sizing: border-box !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-swiper > .swiper-wrapper {
        display: flex !important;
        align-items: stretch !important;
        gap: 0 !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide {
        height: auto !important;
        min-width: 0 !important;
        display: flex !important;
        box-sizing: border-box !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide > .bpc-card {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 100% !important;
        border-radius: 16px !important;
        box-shadow: 0 2px 9px rgba(27, 31, 38, .035) !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide > .bpc-card:hover {
        transform: none !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-media {
        margin: 6px 6px 0 !important;
        border-radius: 12px !important;
        aspect-ratio: 1 / 1 !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-image-link {
        padding: 10px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist {
        top: 7px !important;
        right: 7px !important;
        width: 29px !important;
        height: 29px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist .yith-add-to-wishlist-button-block,
    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist .yith-wcwl-add-to-wishlist,
    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist .yith-wcwl-add-button,
    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist .yith-wcwl-wishlistaddedbrowse,
    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist .yith-wcwl-wishlistexistsbrowse,
    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist .yith-wcwl-add-to-wishlist-button,
    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist a,
    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist-fallback {
        width: 29px !important;
        height: 29px !important;
        min-width: 29px !important;
        min-height: 29px !important;
        border-radius: 9px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist .yith-wcwl-add-to-wishlist-button::before,
    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist a::before,
    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-wishlist-fallback::before {
        font-size: 20px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-badges {
        top: 7px !important;
        left: 7px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-badge {
        min-height: 22px !important;
        padding: 4px 6px !important;
        font-size: 8px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-body {
        min-height: 174px !important;
        padding: 9px 9px 10px !important;
        gap: 9px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-category {
        margin-bottom: 3px !important;
        font-size: 8px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-title {
        min-height: 38px !important;
        font-size: 10.5px !important;
        line-height: 1.75 !important;
        -webkit-line-clamp: 2 !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-meta-row {
        margin-top: 5px !important;
        min-height: 17px !important;
        gap: 3px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-meta-row .bpc-brand-row {
        max-width: 42% !important;
        overflow: hidden !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-brand {
        font-size: 7.5px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-rating {
        gap: 2px !important;
        min-height: 17px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-stars {
        font-size: 9px !important;
        letter-spacing: 0 !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-rating-value {
        font-size: 8px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-rating-count {
        display: none !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-bottom {
        min-height: 38px !important;
        padding-top: 7px !important;
        gap: 4px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-colors {
        max-width: 46% !important;
        min-height: 18px !important;
        gap: 3px !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-color {
        width: 13px !important;
        height: 13px !important;
        flex: 0 0 13px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-color-more {
        font-size: 7px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-price {
        min-width: 0 !important;
        gap: 1px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-price-current {
        font-size: 10.5px !important;
        line-height: 1.3 !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-price-regular {
        font-size: 7.5px !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-slide .bpc-view-cue {
        display: none !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-pagination {
        position: static !important;
        width: 100% !important;
        min-height: 18px !important;
        margin-top: 9px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-pagination .swiper-pagination-bullet {
        width: 6px !important;
        height: 6px !important;
        margin: 0 3px !important;
        background: #d5d8dd !important;
        opacity: 1 !important;
    }

    .single-product .sp-linked-wrapper .bpc-linked-mobile-pagination .swiper-pagination-bullet-active {
        width: 18px !important;
        border-radius: 999px !important;
        background: #fa7921 !important;
    }
}
