/*  ----------------------------------------------------------------------------
    WooCommerce
*/
.woocommerce {
  .entry-crumbs {
    padding-top: 20px;
  }

  // reset on active state button position
  .button:active {
    top: auto !important;
  }
  .woocommerce-message .button:active {
    top: 11px !important;
  }

  .page-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
    margin: 1px 0 20px;
  }

  // block title in cart page
  .td-main-content .block-title {
    margin: 20px 0px 20px 0px;
  }

  // general product
  .product {
    img {
      box-shadow: none !important;
    }
    .onsale {
      background: none @td_theme_color;
      border-radius: 0;
      box-shadow: none;
      text-shadow: none;
      margin: 0 !important;
      padding: 4px;
      line-height: 32px;
      font-size: 12px;
    }

    &:hover h3 {
      color: #000000;
    }
  }

  // product tag
  .tagged_as {
    display: block;
  }

  // pagination
  .page-nav {
    padding: 0px;
  }

  .order_details li:before {
    content: '';
  }
  .order_details {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      padding-left: 0px;
    }
  }
  .order_details li {
    margin-top: 7px;
    margin-bottom: 7px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100%;
      display: block;
      margin-left: 0px;
      margin-right: 0px;
      border-right: none;
    }
  }

  // remove the arrows from lists
  .payment_methods li:before {
    content: '';
  }

  // add to cart button
  .product a.button,
  .product #respond input#submit,
  .checkout input#place_order,
  .woocommerce.widget .button {
    border: none;
    box-shadow: none;
    color: #ffffff;
    background: none #222222;
    font-size: 11px;
    padding: 10px;
    text-shadow: none;
    border-radius: 3px;

    &:hover {
      background-color: #4db2ec;
    }

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      font-size: 10px;
      padding: 8px;
    }

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      margin-top: 5px;
    }
  }

  // stars
  .star-rating {
    height: 14px;
  }

  fieldset {
    border: 0px !important;
    margin: 30px 0px 20px 0px !important;
    padding: 0px !important;

    legend {
      font-weight: bold;
      padding-left: 3px;
    }
  }
  // product
  ul.products li.product {
    a img {
      margin: 0 0 8px;
    }

    .price del {
      display: inline-block;
    }

    .button {
      margin-top: 0;
    }
  }

  .price del {
    display: inline-block !important;
    font-size: 0.75em !important;
  }

  // product titles
  ul.products li.product h3 {
    font-size: 13px;
    font-weight: 600;
    line-height: 19px;
    padding-top: 0px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      font-size: 21px;
      line-height: 28px;
      padding-bottom: 4px;
    }
  }

  // product price
  ul.products li.product .price {
    font-weight: 600;
    color: #111111;
    font-size: 14px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      font-size: 18px;
      float: right;
      display: inline-block;
      margin-bottom: 0px;
      margin-top: 9px;
    }
  }


  .form-row .input-text {
    font-size: 12px;
    line-height: 21px;
    color: #444444;
    border: 1px solid #e6e6e6;
    width: 100%;
    max-width: 100%;
    height: 34px !important;
    padding: 3px 9px 3px 9px;
  }

  // fix ul
  #tab-description,
  .entry-summary {
    ol li {
      list-style-type: decimal;
      margin: 0 0 0 21px;
    }

    ul li {
      margin: 0 0 0 21px;
    }
  }
}

// shop page
.woocommerce-page {
  ul .product {
    float: left !important;
    margin-right: 3.125% !important;
    width: 31.25% !important;

    &.last {
      margin-right: 0px !important;
    }

    &:before {
      content: '';
    }

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      margin: 0px 0px 20px 0px !important;
      border-bottom: 1px dashed @module-dashed-line;
      padding-bottom: 20px !important;
      width: 100% !important;
    }
  }

  .product table td {
    border: none !important;
  }

  .variations_button {
    position: relative;
    top: 10px;
  }
}

.woocommerce-page .related ul li.product.last {
  margin-right: 0px !important;
}
.woocommerce-page .related ul li.product.first {
  clear: both;
}

