/* Cart Styles */
.cart-icon-container {
  position: relative;
  display: inline-block;
}

.cart-icon {
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Cart Modal Styles */
.cart-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}

.cart-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close-cart {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.cart-header {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.cart-items-container {
  margin-bottom: 20px;
}

.empty-cart-message {
  text-align: center;
  padding: 20px;
  color: #666;
}

.cart-item {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
  border-radius: 4px;
  overflow: hidden;
}

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

.cart-item-details {
  flex-grow: 1;
  padding-right: 15px;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.cart-item-price {
  color: #666;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.cart-item-total {
  font-weight: 600;
  color: #000;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.quantity-control {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  background-color: #f0f0f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.quantity-input {
  width: 40px;
  height: 30px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 0 5px;
}

.remove-item-btn {
  background-color: transparent;
  border: none;
  color: #ff4757;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 5px;
}

.cart-footer {
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.cart-total-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.cart-total {
  font-weight: 700;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.continue-shopping-btn, .clear-cart-btn, .checkout-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 10px;
}

.continue-shopping-btn {
  background-color: #f0f0f0;
  color: #333;
}

.clear-cart-btn {
  background-color: #ff4757;
  color: white;
}

.checkout-btn {
  background-color: #4479d9;
  color: white;
}

.checkout-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* Modal quantity control */
.modal-quantity-control {
  display: flex;
  align-items: center;
  margin: 15px 0;
}

.modal-quantity-label {
  margin-right: 10px;
  font-weight: 500;
}

/* Added to cart message */
.added-to-cart-message {
  display: none;
  margin-top: 15px;
  padding: 10px;
  background-color: #4cd137;
  color: white;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cart-item {
    flex-direction: column;
  }
  
  .cart-item-image {
    margin-bottom: 10px;
  }
  
  .cart-item-actions {
    flex-direction: row;
    margin-top: 10px;
  }
  
  .quantity-control {
    margin-bottom: 0;
    margin-right: 15px;
  }
  
  .cart-actions {
    flex-direction: column;
  }
  
  .continue-shopping-btn, .clear-cart-btn, .checkout-btn {
    width: 100%;
    margin-bottom: 10px;
  }
}
