/* Main Cart Grid */
@media(min-width: 1784px) {
  .page-template-template-cart #page.site .c-cart-content {
    display               : grid;
    grid-template-columns : subgrid;
  }
  .page-template-template-cart #page.site .c-cart-content article {
    display               : contents; 
  }
  .page-template-template-cart #page.site .entry-content {
    display: contents;
  }
  .page-template-template-cart #page.site .entry-content::before,
  .page-template-template-cart #page.site .entry-content::after {
    display: none;
  }
  .page-template-template-cart #page.site .entry-content > div {
    display: contents;
  }
  .page-template-template-cart #page.site .entry-content > div .woocommerce-notices-wrapper {
    grid-column: 1/2;
  }
  .page-template-template-cart #page.site .entry-content > div > form {
    grid-column: 1/2;
  }
  .page-template-template-cart #page.site .entry-content > div .cart-collaterals {
    grid-column : 5/6;
    grid-row    : 1/4;
  }
}

/* Form Grid */
.page-template-template-cart #page.site .woocommerce-cart-form {
  display               : grid;
  column-gap            : 16px;  
  grid-template-columns : 1fr;
  grid-template-rows    : repeat(8, auto) 16px auto;
  grid-template-areas   : 
    "div_messagesWarning"
    "div_messagesAction"
    "div_messagesErrors"
    "datel"
    "datef"
    "datee"
    "button_partDelivery "
    "button_updateCart"
    "."
    "items"
}
@media(min-width: 744px) {
  .page-template-template-cart #page.site .woocommerce-cart-form {
    display               : grid;
    column-gap            : 16px;  
    grid-template-columns : auto auto auto 1fr auto;
    grid-template-rows    : repeat(5, auto) 16px auto;
    grid-template-areas   : 
      "div_messagesWarning  div_messagesWarning   div_messagesWarning  div_messagesWarning  div_messagesWarning"
      "div_messagesAction   div_messagesAction    div_messagesAction   div_messagesAction   div_messagesAction "
      "div_messagesErrors   div_messagesErrors    div_messagesErrors   div_messagesErrors   div_messagesErrors "
      "datel                datef                 button_partDelivery  .                    button_updateCart  "
      "datee                datee                 datee                datee                datee              "
      ".                    .                     .                    .                    .                  "
      "items                items                 items                items                items              "
  }
}
.page-template-template-cart #page.site .woocommerce-cart-form::before {
  display : none;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .woocommerce-cart-form__contents {
  display : none;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .div_messagesWarning {
  grid-area : div_messagesWarning;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .div_messagesAction {
  grid-area : div_messagesAction;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .div_messagesErrors {
  grid-area : div_messagesErrors;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .c-common-delivery-date {
  display : contents;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .c-common-delivery-date > label {
  grid-area : datel;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .c-common-delivery-date > div {
  grid-area : datef;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .c-common-delivery-date > p{
  grid-area : datee;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .button_partDelivery {
  grid-area : button_partDelivery;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .button_updateCart {
  grid-area : button_updateCart;
}
.page-template-template-cart #page.site .woocommerce-cart-form > .c-item-list {
  grid-area : items;
}


/* Collateral Grid */
.page-template-template-cart #page.site .cart-collaterals {
  display               : grid;
  grid-template-columns : 1fr 1fr;
}
.page-template-template-cart #page.site .cart-collaterals::before,
.page-template-template-cart #page.site .cart-collaterals::after {
  display : none;
}

/* Cart Totals Grid */
#page.site .c-cart-totals {
  align-self            : start;
  grid-column           : 1/3;
  display               : grid;
  grid-template-columns : 1fr auto;
}
@media(min-width: 744px) {
  #page.site .c-cart-totals {
    grid-column : 2/3;
  }
}
@media(min-width: 1784px) {
  #page.site .c-cart-totals {
    grid-column : 1/3;
  }
}
#page.site .c-cart-totals h2 {
  grid-column : 1/3;
}
#page.site .c-cart-totals dl {
  display : contents;
}
#page.site .c-cart-totals > button {
  grid-column : 1/3;
}

body:not(.logged-in) #page.site .c-cart-totals h2 {
  display : none;
}
body:not(.logged-in) #page.site .c-cart-totals dl {
  display : none;
}

/* Desgin */
.page-template-template-cart #page.site .woocommerce-cart-form {
  align-items   : center;
  align-content : start;
}

