/**
 * Custom Minimalist Cart Page Styling
 * Path: astra-child/assets/css/wc-custom-cart.css
 * 
 * All typography declarations omitted to inherit directly from Astra Theme settings.
 */

/* Container & Global Colors */
.custom-cart-container {
  margin: 40px auto;
  padding: 0 20px;
  color: #2d2b3a;
}

/* Breadcrumbs */
.custom-cart-breadcrumbs {
  margin-bottom: 24px;
  color: #606060;
}

.custom-cart-breadcrumbs a {
  color: #606060;
  text-decoration: none;
}

.custom-cart-breadcrumbs a:hover {
  color: #2d2b3a;
}

.custom-cart-breadcrumbs .sep {
  margin: 0 8px;
  color: #cccccc;
}

.custom-cart-breadcrumbs .current {
  color: #909090;
}

/* Cart Item Card */
.custom-cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.cart-item-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  border: 1px solid #f9f9f9;
  gap: 20px;
}

/* Left Stack: Title + Price */
.cart-item-info-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.cart-item-title a {
  color: #2d2b3a;
  text-decoration: none;
}

.cart-item-title a:hover {
  color: #e5456d;
}

.cart-item-price-inline .label {
  color: #606060;
  margin-right: 4px;
}

.cart-item-price-inline .amount {
  color: #2d2b3a;
}

/* Actions Group (Desktop View) */
.cart-item-actions-group {
  display: flex;
  align-items: center;
  gap: 28px;
}

.cart-item-subtotal-inline .label {
  color: #2d2b3a;
  margin-right: 4px;
}

.cart-item-subtotal-inline .amount {
  color: #2d2b3a;
}

.cart-stepper-remove-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

/* Vertical Quantity Stepper */
.custom-quantity-stepper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.custom-quantity-stepper .qty-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 8px;
  color: #606060;
  transition: color 0.15s ease;
}

.custom-quantity-stepper .qty-btn:hover {
  color: #2d2b3a;
}

.custom-quantity-stepper .quantity {
  display: inline-block;
  margin: 0 !important;
  padding: 0 !important;
}

.custom-quantity-stepper input.qty {
  width: 38px;
  height: 36px;
  text-align: center;
  border: 1px solid #cccccc;
  border-radius: 8px;
  color: #2d2b3a;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  -moz-appearance: textfield;
}

.custom-quantity-stepper input.qty::-webkit-outer-spin-button,
.custom-quantity-stepper input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove Button (Trash Icon) */
.cart-item-remove {
  margin-bottom: 2px;
}

.cart-item-remove .remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e5456d;
  text-decoration: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.cart-item-remove .remove-btn:hover {
  color: #e5456d;
  transform: scale(1.1);
}

/* Summary Card */
.custom-cart-summary-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #f9f9f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  margin-top: 20px;
}

.summary-total-group .summary-label {
  display: block;
  color: #606060;
  margin-bottom: 4px;
}

.summary-total-group .summary-amount {
  color: #2d2b3a;
}

/* Proceed to Checkout Button */
.custom-checkout-btn {
  background-color: #2d2b3a !important;
  color: #ffffff !important;
  padding: 14px 28px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  display: inline-block !important;
  border: none !important;
  text-align: center !important;
  transition: background-color 0.2s ease !important;
}

.custom-checkout-btn:hover {
  background-color: #2d2b3a !important;
}

/* Empty Cart View */
.cart-empty-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  border: 1px solid #f9f9f9;
}

.cart-empty-card p {
  color: #606060;
  margin-bottom: 20px;
}

/* ============================================================
   RESPONSIVE DESIGN (<= 768px & <= 480px)
   ============================================================ */

@media (max-width: 768px) {
  .custom-cart-container {
    padding: 0 16px;
    margin: 20px auto;
  }

  .cart-item-card {
    padding: 16px 20px;
  }

  .cart-item-subtotal-inline {
    display: none;
  }
}

@media (max-width: 480px) {
  .cart-item-card {
    padding: 16px;
  }

  .cart-item-info-stack {
    padding-right: 12px;
  }

  .custom-cart-summary-card {
    padding: 16px 20px;
  }

  /* Two-line text wrapping for checkout button on mobile */
  .custom-checkout-btn {
    padding: 10px 10px !important;
    max-width: 140px;
    white-space: normal !important;
    word-wrap: break-word;
  }
}

/* Product Image Thumbnail (Left Side) */
.cart-item-thumbnail {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  background: #f9f9f9;
}

.cart-item-thumbnail a,
.cart-item-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive adjustments for mobile screens */
@media (max-width: 480px) {
  .cart-item-thumbnail {
    width: 54px;
    height: 54px;
  }
}
