/* Cart page — modern, friendly UI */

.woocommerce-cart .woocommerce{
  display:grid;
  gap:16px;
}

/* --- WooCommerce Cart Block layout --- */
.woocommerce-cart .wp-block-woocommerce-cart{
  display:grid;
  gap:16px;
}

.woocommerce-cart .wc-block-cart__main,
.woocommerce-cart .wc-block-cart__sidebar{
  background:linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 86%, var(--surface) 14%),
    color-mix(in srgb, var(--bg) 94%, var(--surface) 6%)
  );
  border:1px solid color-mix(in srgb, var(--text) 10%, var(--bg) 90%);
  border-radius:var(--radius,16px);
  padding:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
}

.woocommerce-cart .wc-block-components-totals-wrapper,
.woocommerce-cart .wc-block-components-totals-coupon,
.woocommerce-cart .wc-block-components-totals-item{
  background:color-mix(in srgb, var(--bg) 92%, var(--surface) 8%);
  border:1px solid color-mix(in srgb, var(--text) 8%, var(--bg) 92%);
  border-radius:12px;
  padding:12px 14px;
}

.woocommerce-cart .wc-block-cart-items__row{
  background:color-mix(in srgb, var(--bg) 92%, var(--surface) 8%);
  border:1px solid color-mix(in srgb, var(--text) 8%, var(--bg) 92%);
  border-radius:14px;
  padding:12px 14px;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
  margin-bottom:12px;
}

.woocommerce-cart .wc-block-components-product-image img{
  border-radius:10px;
  background:var(--surface);
  padding:4px;
  border:1px solid color-mix(in srgb, var(--text) 8%, var(--bg) 92%);
}

.woocommerce-cart .wc-block-components-quantity-selector input{
  border-radius:10px;
  border:1px solid color-mix(in srgb, var(--text) 10%, var(--bg) 90%);
  background:var(--surface);
  color:var(--text);
}

.woocommerce-cart .wc-block-components-button,
.woocommerce-cart .wc-block-cart__submit-button,
.woocommerce-cart .wc-block-components-button.wp-block-button__link{
  border-radius:999px !important;
  border:1px solid color-mix(in srgb, var(--accent) 45%, var(--bg) 55%) !important;
  background:linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 26%, var(--bg) 74%),
    color-mix(in srgb, var(--accent) 14%, var(--bg) 86%)
  ) !important;
  color:var(--text) !important;
  font-weight:800 !important;
  box-shadow:0 8px 18px rgba(0,0,0,.10) !important;
}

/* Cart table wrapper */
.woocommerce-cart .woocommerce-cart-form{
  background:linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 86%, var(--surface) 14%),
    color-mix(in srgb, var(--bg) 94%, var(--surface) 6%)
  );
  border:1px solid color-mix(in srgb, var(--text) 10%, var(--bg) 90%);
  border-radius:var(--radius,16px);
  padding:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
}

.woocommerce-cart table.shop_table.cart{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:color-mix(in srgb, var(--bg) 92%, var(--surface) 8%);
  border:1px solid color-mix(in srgb, var(--text) 8%, var(--bg) 92%);
  border-radius:12px;
  overflow:hidden;
}

.woocommerce-cart table.shop_table.cart thead th{
  background:color-mix(in srgb, var(--accent) 10%, var(--bg) 90%);
  color:var(--text);
  font-weight:700;
  border-bottom:1px solid color-mix(in srgb, var(--accent) 25%, var(--bg) 75%);
  padding:12px 14px;
}

.woocommerce-cart table.shop_table.cart td{
  padding:12px 14px;
  border-bottom:1px solid color-mix(in srgb, var(--text) 8%, var(--bg) 92%);
  vertical-align:middle;
}

.woocommerce-cart table.shop_table.cart tr:last-child td{
  border-bottom:0;
}

.woocommerce-cart table.shop_table.cart a{
  color:var(--accent-2, var(--accent));
  font-weight:600;
}

.woocommerce-cart table.shop_table.cart a:hover{
  color:var(--accent-3, var(--accent));
}

