/* Cart visual layer; native WooCommerce table, names and actions remain intact. */
.aig-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 26px;
  align-items: start;
}
.aig-cart-layout > * {
  min-width: 0;
}
.aig-shell .woocommerce-cart-form {
  margin: 0;
  min-width: 0;
}
.aig-shell .cart-collaterals {
  width: auto;
  float: none;
  min-width: 0;
}
.aig-shell .cart-collaterals .cart_totals {
  float: none;
  width: 100%;
  position: sticky;
  top: 24px;
}
.aig-shell .cart-collaterals .cross-sells {
  float: none;
  width: 100%;
  margin-bottom: 20px;
}
.aig-shell .cart-collaterals .products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.aig-shell table.cart {
  display: block;
  width: 100%;
}
.aig-shell table.cart thead {
  position: absolute;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
}
.aig-shell table.cart tbody {
  display: block;
}
.aig-shell table.cart tr.cart_item {
  display: grid;
  direction: ltr;
  grid-template-columns: 34px 118px minmax(0, 1fr) minmax(115px, 0.6fr);
  gap: 12px 18px;
  align-items: center;
  padding: 24px 20px;
  margin-bottom: 16px;
  background: var(--ag-glass);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-top-color: #fff;
  border-radius: 22px;
  box-shadow: var(--ag-shadow);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.aig-shell table.cart tr.cart_item:hover {
  border-color: rgba(49, 132, 229, 0.42);
  box-shadow: 0 26px 58px rgba(49, 113, 178, 0.15);
  transform: translateY(-2px);
}
.aig-shell table.cart tr.cart_item td {
  display: block;
  direction: rtl;
  min-width: 0;
  border: 0;
  padding: 0;
  background: none !important;
  text-align: right !important;
}
.aig-shell table.cart tr.cart_item td::before {
  display: none !important;
}
.aig-shell table.cart .product-remove {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
}
.aig-shell table.cart a.remove {
  display: flex;
  width: 32px;
  height: 34px;
  border: 1px solid rgba(130, 177, 227, 0.5);
  border-radius: 10px;
  color: #38638c !important;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 400;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  transition: all 0.2s ease;
}
.aig-shell table.cart a.remove:hover {
  background: #fff0f1;
  color: #ac263b !important;
  border-color: #dd8a97;
  transform: scale(1.06);
}
.aig-shell table.cart .product-thumbnail {
  grid-column: 2;
  grid-row: 1 / span 3;
}
.aig-shell table.cart .product-thumbnail img {
  width: 118px;
  height: 148px;
  object-fit: contain;
  display: block;
  margin: auto;
  filter: drop-shadow(0 12px 12px rgba(35, 82, 132, 0.11));
  transition: transform 0.3s ease;
}
.aig-shell table.cart tr.cart_item:hover .product-thumbnail img {
  transform: scale(1.035);
}
.aig-shell table.cart .product-name {
  grid-column: 3;
  grid-row: 1;
  font-size: 17px;
  font-weight: 750;
}
.aig-shell table.cart .product-name a {
  color: var(--ag-ink-strong);
  text-decoration: none;
}
.aig-shell table.cart .product-name dl.variation {
  font-size: 12px;
  font-weight: 400;
  color: var(--ag-muted);
  margin: 8px 0;
}
.aig-shell table.cart .product-name dl.variation p {
  margin: 0;
}
.aig-shell table.cart .product-price {
  grid-column: 4;
  grid-row: 1;
  font-size: 13px;
  color: var(--ag-muted);
  text-align: end !important;
}
.aig-shell table.cart .product-quantity {
  grid-column: 3;
  grid-row: 2;
}
.aig-shell table.cart .product-subtotal {
  grid-column: 4;
  grid-row: 2;
  font-weight: 800;
  font-size: 15px;
  text-align: end !important;
}
.aig-shell .aig-quantity {
  display: inline-flex;
  direction: ltr;
  align-items: center;
  border: 1px solid rgba(130, 177, 227, 0.48);
  border-radius: 13px;
  background: rgba(247, 251, 255, 0.75);
  max-width: 100%;
  overflow: hidden;
  box-shadow: inset 0 1px 0 #fff;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.aig-shell .aig-quantity:focus-within {
  border-color: #168bff;
  box-shadow: 0 0 0 4px rgba(22, 139, 255, 0.1);
}
.aig-shell .aig-quantity button {
  border: 0;
  background: transparent;
  color: #16375f;
  min-width: 40px;
  min-height: 44px;
  cursor: pointer;
  font-size: 21px;
  padding: 0;
  box-shadow: none;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}
.aig-shell .aig-quantity button:hover {
  background: #e4f1ff;
  color: #0759b6;
}
.aig-shell .aig-quantity button:active {
  transform: scale(0.9);
}
.aig-shell .aig-quantity input.qty {
  width: 48px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  padding: 3px;
  text-align: center;
  background: transparent;
  box-shadow: none;
  appearance: textfield;
}
.aig-shell .aig-quantity input::-webkit-inner-spin-button,
.aig-shell .aig-quantity input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}
.aig-shell table.cart td.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  padding: 17px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(49, 113, 178, 0.06);
}
.aig-shell table.cart .coupon {
  display: flex;
  align-items: center;
  gap: 9px;
  float: none;
  flex: 1 1 250px;
  flex-wrap: wrap;
}
.aig-shell table.cart .coupon .input-text {
  width: auto;
  flex: 1 1 130px;
  min-width: 0;
  margin: 0;
}
.aig-shell .wc-proceed-to-checkout {
  padding: 22px 0 0;
}
.aig-shell .wc-proceed-to-checkout a.checkout-button {
  width: 100%;
  margin: 0;
  font-size: 15px;
}
.aig-shell .cart_totals .shipping-calculator-form {
  min-width: 0;
}
.aig-shell .cart_totals h2 {
  font-size: 21px;
  margin-bottom: 20px;
}
.aig-shell .cart_totals .order-total td {
  color: var(--ag-ink-strong);
}
.aig-shell .cart-collaterals .cart_totals:before {
  content: "جزئیات مبلغ سفارش";
  display: block;
  font-size: 12px;
  color: var(--ag-muted);
  margin: -10px 0 13px;
  font-weight: 600;
}
@media (max-width: 1023px) {
  .aig-cart-layout {
    grid-template-columns: 1fr;
  }
  .aig-shell .cart-collaterals {
    width: 100%;
  }
  .aig-shell .cart-collaterals .cart_totals {
    position: static;
  }
}
@media (max-width: 600px) {
  .aig-shell table.cart tr.cart_item {
    grid-template-columns: 27px 82px minmax(0, 1fr);
    gap: 10px;
    padding: 17px 12px;
    border-radius: 19px;
  }
  .aig-shell table.cart .product-thumbnail img {
    width: 82px;
    height: 114px;
  }
  .aig-shell table.cart .product-thumbnail {
    grid-row: 1 / span 4;
  }
  .aig-shell table.cart .product-remove {
    grid-row: 1 / span 4;
  }
  .aig-shell table.cart .product-price {
    grid-column: 3;
    grid-row: 2;
    text-align: start !important;
  }
  .aig-shell table.cart .product-quantity {
    grid-row: 3;
  }
  .aig-shell table.cart .product-subtotal {
    grid-column: 3;
    grid-row: 4;
    text-align: start !important;
  }
  .aig-shell table.cart .product-name {
    font-size: 14px;
  }
  .aig-shell table.cart td.actions {
    display: block;
  }
  .aig-shell table.cart td.actions > .button {
    width: 100%;
    margin-top: 14px;
  }
  .aig-shell table.cart .coupon {
    display: flex;
  }
  .aig-shell .cart-collaterals .products {
    grid-template-columns: 1fr;
  }
}
.aig-shell table.cart tbody > tr:not(.cart_item) {
  display: block;
}
.aig-shell .aig-quantity.is-changing {
  border-color: #168bff;
  box-shadow: 0 0 0 4px rgba(22, 139, 255, 0.1);
}

