/* Cart Page Styles */

.cart-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 4rem 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  align-items: flex-start;
}

.cart-header {
  margin-bottom: 2rem;
}

.cart-header h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.cart-header p {
  color: var(--text-muted);
}

/* Cart Items List */
.cart-items {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  transition: var(--transition);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item:hover {
  background: var(--bg-light);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  background: #f9f9f9;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-details {
  flex: 1;
}

.cart-item-category {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.cart-item-title {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  display: block;
}

.cart-item-title:hover {
  color: var(--primary);
}

.cart-item-price {
  font-weight: 700;
  color: var(--primary);
}

/* Quantity Control */
.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-pill);
  background: var(--white);
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-dark);
  transition: var(--transition);
  font-size: 1.1rem;
}

.qty-btn:hover {
  background: var(--bg-light);
  color: var(--primary);
  border-radius: 50%;
}

.qty-input {
  width: 40px;
  text-align: center;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
}

/* Remove Button */
.remove-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: var(--white);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.remove-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}

/* Order Summary */
.cart-summary {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  border: 1px solid #f0f0f0;
  position: sticky;
  top: 100px;
}

.summary-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.summary-row.total {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid #f0f0f0;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1.2rem;
}

.summary-total-price {
  color: var(--primary);
}

.checkout-btn {
  width: 100%;
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.continue-shopping {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.continue-shopping:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Empty Cart State */
.empty-cart {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.empty-cart-icon {
  width: 120px;
  height: 120px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .cart-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .cart-summary {
    position: static;
  }
}

@media (max-width: 600px) {
  .cart-item {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .cart-item-image {
    width: 80px;
    height: 80px;
  }
  
  .cart-item-details {
    width: calc(100% - 100px); /* 80px img + 20px gap */
  }
  
  .quantity-control {
    margin-top: 1rem;
  }
  
  .remove-btn {
    margin-top: 1rem;
  }
}
