/*
 * Cart presentation: retain WooCommerce's native form and calculations while
 * giving the cart the same calm two-column rhythm as Haystack checkout.
 */

body.woocommerce-cart {
  background: #fff;
  color: #171717;
}

/* #page is globally clipped for the rounded site shell. `clip` preserves that
 * edge treatment without creating the scroll container that disables sticky. */
.woocommerce-cart #page {
  overflow: clip;
}

.woocommerce-cart #page-content {
  padding-top: 8px;
}

/* The title and cart contents inherit the same site container as navigation. */
.woocommerce-cart .page-title {
  padding-top: 15px;
}

.woocommerce-cart .page-header,
.woocommerce-cart .entry-header {
  margin-bottom: 38px;
}

.woocommerce-cart .page-title,
.woocommerce-cart .entry-title {
  margin-bottom: 0;
  font-family: minsans, serif;
  font-size: 46px;
  font-weight: 400;
  line-height: 1.3;
}

.woocommerce-cart .woocommerce {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 14fr) minmax(360px, 11fr);
  align-items: start;
  column-gap: 48px;
  row-gap: 24px;
  margin-bottom: 88px;
}

.woocommerce-cart .woocommerce-notices-wrapper {
  grid-column: 1 / -1;
}

.woocommerce-cart .woocommerce-notices-wrapper:empty {
  display: none;
}

.woocommerce-cart .woocommerce-cart-form {
  min-width: 0;
  margin: 0;
}

.woocommerce-cart table.shop_table,
.woocommerce-cart table.shop_table tbody,
.woocommerce-cart table.shop_table tr,
.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td {
  border: 0;
  background: transparent;
}

.woocommerce-cart table.shop_table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border-radius: 0;
}

.woocommerce-cart table.shop_table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.woocommerce-cart table.shop_table tbody {
  display: block;
}

.woocommerce-cart table.shop_table tr.cart_item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 90px 82px 112px 24px;
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: 16px;
  row-gap: 12px;
  padding: 22px 0;
  border-top: 1px solid #deded9;
}

.woocommerce-cart table.shop_table tr.cart_item:last-of-type {
  border-bottom: 1px solid #deded9;
}

.woocommerce-cart table.shop_table td {
  padding: 0;
}

.woocommerce-cart table.shop_table .product-thumbnail {
  grid-column: 1;
  grid-row: 1 / 3;
}

.woocommerce-cart table.shop_table .product-thumbnail a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  border: 1px solid #deded9;
  border-radius: 7px;
  background: #f5f5f2;
  overflow: hidden;
}

.woocommerce-cart table.shop_table .product-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
}

.woocommerce-cart table.shop_table .product-name {
  grid-column: 2 / 6;
  grid-row: 1;
  padding-top: 4px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

.woocommerce-cart table.shop_table .product-name a {
  color: #171717;
  text-decoration: none;
}

.woocommerce-cart table.shop_table .product-name a:hover,
.woocommerce-cart table.shop_table .product-name a:focus {
  color: #2d716b;
}

.woocommerce-cart table.shop_table .product-price {
  grid-column: 2;
  grid-row: 2;
}

.woocommerce-cart table.shop_table .product-quantity {
  grid-column: 3;
  grid-row: 2;
}

.woocommerce-cart table.shop_table .product-subtotal {
  grid-column: 4 / 6;
  grid-row: 2;
  text-align: right;
}

.woocommerce-cart table.shop_table .product-remove {
  grid-column: 6;
  grid-row: 1;
  text-align: right;
}

.woocommerce-cart table.shop_table tr.cart_item .product-price::before,
.woocommerce-cart table.shop_table tr.cart_item .product-quantity::before,
.woocommerce-cart table.shop_table tr.cart_item .product-subtotal::before {
  display: block;
  margin-bottom: 5px;
  color: #717171;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.woocommerce-cart table.shop_table tr.cart_item .product-price::before {
  content: "Price";
}

.woocommerce-cart table.shop_table tr.cart_item .product-quantity::before {
  content: "Quantity";
}

.woocommerce-cart table.shop_table tr.cart_item .product-subtotal::before {
  content: "Subtotal";
}

.woocommerce-cart table.shop_table .product-price,
.woocommerce-cart table.shop_table .product-subtotal {
  color: #292929;
  font-size: 14px;
  line-height: 38px;
  white-space: nowrap;
}

.woocommerce-cart table.shop_table tr.cart_item .product-price::before,
.woocommerce-cart table.shop_table tr.cart_item .product-subtotal::before {
  line-height: 1.2;
}

.woocommerce-cart table.shop_table .quantity .qty {
  width: 66px;
  min-height: 38px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #cecec8;
  border-radius: 6px;
  background: #fff;
  color: #171717;
  font-size: 14px;
  text-align: center;
}

.woocommerce-cart table.shop_table .product-remove a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  color: #686868 !important;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.woocommerce-cart table.shop_table .product-remove a.remove:hover,
.woocommerce-cart table.shop_table .product-remove a.remove:focus {
  background: #e8e8e4;
  color: #171717 !important;
}

.woocommerce-cart table.shop_table tr:not(.cart_item) {
  display: block;
}

.woocommerce-cart table.shop_table td.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 0;
}

