/*  ----------------------------------------------------------------------------
    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 0;
  }

  // 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 .woocommerce-loop-product__title {
      color: #000000;
    }
  }

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

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

  .order_details li:before {
    content: '';
  }
  .order_details {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      padding-left: 0;
    }
  }
  .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: 0;
      margin-right: 0;
      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: 0 !important;
    margin: 30px 0 20px 0 !important;
    padding: 0 !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 .woocommerce-loop-product__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 19px;
    padding-top: 0;

    /* 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: 0;
      margin-top: 9px;
    }
  }


  .form-row {

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

      &#billing_phone_field,
      &#billing_email_field{
        float: none;
        width: 100%;
      }
    }

    .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;
    }
  }

  // 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: 0 !important;
    }

    &:before {
      content: '';
    }

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      margin: 0 0 20px 0 !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: 0 !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: 0;
      top: 0;
    }

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

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

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

    .panel h2,
    .related h2:not(.woocommerce-loop-product__title) {
      margin: 20px 0;
      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: 0;
  }

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

  // 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: 0 !important;
  }

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    margin: 0 0 20px 0 !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-thumbnail {
    width: 46px;
  }

  .coupon {

    .input-text {
      padding: 6px !important;
    }

    /* 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 0 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;

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

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

  .calculated_shipping td {
    text-align: right;
  }

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      line-height: 15px !important;
    }
  }

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

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

//account page
.woocommerce-account {
  font-family: @font1;

  .woocommerce-MyAccount-navigation {
    margin-bottom: 38px;

    a {
      color: #111;
    }

    a:hover {
      text-decoration: none;
      color: @td_theme_color;
    }

    ul {
      list-style: none;
      box-shadow: none;
    }

    li {
      line-height: 30px;
      list-style: none;
      margin-left: 12px;

      li {
        margin-left: 21px;
      }
    }
  }
}

// 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: 0 !important;
  margin: 0 !important;
  padding: 16px 120px 16px 40px !important;

  &:before {
    padding-top: 0 !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: 0;
    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: 0 !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 {

  .woocommerce-product-gallery__image:nth-child(n+2) {
    padding-top: 16px;
  }

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

.woocommerce-cart,
.woocommerce-checkout {
  .woocommerce {
    padding: 20px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      padding: 10px;
    }
  }
}