
//
//  Variables
//  _____________________________________________

//  Custom variables

@product-info-price: @color-gray34;
@indent__product-info: 15px;

//  Local variable. Moved to top of the file to use in multiple places.
@tocart-input-size: @button__line-height__l + 28px;

//  Default variables

@product-grid-items-per-row-layout-default: 2;

@product-grid-items-per-row-layout-1-screen-s: 3;
@product-grid-items-per-row-layout-1-screen-m: 4;
@product-grid-items-per-row-layout-1-screen-l: 5;

@product-grid-items-per-row-layout-2-left-screen-s: 3;
@product-grid-items-per-row-layout-2-left-screen-m: 4;
@product-grid-items-per-row-layout-2-left-screen-l: '';

@product-grid-items-per-row-layout-2-right-screen-s: 3;
@product-grid-items-per-row-layout-2-right-screen-m: 4;
@product-grid-items-per-row-layout-2-right-screen-l: '';

@product-grid-items-per-row-layout-3-screen-s: 3;
@product-grid-items-per-row-layout-3-screen-m: '';
@product-grid-items-per-row-layout-3-screen-l: '';

@product-grid-items-padding: 0 @indent__base @indent__base;
@product-grid-items-margin: 0 0 @indent__s;

@product-name-text-decoration: none;
@product-name-text-decoration-hover: @link__hover__text-decoration;

@toolbar-mode-icon-font-size: 26px;
@product-h1-margin-bottom-desktop: @indent__base;

@import 'module/_listings.less';
@import 'module/_toolbar.less';

//
//  Common
//  _____________________________________________

