/*
 * ATC WooCommerce cart.
 * Loads only on the WooCommerce cart page.
 */

/* =========================================================
   CART PAGE — VARIABLES AND GENERAL LAYOUT
   ========================================================= */

body.woocommerce-cart {
  --atc-cart-green: #14532d;
  --atc-cart-green-hover: #0f3f22;
  --atc-cart-green-soft: #edf7f1;
  --atc-cart-gold: #c7a76c;
  --atc-cart-gold-dark: #9b793d;
  --atc-cart-gold-soft: #f8f1e3;
  --atc-cart-text: #1f2937;
  --atc-cart-muted: #64748b;
  --atc-cart-border: #dfe7e2;
  --atc-cart-surface: #ffffff;
  --atc-cart-page: #f5f7f6;
  --atc-cart-danger: #c2413b;
  --atc-cart-shadow: 0 18px 46px rgba(15, 63, 34, 0.10);
}

body.woocommerce-cart .woocommerce,
body.woocommerce-cart .woocommerce * {
  box-sizing: border-box;
}

body.woocommerce-cart .woocommerce {
  width: min(100% - 32px, 1280px);
  margin-right: auto;
  margin-left: auto;
  color: var(--atc-cart-text);
}

/* =========================================================
   CART NOTICES
   ========================================================= */

body.woocommerce-cart .woocommerce-notices-wrapper {
  margin-bottom: 24px;
}

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
  position: relative;
  min-height: 70px;
  margin: 0 0 20px !important;
  padding: 18px 210px 18px 24px !important;
  border: 0 !important;
  border-left: 5px solid var(--atc-cart-gold) !important;
  border-radius: 14px !important;
  background: var(--atc-cart-green) !important;
  color: #ffffff !important;
  font-size: 17px !important;
  line-height: 1.5 !important;
  box-shadow: 0 12px 30px rgba(15, 63, 34, 0.12) !important;
}

body.woocommerce-cart .woocommerce-message::before,
body.woocommerce-cart .woocommerce-info::before,
body.woocommerce-cart .woocommerce-error::before {
  display: none !important;
}

body.woocommerce-cart .woocommerce-message a.button,
body.woocommerce-cart .woocommerce-info a.button,
body.woocommerce-cart .woocommerce-error a.button {
  position: absolute;
  top: 50%;
  right: 16px;
  min-width: 180px;
  min-height: 48px;
  margin: 0 !important;
  padding: 13px 20px !important;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 9px !important;
  background: #0b1610 !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: none !important;
}

body.woocommerce-cart .woocommerce-message a.button:hover,
body.woocommerce-cart .woocommerce-info a.button:hover,
body.woocommerce-cart .woocommerce-error a.button:hover {
  background: var(--atc-cart-gold) !important;
  color: #17231b !important;
}

/* =========================================================
   CART TABLE CARD
   ========================================================= */

body.woocommerce-cart .woocommerce-cart-form {
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid var(--atc-cart-border);
  border-top: 5px solid var(--atc-cart-gold);
  border-radius: 18px;
  background: var(--atc-cart-surface);
  box-shadow: var(--atc-cart-shadow);
}

body.woocommerce-cart table.shop_table.cart {
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: transparent !important;
  table-layout: auto;
}

body.woocommerce-cart table.shop_table.cart thead {
  background: var(--atc-cart-green);
}

body.woocommerce-cart table.shop_table.cart thead th {
  padding: 18px 14px !important;
  border: 0 !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

body.woocommerce-cart table.shop_table.cart tbody td {
  padding: 24px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--atc-cart-border) !important;
  background: #ffffff !important;
  color: var(--atc-cart-text) !important;
  vertical-align: top !important;
}

body.woocommerce-cart table.shop_table.cart tr.cart_item:last-of-type td {
  border-bottom-color: var(--atc-cart-border) !important;
}

body.woocommerce-cart table.shop_table.cart th.product-remove,
body.woocommerce-cart table.shop_table.cart td.product-remove {
  width: 52px;
  padding-right: 8px !important;
  padding-left: 18px !important;
  text-align: center;
  vertical-align: middle !important;
}

body.woocommerce-cart table.shop_table.cart th.product-thumbnail,
body.woocommerce-cart table.shop_table.cart td.product-thumbnail {
  width: 138px;
  padding-right: 10px !important;
  padding-left: 10px !important;
  text-align: center;
}

body.woocommerce-cart table.shop_table.cart th.product-name,
body.woocommerce-cart table.shop_table.cart td.product-name {
  width: auto;
  min-width: 300px;
}

