@import "../config.less";

/* Widget Thim: Search post types */
.widget_thim_search_form_widget, body.search {
  form.search-post-types {
    input[type=search] {
      height: 40px;
      padding-left: 10px;
      font-size: 13px;
      font-family: @thim_font_body_font_family;
      color: #b7b7b7;
      font-style: italic;
      border: 1px solid @border-color;
      border-right: none;
      position: relative;
      .rounded(5px 0 0 5px);
      .calc(width, '100% - 40px');
      outline: none !important;
    }
    .icon-search {
      background: @thim_body_secondary_color;
      border: none;
      font-size: 15px;
      width: 40px;
      height: 40px;
      color: @thim_color_white !important;
      text-align: center;
      padding-top: 0;
      .rounded(0 5px 5px 0);
      position: absolute;
      outline: none;
    }
  }
}

body.search form.search-post-types {
  @media (min-width: 350px) {
    width: 280px;
  }
  @media (max-width: 350px) {
    width: 100%;
  }
}

.widget_product_categories {

  ul {
    list-style: none;
    padding-left: 0;
    margin-top: -20px;

    li {
      font-size: 13px;
      font-weight: 700;
      text-transform: capitalize;
      border-bottom: 1px solid #eeeeee;
      color: @thim_body_primary_color;

      &:last-child {
        border-bottom: none;
        padding-bottom: 0 !important;
      }

      a {
        &:extend(.global-link);
        font-size: @font-size-small;
        font-weight: 700;
        &:hover {
          color: @thim_body_secondary_color !important;
        }
      }
    }
  }
}

.widget_price_filter {
  position: relative;
  margin-bottom: 40px !important;
  form {
    margin-top: 20px;

    .price_slider_wrapper {

      .price_slider {
        background-color: #cccccc !important;
        border-radius: 0 !important;
        cursor: pointer;

        .ui-slider-range {
          background-color: @thim_body_secondary_color !important;
        }

        .ui-slider-handle {
          width: 12px !important;
          height: 24px;
          cursor: pointer;
          background-color: white;
          border: 3px solid @thim_body_secondary_color;
          border-radius: 0;
          margin-top: -5px;
        }
      }

      .price_slider_amount {
        font-size: 13px;

        button {
          display: inline-block;
          color: @thim_body_secondary_color;
          background-color: transparent;
          float: right !important;
          &:hover {
            color: @thim_body_primary_color;
          }
        }

        .price_label {
          display: inline-block;
          float: left;
          text-align: left;
        }
      }
    }
  }
}

/* Widget Thim: Top Sale Product */
.wc-top-sale-products {
  .fa {
    color: @thim_color_white;
  }
  img {
    width: 100%;
  }
  .product-thumb {
    width: 45%;
    text-align: center;
    position: relative;
    &::before {
      position: absolute;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      content: "";
      background: rgba(0, 0, 0, .3);
      margin-left: -15px;
      .scale(0);
      .transition();
    }
    &:hover {
      .product-thumb::before, .quick-view {
        .scale(1);
      }
    }
    .link-images-product {
      position: absolute;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
    }
  }
  .product-info {
    width: 55%;
  }
  .top-product {
    margin-bottom: 30px;
    font-size: @thim_body_font_size_second;
    &:hover {
      .product-thumb::before, .quick-view {
        .scale(1);
      }
    }
    .product-info {
      margin-top: -5px;
      padding-left: 0;
      .product-name {
        color: @thim_body_primary_color;
        font-size: @thim_body_font_size_second;
        text-decoration: none;
        font-family: @thim_font_title_font_family;
        font-weight: 500;
        &:hover {
          color: lighten(@thim_body_primary_color, 20%);
        }
      }

      .star-rating {
        float: left;
        margin-top: 10px;
        margin-bottom: 10px;
        &::before {
          content: "\73\73\73\73\73";
          color: #d3ced2;
        }
        span {
          &::before {
            content: "\73\73\73\73\73";
            color: @thim_body_secondary_color;
          }
        }
      }
      .price-product {
        clear: both;
        div {
          display: inline-block;
        }
        .label {
          font-family: @thim_font_title_font_family;
          padding-left: 0;
          padding-right: 10px;
          font-size: @thim_body_font_size_second;
          font-weight: 400;
          color: #5a5a5a;
        }
        .price {
          color: @thim_body_secondary_color;
          font-family: @thim_font_title_font_family;
          font-size: @thim_body_font_size_second;
          font-weight: bold;
          del {
            .amount {
              color: #5a5a5a;
              font-weight: 400;
            }
          }
          ins {
            padding-left: 5px;
          }
        }
      }
    }
  }

}