& when (@media-common = true) {

    //
    //  Category view
    //  ---------------------------------------------

    .old-price,
    .old.price {
        text-decoration: line-through;
    }

    // New: updated in Mage 2.1
    .prices-tier {
        .price-container {
            .price-including-tax {
                + .price-excluding-tax {
                    &:before {
                        content: '(' attr(data-label) ': ';
                    }

                    &:last-child:after {
                        content: ')';
                    }
                }
            }

            .weee[data-label] {
                display: inline;

                .price {
                    .lib-font-size(11);
                }

                &:before {
                    content: ' +' attr(data-label) ': ';
                }
            }
        }
    }

    .actual-price {
        font-weight: @font-weight__bold;
    }

    .product.name a {
        &:extend(.abs-product-link all);
    }

    .category {
        &-image {
            .image {
                max-width: 100%;
                height: auto;
                display: block;
            }
        }
        &-image,
        &-description {
            margin-bottom: @indent__base;
        }
    }

    //
    //  Product images general container
    //  ---------------------------------------------

    .product-image-container {
        display: inline-block;
        max-width: 100%;
    }

    .product-image-wrapper {
        display: block;
        height: 0;
        overflow: hidden;
        position: relative;
        z-index: 1;
    }

    .product-image-photo {
        display: block;
    }

    // "product-image-photo" has "position:absolute" only when inside "product-image-container"
    .product-image-container {
        .product-image-photo {
            bottom: 0;
            display: block;
            height: auto;
            left: 0;
            margin: auto;
            max-width: 100%;
            position: absolute;
            right: 0;
            top: 0;
        }
    }

    //
    //  Product view
    //  ---------------------------------------------

    .product.media {
        .product.photo .photo.image {
            &:extend(.abs-adaptive-images-centered);
        }
        .placeholder .photo.container {
            max-width: 100%;
        }
        .notice {
            .lib-css(color, @text__color__muted);
            .lib-font-size(@font-size__s);
            margin: @indent__s 0;
        }
        .product.thumbs {
            margin: @indent__base 0 @indent__l;
        }
        .items.thumbs {
            .lib-list-inline();
            .active {
                display: block;
                line-height: 1;
            }
        }
    }

    .product.info.detailed {
        clear: both;
        margin-bottom: 30px;
        .additional-attributes {
            width: auto;
            .lib-table-resize(
            @_th-padding-left: 0,
            @_th-padding-right: @indent__l,
            @_th-padding-bottom: @indent__s,
            @_td-padding-bottom: @indent__s
            );
        }
    }

    // New: TODO: remove in layout
    .block-bundle-summary .product-addto-links {
        display: none;
    }

    // New:
    .product-social-links
    {
        margin: 0 0 20px;
        text-align: center;
    }

    // New:
    // .product-info-main,
    // .product-options-bottom,
    // .block-bundle-summary,
    // .products.wrapper:not(.products-related):not(.products-upsell) .product-items .item, // TODO: remove
    .product-social-links, // Alternative for other containers in product view
    .product-items .item, // Alternative for ".product-item" which can be not present in product listings
    .product-items .product-item
    {
        .action.tocompare {
            &:extend(.abs-actions-addto-gridlist all);
            .lib-icon-font-symbol(
                @icon-compare-full
            );
        }
    }

    // New: hide "add to" icons in selected blocks
    .product-items[class*="widget"],
    .products-related,
    .products-upsell {
        .product-item-actions {
            .action.towishlist,
            .action.tocompare {
                display: none;
            }
        }
    }


    .product-info-main {

        //
        //  New: styles for "product-info-price" and
        //  "product-info-stock-sku" blocks similar to Luma theme
        //  ---------------------------------------------

        // // .product-info-price {
        // //     .price-box {
        // //         // display: table-cell;
        // //         // vertical-align: top;
        // //         .price-final_price > span {
        // //             display: block;
        // //             margin-bottom: @indent__xs;
        // //             &:last-child {
        // //                 margin-bottom: 0;
        // //             }
        // //         }
        // //     }
        // //     .price-including-tax + .price-excluding-tax,
        // //     .weee + .price-excluding-tax,
        // //     .weee {
        // //         .lib-font-size(14);
        // //         .price {
        // //             .lib-font-size(14);
        // //             font-weight: @font-weight__semibold;
        // //             line-height: 16px;
        // //         }
        // //     }
        // //     .price-wrapper .price {
        // //         .lib-font-size(22);
        // //         font-weight: @font-weight__semibold;
        // //         line-height: 22px;
        // //     }
        // //     .old-price {
        // //         .price-wrapper .price {
        // //             .lib-font-size(20);
        // //             font-weight: @font-weight__light;
        // //         }
        // //         .price-label {
        // //             &:after {
        // //                 content: ": ";
        // //             }
        // //         }
        // //     }
        // //     .special-price {
        // //         .price-label {
        // //             &:after {
        // //                 content: ": ";
        // //             }
        // //         }
        // //     }
        // // }

        // // // New: styles for "product-info-price" and "product-info-stock-sku" blocks similar to Luma theme
        // // .product-info-price {
        // //     border-bottom: 1px @global-border-color__light solid;
        // //     &:extend(.abs-global-border-color-light all);
        // //     display: table;
        // //     width: 100%;
        // //     .lib-css(color, @product-info-price);
        // //     margin-bottom: @indent__s + @indent__xs;

        // //     .price-box {
        // //         display: table-cell;
        // //         vertical-align: top;
        // //     }
        // // }
        // // .product-info-stock-sku {
        // //     display: table-cell;
        // //     vertical-align: top;
        // //     min-width: 15rem;
        // //     text-align: right;
        // //     padding-left: 10%;
        // //     padding-bottom: @indent__s;
        // // }

        // // .stock {
        // //     margin: 0 0 3px;
        // //     &.available,
        // //     &.unavailable {
        // //         font-weight: @font-weight__bold;
        // //         text-transform: uppercase;
        // //     }
        // // }
        // // .availability.only {
        // //     margin: 0 0 3px;
        // //     strong {
        // //         font-weight: normal;
        // //     }
        // // }
        // // .product.attibute.sku {
        // //     word-wrap: break-word;
        // // }
        // // .product {
        // //     &-add-form {
        // //         //padding-top: @indent__s + @indent__xs;
        // //         clear: both;
        // //         border-bottom: 1px @global-border-color__light solid;
        // //         &:extend(.abs-global-border-color-light all);
        // //         margin-bottom: @indent__s;
        // //     }
        // //     &.attibute {
        // //         &.sku {
        // //             .type {
        // //                 font-weight: normal;
        // //                 margin-right: @indent__xs;
        // //                 &:after {
        // //                     content: ':';
        // //                 }
        // //             }
        // //             .value {
        // //                 display: inline-block;
        // //             }
        // //         }
        // //         &.overview {
        // //             margin: @indent__base 0;
        // //         }
        // //     }
        // //     &.alert {
        // //         margin: @indent__s 0;
        // //     }
        // // }

        //
        //  New: styles for "product-info-price"
        //  and "product-info-stock-sku" blocks
        //  ---------------------------------------------

        .product-info-price {
            margin-bottom: @indent__product-info;
            .price-box {
                // Remove bottom space - button block already has spacing
                padding-bottom: 0;
                margin-bottom: 0;
            }
        }
        .product-info-stock-sku {
            margin-top: @indent__product-info;
            padding-bottom: @indent__product-info;
            margin-bottom: @indent__product-info;
            border-bottom: 1px @global-border-color__light solid;
            &:extend(.abs-global-border-color-light all);

            > * {
                display: inline-block;
                vertical-align: top;
                margin-right: 10px;
                &:last-child {
                    margin-right: 0;
                }
            }
        }

        .stock {
            &.available,
            &.unavailable {
                //display: inline-block;
                font-weight: @font-weight__bold;
                //margin-right: @indent__base;
                text-transform: uppercase;
                //vertical-align: top;
            }
        }
        .product {
            &.attribute, // New: fixed class name (Mage 2.1)
            &.attibute {
                &.sku {
                    //vertical-align: top;
                    .lib-css(color, @text__color__muted);
                    > .value {
                        display: inline-block;
                        vertical-align: top;
                    }
                    .type {
                        font-weight: normal;
                        display: inline-block;
                        margin-right: 2px;
                    }
                }
                &.overview {
                    margin: @indent__product-info 0;
                }
            }
            &.alert {
                margin: @indent__s 0;
            }
        }
        .availability.only {
            strong {
                font-weight: normal;
            }
        }

        //
        //  Other styles in the main section
        //  ---------------------------------------------

        .page-title-wrapper {
            .page-title {
                margin-bottom: @indent__base;
                // line-height: @line-height__base;
                line-height: 44px; // New
            }
        }
        .product {
            &-reviews-summary {
                margin-top: @indent__s;
                margin-bottom: @indent__s;
            }
            &-add-form {
                clear: both;
                border-bottom: 1px @global-border-color__light solid;
                &:extend(.abs-global-border-color-light all);
                margin-bottom: @indent__s;
            }
        }
        .swatch-opt {
            margin-top: @indent__s;
        }

        // If short description follows rating, remove margin
        // to pull ratings closer and reduce the gap.
        .product-reviews-summary + .product.attribute.overview, // New: fixed class name (Mage 2.1)
        .product-reviews-summary + .product.attibute.overview {
            margin-top: 0;
        }

    }

    .product-options-wrapper {
        .fieldset-product-options-inner {
            .legend {
                .lib-css(font-weight, @font-weight__bold);
                .lib-css(margin, 0 0 @indent__xs);
                .lib-font-size(14px);
                border: none;
                display: inline-block;
                float: none;
                padding: 0;
            }

            // New: added "_required" class (added in Mage 2.1)
            &.required,
            &._required {
                .legend {
                    &:after {
                        content: '*';
                        .lib-typography(
                        @_font-size: @form-field-label-asterisk__font-size,
                        @_color: @form-field-label-asterisk__color,
                        @_font-family: @form-field-label-asterisk__font-family,
                        @_font-weight: @form-field-label-asterisk__font-weight,
                        @_line-height: @form-field-label-asterisk__line-height,
                        @_font-style: @form-field-label-asterisk__font-style
                        );
                        .lib-css(margin, @form-field-label-asterisk__margin);
                    }
                }
            }
        }
        .field {
            .note {
                display: block;
            }
            .price-notice {
              &:extend(.abs-adjustment-incl-excl-tax all);
            }
        }
    }

    .product-info-main,
    .product-options-bottom {

        // Based on original price styles from Blank theme
        
        .product-items .price-box, // New: force proper price size in product listings
        .price-box {
            .price-including-tax + .price-excluding-tax,
            .weee + .price-excluding-tax,
            .weee {
                // .lib-font-size(12);
                // margin-bottom: @indent__xs;
                // line-height: 14px;
                .lib-font-size(14);

                .price {
                    .lib-font-size(14);
                    line-height: 16px;
                    font-weight: normal;
                }
            }
        }

        .price-box {
            .price-wrapper .price {
                .lib-font-size(26);
                line-height: 26px;
                font-weight: normal;
            }
            .price-including-tax + .price-excluding-tax {
                //color: @text__color__muted;
                color: inherit;
                .price {
                    color: inherit;
                }
            }
        }

        .special-price {
            display: block;
            margin: 0 0 3px;
            .price-container {
                .lib-font-size(20);
                line-height: 20px;
                .price {
                    .lib-font-size(20);
                    line-height: 20px;
                }
            }
            .price-label + .price-wrapper {
                display: inline-block;
            }
        }

        .old-price {
            .price-container {
                .lib-font-size(20);
                line-height: 20px;
                .price {
                    .lib-font-size(20);
                    line-height: 20px;
                }
            }
            .price-label {
                display: none;
            }
        }

        .old-price,
        .special-price {
            .price-label {
                &:after {
                    content: ": ";
                }
            }
        }

        .table.grouped .price-box {
            .price {
                .lib-font-size(14);
                line-height: 14px;
                font-weight: @font-weight__bold;
            }
        }

        .box-tocart {
            margin: @indent__base 0;
            .field.qty {
                padding-right: .75 * @indent__base;

                .label {
                    display: inline-block;
                }
                .control {
                    display: inline-block;
                    margin-left: 5px;
                }
            }
            .input-text.qty {
                width: @tocart-input-size + 2px;
                height: @tocart-input-size + 2px;
                text-align: center;
            }
            .actions {
                text-align: center;
            }
            .action.tocart {
                &:extend(.abs-button-l all);

                //New:
                min-width: 170px;
                font-weight: @font-weight__semibold;
            }

            // New
            div.mage-error[generated] {
                display: inline;
            }
        }

        // .product-addto-links {
        //     margin: @indent__base 0;
        // }
        // .action.tocompare {
        //     &:extend(.abs-action-addto-product all);
        //     vertical-align: top;
        // }

        // New:
        .product-addto-links {
            display: inline;
            .action {
                margin-right: 7px;
                &:last-child {
                    margin-right: 0;
                }
            }
        }
        .action.mailto.friend {
            display: inline-block;
        }
        .product-addto-links + .action.mailto.friend {
            margin-left: 7px;
        }
    }

    // New
    .table.grouped,
    .bundle-options-container {
        .input-text.qty {
            width: @tocart-input-size + 2px;
            height: @tocart-input-size + 2px;
        }
    }

    // New:
    // Hide special price label on product page of configurable products
    .page-product-configurable {
        .special-price {
            .price-label {
                display: none;
            }
        }
    }

    // New:
    .bundle-options-container .price-box {
        margin-top: 10px;
        .price-wrapper .price {
            .lib-font-size(26);
            line-height: 26px;
            font-weight: normal;
        }
        .price-including-tax + .price-excluding-tax {
            .lib-font-size(14);
            line-height: 16px;
            font-weight: normal;
        }
    }

    // New:
    // Price styles from Luma

    // // .product-options-bottom .price-box,
    // // .product-info-price .price-box {
    // //     .lib-css(color, @product-info-price);
    // //     display: table-cell;
    // //     vertical-align: top;
    // //     padding-bottom: @indent__s;
    // //     .old-price {
    // //         font-size: 20px;
    // //         font-weight: @font-weight__light;
    // //         .price-container > span {
    // //             display: inline-block;
    // //         }
    // //     }
    // //     .price-container {
    // //         > span {
    // //             display: block;
    // //             margin-bottom: @indent__xs;
    // //             &:last-child {
    // //                 margin-bottom: 0;
    // //             }
    // //         }
    // //         .price {
    // //             font-size: 22px;
    // //             line-height: 22px;
    // //             font-weight: @font-weight__semibold;
    // //         }
    // //         .price-including-tax + .price-excluding-tax,
    // //         .weee + .price-excluding-tax,
    // //         .weee {
    // //             .lib-font-size(12);
    // //             line-height: 14px;
    // //             .price {
    // //                 .lib-font-size(12);
    // //                 font-weight: @font-weight__bold;
    // //             }
    // //         }
    // //     }
    // // }

    // New: updated in Mage 2.1
    .prices-tier {
        &:extend(.abs-reset-list all);
        .lib-css(background, @sidebar__background-color);
        margin: @indent__s 0;
        padding: @indent__s (.75 * @indent__base);

        .price-container {
            display: inline-block;
        }

        .price-including-tax,
        .price-excluding-tax,
        .weee {
            display: inline-block;

            .price {
                .lib-font-size(14);
                font-weight: @font-weight__bold;
            }
        }
    }

    .ui-dialog-titlebar-close {
        .lib-button-as-link();
    }

    .block.related {
        .action.select {
            margin: 0;
            //margin: 0 @indent__xs;
            // New:
            &:extend(.abs-action-button-as-link all);
        }

        // New:
        .block-actions {
            color: @color-gray64;
            display: inline;
            font-size: 1.4rem;
            margin-left: 0;
            
            .label {
                display: none;
            }
        }

        // New:
        .block-title > strong {
            margin-right: 3px;
        }
    }

    //
    //  Sidebar product view
    //  ---------------------------------------------

    .sidebar {
        .product-items {
            .product-item {
                margin-bottom: @indent__base;
                position: relative;
                &-info {
                    position: relative;
                    width: auto;
                    .product-item-photo {
                        position: absolute;
                        left: 0;
                        top: 0;
                    }
                }
                &-name {
                    margin-top: 0;
                }
                &-details {
                    margin: 0 0 0 85px;
                }
                &-actions {
                    display: block;
                    margin-top: @indent__s;
                }
            }
            .price-box {
                display: block;
                margin: 7px 0;
            }
            .text {
                margin-right: 8px;
            }
            .counter {
                .lib-css(color, @primary__color__lighter);
                .lib-font-size(12);
                white-space: nowrap;
            }
            .minilist {
                .price {
                    display: inline;
                    padding: 0;
                }
                .weee:before {
                    display: inline-block;
                }
            }
        }
        .action {
            &.delete {
                &:extend(.abs-remove-button-for-blocks all);
                position: absolute;
                right: 0;
                top: 0;
            }
        }
        .subtitle {
            &:extend(.abs-no-display all);
        }

        //
        //  Product images only
        //  ---------------------------------------------

        .product-items-images {
            &:extend(.abs-add-clearfix all);
            margin-left: -@indent__xs;
            .product-item {
                &:extend(.abs-add-box-sizing all);
                float: left;
                padding-left: @indent__xs;
            }
        }

        //
        //  Product names only
        //  ---------------------------------------------

        .product-items-names {
            .product-item {
                margin-bottom: @indent__s;
            }
            .product-item-name {
                margin: 0;
            }
        }
    }

}