/* Card-style cart rows (mobile/tablet) */
@media (max-width: 900px){
  .woocommerce-cart table.shop_table.cart thead{
    display:none;
  }

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

  .woocommerce-cart table.shop_table.cart tr.cart_item{
    background:color-mix(in srgb, var(--bg) 92%, var(--surface) 8%);
    border:1px solid color-mix(in srgb, var(--text) 8%, var(--bg) 92%);
    border-radius:14px;
    padding:12px 14px;
    margin:12px 0;
    box-shadow:0 6px 16px rgba(0,0,0,.06);
    display:grid;
    grid-template-columns:80px 1fr;
    gap:8px 12px;
    align-items:center;
  }

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

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

  .woocommerce-cart table.shop_table.cart td.product-name{
    grid-column:2;
    grid-row:1;
    font-weight:700;
  }

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

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

  .woocommerce-cart table.shop_table.cart td.product-subtotal{
    grid-column:2;
    grid-row:4;
    font-weight:700;
  }

  .woocommerce-cart table.shop_table.cart td.product-remove{
    grid-column:2;
    grid-row:5;
    justify-self:end;
  }

  .woocommerce-cart table.shop_table.cart td.product-price,
  .woocommerce-cart table.shop_table.cart td.product-quantity,
  .woocommerce-cart table.shop_table.cart td.product-subtotal{
    display:flex;
    align-items:center;
    gap:8px;
  }

  .woocommerce-cart table.shop_table.cart td.product-price::before,
  .woocommerce-cart table.shop_table.cart td.product-quantity::before,
  .woocommerce-cart table.shop_table.cart td.product-subtotal::before{
    content:attr(data-title);
    font-weight:700;
    color:color-mix(in srgb, var(--text) 70%, var(--bg) 30%);
    min-width:90px;
  }
}

/* Product thumb polish */
.woocommerce-cart .product-thumbnail img{
  border-radius:10px;
  background:var(--surface);
  padding:4px;
  border:1px solid color-mix(in srgb, var(--text) 8%, var(--bg) 92%);
}

/* Qty input */
.woocommerce-cart .quantity input.qty{
  width:84px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid color-mix(in srgb, var(--text) 10%, var(--bg) 90%);
  background:var(--surface);
  color:var(--text);
}

/* Actions row (coupon + update) */
.woocommerce-cart .actions{
  padding:12px 14px;
  background:color-mix(in srgb, var(--bg) 90%, var(--surface) 10%);
}

.woocommerce-cart .coupon{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.woocommerce-cart .coupon input.input-text{
  min-width:200px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid color-mix(in srgb, var(--text) 10%, var(--bg) 90%);
  background:var(--surface);
  color:var(--text);
}

/* Cart totals card */
.woocommerce-cart .cart-collaterals{
  display:grid;
  gap:16px;
}

.woocommerce-cart .cart_totals{
  background:linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 86%, var(--surface) 14%),
    color-mix(in srgb, var(--bg) 94%, var(--surface) 6%)
  );
  border:1px solid color-mix(in srgb, var(--text) 10%, var(--bg) 90%);
  border-radius:var(--radius,16px);
  padding:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
}

.woocommerce-cart .cart_totals h2{
  margin:0 0 8px 0;
}

.woocommerce-cart .cart_totals table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:color-mix(in srgb, var(--bg) 92%, var(--surface) 8%);
  border:1px solid color-mix(in srgb, var(--text) 8%, var(--bg) 92%);
  border-radius:12px;
  overflow:hidden;
}

.woocommerce-cart .cart_totals th,
.woocommerce-cart .cart_totals td{
  padding:12px 14px;
  border-bottom:1px solid color-mix(in srgb, var(--text) 8%, var(--bg) 92%);
}

.woocommerce-cart .cart_totals tr:last-child th,
.woocommerce-cart .cart_totals tr:last-child td{
  border-bottom:0;
}

/* Proceed to checkout button */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  width:100%;
  padding:12px 18px;
  border-radius:999px;
  border:1px solid color-mix(in srgb, var(--accent) 45%, var(--bg) 55%);
  background:linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 26%, var(--bg) 74%),
    color-mix(in srgb, var(--accent) 14%, var(--bg) 86%)
  );
  color:var(--text);
  font-weight:800;
  box-shadow:0 8px 18px rgba(0,0,0,.10);
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover{
  transform:translateY(-1px);
  filter:saturate(1.05);
}

/* Responsive: stack table and totals */
@media (min-width: 1024px){
  .woocommerce-cart .woocommerce{
    grid-template-columns:1.35fr .65fr;
    align-items:start;
  }
  .woocommerce-cart .cart-collaterals{
    position:sticky;
    top:16px;
  }
}

@media (max-width: 720px){
  .woocommerce-cart .coupon{
    flex-direction:column;
  }
  .woocommerce-cart .coupon input.input-text{
    width:100%;
  }
}