body.archive, body.single-product, body.search {
  .product-filter {
    border: 1px solid @border-color;
    border-radius: 5px;
    padding: 11px 0;
	line-height: 29px;
    &.row {
      margin: 0 0 50px 0;
    }
    .sbOptions {
      z-index: 9;
    }
    .display {
      margin-left: 5px;
      width: 9%;
      a {
        color: #ddd;
        &:hover, &.switcher-active {
          color: @thim_body_secondary_color;
        }
        &.grid {
          margin-right: 10px;
        }
      }
    }
    form.woocommerce-ordering {
      margin-bottom: 0;
      .name-sortby {
        font-size: 13px;
      }
      select.orderby {
        border: none;
		height: 29px;
		padding: 0px 12px;
		line-height: 29px;
      }
      a {
        font-size: 13px;
      }
      .sbHolder {
        display: inline-block;
        vertical-align: middle;
        .sbSelector {
          font-weight: bold !important;
        }
      }
    }
    .woocommerce-result-count {
      margin-bottom: 0;
      font-size: 13px;
    }
  }

  ul.category-product-list {
    li {
      font-family: @thim_font_title_font_family;
	  &.first {
		clear: both;
	  }
	  &.last {
		&.first {
			clear: none;
		}
	  }
      .content__product {
        .product_thumb {
          text-align: center;
          position: relative;
          &:before {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            content: "";
            background: rgba(0, 0, 0, .3);
            .scale(0);
            .transition();
          }
          .link-images-product {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
          }
        }

        .product__title {
          .price-product {
            margin-bottom: 10px;
            .label {
              display: none;
            }
            ins {
              text-decoration: none;
            }
          }
          .title {
            display: block;
            color: @thim_body_primary_color;
            margin-bottom: 10px;
            padding: 0 30px;
            font-size: 16px;
            &:hover {
              color: @thim_body_secondary_color;
            }
          }
        }
      }
      .price {
        color: @thim_body_secondary_color;
        font-family: @thim_font_title_font_family;
        font-size: @thim_body_font_size_second;
        font-weight: bold;
        del {
          color: #5a5a5a;
          .amount {
            color: #5a5a5a;
            font-weight: 400;
          }
        }
        ins {
          padding-left: 5px;
        }
      }
      &.sale {
        .burst-price.sale-cate {
          position: absolute;
          top: 20px;
          right: -15px;
          .onsale {
            position: absolute;
            top: 0;
            left: -4px;
            background-color: transparent;
            font-weight: 400;
            font-size: 13px;
            text-transform: capitalize;
            line-height: 26px;
          }
        }
        .price-product {
          top: 80px !important;
        }
      }
    }
    &.product-grid {
      li {
        float: left;
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 50px !important;
        list-style: none;
        .content__product {
          border: 1px solid @border-color;
          .rounded(5px);
          .product_thumb {
            &:before {
              border-top-left-radius: 5px;
              border-top-right-radius: 5px;
            }
            img {
              border-top-left-radius: 5px;
              border-top-right-radius: 5px;
            }
            &:hover {
              &:before, .quick-view {
                .scale(1);
              }
            }
          }
          .product__title {
            text-align: center;
            .hidden__product_grid, .short-description {
              display: none !important;
            }
            .star-rating {
              text-align: center;
              float: none;
              margin: 15px auto 10px auto;
              font-size: 13px;

              span {
                &:before {
                  content: "\73\73\73\73\73";
                  color: @thim_body_secondary_color;
                }
              }
            }

            .add-to-cart-button {
              margin-bottom: -22px;
            }
            a.button {
              position: relative;
              background: @thim_bg_color_white;
              color: @thim_body_secondary_color;
              font-size: 12px;
              text-transform: uppercase;
              padding: 13px 20px;
              .rounded(100%);
              border-radius: 5px;
              border: 1px solid @border-color;
              font-weight: 700;
              &.added {
                display: none;
              }
              &:hover {
                border-color: @thim_body_secondary_color;
                background: @thim_body_secondary_color;
                color: @thim_color_white;
              }
            }
            a.button.add_to_cart_button.loading {
              position: relative;
              z-index: 9990;
              &:before {
                position: absolute !important;
                z-index: 9990;
                right: 5px;
                font-family: FontAwesome !important;
                content: "\f110" !important;
                font-size: 12px !important;
                color: @thim_color_white !important;
                -webkit-animation: fa-spin 1s infinite steps(8);
                animation: fa-spin 1s infinite steps(8);
              }
              &:after {
                display: none;
              }
            }
            a.added_to_cart {
              background: @thim_body_secondary_color;
              color: @thim_color_white;
              font-size: 12px;
              text-transform: uppercase;
              padding: 9px 20px;
              .rounded(5px);
              font-weight: 700;
            }
          }
        }
      }
    }
    &.product-list {
      margin-left: 0;
      margin-right: 0;
      li {
        float: left;
        width: 100%;
        margin-bottom: 30px;
        padding-bottom: 30px;
        border-bottom: 1px solid @border-color;
        .content__product {
          .product_thumb {
            width: 32%;
            float: left;
            max-width: 270px;
          }
          .product__title {
            width: 68%;
            float: left;
            padding-left: 30px;
            > .star-rating {
              display: none !important;
            }
            .hidden__product_grid {
              .star-rating {
                float: left;
                font-size: 13px;
                span {
                  &:before {
                    content: "\73\73\73\73\73";
                    color: @thim_body_secondary_color;
                  }
                }
              }
              &:after {
                clear: both;
                display: block;
                content: "";
              }
            }
            .title {
              font-size: 24px;
              padding-left: 0;
              margin-bottom: 20px;
            }
            .short-description {
              margin-top: 20px;
            }
            .add-to-cart-button {
              margin-top: 20px;
              a.button {
                position: relative;
                background: @thim_bg_color_white;
                color: @thim_body_secondary_color;
                font-size: @thim_body_font_size_second;
                text-transform: uppercase;
                padding: 13px 20px;
                .rounded(5px);
                border: 1px solid @border-color;

                &.added {
                  display: none;
                }
                &:hover {
                  border-color: @thim_body_secondary_color;
                  background: @thim_body_secondary_color;
                  color: @thim_color_white;
                }
              }
              a.button.add_to_cart_button.loading {
                &:before {
                  position: absolute !important;
                  right: 5px;
                  font-family: FontAwesome !important;
                  content: "\f110" !important;
                  font-size: @thim_body_font_size_second !important;
                  color: @thim_color_white !important;
                  -webkit-animation: fa-spin 1s infinite steps(8);
                  animation: fa-spin 1s infinite steps(8);
                }
                &:after {
                  display: none;
                }
              }
              a.added_to_cart {
                background: @thim_body_secondary_color;
                color: @thim_color_white;
                font-size: @thim_body_font_size_second;
                text-transform: uppercase;
                padding: 10px 20px;
                .rounded(5px);
              }
            }
          }
        }
        &:hover {
          .product_thumb::before, .quick-view {
            .scale(1);
          }
        }
      }
    }
  }

  table.variations {
    .label {
      color: black !important;
      td.label {
        margin-bottom: 15px;
      }
    }
    td.value {
      select {
        margin-bottom: 15px;
      }
      .reset_variations {
        margin-top: -5px;
        margin-bottom: 10px;
      }
    }
  }

  .mfp-content .single_variation_wrap{
    display: none !important;
  }
}

body.search {
  li.product {
    margin-left: 80px;
    .onsale {
      left: 5px;
    }
  }
}

.post-type-archive-product .archive_switch {
  margin-bottom: 30px;
}

body.archive, body.search {
  .product-filter .woocommerce-message {
    display: none;
  }
}

.all-subcategories {
 	width: 100%;
    margin: 0 -15px 40px;
    display: inline-block;
	li {
		width: 33.33%;
		float: left;
		padding: 0 15px;
	}
}