//
//  Mobile
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
    .catalog-product-view {
        .column.main {
            .lib-vendor-prefix-display(flex);
            .lib-vendor-prefix-flex-direction(column);
        }
        .product.media {
            .lib-vendor-prefix-order(-1);
        }
    }
    .product-info-main .box-tocart {
        .actions {
            .action.tocart {
                &:extend(.abs-button-responsive-smaller all);
            }
        }
    }
    .block.related {
        .action.select {
            // margin: @indent__xs 0;
            // display: block;
            // display: inline; // New:
        }

        // // New:
        // .block-actions {
        //     display: inline-block;
        //     margin-left: 0;
        // }
    }

    .product-items .item .action.tocompare, // New
    .actions-secondary > .action.tocompare, // New: link placed outside standard wrappers (e.g. outside "product-item-actions")
    .compare,
    .product-addto-links .action.tocompare,
    .product-item-actions .actions-secondary > .action.tocompare,
    //[class*='block-compare'] { // New: changed to single quote (added in Mage 2.1)
    [class*="block-compare"] {
        display: none;
    }

    // New: 
    // Order of columns in mobile view
    .product-img-column {
        .lib-vendor-prefix-order(0);
    }
    .product-primary-column {
        .lib-vendor-prefix-order(1);
    }
    .product-lower-primary-column {
        .lib-vendor-prefix-order(2);
    }
    .product-secondary-column {
        .lib-vendor-prefix-order(3);
    }
    .product-lower-secondary-column {
        .lib-vendor-prefix-order(4);
    }

    .product-img-column {
        margin-bottom: 30px;
    }

}

