/*  ----------------------------------------------------------------------------
    General Settings - Category Templates
*/

//sub-category
.td-subcategory-header .td-category {
  display: inline-block;
  overflow: hidden;
  margin-left: 10px;
  height: 20px;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    margin: 0 30px;
    height: 15px;
  }

  li {
    margin: 0 3px 0 0;

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

  a {
    font-size: 11px;
    padding: 0 14px;
    line-height: 20px;
    background: none;
    color: #222;
    white-space: nowrap;
    display: inline-table;

    // removing the transition
    -o-transition: none;
    -moz-transition: none;
    -khtml-transition: none;
    -webkit-transition: none;
    -ms-transition: none;
    transition: none;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      line-height: 15px;
      font-weight: 700;
      padding: 2px 9px;
      height: 20px;
    }

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      background-color: #222;
      color: #fff;
      padding: 1px 5px 1px 5px;
      font-size: 9px;
      margin-right: 5px;
      line-height: 13px;
    }

    &:hover {
      background-color: #222;
      color: #fff;
    }
  }
}

.td-subcategory-header a.td-current-sub-category {
  background-color: #222;
  color: #fff;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    background-color: @td_theme_color;
  }
}

.td-subcategory-header {
  min-height: 48px;
  position: relative;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    min-height: 44px;
  }

  // category siblings filter
  .td-category-siblings {
    z-index: 2;
    opacity: 0;
    width: 700px;
    position: absolute;
    line-height: 1;
    top: 0;
    bottom: 0;
    margin: auto;
    height: 20px;

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      text-align: center;
      margin-right: 0;
      width: 100%;
      height: 15px;
    }

    .td-subcat-dropdown {
      display: inline-block;
      margin: 0 0 0 10px;
      padding: 0 5px;
      position: absolute;
      border: 1px solid #e6e6e6;
      color: #444;
      right: auto;

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

      i {
        padding-left: 0;
      }

      ul {
        z-index: 999;
        border: 1px solid #e6e6e6;
      }

      &:hover {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;

        ul {
          display: block;
        }
      }

      li {
        list-style: none;
      }

      a {
        display: block;
        color: #444;
        padding: 0 30px 0 16px;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 300px;
        overflow: hidden;

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

        &:hover {
          color: @td_theme_color;
        }

        &.td-current-sub-category {
          background-color: transparent;
          color: @td_theme_color;
        }
      }
    }
  }


  // pulldown
  .td-category-pulldown-filter {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }

  .td-pulldown-filter-display-option {
    margin: 0 19px 0 0;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      margin-right: 15px;
    }

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

//description
.td-category-description {
  font-family: @font1;
  font-size: 13px;
  font-style: italic;
  line-height: 22px;
  color: #444;
  border-top: 1px dashed @module-dashed-line;
  border-bottom: 1px dashed @module-dashed-line;
  padding: 11px 0 14px 0;
  margin-bottom: 20px;

  p {
    margin-bottom: 0;
  }
}

// pagination
.page-nav {
  margin-top: 26px;

  /* responsive portrait tablet */
  @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
    margin-top: 22px;
  }
}

// hide on category the top border of the grids
.category {
  .td-big-grids {
    border: none;
  }
}

// fix category header on page 2,3....
.td_line_above_cat_big_grid {
  border-bottom: 1px solid @td_grid_border_color;
}

/*  ----------------------------------------------------------------------------
    Category Disable
*/

