/* 05.05 Shopping Cart CSS */

.header-cart {
    position: relative;

    padding: 0 10px;

    &:hover {
        & .header-mini-cart {
            visibility: visible;

            margin-top: 0;

            opacity: 1;
        }
    }

    @media #{$extra-small-mobile} {
        padding-right: 8px;
        padding-left: 8px;
    }
}

/* Header Cart Button */
.header-cart-btn {
    position: relative;

    display: flex;
    align-items: center;

    width: 30px;
    height: 30px;

    color: #111111;

    & .cart-count {
        font-size: 10px;
        line-height: 16px;

        position: absolute;
        top: -4px;
        right: 0;

        width: 15px;
        height: 15px;

        text-align: center;

        color: $white;
        border-radius: 50%;
        background-color: $primary;
    }

    & i {
        font-size: 18px;
        line-height: 1;
    }

    &:hover {
        color: $primary;
    }
}

/* Header Mini Cart */
.header-mini-cart {
    position: absolute;
    z-index: 99;
    top: 100%;
    right: 0;

    visibility: hidden;
    overflow: auto;

    width: 360px;
    max-height: 80vh;
    margin-top: 20px;

    transition: $transition;

    opacity: 0;
    background-color: $white;
    box-shadow: 0 10px 30px rgba($black, 0.12);

    & > .inner {
        padding: 30px 20px;
    }

    @media #{$large-mobile} {
        display: none;
    }
}

/* Mini Cart Product */
.mini-cart-product {
    position: relative;

    display: flex;
    flex-wrap: wrap;

    &:not(:last-child) {
        margin-bottom: 20px;
        padding-bottom: 20px;

        border-bottom: 1px solid $border-color;
    }

    & .thumb {
        width: 80px;

        & img {
        }
    }

    & .content {
        max-width: calc(100% - 80px);
        padding-right: 25px;
        padding-left: 20px;

        & .title {
            font-weight: 500;
        }

        & .quantity {
            font-weight: 500;

            display: block;

            & .price {
                color: $secondary-light;
            }
        }
    }

    & .remove {
        position: absolute;
        top: 0;
        right: 0;

        width: 20px;
        height: 20px;

        text-align: center;

        & i {
            line-height: 20px;

            display: block;
        }
    }
}

/* Mini Cart Product */
.mini-cart-footer {
    margin-top: 30px;
    padding-top: 16px;

    border-top: 2px solid $border-color;
}

/* Mini Cart Total */
.mini-cart-total {
    font-weight: 500;

    display: flex;
    justify-content: space-between;
}

/* Mini Cart Buttons */
.mini-cart-buttons {
    display: flex;
    flex-wrap: wrap;

    margin-top: 6px;
    margin-right: -10px;

    & .btn {
        line-height: 46px;

        flex: 1 0 auto;

        height: 48px;
        margin-top: 10px;
        margin-right: 10px;
        padding-right: 20px;
        padding-left: 20px;
    }
}


.header-light {
    & .header-cart-btn {
        color: $white;

        & .cart-count {
            color: $secondary;
            background-color: $white;
        }

        &:hover {
            color: $white;
        }
    }
}