.woocommerce-cart .haystack-cart-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: 1;
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid #1d1d1d;
  border-radius: 999px;
  background: #fff;
  color: #1d1d1d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
}

.woocommerce-cart .haystack-cart-continue:hover,
.woocommerce-cart .haystack-cart-continue:focus {
  border-color: #2d716b;
  color: #2d716b;
  text-decoration: none;
}

.woocommerce-cart table.shop_table td.actions button[name="update_cart"] {
  order: 2;
  min-height: 42px;
  margin-left: auto;
  padding: 10px 20px !important;
  border: 1px solid #1d1d1d !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #1d1d1d !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.woocommerce-cart table.shop_table td.actions button[name="update_cart"]:hover,
.woocommerce-cart table.shop_table td.actions button[name="update_cart"]:focus {
  border-color: #2d716b !important;
  color: #2d716b !important;
}

.woocommerce-cart .cart-collaterals {
  position: sticky;
  top: 118px;
  width: 100%;
  min-width: 0;
  max-height: calc(100vh - 142px);
  padding: 34px 32px 38px;
  border-left: 1px solid #deded9;
  background: #f5f5f2;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

html.haystack-cart-auto-update body.woocommerce-cart table.shop_table td.actions button[name="update_cart"] {
  display: none;
}

.woocommerce-cart .woocommerce.is-updating .quantity,
.woocommerce-cart .woocommerce.is-updating .product-remove {
  opacity: .5;
  pointer-events: none;
}

.haystack-cart-status {
  position: absolute;
  top: 38px;
  right: 32px;
  max-width: 280px;
  padding: 6px 10px;
  border: 1px solid rgba(45, 113, 107, .34);
  border-radius: 999px;
  background: rgba(45, 113, 107, .08);
  color: #2d716b;
  font-family: "Area Normal", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .06em;
  text-align: right;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.haystack-cart-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.haystack-cart-status.is-error {
  top: 26px;
  padding: 8px 12px;
  border-color: #8a2727;
  border-radius: 8px;
  background: #8a2727;
  color: #fff;
  font-size: 10px;
}

.woocommerce-cart .cart-collaterals .cart_totals {
  float: none;
  width: 100%;
}

.woocommerce-cart .cart-collaterals h2 {
  margin: 0 0 22px;
  padding-right: 100px;
  color: #171717;
  font-family: "Area Normal", sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.woocommerce-cart .cart-collaterals table.shop_table {
  margin-bottom: 24px;
  font-size: 14px;
}

.woocommerce-cart .cart-collaterals table.shop_table tbody {
  display: table-row-group;
}

.woocommerce-cart .cart-collaterals table.shop_table tr {
  display: table-row;
  border-bottom: 1px solid #deded9;
}

.woocommerce-cart .cart-collaterals table.shop_table th,
.woocommerce-cart .cart-collaterals table.shop_table td {
  padding: 14px 0;
  vertical-align: top;
}

.woocommerce-cart .cart-collaterals table.shop_table th {
  width: 38%;
  color: #343434;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
}

.woocommerce-cart .cart-collaterals table.shop_table td {
  color: #171717;
  font-size: 14px;
  line-height: 1.45;
  text-align: right;
}

.woocommerce-cart .cart-collaterals .shipping td {
  color: #555;
  font-size: 12px;
  text-align: right;
}

.woocommerce-cart .cart-collaterals .shipping th {
  width: auto;
  white-space: nowrap;
}

.woocommerce-cart .cart-collaterals .shipping td {
  width: 1%;
  white-space: nowrap;
}

.woocommerce-cart .cart-collaterals .shipping ul#shipping_method {
  margin: 0;
  text-align: right;
}

.woocommerce-cart .cart-collaterals .shipping ul#shipping_method li,
.woocommerce-cart .cart-collaterals .shipping ul#shipping_method label {
  display: block;
  text-align: right;
}

.woocommerce-cart .cart-collaterals .shipping-calculator-button {
  display: inline-block;
  margin-top: 10px;
  color: #2d716b;
  font-size: 13px;
  text-decoration: none;
}

.woocommerce-cart .cart-collaterals table.shop_table tbody {
  display: block;
}

.woocommerce-cart .cart-collaterals table.shop_table tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  width: 100%;
}

.woocommerce-cart .cart-collaterals table.shop_table th,
.woocommerce-cart .cart-collaterals table.shop_table td {
  display: block;
  width: auto;
}

.woocommerce-cart .cart-collaterals table.shop_table tr.haystack-international-import-row > td {
  grid-column: 1 / -1;
}

.woocommerce-cart .cart-collaterals table.shop_table tr.haystack-cart-shipping-deferred > td {
  grid-column: 1 / -1;
  color: #555;
  font-size: 13px;
  text-align: left;
}

.woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) {
  position: relative;
}

.woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) > th {
  grid-column: 1;
  grid-row: 1;
}

.woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) > td {
  display: grid !important;
  grid-column: 1 / -1;
  grid-row: 1 / 3;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) > td > ul {
  grid-column: 2;
  grid-row: 1;
}

.woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) > td > .woocommerce-shipping-destination,
.woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) > td > .woocommerce-shipping-calculator {
  grid-column: 1 / -1;
}

.woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) > td > .woocommerce-shipping-destination {
  grid-row: 2;
  text-align: right;
}

.woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) > td > .woocommerce-shipping-calculator {
  grid-row: 3;
}

.woocommerce-cart .shipping-calculator-form:not([style*="display: none"]):not([style*="display:none"]) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  width: 100%;
  margin-top: 16px;
  text-align: left;
}

.woocommerce-cart .shipping-calculator-form .form-row,
.woocommerce-cart .shipping-calculator-form > p {
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
}

.woocommerce-cart .shipping-calculator-form label {
  display: block;
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
}

.woocommerce-cart .shipping-calculator-form input.input-text,
.woocommerce-cart .shipping-calculator-form select,
.woocommerce-cart .shipping-calculator-form .select2-container,
.woocommerce-cart .shipping-calculator-form .select2-selection {
  width: 100% !important;
  min-width: 0;
  text-align: left;
}

.woocommerce-cart .shipping-calculator-form .select2-selection__rendered {
  text-align: left;
}

.woocommerce-cart .shipping-calculator-form > p:last-of-type {
  display: flex;
  grid-column: -2 / -1;
  align-items: flex-end;
  justify-content: flex-end;
}

.woocommerce-cart .shipping-calculator-form button {
  width: 100%;
  min-height: 42px;
  margin: 0;
}

.woocommerce-cart .cart-collaterals .order-total th,
.woocommerce-cart .cart-collaterals .order-total td {
  padding-top: 18px;
  color: #171717;
  font-size: 17px;
  font-weight: 700;
}

.woocommerce-cart .wc-proceed-to-checkout {
  padding: 0;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 13px 22px !important;
  border: 1px solid #1d1d1d !important;
  border-radius: 999px !important;
  background: #1d1d1d !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus {
  border-color: #2d716b !important;
  background: #2d716b !important;
  color: #fff !important;
}

@media (max-width: 991px) {
  .woocommerce-cart .woocommerce {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    margin-bottom: 64px;
  }

  .woocommerce-cart .cart-collaterals {
    position: relative;
    top: auto;
    max-height: none;
    padding: 30px 28px 34px;
    border-top: 1px solid #deded9;
    border-left: 0;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .woocommerce-cart .shipping-calculator-form:not([style*="display: none"]):not([style*="display:none"]) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .woocommerce-cart .cart-collaterals table.shop_table tr.shipping {
    grid-template-columns: minmax(0, 1fr);
  }

  .woocommerce-cart .cart-collaterals table.shop_table tr.shipping th,
  .woocommerce-cart .cart-collaterals table.shop_table tr.shipping td {
    padding-bottom: 0;
    text-align: left;
    white-space: normal;
  }

  /* Desktop aligns the shipping method with its heading in one grid row.
   * In the stacked cart the address prompt needs its own row so the two
   * pieces of copy never overlap. */
  .woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) > th {
    grid-column: 1;
    grid-row: 1;
  }

  .woocommerce-cart .cart-collaterals tr.shipping:has(.woocommerce-shipping-calculator) > td {
    display: block !important;
    grid-column: 1;
    grid-row: 2;
    padding-top: 6px;
    padding-bottom: 14px;
  }

  .woocommerce-cart .cart-collaterals .shipping-calculator-button {
    margin-top: 8px;
  }

  .woocommerce-cart .cart-collaterals .shipping ul#shipping_method,
  .woocommerce-cart .cart-collaterals .shipping ul#shipping_method li,
  .woocommerce-cart .cart-collaterals .shipping ul#shipping_method label {
    text-align: left;
  }
}