//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {

    // New: 
    // Inline quantity box and button
    .product-info-main,
    .product-options-bottom {

        .box-tocart {
            display: table;

            .field.qty {
                display: table-cell;

                .label {
                    display: inline-block;
                }
                .control {
                    display: inline-block;
                    margin-left: 5px;
                }
            }

            .actions {
                display: table-cell;
                padding-top: 0; // Neutralize default top padding of the button box
                text-align: center;
                vertical-align: bottom;
            }
        }

        // Align button on the left side
        .box-tocart {
            .field.qty {
                float: right;
                padding-left: 10px;
                padding-right: 0;
                margin-bottom: 0;
            }
            .actions {
                float: left;
            }
        }
    }

    // New:
    .product-social-links {
        text-align: left;
    }

    // New:
    // Price styles from Luma

    // // .product-options-bottom,
    // // .product-info-price {
    // //     .price-box {
    // //         .price-container {
    // //             font-size: @font-size__xl;
    // //             .price {
    // //                 font-size: 36px;
    // //                 line-height: 36px;
    // //             }
    // //         }
    // //         .price-including-tax + .price-excluding-tax {
    // //             .price {
    // //                 .lib-font-size(14);
    // //                 line-height: 16px;
    // //             }
    // //         }
    // //     }
    // // }

    .product-info-main {
        .page-title-wrapper {
            .page-title {
                //margin-top: -13px;
                margin-top: -6px; // Align it with top edge of the main image
                // New
                font-size: 3.2rem;
            }
        }
    }

    .sidebar {
        .product-items {
            .product-item {
                &-info {
                    .product-item-photo {
                        position: relative;
                        left: auto;
                        top: auto;
                        float: left;
                        margin: 0 @indent__s @indent__s 0;
                    }
                }
                &-details {
                    margin: 0;
                }
                &-actions {
                    clear: left;
                }
            }
        }
    }

    .product-add-form {
        &:extend(.abs-revert-field-type-desktop all);
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
    .product-info-main,
    .product-options-bottom {
        .box-tocart {
            .action.tocart {
                min-width: 190px;
            }
        }
    }
}