// single product
.single-product {
  .product {
    margin-top: 8px;

    .onsale {
      line-height: 32px;
      font-size: 12px;
      left: 0px;
      top: 0px;
    }

    ul.tabs li:before,
    ul.tabs li:after {
      display: none;
    }

    ul.tabs li {
      box-shadow: none !important;
      border: none !important;
      background: none !important;
      margin: 0px !important;
      padding-left: 0px !important;
    }

    ul.tabs {
      padding: 0px !important;
      margin: 0px !important;
    }

    .panel h2,
    .related h2 {
      margin: 20px 0px 20px 0px;
      background-color: #222222;
      border-radius: 3px;
      color: #ffffff;
      display: inline-table;
      font-size: 11px;
      font-weight: bold;
      line-height: 16px;
      padding: 2px 15px;
    }
  }

  // product title
  .product_title {
    font-size: 28px;
    line-height: 36px;
    margin-bottom: 0px;
  }

  // product price
  .product .summary .price {
    font-size: 24px;
    color: #111111;
    font-weight: 800;
    margin: 20px 0px 18px 0px;
  }

  // add to cart
  .product .summary .cart {
    margin-top: 20px;
    margin-bottom: 20px;

    .button {
      border: none;
      box-shadow: none;
      color: #ffffff;
      background: none #222222;
      font-size: 11px;
      padding: 10px;
      text-shadow: none;
      border-radius: 3px;

      &:hover {
        background-color: #4db2ec;
      }
    }

    input.qty {
      height: 31px;
    }
  }

  .comment-form {
    margin-top: 10px;
  }

  .images {
    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 38% !important;
    }

    a {
      margin-bottom: 3.8%;
    }
  }

  .summary {
    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 58% !important;
    }
  }

  .thumbnails {
    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      padding-top: 3.8% !important;
    }
  }
}

// related product + category product page
.woocommerce-page .related ul li.product {
  float: left !important;
  margin-right: 3.125% !important;
  width: 31.25% !important;
  clear: none;

  &:last-child {
    margin-right: 0px !important;
  }

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    margin: 0px 0px 20px 0px !important;
    border-bottom: 1px dashed @module-dashed-line;
    padding-bottom: 20px !important;
    width: 100% !important;
  }
}


// cart page
.woocommerce-cart .woocommerce {
  table {
    border-collapse: collapse !important;
  }

  .cart_totals {
    table, th, td {
      border: none !important;
    }

    th {
      width: 60% !important;
    }

    tr {
      border-bottom: 1px solid @td_grid_border_color;
    }
  }

  .product-name a {
    color: #222222;
    font-weight: bold;
  }

  .cart_item td {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      padding-left: 7px;
      padding-right: 7px;
      font-size: 11px;
    }
  }

  .product-remove {
    width: 46px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }

  .product-thumbnail {
    width: 46px;
  }

  .coupon {
    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      float: left !important;
      padding-bottom: 0 !important;
    }

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      margin-bottom: 12px;
    }
  }

  .button {
    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: auto !important;
    }
  }

  .actions {
    padding: 10px 8px 0px 8px !important;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      text-align: right !important;
    }


    .button {
      margin-bottom: 9px;

      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        width: 100% !important;
        display: block;
      }
    }
  }

  h2 {
    font-size: 15px;
    line-height: 21px;
    font-weight: bold;
  }

  table.cart .button,
  .shipping-calculator-form .button {
    border: none;
    box-shadow: none;
    color: #ffffff;
    background: none #222222;
    font-size: 11px;
    padding: 10px;
    text-shadow: none;
    border-radius: 3px;
    display: inherit;

    &:hover {
      background-color: #4db2ec;
    }
  }

  .product-price,
  .product-subtotal {
    text-align: right !important;
  }

  .calculated_shipping td {
    text-align: right;
  }

  a.remove {
    line-height: 18px !important;
  }

  #coupon_code {
    width: 100px !important;
    height: 31px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100% !important;
      margin-bottom: 7px;
    }
  }
}

.woocommerce table.shop_table td,
.woocommerce-page table.shop_table td {
  padding: 9px 12px;
}