@media (max-width: 640px) {
  /* The global content shell and desktop cart both reserve footer space.
   * On phones the footer supplies that breathing room by itself. */
  .woocommerce-cart #page-content {
    padding-bottom: 0;
  }

  .woocommerce-cart .woocommerce {
    gap: 24px;
    margin-bottom: 20px;
  }

  .woocommerce-cart .page-title .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .woocommerce-cart .page-title h1 {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .woocommerce-cart .shipping-calculator-form:not([style*="display: none"]):not([style*="display:none"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-cart .page-header,
  .woocommerce-cart .entry-header {
    margin-bottom: 24px;
  }

  .woocommerce-cart table.shop_table tr.cart_item {
    grid-template-columns: 86px minmax(0, 1fr) 24px;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 10px;
    padding: 18px 0;
  }

  /*
   * WooCommerce turns cart tables into labelled rows on small screens. Our
   * card grid supplies its own hierarchy, so neutralize only those generated
   * table labels and keep the native cells and form controls intact.
   */
  .woocommerce-cart table.shop_table tr.cart_item td {
    background: transparent !important;
    text-align: left !important;
  }

  .woocommerce-cart table.shop_table tr.cart_item td::before {
    float: none !important;
  }

  .woocommerce-cart table.shop_table tr.cart_item .product-remove::before,
  .woocommerce-cart table.shop_table tr.cart_item .product-thumbnail::before,
  .woocommerce-cart table.shop_table tr.cart_item .product-name::before {
    display: none !important;
    content: none !important;
  }

  .woocommerce-cart table.shop_table .product-thumbnail {
    grid-column: 1;
    grid-row: 1 / 3;
    display: block !important;
  }

  .woocommerce-cart table.shop_table .product-thumbnail a {
    width: 86px;
    height: 86px;
  }

  .woocommerce-cart table.shop_table .product-name {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    font-size: 15px;
  }

  .woocommerce-cart table.shop_table .product-price {
    display: none !important;
  }

  .woocommerce-cart table.shop_table .product-quantity {
    grid-column: 2;
    grid-row: 2;
    display: block !important;
    justify-self: start;
  }

  .woocommerce-cart table.shop_table .product-subtotal {
    grid-column: 2;
    grid-row: 2;
    display: block !important;
    justify-self: end;
    text-align: right !important;
  }

  .woocommerce-cart table.shop_table tr.cart_item .product-subtotal::before {
    content: "Item total";
  }

  .woocommerce-cart table.shop_table .product-remove {
    grid-column: 3;
    grid-row: 1;
    display: block !important;
    padding: 0 !important;
  }

  .woocommerce-cart table.shop_table td.actions {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 18px;
  }

  /* Keep this useful escape route visibly button-like without letting it
   * compete with the cart summary and primary checkout action. */
  .woocommerce-cart .haystack-cart-continue {
    flex: 0 0 auto;
    min-height: 36px;
    margin-left: auto;
    padding: 8px 14px;
    border-color: #8e8e88;
    color: #454545;
    font-size: 10px;
  }

  html.haystack-cart-continue-in-title body.woocommerce-cart table.shop_table td.actions {
    display: none;
  }

  .woocommerce-cart table.shop_table td.actions button[name="update_cart"] {
    width: 100%;
    margin-left: 0;
  }

  .woocommerce-cart .cart-collaterals {
    width: 100%;
    margin: 0;
    padding: 24px 20px 28px;
    border: 1px solid #deded9;
  }

  .haystack-cart-status {
    top: 32px;
    right: 18px;
  }

  .woocommerce-cart .cart-collaterals table.shop_table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .woocommerce-cart .cart-collaterals table.shop_table th,
  .woocommerce-cart .cart-collaterals table.shop_table td {
    display: block !important;
    width: auto;
  }

  .woocommerce-cart .cart-collaterals table.shop_table td {
    text-align: right;
  }

  .woocommerce-cart .cart-collaterals table.shop_table td::before {
    display: none !important;
    content: none !important;
  }

}

@media (max-width: 420px) {
  .woocommerce-cart .shipping-calculator-form:not([style*="display: none"]):not([style*="display:none"]) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .haystack-cart-status {
    transition: none;
  }
}

/* Empty carts occupy the full content width, with a single grouped action. */
.woocommerce-cart .haystack-empty-cart,
.woocommerce-cart .return-to-shop {
  grid-column: 1 / -1;
}

.woocommerce-cart .haystack-empty-cart {
  padding-top: 12px;
}

.woocommerce-cart .haystack-empty-cart h2 {
  margin: 0 0 16px;
  font-family: minsans, serif;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.25;
}

.woocommerce-cart .haystack-empty-cart p {
  max-width: 540px;
  margin: 0;
  font-family: "Area Normal", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.woocommerce-cart .return-to-shop {
  margin: 0;
}