body.woocommerce-cart table.shop_table.cart th.product-price,
body.woocommerce-cart table.shop_table.cart td.product-price,
body.woocommerce-cart table.shop_table.cart th.product-quantity,
body.woocommerce-cart table.shop_table.cart td.product-quantity,
body.woocommerce-cart table.shop_table.cart th.product-subtotal,
body.woocommerce-cart table.shop_table.cart td.product-subtotal {
  width: 135px;
  text-align: right;
}

body.woocommerce-cart table.shop_table.cart td.product-price,
body.woocommerce-cart table.shop_table.cart td.product-quantity,
body.woocommerce-cart table.shop_table.cart td.product-subtotal {
  padding-top: 30px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

/* Booking products commonly have no separate WooCommerce quantity control.
   Hide the empty column only when the cart has no quantity input at all. */
@supports selector(table:has(input)) {
  body.woocommerce-cart table.shop_table.cart:not(:has(td.product-quantity input)) th.product-quantity,
  body.woocommerce-cart table.shop_table.cart:not(:has(td.product-quantity input)) td.product-quantity {
    display: none !important;
  }
}

/* =========================================================
   PRODUCT IMAGE, NAME AND BOOKING DETAILS
   ========================================================= */

body.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
  display: block;
  width: 118px !important;
  max-width: 118px !important;
  height: 88px !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(15, 63, 34, 0.13);
}

body.woocommerce-cart table.shop_table.cart td.product-name > a {
  display: inline-block;
  margin: 0 0 14px;
  color: #168b55 !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
}