// woocommerce messages
.woocommerce .woocommerce-message:before,
.woocommerce .woocommerce-error:before,
.woocommerce .woocommerce-info:before {
  border-radius: 3px !important;
  box-shadow: none !important;
  display: block !important;
  height: 31px !important;
  left: 0 !important;
  line-height: 31px !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  top: 11px !important;
  width: 31px !important;
  font-size: 21px !important;
  text-shadow: none !important;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
  font-size: 12px;
  line-height: 21px;
  border-bottom: 1px solid @td_grid_border_color !important;
  border-top: 1px solid @td_grid_border_color !important;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0px !important;
  margin: 10px 0px 20px 0px !important;
  padding: 16px 120px 16px 40px !important;

  &:before {
    padding-top: 0px !important;
  }

  .button {
    border: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
    background: none #222222 !important;
    font-size: 11px !important;
    padding: 10px !important;
    text-shadow: none !important;
    border-radius: 3px !important;
    margin-left: 20px;
    position: absolute;
    right: 0;
    top: 11px;

    &:hover {
      background-color: #4db2ec !important;
    }
  }
}

// place order page
.woocommerce table.shop_table,
.woocommerce-page table.shop_table {
  border-collapse: collapse;
}

.woocommerce-checkout .woocommerce input.button,
.woocommerce-page .woocommerce a.button,
.woocommerce-account div.woocommerce .button {
  border: none;
  box-shadow: none;
  color: #ffffff;
  background: none #222222;
  font-size: 11px;
  padding: 10px;
  text-shadow: none;
  border-radius: 3px;

  &:hover {
    background-color: #4db2ec;
  }
}

.woocommerce-product-search {
  position: relative;
}

// widgets
.woocommerce.widget {
  img {
    box-shadow: none !important;
    width: 70px !important;
  }

  li {

    a {
      line-height: 19px;
    }
  }

  &.widget_shopping_cart,
  &.widget_products,
  &.widget_recently_viewed_products,
  &.widget_top_rated_products,
  &.widget_recent_reviews {
    li {
      margin-bottom: 11px;
    }

    ins {
      background-color: transparent;
      font-weight: bold;
    }

    del {
      font-size: 10px;
    }
  }

  &.widget_product_search {
    .screen-reader-text {
      display: none;
    }

    form div {
      position: relative;
      margin-top: 11px;
    }

    .block-title {
      margin-bottom: 20px;
    }

    input[type="search"] {
      height: 32px;
      width: 95%;
      font-family: @font2;
      font-size: 12px;
      line-height: 21px;
      color: #444444;
      border: 1px solid @td_grid_border_color;
      padding: 3px 9px 3px 9px;
      box-sizing: border-box;
    }

    input[type="submit"] {
      position: absolute;
      right: 0;
      bottom: 0;
      border-radius: 0 3px 3px 0;
    }
  }

  .star-rating {
    top: 3px;
  }

  .ui-slider .ui-slider-handle {
    box-shadow: none;
    border-radius: 0px;
    border: 1px solid #ffffff;
    background: none @td_theme_color;
    width: 15px;
    height: 15px;
  }

  .ui-slider-range {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5) !important;
    box-shadow: none !important;
  }

  .ui-slider {
    background: none repeat scroll 0 0 rgba(50, 50, 50, 0.8) !important;
    border-radius: 0px !important;
    margin-bottom: 20px !important;
    margin-top: 10px;
  }

  &.widget_layered_nav_filters ul li a {
    background: none repeat scroll 0 0 @td_theme_color !important;
    border-color: transparent !important;
  }
}

// footer fix on black
.td-footer-container {
  .widget_product_search {
    input[type="submit"] {
      background-color: #444444;
    }
  }

  .woocommerce.widget .ui-slider-range {
    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5) !important;
  }
  .woocommerce.widget .ui-slider {
    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.3) !important;
  }
}

// fix responsive 768 new version
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  /* responsive portrait phone */
  @media (width: 768px) {
    clear: none;
  }
}

.woocommerce ul.products li.product.first {
  /* responsive portrait phone */
  @media (width: 768px) {
    clear: left !important;
  }
}

.woocommerce-page div.product div.summary {
  /* responsive portrait phone */
  @media (width: 768px) {
    float: right;
  }
}

.woocommerce-page div.product div.images {
  /* responsive portrait phone */
  @media (width: 768px) {
    float: left;
  }
}