.td_category_template_disable {
  // hide title, breadcrumbs, description in main content area
  .td-main-content {
    padding-top: 20px;

    .td-category-header {
      display: none;
    }
  }

  .entry-crumbs {
    margin-bottom: 10px;
  }

  .td-category-container {
    margin-top: 20px;

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

  // border remove on headers
  .td-header-style-5 .td-ad-m,
  .td-header-style-7 .td-ad-m,
  .td-header-style-8 .td-ad-m,
  .td-header-style-9 .td-ad-m,
  .td-header-style-10 .td-ad-m,
  .td-header-style-6 .td-header-header .td-make-full {
    border-bottom-width: 0;
  }

  // border add to top of main content when big grid is off
  &.td_category_top_posts_style_disable {
    .td-category-header.td-container {
      border-bottom-width: 1px;
    }

    .td-category-container {
      margin-top: 0;
    }
  }
}


/*  ----------------------------------------------------------------------------
    Category Template 1
*/
.td_category_template_1 {
  // general container
  .td-category-header {
    .td-container {
      border-bottom-width: 0;
      z-index: 2;
    }

    // page title
    header {
      display: inline-block;
    }

    .entry-title {
      line-height: 10px;
      margin: 20px 14px 20px 0;

      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        margin-bottom: 17px;
        margin-top: 16px;
      }

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

      span {
        display: inline-block;
        font-family: @font1;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        padding: 2px 14px;
        color: #fff;
        background-color: #222;
        border-radius: 3px;
        line-height: 16px;
      }
    }
  }

  // hacks for category templates
  &.td_category_top_posts_style_disable {
    .td-subcategory-header {
      border-bottom: 1px solid @td_grid_border_color;
    }
  }

  //breadcrumb
  .entry-crumbs {
    display: inline-block;
    position: relative;
    top: 0;
    margin: 0 0 14px 0;
  }

  //description
  .td-category-description {
    /* responsive portrait tablet */
    @media (max-width: @responsive_p_tablet_max) {
      padding: 7px 0 10px 0;
      margin-bottom: 17px;
    }
  }
}