//
//  Desktop large
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__xl) {
    .sidebar {
        .product-items {
            .product-item {
                &-info {
                    .product-item-photo {
                        float: none;
                        margin: 0;
                        position: absolute;
                        left: 0;
                        top: 0;
                    }
                }
                &-details {
                    margin-left: 85px;
                }
            }
        }
    }
}

//
//  Category page layout
//  ---------------------------------------------

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {

    // .product-info-main {
    //     float: right;
    // }

    // .product.media {
    //     float: left;
    //     margin-bottom: @indent__m;
    // }

    // .page-layout-1column {
    //     .product-info-main {
    //         width: 40%;
    //     }
    //     .product.media {
    //         width: 57%;
    //     }
    // }

    // .page-layout-2columns-left,
    // .page-layout-2columns-right,
    // .page-layout-3columns {
    //     .product-info-main {
    //         width: 48%;
    //     }
    //     .product.media {
    //         width: 50%;
    //     }
    // }

    // New:
    .product-img-column,
    .product-primary-column,
    .product-secondary-column {
        margin-bottom: @indent__m;
    }
    // To prevent collapsing column, add minimal padding to the column
    .product-img-column {
        padding-bottom: 1px;
    }
    // Alternative: insert additional element into a column, it will prevent collapsing column
    .non-collapsing-column-placeholder {
        padding-bottom: 1px;
        height: 1px;
        min-height: 1px;
    }

}