/* Buttons */
.page-template-template-cart #page.site  .woocommerce-cart-form > button {
  margin-top: 8px;
}
@media(min-width: 744px) {
  .page-template-template-cart #page.site  .woocommerce-cart-form > button {
    margin-top: 0;
  }
}
/* Collateral */
@media(min-width: 1784px) {
  .page-template-template-cart #page.site .cart-collaterals {
    background-color : white;
    border-left      : 1px solid var(--c-border);
    z-index          : 1;
    margin-top       : -24px;
  }
  .page-template-template-cart #page.site .cart-collaterals > div {
    width: 100%;
  }
}
/* Cart Totals */
#page.site .c-cart-totals {
  border-radius         : var(--c-radius);
  border                : 1px solid var(--c-border);  
  padding               : 16px 16px;
  background-color      : white;
}
@media(min-width: 1784px) {
  #page.site .c-cart-totals {
    border: none;
  }
}
#page.site .c-cart-totals h2 {
  font-size   : 18px;
  line-height : 26px;
  margin      : 0 0 24px 0;
}
#page.site .c-cart-totals dl {
  display : contents;
}
#page.site .c-cart-totals:has(.c-button-simple-light:not(.c-hidden)) dl {
  display : none;
}
#page.site .c-cart-totals dl dt,
#page.site .c-cart-totals dl dd {
  font-size   : 14px;
  line-height : 20px;
  font-weight : 400;
  font-family : var(--c-font-familiy-text);
  color       : var(--c-text-title);
  margin      : 0 0 8px 0;
}
#page.site .c-cart-totals dl dd strong {
  font-weight : 500;
  font-family : var(--c-font-familiy-title);
}
#page.site .c-cart-totals dl dt:last-of-type,
#page.site .c-cart-totals dl dd:last-of-type {
  width       : 100%;
  padding-top : 16px;
  margin      : 16px 0;
  border-top  : 1px solid var(--c-border);
}

#page.site .c-cart-totals .c-button-simple-light {
  margin-bottom : 16px;
}

/* Empty Cart */
#page.site .return-to-shop a {
  display: inline-grid;
}

/* Breadcrumb */
.page-template-template-checkout #page.site .c-breadcrumb a:nth-child(1),
.page-template-template-checkout #page.site .c-breadcrumb a:nth-child(3),
.page-template-template-checkout #page.site .c-breadcrumb span:nth-child(5),
.page-template-template-cart     #page.site .c-breadcrumb a:nth-child(1),
.page-template-template-cart     #page.site .c-breadcrumb a:nth-child(3),
.page-template-template-cart     #page.site .c-breadcrumb span:nth-child(5) {
  font-size   : 14px;
  line-height : 20px;
  font-weight : 400;
  font-family : var(--c-font-familiy-text);
  color       : var(--c-text-title);
}
.page-template-template-checkout #page.site .c-breadcrumb a:nth-child(1)::before,
.page-template-template-checkout #page.site .c-breadcrumb a:nth-child(3)::before,
.page-template-template-checkout #page.site .c-breadcrumb span:nth-child(5)::before,
.page-template-template-cart     #page.site .c-breadcrumb a:nth-child(1)::before,
.page-template-template-cart     #page.site .c-breadcrumb a:nth-child(3)::before,
.page-template-template-cart     #page.site .c-breadcrumb span:nth-child(5)::before {
  content             : '';
  display             : inline-block;
  height              : 16px;
  width               : 16px;
  background-repeat   : no-repeat;
  background-size     : 16px;
  background-position : center center;
  margin-right        : 12px;
  vertical-align      : text-bottom;
}
.page-template-template-checkout #page.site .c-breadcrumb a:nth-child(1)::before,
.page-template-template-cart     #page.site .c-breadcrumb a:nth-child(1)::before {
  background-image : url(/wp-content/plugins/custom/assets/cart2-icon.svg);
}
.page-template-template-checkout #page.site .c-breadcrumb a:nth-child(3)::before,
.page-template-template-cart     #page.site .c-breadcrumb a:nth-child(3)::before {
  background-image : url(/wp-content/plugins/custom/assets/coins-icon.svg);
}
.page-template-template-checkout #page.site .c-breadcrumb span:nth-child(5)::before,
.page-template-template-cart     #page.site .c-breadcrumb span:nth-child(5)::before {
  background-image : url(/wp-content/plugins/custom/assets/badge-check-icon.svg);
}
.page-template-template-checkout                               #page.site .c-breadcrumb a:nth-child(1),
.page-template-template-checkout:has(.woocommerce-order)       #page.site .c-breadcrumb a:nth-child(3),
.page-template-template-cart                                   #page.site .c-breadcrumb a:nth-child(3),
.page-template-template-cart                                   #page.site .c-breadcrumb span:nth-child(5),
.page-template-template-checkout:not(:has(.woocommerce-order)) #page.site .c-breadcrumb span:nth-child(5) {
  opacity: 0.4;
}
.page-template-template-checkout #page.site .c-breadcrumb span:nth-child(2),
.page-template-template-checkout #page.site .c-breadcrumb span:nth-child(4),
.page-template-template-cart     #page.site .c-breadcrumb span:nth-child(2),
.page-template-template-cart     #page.site .c-breadcrumb span:nth-child(4) {
  display       : inline-block;
  width         : 8px;
  height        : 1px; 
  margin        : 0 2px 4px 2px; 
  border-bottom : 1px solid var(--c-border);
}
@media(min-width: 744px) {
  .page-template-template-checkout #page.site .c-breadcrumb span:nth-child(2),
  .page-template-template-checkout #page.site .c-breadcrumb span:nth-child(4),
  .page-template-template-cart     #page.site .c-breadcrumb span:nth-child(2),
  .page-template-template-cart     #page.site .c-breadcrumb span:nth-child(4) {
    width  : 40px;
    margin : 0 12px 4px 12px; 
  }
}