/*  ----------------------------------------------------------------------------
    Category Template 2
*/
.td_category_template_2 {
  //hide title, breadcrumbs, description in main content area
  .td-main-content {
    padding-top: 20px;

    .td-category-header {
      display: none;
    }
  }

  //general container
  .td-category-header {
    .td-container {
      z-index: 2;
      border-bottom-width: 0;

      //title
      .entry-title {
        font-size: 26px;
        line-height: 1;
        font-weight: 700;
        margin: 22px 0 0 0;
        text-transform: uppercase;

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

  //border add to top of main content when big grid is off
  &.td_category_top_posts_style_disable {
    .td-category-header {
      .td-container {
        border-bottom-width: 1px;

        /* responsive portrait phone */
        @media (max-width: @responsive_p_phone_max) {
          border-bottom-width: 0;
        }
      }
    }

    .td-category-description {
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        margin-bottom: 0;
      }
    }
  }

  //breadcrumb
  .entry-crumbs {
    position: static;
    margin: 15px 0 0 0;
  }

  //description
  .td-category-description {
    /* responsive portrait tablet */
    @media (max-width: @responsive_p_tablet_max) {
      margin-top: 10px;
    }
  }

  //subcategories
  .td-subcategory-header {
    margin-bottom: 6px;

    // pulldown filter
    .td-pulldown-filter-list {
      top: 9px;
    }
    .td-pulldown-filter-display-option {
      height: 21px;
      margin: 0;
      top: 0;

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

  // pulldown filter
  .td-category-siblings {
    text-align: left;
    height: 21px;

    .td-category {
      height: 21px;
      margin: 0;
      padding-top: 0;
      font-weight: 600;

      li {
        margin: 0 10px 0 0;

        @media (max-width: @responsive_p_phone_max) {
          margin: 0 5px 0 0;
        }
      }

      a {
        background-color: transparent;
        border: 1px solid #eaeaea;
        color: @td_black;
        font-size: 10px;
        line-height: 18px;
        padding: 0 10px 1px;

        &:hover {
          border-color: @td_theme_color;
          background-color: @td_theme_color;
          color: #fff;
        }
      }

      .td-current-sub-category {
        background-color: @td_black;
        border-color: @td_black;
        color: #fff;
      }
    }
  }

  .td-category-pulldown-filter.td-wrapper-pulldown-filter {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }
}


/*  ----------------------------------------------------------------------------
    Category Template 3
*/
.td_category_template_3 {
  //hide title, breadcrumbs, description in main content area
  .td-main-content {
    padding-top: 20px;

    .td-category-header {
      display: none;
    }
  }

  //general container
  .td-category-header {
    .td-container {
      z-index: 2;
      border-bottom-width: 0;

      //title
      .entry-title {
        font-size: 26px;
        line-height: 1;
        font-weight: 700;
        margin: 20px 0;
        text-transform: uppercase;
      }
    }
  }

  //border add to top of main content when big grid is off
  &.td_category_top_posts_style_disable {
    .td-category-header {
      .td-container {
        border-bottom-width: 1px;

        /* responsive portrait phone */
        @media (max-width: @responsive_p_phone_max) {
          border-bottom-width: 0;
        }
      }
    }

    .td-category-description {
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        margin-bottom: 0;
      }
    }
  }

  .td-scrumb-holder {
    min-height: 49px;
    border-bottom: 1px solid #efefef;

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

    .td-pb-span12 {
      background-color: #fcfcfc;
    }

    //breadcrumb
    .td-crumb-container {
      padding-bottom: 16px;
      padding-top: 17px;

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

      .entry-crumbs {
        position: static;
      }
    }
  }

  //pulldown
  .td-category-pulldown-filter.td-wrapper-pulldown-filter {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }
}

/*  ----------------------------------------------------------------------------
    Category Template 4
*/
.td_category_template_4 {
  //hide title, breadcrumbs, description in main content area
  .td-main-content {
    padding-top: 20px;

    .td-category-header {
      display: none;
    }
  }

  //general container
  .td-category-header {
    .td-container {
      z-index: 2;
      border-bottom-width: 0;
      padding-bottom: 46px;

      /* responsive portrait tablet */
      @media (max-width: @responsive_p_tablet_max) {
        padding-bottom: 20px;
      }

      //title
      .entry-title {
        text-align: center;
        font-size: 34px;
        line-height: 1;
        font-weight: 700;
        margin: 30px 0 7px 0;
        text-transform: uppercase;

        /* responsive portrait tablet */
        @media (max-width: @responsive_p_tablet_max) {
          font-size: 28px;
          margin: 20px 0 0 0;
        }
      }
    }
  }

  //border add to top of main content when big grid is off
  &.td_category_top_posts_style_disable {
    .td-category-header {
      .td-container {
        border-bottom-width: 1px;

        /* responsive portrait phone */
        @media (max-width: @responsive_p_phone_max) {
          border-bottom-width: 0;
          padding-bottom: 0;
        }
      }
    }
  }

  //breadcrumb
  .td-crumb-container {
    margin-top: 20px;

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

    .entry-crumbs {
      top: 0;
    }
  }

  //pulldown
  .td-category-pulldown-filter.td-wrapper-pulldown-filter {
    top: 18px;
    z-index: 3;

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

  //subcategories
  .td-subcategory-header {
    .td-category {
      margin-left: 0;
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        margin: 0 15px 0 20px;
      }
    }

    .td-category-siblings {
      text-align: center;
      left: 0;
      right: 0;
      width: 800px;

      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        width: 620px;
      }
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        width: 100%;
      }
    }
  }

  //description
  .td-category-description {
    text-align: center;
    border-bottom: none;
    margin-bottom: 0;
  }
}


/*  ----------------------------------------------------------------------------
    Category Template 5
*/
.td_category_template_5 {
  //hide title, breadcrumbs, description in main content area
  .td-main-content {
    padding-top: 20px;

    .td-category-header {
      display: none;
    }
  }

  .td-header-style-5 .td-ad-m,
  .td-header-style-7 .td-ad-m,
  .td-header-style-8 .td-ad-m,
  .td-header-style-9 .td-ad-m,
  .td-header-style-10 .td-ad-m,
  .td-header-style-6 .td-header-header .td-make-full {
    border-bottom-width: 0;
  }


  .td-image-gradient-style5:after {
    top: 0;
    left: 0;
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.4);
    -webkit-box-shadow: inset 0 0 188px 0 #000000;
    -moz-box-shadow: inset 0 0 188px 0 #000000;
    box-shadow: inset 0 0 188px 0 #000000;
    z-index: -1;
  }

  .td-category-header {
    .td-container {
      z-index: 2;
      border-bottom-width: 0;
      background-color: transparent;
      padding-bottom: 100px;

      .td-pb-span12 {
        border-left: none;
      }

      //title
      .entry-title {
        font-size: 30px;
        line-height: 1;
        font-weight: 700;
        margin: 60px 0 16px 0;
        text-transform: uppercase;
        color: #fff;
      }
    }
  }

  //breadcrumb
  .entry-crumbs {
    position: static;
    margin: 16px 0 0 0;
    color: #fff;

    a {
      color: #fff;
    }
  }

  //subcategories
  .td-subcategory-header {
    min-height: 21px;

    .td-big-grids {
      margin-top: 3px;
    }
  }

  //grid style 1 border
  &.td_category_top_posts_style_1 {
    .td-subcategory-header .td-big-grids {
      margin-top: 4px;
    }
  }

  //grid style 6,7 border
  &.td_category_top_posts_style_6,
  &.td_category_top_posts_style_7 {
    .td-subcategory-header .td-big-grids {
      margin-top: 0;
    }
  }

  .td-category-siblings {
    text-align: left;
    height: 21px;

    .td-category {
      margin: 0;
      padding-top: 0;
      font-weight: 600;
      height: 21px;

      li {
        margin: 0 10px 0 0;

        @media (max-width: @responsive_p_phone_max) {
          margin: 0 5px 0 0;
        }
      }

      a {
        background-color: transparent;
        border: 1px solid rgba(234, 234, 234, 0.8);
        color: #fff;
        font-size: 10px;
        line-height: 18px;
        padding: 0 10px 1px;

        &:hover {
          background-color: #fff;
          border-color: #fff;
          color: @td_black;
        }
      }

      .td-current-sub-category {
        background-color: @td_black;
        border-color: @td_black;
        color: #fff;
      }
    }
  }

  //pulldown
  .td-category-pulldown-filter.td-wrapper-pulldown-filter {
    top: auto;
    bottom: 0;
    right: 1px;

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

    .td-pulldown-filter-display-option {
      color: #fff;
      border: 1px solid rgba(234, 234, 234, 0.8);
      background-color: transparent;
      line-height: 16px;

      &:hover {
        background-color: #fff;
        color: @td_black;
        i {
          color: @td_black;
        }
      }

      i {
        color: #fff;
      }
    }
  }

  //pulldown icon on mobile display
  .td-category-siblings .td-subcat-dropdown {
    background-color: transparent;
    margin: 0;
    height: 21px;
    border-color: rgba(234, 234, 234, 0.8);

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      right: auto;
      top: 0;
    }

    i {
      color: #fff;
    }

    &:hover {
      background-color: #fff;
      i {
        color: @td_black;
      }
    }
  }


  //description
  .td-category-description {
    border: none;
    margin-top: 10px;
    margin-bottom: 0;
    padding-bottom: 0;

    p {
      color: #fff;
    }
  }
}

