/*================ _Drawers ================*/


.drawer {
    display: none;
    position: fixed;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    top: 0;
    bottom: 0;
    z-index: 9991!important;
    color: #202020;
    border-color: #f2f2f2;
    background-color: #fff;
    -moz-transition: all .5s ease;
    -ms-transition: all .5s ease;
    -o-transition: all .5s ease;
    -webkit-transition: all .5s ease;
    transition: all .5s ease;
}

/* //drawer left */
.drawer--left {
  @include shadow($shadowRight);
  
/*   //large */
  @include screenUp($small){
    width: $drawerNavWidth;
    left: -$drawerNavWidth;
  }

/*   //mobile */
  @include screen($small) {
    width: $drawerNavWidthMobile;
    left: -$drawerNavWidthMobile;
  }
  
  .js-drawer-open-left & {
    display: block;
    @include transform(translateX(100%));

    .lt-ie9 & {
      left: 0;
    }
  }
}

.drawer--right {
    -moz-box-shadow: 0 0 40px rgba(0,0,0,.07);
    -ms-box-shadow: 0 0 40px rgba(0,0,0,.07);
    -o-box-shadow: 0 0 40px rgba(0,0,0,.07);
    -webkit-box-shadow: 0 0 40px rgb(0 0 0 / 7%);
    box-shadow: 0 0 40px rgb(0 0 0 / 7%);
    width: 450px;
    right: -450px;
}
.js-drawer-open-right .drawer--right {
    display: block;
    -webkit-transform: translateX(-100%);
    -moz-transform: translateX(-100%);
    -ms-transform: translateX(-100%);
    -o-transform: translateX(-100%);
    transform: translateX(-100%);
}

/* //drawer top */
.drawer--top {
  min-height: $heightInput + $gutter*2;
  top: -($heightInput + $gutter*2);
  left:0;
  right:0;
  bottom:inherit;
  max-width:100%;
  @include shadow($shadowBottom);

  .drawer__inner{
    overflow: hidden;
  }

  .js-drawer-open-top & {
    display: block;
    @include transform(translateY( ($heightInput + $gutter*2) ));

    .lt-ie9 & {
      top: 0;
    }
  }
}

.drawer__title {
  @include headerFontStack;
  font-size: $headerSize3;
  line-height:1;
}


.overlay-drawer {
    background-color: #202020;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    z-index: 9990;
    -moz-transition: all .5s ease;
    -ms-transition: all .5s ease;
    -o-transition: all .5s ease;
    -webkit-transition: all .5s ease;
    transition: all .5s ease;
}
.js-drawer-open .overlay-drawer {
    pointer-events: auto;
    opacity: .65;
}

/* //drawer header */
.drawer__header {
  display: table;
  height: $heightHeader;
  width: 100%;

  @include screen($small){
    height: $heightHeaderMobile;
  }
}

.drawer__fixed-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0 30px;
    -moz-box-shadow: 0 0 40px rgba(0,0,0,.07);
    -ms-box-shadow: 0 0 40px rgba(0,0,0,.07);
    -o-box-shadow: 0 0 40px rgba(0,0,0,.07);
    -webkit-box-shadow: 0 0 40px rgb(0 0 0 / 7%);
    box-shadow: 0 0 40px rgb(0 0 0 / 7%);
    height: 80px;
    overflow: visible;
    z-index: 10;
}

.drawer__title,
.drawer__close {
  display: table-cell;
  vertical-align: middle;
}

.drawer__close{
  text-align: right;
}

.drawer__inner {
    position: absolute;
    top: 80px;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 30px;
}

/*================ _Cart_drawer ================*/
.cart-empty-container{
  display:none; 
}
#CartDrawer .drawer__inner {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    -ms-justify-content: center;
    justify-content: center;
}
.ajaxcart__inner--has-fixed-footer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  bottom: $drawerCartFooterHeight; 
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: $gutter;

  @include screen($small){
    padding: $gutter $gutter-sm;
  }
}


.ajaxcart__product{
  position: relative;
  max-height: 500px;

  &.is-removed {
    max-height: 0;
    opacity:0;
    overflow: hidden;
    visibility: hidden;
    @include backface(hidden);
    @include transition($transitionDrawers);
  }
}


.ajaxcart__row{
   margin-bottom: $gutter;
  
  .cart-spacer &{
    padding-bottom: $gutter;
    border-bottom: $borders;
  }
  
  .ajaxcart__product:last-child &{
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
  }
}

.ajaxcart__grid-info{
  @include align-self(center); 
  padding-left: $gutter-sm!important;
}

.ajaxcart__grid{
/*   @include animated(fadeIn); */
}


.ajaxcart__product-image {
  display: block;
  overflow: hidden;

  img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    background-color: $drawerColorProduct;
  }
}


.ajaxcart__product-name,
.cart__product-name {
  @include headerFontStack;
  color: $colorDrawerText;
}


.ajaxcart__quantity-grid{
  @include align-items(center);
  
  &.ajaxcart__has-discount{
    @include align-items(flex-start);
  }
}
.ajaxcart__quantity-grid__item{
  @include flex(0);  
}
.ajaxcart__price-grid__item{
  @include flex(1);
  padding-left: $spacer-xs!important;
}
.ajaxcart__price{
  .ajaxcart__has-discount &{
    display: block; 
  }
}


.ajaxcart__product-name--wrapper{
  margin-bottom: $spacer-xs;
}
.ajaxcart__product-name{
  display: inline-block;
}


.ajaxcart__product-meta{
  display: block;
  font-size: $baseFontSize-sm;
}


.ajaxcart__price--strikethrough,
.cart__price--strikethrough {
  text-decoration: line-through;
  font-size: $baseFontSize-sm;
}


.order-discount{
  margin: 0px;
  list-style: unset;
}
.order-discount__item{
  margin-top: $spacer-xs;
}


.ajaxcart__note {

}


.ajaxcart__note_checkout{
  
}


.ajaxcart__footer--fixed {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: $gutter;
  min-height: $drawerCartFooterHeight; 
  background-color: $colorDrawer;
  @include shadow($shadowTop);
  @include screen($small) {
    padding: $gutter-sm;
  }
}


.ajaxcart__subtotal{
  margin-bottom: $spacer-sm;
  @include accentFontStack;
}
.ajaxcart__savings{ 
  margin-bottom: $spacer-xs;
}


.ajaxcart-loading-icon{
  display: none!important;
  color: $colorDrawerPrimary;
  font-size: $baseFontSize-lg;
  
  .drawer--is-loading &{
    display: block!important;
  }
}
