.woocommerce.single-product {

    section {
        margin: 25px 0;
    }

    table {
        border-collapse: collapse;
        margin: 20px auto;
        table-layout: auto;
        width: 100%;

        thead {
            @include media ('<=phone') {
                display: none;
            }
        }

        th,
        td {
            font-family: $font-family-primary;
            padding: 10px;
            text-align: left;
            @include media ('<=phone') {
                text-align: right;
            }
        }
    }

    @include media ('<=phone') {

        /* Force table to not be like tables anymore */
        table, thead, tfoot, tbody, th, td, tr {
            display: block;
        }

        /* Hide table headers (but not display: none;, for accessibility) */
        thead tr {
            display: none;

            &:first-child {
                display: block;
                padding: 10px;
                padding-left: 0;
            }
            td {
                &:first-child {
                    padding-left: 0;
                }
            }
        }

        td {
            /* Behave  like a "row" */
            border: none;
            position: relative;
            padding-left: 50%;
        }

        td:before {
            /* Now like a table header */
            position: absolute;
            /* Top/left values mimic padding */
            top: 6px;
            left: 6px;
            //width: 45%;
            padding-right: 10px;
            white-space: nowrap;
        }

        tbody th {
            float: left;
        }

    }

    .product-details  {
        margin-top: 0;
        @include media('>=tablet') {
            padding-top: 50px;
        }

        .zoom {
            display: none;

            bottom: 46px;
            cursor: pointer;
            position: absolute;
            right: 22px;
            background-color: rgba($white,0.5);
            padding: 5px;
            font-weight: bold;
            font-size: 12px;
            text-transform: uppercase;

            i {
                margin-right: 10px;
                color: $brand-primary;
            }

        }

        .slick-vertical {
            .btn-prev:before {
                content: "\f102";
                font-family: 'font awesome 5 pro';
                font-weight: 300;
            }
            .btn-next:before {
                content: "\f103";
                font-family: 'font awesome 5 pro';
                font-weight: 300;
            }
            .twist-video-thumb:after {
                top: 13px;
                right: 26px;
                font-size: 48px;
            }
        }
    }

    .product-images {
        margin-bottom: 20px;
        @include media('>=tablet') {
            margin-bottom: 0;
        }

        ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .pimage-wrap {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            width: 100%;
            height: 100%;
        }

        .product-images-wrap {
            width: 300px;
            height: 300px;
            position: relative;
            margin: 0 auto;
            @include media('>=tablet') {
                margin: 0;
            }

            .pimage {
                width: 100%;
                height: 100%;
                position: absolute;
                left: 0;
                top: 0;

                .text {
                    font-size: 3em;
                }
            }
        }

        .product-images-thumbs {
            width: 300px;
            height: 90px;
            display: block;
            margin: 0 auto;
            @include media('>=tablet') {
                margin: 0;
            }

            .pthumb {
                display: inline-block;
                vertical-align: top;
                width: 100px;
                height: 90px;
                box-sizing: border-box;
                border: 1px solid $gray-light;
                cursor: pointer;

                &.active {
                    border-color: $blue;
                }
            }
        }
    }

    .product-description {
        .product-title-header {
            padding-bottom: 15px;
            border-bottom: 1px solid #ddd;
            margin-bottom: 20px;
        }

        h1 {
            font-size: 1.25rem;
            font-weight: normal;
            margin-bottom: 10px;
            @include media('>=tablet') {
                font-size: 1.75rem;
                margin-bottom: 0;
            }
        }

        .product-price {
            font-size: 12px;
            margin-bottom: 5px;
            text-align: right;

            p {
                margin: 0 0 2px;
            }

            .price-block {
                line-height: 1.1;
                margin-bottom: 5px;

                .amount {
                    font-family: $font-family-primary;
                    color: $red;
                    display: inline-block;
                    font-size: 24px;
                    margin: 0;
                    padding: 0 10px 0 0;
                }

                .exvat {
                    display: inline-block;
                }
            }

            .ppu {
                font-family: $font-family-primary;
                font-size: 1rem;
                color: #666;

                .price {
                    font-size: 1.5em;
                    color: $red;
                    margin: 0 4px;
                }

                .exvat {
                    font-size: 0.875em;
                    font-weight: 200;
                    margin-left: 4px;
                    display: block;
                }
            }

        }

        .stock-status {
            min-height: 26px;
            line-height: 1;
            padding: 7px 15px 5px;
            float: right;
            cursor: default;

            i {
                line-height: 1;
            }
        }


        .product-data {
            font-family: $font-family-primary;

            tr {
                position: relative;
            }

            th,
            td {
                font-size: 16px;
                margin-left: 0;
                margin-right: 0;
                padding: 0;
                width: 50%;
            }


            th {
                font-size: 12px;
                font-weight: 200;
                text-transform: uppercase;
                line-height: normal;
                width: auto;
                position: absolute;
                left: 5px;
                top: 50%;
                transform: translateY(-50%);
                @include media ('>=tablet') {
                    padding: 0 0 4px 0;
                    width: 40%;
                    position: static;
                    transform: none;
                }
            }

            td {
                font-size: 14px;
                font-weight: 600;
                width: 100%;
                padding: 5px 5px 5px 40%;
                border-bottom: 1px solid #eee;
                @include media ('>=tablet') {
                    width: 60%;
                    padding: 0 0 4px 0;
                    margin-left: 0;
                    vertical-align: top;
                    border: 0 none;
                }

                .brand-link {
                    min-height: 0;
                    line-height: 1.1;
                    padding: 7px 10px 4px;
                }
            }
        }

        .tiered-pricing {
            clear: right;
            font-size: 12px;
            margin: 0;
            padding: 15px 0 0;
            width: 100%;

            @include media ('<tablet') {
                td:nth-of-type(1):before { content: "QTY"; }
                td:nth-of-type(2):before { content: "DISCOUNT"; }
                td:nth-of-type(3):before { content: "PRICE"; }
                td:nth-of-type(4):before { content: "Price per unit"; }

                td:before {
                    font-size: 10px;
                    color: $black;
                    text-transform: uppercase;
                }
            }

            h3 {
                font-family: $font-family-primary;
                font-size: 14px;
                font-weight: 300;
                color: $black;
                text-align: left;
                text-transform: uppercase;
                margin: 0 10px 4px 0;
                padding-bottom: 0;

                .tier-sku {
                    font-weight: bold;
                }
            }

            table {
                margin-top: 0;

                th,
                td {
                    padding: 5px 10px;

                    &.ppu {
                        text-align: right;
                    }
                }

                thead {
                    tr {
                        border-top: 0.5px solid $gray-light;
                        text-transform: uppercase;

                        th {
                            font-size: 10px;
                            font-weight: 400;
                        }
                    }
                }

                tbody {
                    tr {
                        td {
                            font-size: 12px;
                            border-bottom: 1px solid #f4f4f4;
                            @include media('>=tablet') {
                                border-bottom: 0 none;
                            }

                            &.ppu {
                                color: $red;
                            }
                        }

                        &:nth-of-type(odd) {
                            td {
                                border-color: #fff;
                            }
                        }
                    }
                }
            }
        }
    }

    .product-variations {
        margin-bottom: 50px;
        @include media('>=widescreen') {
            margin-bottom: 100px;
        }

        .variations-table {
            border: 1px solid $blue;
            margin: 0;
            padding: 0px;
            position: relative;
            @include media('>=tablet') {
                padding: 0 15px;
            }

            table {
                margin-top: 0;
                margin-bottom: 10px;

                @include media('>=tablet') {

                    th,
                    td {
                        &.sku {
                            width: 20%;
                        }

                        &.availability {
                            width: 27%;
                        }

                        &.refresh {
                            width: 15%;
                        }

                        &.price {
                            width: 30%;
                        }

                        &.qty {
                            width: 8%;
                            padding-left: 2%;
                        }
                    }

                }

                thead {
                    tr {
                        border-bottom: 1px solid rgba($blue, 0.2);

                        th {
                            font-size: 12px;
                            font-weight: normal;
                            text-transform: uppercase;
                            padding: 18px 10px 4px;

                            &.price {
                                text-align: right;
                            }
                        }
                    }
                }

                tbody {
                    tr {
                        border-bottom: 1px solid rgba($blue, 0.4);
                        @include media('>=tablet') {
                            border-bottom: 1px solid rgba($blue, 0.2);
                        }
                        @include media('>=desktop') {
                            &:hover {
                                background: #f4f4f4;
                            }
                        }

                        &.lowest-price {
                            td {
                                background: rgba($yellow, 0.1);

                                .lowest-price-icon-wrap {
                                    font-family: $font-family-tertiary;
                                    font-size: 0.6875rem;
                                    color: $white;
                                    background: $yellow;
                                    padding: 0.2em 0.6em;
                                    border-radius: 3px;
                                    text-transform: uppercase;
                                    position: absolute;
                                    left: 10px;
                                    bottom: 10px;

                                    @include media('>=tablet') {
                                        position: static;
                                        display: inline-block;
                                        padding: 0.4em 0.6em;
                                        margin-right: 2rem;
                                    }

                                    .fa-star {
                                        color: $white;
                                        margin-right: 5px;
                                    }
                                }
                            }
                        }

                        &.searched-item {
                            td {
                                .searched-item-icon-wrap {
                                    font-family: $font-family-tertiary;
                                    font-size: 0.6875rem;
                                    color: $white;
                                    margin-left: 1rem;
                                    padding: 0.4em 0.6em;
                                    background: $blue;
                                    border-radius: 3px;
                                    text-transform: uppercase;

                                    .fa-search {
                                        color: $white;
                                        margin-right: 5px;
                                    }
                                }
                            }
                        }

                        &.selected {
                            position: relative;

                            td {
                                background: rgba($blue, 0.2);
                            }
                        }

                        td {
                            font-size: 14px;
                            padding: 30px 15px 10px 15px;
                            text-align: left;
                            @include media('>=tablet') {
                                border-bottom: 0 none;
                                padding: 10px;
                            }

                            &::before {
                                font-size: 12px;
                                font-weight: 200;
                                text-transform: uppercase;
                                line-height: normal;
                                width: auto;
                                position: absolute;
                                left: 15px;
                                top: 10px;
                                @include media('>=tablet') {
                                    display: none;
                                }
                            }

                            &.sku {
                                font-size: 12px;
                                border-bottom: 1px dotted #ddd;
                                @include media('>=tablet') {
                                    border-bottom: 0 none;
                                }
                            }

                            &.availability {

                                .availability-message {
                                    i  {
                                        margin: 0 10px 0 0;

                                        &.fa-info-circle {
                                            color: $blue;
                                        }

                                        &.fa-exclamation-circle {
                                            color: $red;
                                        }

                                        &.fa-check-circle {
                                            color: $green;
                                        }
                                    }
                                }

                                .ago {
                                    font-family: $font-family-condensed;
                                    font-size: 0.6875rem;
                                    font-style: italic;
                                    color: $gray;
                                    padding-left: 10px;
                                }
                            }

                            &.refresh {
                                padding-top: 2px;
                                border-bottom: 1px dotted #ddd;
                                @include media('>=tablet') {
                                    padding-top: 10px;
                                    border-bottom: 0 none;
                                }

                                .btn {
                                    font-size: 10px;
                                    font-weight: bold;
                                    min-height: 24px;
                                    line-height: 1.1;
                                    padding: 6px 8px;

                                    i  {
                                        font-size: 12px;
                                        line-height: 1;
                                        margin: 0 0 0 10px;
                                    }
                                }
                            }

                            &.price {
                                text-align: right;
                                border-bottom: 1px dotted #ddd;
                                @include media('>=tablet') {
                                    border-bottom: 0 none;
                                }

                                .ppu {
                                    font-size: 0.75em;
                                    color: #666;
                                    margin-right: 20px;
                                }

                                .woocommerce-Price-amount {
                                    font-weight: bold;
                                    width: 25%;
                                    display: inline-block;
                                }
                            }

                            &.qty {
                                padding-top: 10px;
                                text-align: right;

                                input {
                                    font-size: 14px;
                                    text-align: right;
                                    width: 60px;
                                    padding: 5px;
                                    height: 24px;
                                }
                            }
                        }
                    }
                }

                tfoot {
                    tr {
                        &.variations-total {
                            .totals-wrapper {
                                @include media('>=tablet') {
                                    margin-right: 5%;
                                }
                            }

                            td {
                                text-align: right;
                                @include media('>=tablet') {
                                    padding-bottom: 30px;
                                }

                                span {
                                    &.sub-total {
                                        font-size: 12px;
                                        font-weight: lighter;
                                        padding-right: 5px;
                                    }

                                    &.amount {
                                        color: $red;
                                        font-weight: bold;
                                        font-size: 24px;
                                        padding-right: 2px;
                                    }

                                    &.exvat {
                                        font-size: 10px;
                                    }
                                }
                            }
                        }

                        &.variations-actions {
                            .action-favourite {
                                .fav-link {
                                    max-width: none;
                                }
                            }

                            .action-hire {
                                text-align: right;
                            }

                            .action-add-to-cart {
                                text-align: right;

                                form {
                                    margin: 0;
                                }

                            }

                            &:after {
                                background-color: $gray-lightest;
                                bottom: 0;
                                content: " ";
                                display: block;
                                height: 80px;
                                left: 0;
                                position: absolute;
                                width: 100%;
                                z-index: -1;
                                @include media ('<=phone') {
                                    display: none;
                                }
                            }
                        }
                    }
                }
            }

            /*
            Label the data
            */
            tbody td:nth-of-type(1):before { content: "Sku"; }
            tbody td:nth-of-type(2):before { content: "Availability"; }
            tbody td:nth-of-type(4):before { content: "Price"; }
            tbody td:nth-of-type(5):before { content: "Qty"; }
        }
    }

    .product-tabs {
        margin-bottom: 50px;
        @include media('>=desktop') {
            margin-bottom: 100px;
        }
    }

    .tab-container {
        #tab-desc {
            @include media ('<=phone') {
                word-break: break-word;
            }
            h4 {
                @include media ('>=500px') {
                    display: none;
                }
            }
        }

        .download-item {
            padding: 10px 0;

        }

        .fa-file-pdf {
            font-weight: 400;
            float: left;
            padding-right: 10px;
            font-size: 1.6em;
        }

        .nav {
            display: flex;
            margin: 0;
            @include media ('<500px') {
                display: none;
            }

            li {
                border-color: $gray-lightest;
                border-style: solid;
                border-width: 1px 0 0 1px;
                display: inline-block;
                font-family: $font-family-primary;
                list-style: none;
                padding: 9px 16px;
                text-transform: uppercase;

                &:active,
                &:focus,
                &:hover {
                    background-color: $gray-lighter;
                }

                &:last-child {
                    border-right-width: 1px;
                }

                &.selected {
                    background-color: $brand-primary;
                    border-color: $brand-primary;

                    a {
                        color: $white;
                    }
                }
            }
        }

        .tab-content {
            border: solid 1px $gray-light;

            .pane {
                display: none;

                &.active {
                    display: block;
                }
            }
        }

        .tab {
            margin: 0 -15px 15px;
            @include media('>=tablet') {
                padding: 15px;
                margin: 0;
            }

            @include media ('<500px') {
                // display: block !important;
                // position: static !important;
            }
        }

        .product-dowloads {
            .download-item {
                .btn-download {
                    i {
                        margin: 0 0 0 10px;
                    }
                }
            }
        }
    }

    .product-summary {
        border-bottom: 1px solid #DDD;
        margin-bottom: 10px;
        padding-bottom: 10px;

        .pricing-wrapper {
            font-size: 24px;
            .price {
                font-family: $font-family-primary;
            }

            .exvat {
                font-size: 12px;
            }

            .product-each {
                font-size: 14px;
            }
        }
    }

}


.ajax_form {
    position: relative;

    .loading-wrap {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: rgba(255,255,255,0.7);
        z-index: 199;

        .spinner {
            font-size: 42px;
            color: #111;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            z-index: 200;
        }
    }
}
