/* =========================================================
   PB_PDP_VIEWED_DESKTOP_FINAL_V9

   PDP Viewed Products only.
   Desktop >= 768px only.

   Default:
   - image + wishlist only
   - no quantity/cart controls

   Hover:
   - quantity + Add to cart
   - same interaction style as Related Products

   Mobile <= 767.98px:
   - untouched
   ========================================================= */

@media screen and (min-width: 768px) {

    /* -----------------------------------------------------
       CARD TOP
       ----------------------------------------------------- */

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .product-miniature__top {
        position: relative !important;
        overflow: hidden !important;
    }


    /* -----------------------------------------------------
       REMOVE QUICK VIEW UI
       ----------------------------------------------------- */

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .product-miniature__quickview-button,

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .product-miniature__quickview-touch,

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    [data-ps-action="open-quickview"],

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .js-quickview {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }


    /* -----------------------------------------------------
       ACTIONS HIDDEN BY DEFAULT
       ----------------------------------------------------- */

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .product-miniature__actions {
        position: absolute !important;

        left: 14px !important;
        right: 14px !important;
        bottom: 14px !important;

        width: auto !important;

        margin: 0 !important;
        padding: 0 !important;

        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;

        transform: translateY(8px) !important;

        transition:
            opacity .18s ease,
            transform .18s ease,
            visibility .18s ease !important;

        background: transparent !important;

        z-index: 70 !important;
    }


    /* -----------------------------------------------------
       FORM HIDDEN BY DEFAULT TOO
       ----------------------------------------------------- */

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .product-miniature__form {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;

        align-items: stretch !important;

        width: 100% !important;
        height: 48px !important;

        margin: 0 !important;
        padding: 0 !important;

        gap: 0 !important;

        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;

        transform: translateY(8px) !important;

        background: #ffffff !important;

        border: 0 !important;
        border-radius: 24px !important;

        overflow: hidden !important;

        box-shadow:
            0 5px 18px rgba(0,0,0,.12) !important;

        transition:
            opacity .18s ease,
            transform .18s ease,
            visibility .18s ease !important;
    }


    /* -----------------------------------------------------
       SHOW ON CARD HOVER
       ----------------------------------------------------- */

    html body#product
    section.ps-viewedproduct
    article.product-miniature:hover
    .product-miniature__actions,

    html body#product
    section.ps-viewedproduct
    article.product-miniature:hover
    .product-miniature__form {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;

        transform: translateY(0) !important;
    }


    /* -----------------------------------------------------
       QUANTITY
       ----------------------------------------------------- */

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .quantity-button {
        display: flex !important;

        flex: 1 1 auto !important;

        width: auto !important;
        min-width: 0 !important;

        height: 48px !important;

        margin: 0 !important;
        padding: 0 !important;

        background: #ffffff !important;

        border: 0 !important;
        border-radius: 0 !important;

        overflow: hidden !important;
    }


    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .quantity-button__group,

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .quantity-button
    .input-group {
        display: grid !important;

        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        width: 100% !important;
        height: 48px !important;

        margin: 0 !important;
        padding: 0 !important;

        gap: 0 !important;
    }


    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .quantity-button
    button {
        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        height: 48px !important;

        margin: 0 !important;
        padding: 0 !important;

        background: #ffffff !important;
        color: #171315 !important;

        border: 0 !important;
        border-radius: 0 !important;

        box-shadow: none !important;

        font-size: 18px !important;
        line-height: 1 !important;
    }


    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .quantity-button
    input {
        width: 100% !important;
        height: 48px !important;

        margin: 0 !important;
        padding: 0 !important;

        background: #ffffff !important;
        color: #171315 !important;

        border-top: 0 !important;
        border-bottom: 0 !important;

        border-left:
            1px solid #e7e7e7 !important;

        border-right:
            1px solid #e7e7e7 !important;

        border-radius: 0 !important;

        text-align: center !important;

        font-size: 16px !important;
        line-height: 48px !important;

        box-shadow: none !important;
    }


    /* -----------------------------------------------------
       ADD TO CART
       ----------------------------------------------------- */

    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .product-miniature__form
    button.product-miniature__add[
        data-button-action="add-to-cart"
    ] {
        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        gap: 9px !important;

        flex: 0 0 46% !important;

        width: 46% !important;
        min-width: 130px !important;
        max-width: 46% !important;

        height: 48px !important;

        margin: 0 !important;
        padding: 0 18px !important;

        background: #171315 !important;
        color: #ffffff !important;

        border: 0 !important;
        border-radius: 0 !important;

        box-shadow: none !important;

        opacity: 1 !important;
        visibility: visible !important;

        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1 !important;

        white-space: nowrap !important;
    }


    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .product-miniature__add
    .material-icons {
        display: block !important;

        margin: 0 !important;
        padding: 0 !important;

        color: #ffffff !important;

        font-size: 21px !important;
        line-height: 1 !important;
    }


    html body#product
    section.ps-viewedproduct
    article.product-miniature
    .product-miniature__add-text {
        display: inline-flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: auto !important;
        height: auto !important;

        margin: 0 !important;
        padding: 0 !important;

        color: #ffffff !important;

        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1 !important;

        white-space: nowrap !important;
    }

}

/* PB_PDP_VIEWED_DESKTOP_FINAL_V9_END */