//
//  Common
//  _____________________________________________

& when (@media-common = true) {

    //
    //  Compare Products Page
    //  ---------------------------------------------

    body.catalog-product-compare-index {
        .action.print {
            float: right;
            margin: 15px 0;
        }
    }

    .table-wrapper.comparison {
        clear: both;
        max-width: 100%;
        overflow-x: auto;
    }

    .table-comparison {
        table-layout: fixed;

        .cell.label.remove,
        .cell.label.product {
            span {
                &:extend(.abs-visually-hidden all);
            }
        }

        .cell.label,
        td:last-child {
            border-right: @table__border-width @table__border-style @table__border-color;
        }

        .cell {
            width: 140px;
            padding: 15px;
            .attribute.value, // New: fixed class name (Mage 2.1)
            .attibute.value {
                width: 100%;
                overflow: hidden;
            }

            &.product.info,
            &.product.label {
                border-bottom: @table__border-width @table__border-style @table__border-color;
            }
            &.label {
                .attribute.label {
                    display: block;
                    width: 100%;
                    word-wrap: break-word;
                }
            }
            &.attribute {
                .lib-font-size(13);
                img {
                    max-width: 100%;
                    height: auto;
                }
            }
        }

        .product-item-photo {
            display: block;
            margin: 0 auto 15px;
        }
        .product-image-photo {
            margin-left: 0;
        }

        .product-item-actions,
        .price-box,
        .product.rating,
        .product-item-name {
            display: block;
            margin: 15px 0;
        }

        .product-addto-links {
            margin-top: 15px;

            .action.split,
            .action.toggle {
                .lib-button-s();
            }

            .action.toggle {
                padding: 0;
            }
        }

        .cell.remove {
            padding-top: 0;
            padding-bottom: 0;
            text-align: right;
            .action.delete {
                &:extend(.abs-remove-button-for-blocks all);
            }
        }
        .product-item-actions {
            > .actions-primary {
                + .actions-secondary {
                    margin-top: @indent__s;
                }
            }
        }
        .action {
            &.tocart {
                white-space: nowrap;
            }
        }
    }

    .comparison.headings {
        .lib-css(background, @page__background-color);
        left: 0;
        position: absolute;
        top: 0;
        width: auto;
        z-index: 2;
    }

    .block-compare {
        .block-title {
            &:extend(.abs-block-title all);
        }
        .product-item .product-item-name {
            margin-left: 22px;
        }
        .action {
            &.delete {
                &:extend(.abs-remove-button-for-blocks all);
                position: absolute;
                left: -6px;
                top: 0;
            }
            &.compare {
                &:extend(.abs-revert-secondary-color all);
            }
        }
        .counter {
            &:extend(.abs-block-items-counter all);
        }
        .actions-toolbar {
            margin: 17px 0 0;
        }
    }
}