/*  ----------------------------------------------------------------------------
    Category Template 6
*/
.td_category_template_6 {
  //hide title, breadcrumbs, description in main content area
  .td-main-content {
    padding-top: 20px;

    .td-category-header {
      display: none;
    }
  }

  //border remove on headers
  .td-header-style-5 .td-ad-m,
  .td-header-style-7 .td-ad-m,
  .td-header-style-8 .td-ad-m,
  .td-header-style-9 .td-ad-m,
  .td-header-style-10 .td-ad-m,
  .td-header-style-6 .td-header-header .td-make-full {
    border-bottom-width: 0;
  }

  //border add to top of main content when big grid is off
  &.td_category_top_posts_style_disable {
    .td-category-header.td-container {
        border-bottom-width: 1px;

      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        border-bottom-width: 0;
      }
    }
  }

  .td-background-style6 {
    display: table;
    background-color: rgba(0,0,0,0.4);
    margin: 0 auto;
    padding: 30px 40px;
    max-width: 80%;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      padding: 20px 30px;
      max-width: 90%;
    }
  }

  .td-category-header {
    position: relative;
    padding: 100px 0;
    z-index: 2;
    border-bottom-width: 0;
    background-color: transparent;

    //title
    .entry-title {
      font-size: 36px;
      line-height: 1;
      font-weight: 700;
      margin: 0;
      text-align: center;
      text-transform: uppercase;
      color: #fff;

      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        font-size: 28px;
      }
    }
  }

  //breadcrumb
  .td-crumb-container {
    position: absolute;
    top: 15px;
    width: 100%;

    .entry-crumbs {
      display: inline-block;
      color: #fff;
      top: 0;

      a {
        color: #fff;
      }
    }
  }

  //subcategories
  .td-subcategory-header {
    min-height: 20px;
  }

  //pulldown
  .td-category-pulldown-filter.td-wrapper-pulldown-filter {
    position: static;

    .td-pulldown-filter-display-option {
      color: #fff;
      border: 1px solid rgba(234, 234, 234, 0.8);
      background-color: transparent;
      line-height: 16px;
      margin: 0;

      &:hover {
        background-color: #fff;
        color: @td_black;
        i {
          color: @td_black;
        }
      }

      i {
        color: #fff;
      }
    }

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

  //description
  .td-category-description {
    border-color: rgba(241, 241, 241, 0.3);
    border-bottom: none;
    text-align: center;
    margin: 15px auto 0 auto;
    padding-bottom: 0;

    p {
      color: #fff;

      @media (min-width: @responsive_p_tablet_min) {
        font-size: 15px;
      }
    }
  }
}