/* Sun Distributing – Cart Layout Styles */
/* Only loaded on the cart page */

/* === Sun Cart Layout – Match Checkout === */
.sun-cart-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.sun-cart-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

/* Left: Cart Table */
.cart-left {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 60%;
  min-width: 300px;
  background: #fff;
  padding: 2rem 2.5rem 2rem 2rem;
  border: 3px solid #90cdf4;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.04);
}

/* Right: Totals / Shipping */
.cart-right {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 35%;
  min-width: 280px;
  background: #fff;
  padding: .2rem;
  border: 3px solid #f6ad55;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.04);
}

/* Mobile */
@media (max-width: 1200px) {
  .sun-cart-grid {
    flex-direction: column;
  }

  .cart-left,
  .cart-right {
    width: 100%;
    padding: 1.25rem;
  }
}

/* Table Layout */
.woocommerce-cart table.shop_table {
  width: 100%;
  border-collapse: collapse;
}

.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  line-height: 1.3;
}

.woocommerce-cart td.product-quantity .quantity input {
  font-size: .75rem !important;
  width: 40px !important;
  padding: 0.3rem !important;
}

/* Header */
.woocommerce-cart h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

/* === Clean layout for cart shipping section with line break workaround === */
tr.woocommerce-shipping-totals.shipping {
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 1rem 0;
}

tr.woocommerce-shipping-totals.shipping td {
  padding: 0;
}

.woocommerce-shipping-methods {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.woocommerce-shipping-methods li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.woocommerce-shipping-methods label {
  display: block;
  font-weight: 600;
  margin-left: 1.5rem;
  line-height: 1.4;
}

.woocommerce-shipping-methods .woocommerce-Price-amount {
  float: right;
  font-weight: 600;
  font-size: 1rem;
  margin-right: 0.5rem;
}

.woocommerce-shipping-methods small {
  display: block;
  font-size: 0.75rem;
  color: #666;
  margin-left: 1.5rem;
  margin-top: 0.2rem;
  line-height: 1.2;
}

.woocommerce-shipping-methods input[type="radio"] {
  margin: 0 0.5rem 0 0;
  transform: translateY(1px);
}

/* === Fix forced 40% width on cart shipping container === */
.cart-right .cart_totals {
  width: 100% !important;
  max-width: 100% !important;
}

/* === Clean Compact Cart Layout === */
.cart-left {
  padding: 1.5rem 1.75rem;
  overflow: hidden;
}

.cart-left table.shop_table {
  table-layout: fixed;
  width: 100%;
  word-wrap: break-word;
  border-collapse: collapse;
}

.woocommerce-cart table.shop_table .cart_item {
  border-bottom: 1px solid #ddd;
}

.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td {
  padding: 0.5rem;
  vertical-align: top;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Product image */
.woocommerce-cart .product-thumbnail img {
  width: 60px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  display: block;
}


/* Product name + variation */
.woocommerce-cart td.product-name {
  font-weight: 500;
  max-width: 160px;
  word-break: break-word;
}

.woocommerce-cart .variation,
.woocommerce-cart .subscription-details {
  font-size: 0.7rem;
  color: #666;
  margin-top: 0.25rem;
  line-height: 1.2;
}

/* Radio price options */
.woocommerce-cart td.product-price label {
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
}

/* Quantity box */
.woocommerce-cart .quantity input {
  max-width: 45px;
  padding: 0.2rem;
  font-size: 0.75rem;
}

.woocommerce-cart td.product-quantity {
  text-align: right;
}

/* Clean horizontal layout for coupon input + buttons */
.woocommerce-cart .cart-left .actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0;
}

/* Space control for input field */
.woocommerce-cart .cart-left .coupon input.input-text {
  flex: 1 1 200px;
  max-width: 220px;
}

/* Prevent button wrapping */
.woocommerce-cart .cart-left .coupon button,
.woocommerce-cart .cart-left .actions .button {
  white-space: nowrap;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}


/* Constrain remove and image columns */
.woocommerce-cart table.shop_table td.product-remove {
  width: 32px;
  text-align: center;
}

.woocommerce-cart table.shop_table td.product-thumbnail {
  width: 70px; /* 60px image + buffer */
}

/* Prevent wrapping and shrink heading fonts in cart table */
.woocommerce-cart table.shop_table th {
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 0.5rem 0.5rem;
  text-align: left;
}

.woocommerce-cart .coupon label {
  display: none;
}

/* End of Cart styling */

