/**
 * WooCommerce Cart and Checkout Styles
 * Cart table, checkout forms, and related functionality
 */

/* Cart form styles */
.woocommerce-cart-form {
  margin-bottom: 2rem;
}

.shop_table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shop_table th,
.shop_table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.shop_table th {
  background: var(--gray-100);
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shop_table .product-thumbnail img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.shop_table .product-name a {
  color: var(--gray-900);
  text-decoration: none;
  font-weight: 500;
}

.shop_table .product-name a:hover {
  color: var(--primary-color);
}

.shop_table .product-price,
.shop_table .product-subtotal {
  font-weight: 600;
  color: var(--primary-color);
}

.shop_table .product-remove a {
  color: #dc3545;
  text-decoration: none;
  font-size: 1.2rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: transparent;
  border: 1px solid #dc3545;
}

.shop_table .product-remove a:hover {
  background: #dc3545;
  color: var(--white);
}

.shop_table .product-quantity input {
  width: 80px;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-align: center;
}

.shop_table .actions {
  background: var(--gray-50);
  padding: 1.5rem;
}

.shop_table .actions .coupon {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.shop_table .actions .coupon input {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  flex: 1;
  max-width: 200px;
}

.shop_table .actions .button {
  background: var(--primary-color);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.shop_table .actions .button:hover {
  background: var(--primary-hover);
}

/* Cart totals */
.cart-collaterals {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}

.cart_totals {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  min-width: 400px;
}

.cart_totals h2 {
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
}

.cart_totals table {
  width: 100%;
  border-collapse: collapse;
}

.cart_totals th,
.cart_totals td {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.cart_totals th {
  text-align: left;
  font-weight: 500;
}

.cart_totals td {
  text-align: right;
  font-weight: 600;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

/* Checkout button */
.wc-proceed-to-checkout {
  margin-top: 1.5rem;
}

.wc-proceed-to-checkout .checkout-button {
  background: var(--primary-color);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: block;
  text-align: center;
}

.wc-proceed-to-checkout .checkout-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Empty cart styles */
.return-to-shop {
  text-align: center;
  margin: 2rem 0;
}

.return-to-shop .button {
  background: var(--primary-color);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.return-to-shop .button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Cart responsive styles */
@media (max-width: 768px) {
  .shop_table {
    font-size: 0.9rem;
  }

  .shop_table th,
  .shop_table td {
    padding: 0.75rem 0.5rem;
  }

  .shop_table .product-thumbnail img {
    width: 60px;
    height: 60px;
  }

  .shop_table .actions {
    padding: 1rem;
  }

  .shop_table .actions .coupon {
    flex-direction: column;
    align-items: stretch;
  }

  .shop_table .actions .coupon input {
    max-width: none;
    margin-bottom: 0.5rem;
  }

  .cart-collaterals {
    justify-content: center;
  }

  .cart_totals {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .shop_table th,
  .shop_table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }

  .shop_table .product-thumbnail {
    display: none;
  }

  .shop_table .product-name {
    min-width: 150px;
  }

  .shop_table .product-quantity input {
    width: 60px;
  }
}

/* Mini cart styles */
.widget_shopping_cart .cart_list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget_shopping_cart .cart_list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.widget_shopping_cart .cart_list li:last-child {
  border-bottom: none;
}

.widget_shopping_cart .cart_list .remove {
  color: #dc3545;
  text-decoration: none;
  font-size: 1rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.widget_shopping_cart .cart_list .remove:hover {
  background: #dc3545;
  color: var(--white);
}

.widget_shopping_cart .total {
  padding: 1rem 0;
  border-top: 1px solid var(--gray-200);
  font-weight: bold;
  color: var(--primary-color);
}

.widget_shopping_cart .buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.widget_shopping_cart .buttons a {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.widget_shopping_cart .buttons .button.wc-forward {
  background: var(--primary-color);
  color: var(--white);
}

.widget_shopping_cart .buttons .button.checkout {
  background: var(--gray-800);
  color: var(--white);
}
