/* Cart Styles */
.cart-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.cart-header {
  text-align: center;
  margin-bottom: 30px;
}

.cart-header h1 {
  color: #333;
  font-size: 2rem;
  margin-bottom: 10px;
}

.cart-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.cart-items {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-items-header {
  background: #f8f9fa;
  font-size: 14px;
  color: #666;
  font-weight: bold;
  padding: 15px 0 !important;
  border-bottom: 2px solid #eee !important;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr 120px;
  gap: 15px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
}

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

.cart-item.removing {
  opacity: 0.5;
  transform: translateX(-20px);
}

.item-image {
  width: 100px;
  height: 100px;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 8px;
}

.item-info h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

.item-info .item-color {
  color: #666;
  font-size: 14px;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: white;
}

.quantity-btn {
  background: #f8f9fa;
  border: none;
  width: 35px;
  height: 35px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover:not(:disabled) {
  background: #e9ecef;
}

.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quantity-input {
  border: none;
  width: 50px;
  text-align: center;
  height: 35px;
  font-size: 14px;
  font-weight: 600;
}

.quantity-input:focus {
  outline: none;
  background: #f8f9fa;
}

.item-price {
  text-align: right;
}

.unit-price {
  font-weight: bold;
  color: #ff6b35;
  font-size: 16px;
}

.item-total {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
}

.remove-btn {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 18px;
  width: 35px;
  height: 35px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background: #f8d7da;
  transform: scale(1.1);
}

.cart-summary {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: -moz-fit-content;
  height: fit-content;
}

.cart-summary h3 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.summary-row:last-child {
  border-bottom: none;
  font-weight: bold;
  font-size: 18px;
  color: #ff6b35;
  padding-top: 15px;
  margin-top: 10px;
  border-top: 2px solid #ff6b35;
}

.continue-shopping {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  margin-right: 15px;
  transition: all 0.2s;
}

.continue-shopping:hover {
  background: #5a6268;
  color: white;
  text-decoration: none;
}

.clear-cart-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  margin-left: 10px;
  transition: all 0.2s;
  cursor: pointer;
}

.clear-cart-btn:hover {
  background: #c82333;
}

.checkout-btn {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  margin-top: 20px;
  transition: all 0.2s;
}

.checkout-btn:hover {
  background: #e55a2b;
  transform: translateY(-1px);
}

.empty-cart {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.empty-cart i {
  font-size: 60px;
  color: #ddd;
  margin-bottom: 20px;
}

.empty-cart h3 {
  color: #333;
  margin-bottom: 15px;
}

/* Loading state */
.cart-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Success highlight */
.cart-item.updated {
  box-shadow: 0 0 0 2px #28a745;
  background: #f8fff8;
}

/* Animation keyframes */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cart-item-enter {
  animation: fadeIn 0.3s ease;
}

.cart-item-exit {
  animation: fadeOut 0.3s ease;
}

/* Responsive design */
@media (max-width: 992px) {
  .cart-content {
    grid-template-columns: 1fr;
  }
  .cart-summary {
    order: -1;
  }
}
@media (max-width: 768px) {
  .cart-container {
    padding: 10px;
  }
  .cart-item {
    grid-template-columns: 70px 1fr;
    gap: 10px;
  }
  .cart-items-header {
    display: none;
  }
  .item-controls {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
  }
  .quantity-control {
    justify-self: center;
  }
  .item-price {
    text-align: left;
  }
  .remove-btn {
    justify-self: end;
  }
}
@media (max-width: 576px) {
  .cart-header h1 {
    font-size: 1.5rem;
  }
  .cart-summary {
    padding: 15px;
  }
  .item-image {
    width: 60px;
    height: 60px;
  }
}