body.woocommerce-cart table.shop_table.cart td.product-name > a:hover {
  color: var(--atc-cart-green) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

body.woocommerce-cart table.shop_table.cart dl.variation {
  display: grid !important;
  grid-template-columns: minmax(130px, max-content) minmax(0, 1fr);
  gap: 8px 18px;
  width: 100%;
  max-width: 620px;
  margin: 0 !important;
  padding: 16px 18px !important;
  border: 1px solid var(--atc-cart-border);
  border-radius: 12px;
  background: var(--atc-cart-green-soft);
  color: var(--atc-cart-text);
}

body.woocommerce-cart table.shop_table.cart dl.variation dt,
body.woocommerce-cart table.shop_table.cart dl.variation dd {
  float: none !important;
  clear: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

body.woocommerce-cart table.shop_table.cart dl.variation dt {
  color: var(--atc-cart-green) !important;
  font-weight: 800 !important;
}

body.woocommerce-cart table.shop_table.cart dl.variation dd {
  color: var(--atc-cart-text) !important;
  font-weight: 500 !important;
}

body.woocommerce-cart table.shop_table.cart dl.variation p {
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

body.woocommerce-cart table.shop_table.cart td.product-price .amount,
body.woocommerce-cart table.shop_table.cart td.product-subtotal .amount {
  color: var(--atc-cart-green) !important;
  font-weight: 800 !important;
}

body.woocommerce-cart table.shop_table.cart td.product-remove a.remove {
  display: inline-grid !important;
  place-items: center;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid #f2cbc8 !important;
  border-radius: 50% !important;
  background: #fff5f4 !important;
  color: var(--atc-cart-danger) !important;
  font-size: 23px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

body.woocommerce-cart table.shop_table.cart td.product-remove a.remove:hover {
  border-color: var(--atc-cart-danger) !important;
  background: var(--atc-cart-danger) !important;
  color: #ffffff !important;
}

body.woocommerce-cart table.shop_table.cart input.qty {
  width: 78px !important;
  min-height: 44px !important;
  margin-left: auto !important;
  padding: 8px !important;
  border: 1px solid #cbd5d0 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: var(--atc-cart-text) !important;
  font-size: 16px !important;
  text-align: center;
  box-shadow: none !important;
}

/* =========================================================
   COUPON AND CART ACTIONS
   ========================================================= */

body.woocommerce-cart table.shop_table.cart td.actions {
  padding: 20px !important;
  border: 0 !important;
  background: #f8faf9 !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon input.input-text {
  width: 220px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 11px 14px !important;
  border: 1px solid #bdc9c2 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: var(--atc-cart-text) !important;
  font-size: 15px !important;
  box-shadow: none !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon input.input-text:focus {
  border-color: var(--atc-cart-gold) !important;
  outline: 3px solid rgba(199, 167, 108, 0.22) !important;
}

body.woocommerce-cart table.shop_table.cart td.actions button.button,
body.woocommerce-cart table.shop_table.cart td.actions input.button {
  min-height: 48px !important;
  margin: 0 !important;
  padding: 12px 20px !important;
  border: 1px solid var(--atc-cart-green) !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: var(--atc-cart-green) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: none !important;
}

body.woocommerce-cart table.shop_table.cart td.actions button.button:hover,
body.woocommerce-cart table.shop_table.cart td.actions input.button:hover {
  background: var(--atc-cart-green) !important;
  color: #ffffff !important;
}

body.woocommerce-cart table.shop_table.cart td.actions button.button:disabled,
body.woocommerce-cart table.shop_table.cart td.actions button.button.disabled {
  border-color: #d7dfda !important;
  background: #edf1ef !important;
  color: #8a9890 !important;
  opacity: 1 !important;
  cursor: not-allowed;
}

/* =========================================================
   CART TOTALS
   ========================================================= */

body.woocommerce-cart .cart-collaterals {
  display: flex !important;
  justify-content: flex-end;
  width: 100% !important;
  margin: 28px 0 0 !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
  float: none !important;
  width: min(100%, 440px) !important;
  margin: 0 !important;
  padding: 26px !important;
  border: 1px solid var(--atc-cart-border);
  border-top: 5px solid var(--atc-cart-gold);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--atc-cart-shadow);
}

body.woocommerce-cart .cart-collaterals .cart_totals h2 {
  margin: 0 0 18px !important;
  padding: 0 !important;
  color: var(--atc-cart-green) !important;
  font-size: clamp(26px, 3vw, 34px) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table {
  width: 100% !important;
  margin: 0 0 20px !important;
  border: 0 !important;
  border-collapse: collapse !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table th,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table td {
  padding: 14px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--atc-cart-border) !important;
  background: transparent !important;
  color: var(--atc-cart-text) !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  vertical-align: middle !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table th {
  width: 48%;
  font-weight: 800 !important;
  text-align: left;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table td {
  font-weight: 600 !important;
  text-align: right;
}

body.woocommerce-cart .cart-collaterals .cart_totals tr.order-total th,
body.woocommerce-cart .cart-collaterals .cart_totals tr.order-total td {
  padding-top: 18px !important;
  border-bottom: 0 !important;
  color: var(--atc-cart-green) !important;
  font-size: 19px !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals tr.order-total .amount {
  color: var(--atc-cart-green) !important;
  font-size: 23px !important;
  font-weight: 900 !important;
}

body.woocommerce-cart .wc-proceed-to-checkout {
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 14px 20px !important;
  border: 1px solid var(--atc-cart-gold-dark) !important;
  border-radius: 10px !important;
  background: var(--atc-cart-gold) !important;
  color: #17231b !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  box-shadow: 0 10px 24px rgba(155, 121, 61, 0.22) !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
  border-color: var(--atc-cart-green) !important;
  background: var(--atc-cart-green) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus-visible {
  outline: 3px solid rgba(199, 167, 108, 0.36) !important;
  outline-offset: 3px;
}

/* =========================================================
   EMPTY CART
   ========================================================= */

body.woocommerce-cart .cart-empty.woocommerce-info {
  min-height: 0;
  padding: 24px !important;
  text-align: center;
}

body.woocommerce-cart .return-to-shop {
  margin: 18px 0 0 !important;
  text-align: center;
}

body.woocommerce-cart .return-to-shop a.button {
  min-height: 50px !important;
  padding: 14px 24px !important;
  border: 1px solid var(--atc-cart-green) !important;
  border-radius: 10px !important;
  background: var(--atc-cart-green) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

body.woocommerce-cart .return-to-shop a.button:hover {
  background: var(--atc-cart-green-hover) !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  body.woocommerce-cart table.shop_table.cart th.product-thumbnail,
  body.woocommerce-cart table.shop_table.cart td.product-thumbnail {
    width: 116px;
  }

  body.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
    width: 96px !important;
    max-width: 96px !important;
    height: 76px !important;
  }

  body.woocommerce-cart table.shop_table.cart th.product-name,
  body.woocommerce-cart table.shop_table.cart td.product-name {
    min-width: 250px;
  }

  body.woocommerce-cart table.shop_table.cart th.product-price,
  body.woocommerce-cart table.shop_table.cart td.product-price,
  body.woocommerce-cart table.shop_table.cart th.product-quantity,
  body.woocommerce-cart table.shop_table.cart td.product-quantity,
  body.woocommerce-cart table.shop_table.cart th.product-subtotal,
  body.woocommerce-cart table.shop_table.cart td.product-subtotal {
    width: 110px;
  }
}

@media (max-width: 767px) {
  body.woocommerce-cart .woocommerce {
    width: min(100% - 24px, 1280px);
  }

  body.woocommerce-cart .woocommerce-message,
  body.woocommerce-cart .woocommerce-info,
  body.woocommerce-cart .woocommerce-error {
    padding: 18px !important;
    font-size: 15px !important;
    text-align: center;
  }

  body.woocommerce-cart .woocommerce-message a.button,
  body.woocommerce-cart .woocommerce-info a.button,
  body.woocommerce-cart .woocommerce-error a.button {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin-top: 14px !important;
    transform: none;
  }

  body.woocommerce-cart .woocommerce-cart-form {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.woocommerce-cart table.shop_table.cart,
  body.woocommerce-cart table.shop_table.cart tbody,
  body.woocommerce-cart table.shop_table.cart tr,
  body.woocommerce-cart table.shop_table.cart td {
    display: block !important;
    width: 100% !important;
  }

  body.woocommerce-cart table.shop_table.cart thead {
    display: none !important;
  }

  body.woocommerce-cart table.shop_table.cart tr.cart_item {
    position: relative;
    margin: 0 0 18px !important;
    overflow: hidden;
    border: 1px solid var(--atc-cart-border);
    border-top: 5px solid var(--atc-cart-gold);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 63, 34, 0.09);
  }

  body.woocommerce-cart table.shop_table.cart tbody td {
    min-width: 0 !important;
    padding: 14px 18px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--atc-cart-border) !important;
    text-align: left !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-thumbnail {
    padding: 18px 18px 6px !important;
    border: 0 !important;
    text-align: center !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-thumbnail::before,
  body.woocommerce-cart table.shop_table.cart td.product-name::before {
    display: none !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
    width: 100% !important;
    max-width: 420px !important;
    height: 190px !important;
    margin: 0 auto !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-name {
    padding-top: 12px !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-name > a {
    padding-right: 34px;
    font-size: 19px !important;
  }

  body.woocommerce-cart table.shop_table.cart dl.variation {
    grid-template-columns: 1fr;
    gap: 3px;
    max-width: none;
    padding: 14px !important;
  }

  body.woocommerce-cart table.shop_table.cart dl.variation dd {
    margin-bottom: 8px !important;
  }

  body.woocommerce-cart table.shop_table.cart dl.variation dd:last-child {
    margin-bottom: 0 !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-price,
  body.woocommerce-cart table.shop_table.cart td.product-quantity,
  body.woocommerce-cart table.shop_table.cart td.product-subtotal {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px !important;
    font-size: 16px !important;
    white-space: normal;
  }

  body.woocommerce-cart table.shop_table.cart td.product-price::before,
  body.woocommerce-cart table.shop_table.cart td.product-quantity::before,
  body.woocommerce-cart table.shop_table.cart td.product-subtotal::before {
    float: none !important;
    color: var(--atc-cart-green) !important;
    font-weight: 800 !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-subtotal {
    border-bottom: 0 !important;
  }

  body.woocommerce-cart table.shop_table.cart input.qty {
    margin-left: 0 !important;
  }

  body.woocommerce-cart table.shop_table.cart tr:last-child,
  body.woocommerce-cart table.shop_table.cart tr:last-child td.actions {
    display: block !important;
  }

  body.woocommerce-cart table.shop_table.cart td.actions {
    margin-top: 4px;
    padding: 18px !important;
    border: 1px solid var(--atc-cart-border) !important;
    border-radius: 14px;
    background: #ffffff !important;
    box-shadow: 0 10px 28px rgba(15, 63, 34, 0.07);
  }

  body.woocommerce-cart table.shop_table.cart td.actions .coupon {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
    margin-bottom: 10px;
  }

  body.woocommerce-cart table.shop_table.cart td.actions .coupon input.input-text {
    width: 100% !important;
  }

  body.woocommerce-cart table.shop_table.cart td.actions > button.button,
  body.woocommerce-cart table.shop_table.cart td.actions > input.button {
    float: none !important;
    width: 100% !important;
  }

  body.woocommerce-cart .cart-collaterals {
    display: block !important;
    margin-top: 20px !important;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals {
    width: 100% !important;
    padding: 22px !important;
  }
}

@media (max-width: 480px) {
  body.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
    height: 160px !important;
  }

  body.woocommerce-cart table.shop_table.cart td.actions .coupon {
    grid-template-columns: 1fr;
  }

  body.woocommerce-cart table.shop_table.cart td.actions .coupon button.button,
  body.woocommerce-cart table.shop_table.cart td.actions .coupon input.button {
    width: 100% !important;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals {
    padding: 18px !important;
  }
}