/* Real WooCommerce cart table/collaterals compatibility and premium hierarchy. */
.aig-shell .woocommerce-cart-form table.cart tr.cart_item {
  position: relative;
  isolation: isolate;
}
.aig-shell .woocommerce-cart-form table.cart .product-thumbnail img {
  max-width: 100%;
  height: 148px !important;
  object-fit: contain !important;
}
.aig-shell .woocommerce-cart-form table.cart .product-name a {
  font-size: 16px !important;
  font-weight: 750 !important;
  line-height: 1.7 !important;
}
.aig-shell .woocommerce-cart-form table.cart .product-price,
.aig-shell .woocommerce-cart-form table.cart .product-subtotal {
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.aig-shell .woocommerce-cart-form table.cart td.actions .coupon button {
  min-height: 48px !important;
}
.aig-shell .cart-collaterals .cart_totals .checkout-button {
  display: flex !important;
  width: 100% !important;
  min-height: 56px !important;
  justify-content: center !important;
}
.aig-shell .cart-collaterals .cart_totals table.shop_table {
  margin: 0 !important;
}
.aig-shell .cart-collaterals .cart_totals table.shop_table th {
  font-weight: 650 !important;
  color: #44658c !important;
}
.aig-shell .cart-collaterals .cart_totals table.shop_table .order-total th,
.aig-shell .cart-collaterals .cart_totals table.shop_table .order-total td {
  font-size: 17px !important;
  color: #102a4c !important;
  font-weight: 800 !important;
}
.aig-shell .woocommerce-cart-form table.cart .product-remove a.remove {
  line-height: 1 !important;
}
@media (max-width: 600px) {
  .aig-shell .woocommerce-cart-form table.cart tr.cart_item {
    grid-template-columns: 28px 72px minmax(0, 1fr) !important;
  }
  .aig-shell .woocommerce-cart-form table.cart .product-thumbnail img {
    width: 72px !important;
    height: 102px !important;
  }
  .aig-shell .woocommerce-cart-form table.cart .product-name a {
    font-size: 14px !important;
  }
  .aig-shell .woocommerce-cart-form table.cart td.actions .coupon {
    margin-bottom: 10px !important;
  }
  .aig-shell .woocommerce-cart-form table.cart td.actions .coupon .input-text {
    width: 100% !important;
    flex-basis: 100% !important;
  }
}
/* Cart: shipping is not shown here */
body.woocommerce-cart .cart_totals tr.shipping,
body.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals,
body.woocommerce-cart .cart_totals #shipping_method,
body.woocommerce-cart .cart_totals .woocommerce-shipping-destination,
body.woocommerce-cart .cart_totals .shipping-calculator-button,
body.woocommerce-cart .cart_totals .shipping-calculator-form {
  display: none !important;
}
